/* Cache-Control: public, max-age=86400 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0f172a;
  --surface:  #1e293b;
  --border:   #334155;
  --text:     #f8fafc;
  --muted:    #94a3b8;
  --accent:   #6366f1;
  --hit:      #22c55e;
  --miss:     #ef4444;
  --warn:     #f59e0b;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Layout ─────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}
nav a:hover { color: var(--text); }

main { max-width: 1100px; margin: 0 auto; padding: 2rem; }

/* ── Hero ────────────────────────────────────── */
.hero {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 3rem;
  position: relative;
}
.hero img { width: 100%; display: block; }
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.hero-overlay h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #a5b4fc, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-overlay p { color: var(--muted); font-size: 1.1rem; }

/* ── CDN Status Banner ───────────────────────── */
#cdn-banner {
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-family: monospace;
  border: 1px solid var(--border);
  background: var(--surface);
}
#cdn-banner .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Asset Grid ─────────────────────────────── */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.asset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  transition: border-color 0.2s;
}
.asset-card:hover { border-color: var(--accent); }
.asset-card img { width: 100%; border-radius: 6px; margin-bottom: 0.75rem; }
.asset-card h3 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.asset-card .meta { font-family: monospace; font-size: 0.75rem; color: var(--muted); }

/* ── Timing Table ────────────────────────────── */
.timing-section { margin-bottom: 3rem; }

#resource-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-family: monospace;
}
#resource-table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  background: var(--surface);
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
#resource-table td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
#resource-table tr:hover td { background: var(--surface); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-hit   { background: #15803d30; color: var(--hit);  border: 1px solid #15803d60; }
.badge-miss  { background: #b9142030; color: var(--miss); border: 1px solid #b9142060; }
.badge-skip  { background: #44403c30; color: var(--warn); border: 1px solid #44403c60; }

.bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bar-bg {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}


/* ── Footer ──────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}
