/* Paramount Cyber Insider — hybrid: cyberpunk atmosphere + professional panels.
 * Live data only. No mock content. Keeps board/period UI from app.js.
 */
:root {
  --bg: #04070c;
  --bg2: rgba(12, 18, 28, 0.88);
  --panel: rgba(12, 18, 28, 0.88);
  --ink: #f4f7fa;
  --txt: #d5dee7;
  --muted: #8a97a6;
  --line: rgba(140, 165, 190, 0.16);
  --line2: rgba(140, 165, 190, 0.28);
  --accent: #0f4c6a;
  --accent-soft: rgba(15, 76, 106, 0.22);
  --accent-bright: #3d8fb5;
  --ok: #3d8fb5;
  --err: #c45b6a;
  --font-d: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-b: "Outfit", system-ui, sans-serif;
  --radius: 10px;
  --nav-h: 64px;
  --max: 960px;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  color: var(--txt);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 90% 45% at 50% -10%, rgba(57, 255, 122, 0.06), transparent 62%),
    radial-gradient(ellipse 48% 32% at 92% 34%, rgba(58, 208, 255, 0.04), transparent 72%),
    #04070c;
}

/* Scanlines — atmosphere only */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 72% 58% at 50% 34%, transparent 42%, rgba(1, 3, 7, 0.55) 100%);
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(57, 255, 122, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 122, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.45;
  mask-image: radial-gradient(ellipse 92% 68% at 50% 6%, #000 18%, transparent 78%);
}

.atmo {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 55% at 50% -15%, rgba(15, 76, 106, 0.22), transparent 72%);
}

[hidden] { display: none !important; }
a { color: var(--accent-bright); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topnav {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  background: rgba(4, 7, 12, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
}
.topnav-inner {
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 0 24px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
.brand {
  font-family: var(--font-d); font-weight: 700; font-size: 22px;
  letter-spacing: -0.02em; text-decoration: none; color: var(--ink);
  text-transform: none;
}
.brand span { font-weight: 500; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none; font-size: 14px; font-weight: 500;
  color: var(--muted); padding: 8px 12px; border-radius: 8px;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--ink); background: rgba(255, 255, 255, 0.04);
}
.nav-meta { display: flex; align-items: center; gap: 10px; }
.who {
  font-size: 13px; color: var(--muted); max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.main {
  flex: 1; width: 100%; max-width: var(--max);
  margin: 0 auto; padding: 36px 24px 72px;
}

.page-head { margin-bottom: 28px; }
.page-head .kicker {
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent-bright); margin-bottom: 8px;
}
.page-head h1 {
  font-family: var(--font-d); font-size: clamp(32px, 5vw, 44px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 8px; color: var(--ink); text-transform: none;
}
.page-head p { color: var(--muted); max-width: 36rem; font-size: 16px; }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 18px;
  margin-bottom: 16px; box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.panel h2 {
  font-family: var(--font-d); font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 4px; color: var(--ink);
  text-transform: none;
}
.panel .sub { font-size: 14px; color: var(--muted); margin-bottom: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-b); font-size: 14px; font-weight: 600;
  border-radius: 8px; padding: 10px 16px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; background: transparent; color: var(--ink);
  min-height: 44px;
}
.btn-go, .btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-go:hover, .btn-primary:hover { filter: brightness(1.08); color: #fff; }
.btn-line { border-color: var(--line2); background: rgba(255, 255, 255, 0.03); color: var(--txt); }
.btn-line:hover { border-color: var(--accent); color: var(--accent-bright); }
.btn-ghost { color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: 8px 12px; font-size: 13px; min-height: 40px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

.period-bar {
  display: flex; flex-wrap: nowrap; gap: 6px; margin-bottom: 18px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; padding-bottom: 4px;
}
.period-bar button {
  font-family: var(--font-b); font-size: 13px; font-weight: 500;
  padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); color: var(--muted); cursor: pointer;
  white-space: nowrap; flex-shrink: 0; min-height: 44px;
}
.period-bar button[aria-pressed="true"],
.period-bar button:hover {
  background: var(--accent-soft); color: var(--accent-bright); border-color: transparent;
}

.board { display: flex; flex-direction: column; gap: 8px; }
.board-row {
  display: grid;
  grid-template-columns: 40px 48px 1fr auto;
  gap: 14px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 18, 28, 0.72);
  backdrop-filter: blur(6px);
}
.board-row.is-self {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
}
.rank {
  font-family: var(--font-d); font-size: 18px; font-weight: 600;
  color: var(--muted); text-align: center;
}
.board-row:nth-child(-n+3) .rank { color: var(--accent-bright); }
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; background: var(--accent-soft);
  border: 1px solid var(--line); display: block;
}
.avatar-fallback {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-bright);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; border: 1px solid var(--line);
}
.rep-name {
  font-size: 16px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.you-pill {
  font-size: 11px; font-weight: 600; color: var(--accent-bright);
  background: rgba(4, 7, 12, 0.5); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 999px; padding: 2px 8px;
}
.rep-streams {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.rep-total {
  font-family: var(--font-d); font-size: 20px; font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  color: var(--ink); white-space: nowrap;
}

.empty {
  text-align: center; padding: 40px 20px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: rgba(12, 18, 28, 0.5);
}
.empty h3 {
  font-family: var(--font-d); color: var(--ink); font-size: 20px;
  font-weight: 600; margin-bottom: 6px; text-transform: none;
}

.signin {
  max-width: 400px; margin: 72px auto 0; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 36px 28px; box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.signin h1 {
  font-family: var(--font-d); font-size: 32px; font-weight: 600;
  letter-spacing: -0.03em; margin-bottom: 10px; color: var(--ink);
  text-transform: none;
}
.signin p { color: var(--muted); margin-bottom: 24px; font-size: 15px; }
.signin .btn-row { justify-content: center; }
.signin .btn { min-width: 120px; }

.msg { font-size: 14px; margin-top: 10px; min-height: 18px; color: var(--muted); text-align: center; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.dim { color: var(--muted); }
.footer-note {
  text-align: center; padding: 20px 16px 36px;
  font-size: 12px; color: var(--muted);
}

@media (max-width: 720px) {
  .topnav { height: auto; }
  .topnav-inner { flex-wrap: wrap; padding: 10px 16px; }
  .nav-links { order: 3; width: 100%; gap: 4px; }
  .nav-links a { min-height: 44px; padding: 10px 12px; }
  .who { display: none; }
  .main { padding: 24px 14px 64px; }
  .board-row {
    grid-template-columns: 28px 44px 1fr;
    gap: 10px;
  }
  .rep-total {
    grid-column: 2 / -1;
    font-size: 18px;
    padding-left: 54px;
  }
  .period-bar { gap: 6px; margin-left: -14px; margin-right: -14px; padding: 0 14px 4px; }
  .period-bar button { padding: 10px 14px; min-height: 44px; }
  .signin { margin: 36px 14px 0; }
  .btn { min-height: 44px; }
}
