:root {
  --bg: #0a0e17;
  --bg-card: #111827;
  --bg-card-hover: #1a2235;
  --bg-alt: #0d1220;
  --border: #1e293b;
  --border-hover: #334155;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;
  --green: #22c55e;
  --green-bg: rgba(34,197,94,0.12);
  --red: #ef4444;
  --red-bg: rgba(239,68,68,0.12);
  --yellow: #eab308;
  --yellow-bg: rgba(234,179,8,0.12);
  --blue: #3b82f6;
  --blue-bg: rgba(59,130,246,0.12);
  --purple: #a855f7;
  --accent: #f97316;
  --accent-glow: rgba(249,115,22,0.25);
  --cyan: #06b6d4;
  --mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Nav ─────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,23,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.nav-brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text); }
.brand-icon { color: var(--accent); font-size: 1.2rem; }
.brand-text { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-accent { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.user-email { color: var(--text-dim); font-size: 0.8rem; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  padding: 0.55rem 1.25rem; border-radius: 8px; font-weight: 600; cursor: pointer;
  border: none; font-size: 0.85rem; transition: all 0.2s; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #ea6c0a; transform: translateY(-1px); }
.btn-glow {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(249,115,22,0.1);
}
.btn-glow:hover { transform: translateY(-1px); box-shadow: 0 0 30px var(--accent-glow), 0 0 80px rgba(249,115,22,0.15); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-dim); color: var(--text); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.78rem; }
.btn-full { width: 100%; }
.btn-bet {
  background: var(--green); color: #000; padding: 0.3rem 0.75rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 700; text-decoration: none; display: inline-block;
  transition: all 0.15s; letter-spacing: 0.02em; text-transform: uppercase;
}
.btn-bet:hover { background: #16a34a; transform: translateY(-1px); }
.btn-google { background: #fff; color: #333; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 1px solid #ddd; }
.btn-google:hover { background: #f5f5f5; }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, var(--bg) 0%, #0f1729 50%, var(--bg) 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-content { position: relative; text-align: center; max-width: 680px; margin: 0 auto; }
.hero-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em;
  color: var(--green); background: var(--green-bg); padding: 0.4rem 1rem;
  border-radius: 50px; border: 1px solid rgba(34,197,94,0.2); margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 3.2rem; font-weight: 900; line-height: 1.1; letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 1.25rem;
}
.hero-sub { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.7; max-width: 540px; margin: 0 auto 2rem; }
.hero-stats { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-num { display: block; font-family: var(--mono); font-size: 2rem; font-weight: 700; color: var(--accent); }
.hero-stat-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.hero-stat-divider { width: 1px; background: var(--border); align-self: stretch; }

/* ── Performance Strip ────────────────────────────────────────── */
.perf-strip { background: var(--bg-card); border-bottom: 1px solid var(--border); }
.perf-inner { display: flex; justify-content: center; gap: 3rem; padding: 1rem 0; flex-wrap: wrap; }
.perf-stat { text-align: center; }
.perf-label { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 0.15rem; }
.perf-number { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; }
.perf-number.positive { color: var(--green); }
.perf-number.negative { color: var(--red); }

/* ── Sections ─────────────────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }
.section-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.section-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.section-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; max-width: 600px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }

.tag { font-size: 0.65rem; padding: 0.25rem 0.6rem; border-radius: 50px; font-weight: 700; letter-spacing: 0.04em; vertical-align: middle; margin-left: 0.5rem; }
.tag-green { background: var(--green-bg); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.tag-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }

.filter-select {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem; font-family: inherit;
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem;
}

/* ── Pick Cards ───────────────────────────────────────────────── */
.picks-grid { display: flex; flex-direction: column; gap: 0.5rem; }

.pick-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.pick-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.pick-card.win { border-left: 3px solid var(--green); }
.pick-card.loss { border-left: 3px solid var(--red); }
.pick-card.push { border-left: 3px solid var(--yellow); }

.pick-main { flex: 1; min-width: 200px; }
.pick-sport { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.pick-name { font-size: 1.05rem; font-weight: 700; margin-top: 0.1rem; }
.pick-game { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.15rem; }
.game-started { color: var(--yellow); font-weight: 600; }
.pick-reasoning { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.3rem; }
.pick-correlation { font-size: 0.72rem; color: var(--yellow); margin-top: 0.3rem; }
.pick-correlation::before { content: '⚠️ '; }

.pick-meta { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.pick-odds {
  font-family: var(--mono); font-weight: 600; font-size: 0.95rem;
  padding: 0.3rem 0.6rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px;
}
.pick-ev { font-family: var(--mono); font-size: 0.8rem; color: var(--green); font-weight: 600; }
.pick-confidence { font-size: 0.85rem; }
.pick-result {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  padding: 0.2rem 0.5rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em;
}
.pick-result.win { background: var(--green-bg); color: var(--green); }
.pick-result.loss { background: var(--red-bg); color: var(--red); }
.pick-result.push { background: var(--yellow-bg); color: var(--yellow); }
.pick-result.pending { background: var(--blue-bg); color: var(--blue); }
.pick-profit { font-family: var(--mono); font-size: 0.8rem; font-weight: 600; }
.pick-profit.positive { color: var(--green); }
.pick-profit.negative { color: var(--red); }

/* ── Arb Cards ────────────────────────────────────────────────── */
.arb-card {
  background: var(--bg-card); border: 1px solid rgba(34,197,94,0.3);
  border-radius: 12px; padding: 1.25rem; position: relative; overflow: visible;
}
.arb-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}
.arb-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.arb-profit { font-family: var(--mono); font-size: 1.5rem; font-weight: 800; color: var(--green); }
.arb-game { font-size: 0.8rem; color: var(--text-dim); }
.arb-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.75rem; align-items: center; }
.arb-side { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; }
.arb-side-pick { font-weight: 700; font-size: 0.9rem; }
.arb-side-detail { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.2rem; }
.arb-side-stake { font-family: var(--mono); font-size: 0.8rem; font-weight: 600; color: var(--blue); margin-top: 0.3rem; }

/* ── Tooltips ─────────────────────────────────────────────────── */
.has-tooltip { position: relative; cursor: help; }
.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%);
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.5rem 0.75rem; font-size: 0.72rem; line-height: 1.4;
  white-space: normal; width: max-content; max-width: 220px; text-align: center;
  pointer-events: none; opacity: 0; transition: opacity 0.15s;
  z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.has-tooltip:hover::after, .has-tooltip:focus::after { opacity: 1; }
.arb-vs { font-weight: 800; color: var(--text-dim); font-size: 0.75rem; letter-spacing: 0.05em; }
.arb-reasoning { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.75rem; }

/* ── Charts ───────────────────────────────────────────────────── */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.chart-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
}
.chart-card h3 { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.75rem; }
.chart-wide { grid-column: 1 / -1; }
.chart-note { text-align: center; color: var(--text-dim); font-size: 0.75rem; margin-top: 1rem; }

.stats-table { margin-top: 0.75rem; font-size: 0.78rem; }
.stats-table table { width: 100%; border-collapse: collapse; }
.stats-table th { text-align: left; color: var(--text-dim); font-weight: 500; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.stats-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); }
.stats-table .positive { color: var(--green); }
.stats-table .negative { color: var(--red); }

/* ── How It Works ─────────────────────────────────────────────── */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.how-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.5rem; transition: border-color 0.2s;
}
.how-card:hover { border-color: var(--border-hover); }
.how-num { font-family: var(--mono); font-size: 0.7rem; color: var(--accent); font-weight: 700; margin-bottom: 0.75rem; }
.how-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.how-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Guide ────────────────────────────────────────────────────── */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.guide-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
}
.guide-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.guide-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.guide-card p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Modal ────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-content {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 2rem; width: 90%; max-width: 400px; position: relative;
}
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-dim); font-size: 1.5rem; cursor: pointer; }
.modal-brand { font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem; }
.modal-content h2 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.auth-subtitle { color: var(--text-dim); margin-bottom: 1.25rem; font-size: 0.85rem; }
.auth-divider { text-align: center; margin: 1rem 0; color: var(--text-dim); font-size: 0.75rem; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-toggle { text-align: center; margin-top: 1rem; color: var(--text-dim); font-size: 0.8rem; }
.auth-toggle a { color: var(--blue); text-decoration: none; }
.auth-error { background: var(--red-bg); color: var(--red); padding: 0.75rem; border-radius: 8px; margin-top: 1rem; font-size: 0.8rem; }

#auth-form input {
  width: 100%; padding: 0.75rem; margin-bottom: 0.6rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 0.9rem; font-family: inherit;
}
#auth-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* ── Footer ───────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 3rem 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem; }
.footer-brand { font-weight: 800; font-size: 1.1rem; }
.footer-tagline { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.35rem; font-weight: 400; }
.footer-legal { text-align: right; }
.footer-legal p { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.25rem; }
.footer-copy { margin-top: 0.5rem; }

