@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2235;
  --bg-card-hover: #1f2a40;
  --accent-green: #00e676;
  --accent-green-dim: #00c853;
  --accent-red: #ff5252;
  --accent-gold: #ffd740;
  --accent-blue: #448aff;
  --accent-orange: #ff9100;
  --accent-purple: #b388ff;
  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-muted: #5f6368;
  --border: #2a3444;
  --glow-green: rgba(0, 230, 118, 0.15);
  --glow-gold: rgba(255, 215, 64, 0.12);
  --glow-purple: rgba(179, 136, 255, 0.12);
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-modal: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-cta-hover: 0 4px 20px var(--glow-green);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
h1 { font-size: 64px; font-weight: 900; letter-spacing: -1px; }
h2 { font-size: 36px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
p { color: var(--text-secondary); margin-bottom: 16px; }

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent-green); }

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent-green); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.nav-cta:hover {
  box-shadow: 0 4px 20px var(--glow-gold);
  transform: translateY(-1px);
  color: var(--bg-primary);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-green);
  color: var(--bg-primary);
  font-size: 16px;
  font-weight: 700;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--accent-green-dim);
  box-shadow: var(--shadow-cta-hover);
  transform: translateY(-1px);
  color: var(--bg-primary);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--accent-blue);
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px;
  border: 1px solid var(--accent-blue);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-secondary:hover {
  background: rgba(68, 138, 255, 0.1);
  color: var(--text-primary);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-size: 16px;
  font-weight: 700;
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
}
.btn-gold:hover {
  box-shadow: 0 4px 20px var(--glow-gold);
  transform: translateY(-1px);
  color: var(--bg-primary);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

/* ── Pills / Badges ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
}
.badge-green { background: var(--glow-green); color: var(--accent-green); }
.badge-red { background: rgba(255, 82, 82, 0.15); color: var(--accent-red); }
.badge-gold { background: var(--glow-gold); color: var(--accent-gold); }
.badge-purple { background: var(--glow-purple); color: var(--accent-purple); }

/* ── Standings Row ── */
.standings-row {
  height: 72px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}
.standings-row:hover {
  background: var(--bg-card-hover);
  color: inherit;
}

.standings-row .rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
}
.standings-row.rank-1-pro {
  border-left: 4px solid var(--accent-gold);
  padding-left: 12px;
  box-shadow: inset 0 0 30px var(--glow-gold);
}
.standings-row.rank-1-pro .rank { color: var(--accent-gold); }

.standings-row.rank-1-retail {
  border-left: 4px solid var(--accent-purple);
  padding-left: 12px;
  box-shadow: inset 0 0 30px var(--glow-purple);
}
.standings-row.rank-1-retail .rank { color: var(--accent-purple); }

.standings-row .broker-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg-secondary);
}
.standings-row .broker-logo-fallback {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.standings-row .broker-name {
  font-weight: 600;
  font-size: 15px;
}
.standings-row .ai-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-green);
  text-align: center;
}

.standings-row .movement-up {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-green);
  text-align: center;
}
.standings-row .movement-down {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-red);
  text-align: center;
}
.standings-row .movement-flat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.standings-row .streak {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.standings-row .stat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}
.standings-row .stat-leader {
  color: var(--accent-green);
  font-weight: 700;
}
.standings-row .stat-low {
  color: var(--text-muted);
}

/* ── Ticker Bar ── */
.ticker-bar {
  height: 32px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
}
.ticker-track {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Footer ── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 24px 32px;
  margin-top: 96px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--text-primary); }

.footer-disclosure {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}
.footer-timestamp {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Monospace Numeric Helper ── */
.num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

/* ── Skeleton Loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .nav-links { display: none; }

  .nav-cta {
    font-size: 11px;
    padding: 6px 10px;
    max-width: 140px;
    text-align: center;
    line-height: 1.2;
  }

  .conference-card {
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
  }
  .standings-header,
  .standings-row {
    min-width: 700px;
    grid-template-columns: 36px 36px 100px 56px 44px 44px 44px 44px 44px 44px 50px 36px;
  }
  .standings-row {
    height: auto;
    padding: 10px 12px;
    gap: 4px;
  }
  .standings-header {
    padding: 8px 12px;
  }
  .standings-row .stat { font-size: 11px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  h1 { font-size: 28px; }
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
}