/* ── Utilities ────────────────────────────────────────────────── */
.loading { text-align: center; color: var(--text-dim); padding: 3rem; display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.spinner {
  width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--text-dim); padding: 3rem; font-size: 0.95rem; }
.history-table-wrap { overflow-x: auto; }

/* ── Legal Pages ──────────────────────────────────────────────── */
.legal-page { padding-top: 2rem; }
.legal-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.25rem; }
.legal-updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 2rem; }
.legal-page h2 { font-size: 1.15rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.5rem; color: var(--text); }
.legal-page h3 { font-size: 1rem; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.4rem; color: var(--text); }
.legal-page p, .legal-page li { color: var(--muted); line-height: 1.7; font-size: 0.95rem; }
.legal-page ul { padding-left: 1.5rem; margin: 0.5rem 0; }
.legal-page a { color: var(--accent); text-decoration: underline; }

.footer-links { margin-bottom: 0.5rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-sub { font-size: 0.95rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat-num { font-size: 1.5rem; }
  .hero-stat-divider { display: none; }
  .section { padding: 2.5rem 0; }
  .section-title { font-size: 1.35rem; }
  .pick-card { flex-direction: column; align-items: flex-start; }
  .pick-meta { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .arb-sides { grid-template-columns: 1fr; }
  .arb-vs { text-align: center; }
  .perf-inner { gap: 1.5rem; }
  .footer-inner { flex-direction: column; }
  .footer-legal { text-align: left; }
}

/* ── Line Movement ── */
.pick-movement {
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}
.pick-movement .movement-note {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 0.15rem;
}
.movement-good {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-left: 3px solid #10b981;
}
.movement-bad {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-left: 3px solid #f59e0b;
}
.movement-dead {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-left: 3px solid #ef4444;
}
.pick-card.value-gone {
  opacity: 0.6;
}
.pick-captured {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-left: 0.5rem;
}
.btn-disabled {
  opacity: 0.4;
  pointer-events: none;
}
