/* ── AI Sports Metrics — Core Styles ── */
:root {
  --bg-primary: #0f1118;
  --bg-secondary: #1a1d2e;
  --bg-card: #222640;
  --bg-card-hover: #2a2f4a;
  --bg-accent: #2d3250;
  --text-primary: #e8eaf0;
  --text-secondary: #9ba3b5;
  --text-muted: #6b7280;
  --green: #22c55e;
  --green-dim: #166534;
  --red: #ef4444;
  --red-dim: #7f1d1d;
  --blue: #3b82f6;
  --blue-dim: #1e3a5f;
  --yellow: #eab308;
  --orange: #f97316;
  --purple: #a855f7;
  --border: #2e3348;
  --border-light: #3d4260;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: #60a5fa; }

/* ── Navigation ── */
.navbar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  /* overflow: hidden removed — iOS Safari breaks position:sticky when any
     overflow value other than visible is set on the sticky element itself. */
}
.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 2rem;
}
.navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.navbar-brand span { color: var(--blue); }
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar {
  display: none;
}
.nav-links a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-accent);
}

/* ── Resources dropdown ── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; user-select: none; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0;
  min-width: 168px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  list-style: none;
  margin: 0;
}
.nav-dropdown-menu li { width: 100%; }
.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0;
  background: none;
  transition: background 0.12s, color 0.12s;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: var(--bg-accent);
  color: var(--text-primary);
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }

/* Mobile: dropdown renders inline */
@media (max-width: 768px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 0 1rem;
    background: none;
    display: none;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a { padding: 0.55rem 0.75rem; font-size: 0.9rem; }
}

.nav-sport-tabs {
  display: flex;
  gap: 0.25rem;
}

/* ── Nav User Area ── */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
  white-space: nowrap;
}
.nav-user-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user-plan {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.plan-free  { background: var(--bg-accent); color: var(--text-secondary); }
.plan-pro   { background: var(--blue-dim);  color: var(--blue); }
.plan-elite { background: #3b1f6b;          color: var(--purple); }
.nav-pricing-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.5rem;
}
.nav-pricing-link:hover { color: var(--text-primary); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-full { display: block; width: 100%; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #2563eb; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.btn-outline:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: #9333ea; color: #fff; }
.sport-tab {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.sport-tab:hover { border-color: var(--border-light); color: var(--text-primary); }
.sport-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.sport-tab.disabled { opacity: 0.4; cursor: default; }

/* ── Layout ── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}
.page-header {
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}
.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--border-light); }
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.card-header h2 {
  font-size: 1rem;
  font-weight: 600;
}
.card-header .badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

/* ── Game Card ── */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  transition: all 0.15s;
  cursor: pointer;
}
.game-card:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.game-card .game-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.game-card .game-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.game-status.final { background: var(--bg-accent); color: var(--text-secondary); }
.game-status.live { background: var(--red-dim); color: var(--red); }
.game-status.scheduled { background: var(--blue-dim); color: var(--blue); }

.game-teams {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.team-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.team-name.winner { color: var(--text-primary); }
.team-name.loser { color: var(--text-muted); }
.team-score {
  font-weight: 700;
  font-size: 1.1rem;
  font-family: var(--font-mono);
}

.game-odds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.odds-cell {
  text-align: center;
}
.odds-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.odds-value {
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.game-prediction {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.win-prob-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.win-prob-bar .away { background: var(--red); }
.win-prob-bar .home { background: var(--blue); }
.win-prob-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
}
.win-prob-labels .away-prob { color: var(--red); }
.win-prob-labels .home-prob { color: var(--blue); }

.edge-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.edge-badge.positive { background: var(--green-dim); color: var(--green); }
.edge-badge.negative { background: var(--red-dim); color: var(--red); }

/* ── Stat Tables ── */
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.stat-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.stat-table th.num { text-align: right; }
.stat-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.stat-table td.num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.stat-table tr:hover { background: var(--bg-card-hover); }
.stat-table .player-link {
  font-weight: 600;
  color: var(--text-primary);
}
.stat-table .player-link:hover { color: var(--blue); }

/* ── Best Bets: Sport Tabs ── */
.best-bets-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.bb-tab-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
}
.bb-tab-chip:hover { border-color: var(--border-light); color: var(--text-primary); }
.bb-tab-chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.bb-tab-count {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
}
.bb-tab-chip:not(.active) .bb-tab-count {
  background: var(--bg-secondary, #1e1e1e);
  color: var(--text-muted, #888);
}

/* ── Best Bets: Sport Badges ── */
.sport-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  white-space: nowrap;
  flex-shrink: 0;
}
.sport-badge-mlb { background: #1a3a5c; color: #5bc0de; }
.sport-badge-nba { background: #1a2c1a; color: #5eca6e; }
.sport-badge-nhl { background: #1c1c3a; color: #7b8cde; }
.sport-badge-nfl { background: #2c1a1a; color: #de7b5b; }
.sport-badge-mls { background: #1a2c2c; color: #5ececa; }

/* ── Best Bets / Parlays ── */
.bet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.bet-signal {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  white-space: nowrap;
}
.bet-signal.value { background: var(--green-dim); color: var(--green); }
.bet-signal.over { background: var(--blue-dim); color: var(--blue); }
.bet-signal.under { background: var(--purple); color: #fff; opacity: 0.8; }
.bet-info { flex: 1; }
.bet-info .matchup { font-weight: 600; font-size: 0.9rem; }
.bet-info .details { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }
.bet-edge {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--green);
}
.kelly-badge {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius);
  background: var(--blue-dim);
  color: var(--blue);
  white-space: nowrap;
  cursor: default;
}
.kelly-badge.kelly-na {
  background: var(--bg-secondary, #1e1e1e);
  color: var(--text-muted, #666);
  font-weight: 500;
}

.parlay-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-accent));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.parlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.parlay-header h3 { font-size: 0.9rem; font-weight: 700; }
.parlay-odds {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--green);
  font-size: 1.1rem;
}
.parlay-legs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.parlay-leg {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.parlay-leg:last-child { border-bottom: none; }
.parlay-leg .leg-pick { font-weight: 600; }
.parlay-leg .leg-odds {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}
.parlay-card-full {
  display: flex;
  flex-direction: column;
}
.confidence-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.confidence-badge.high   { background: var(--green-dim);  color: var(--green); }
.confidence-badge.medium { background: var(--blue-dim);   color: var(--blue); }
.confidence-badge.low    { background: var(--bg-accent);  color: var(--text-muted); }

/* ── DFS Optimizer ── */
.dfs-player-row {
  display: grid;
  grid-template-columns: 2fr 0.5fr 1fr 1fr 1fr 0.75fr;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.dfs-player-row:hover { background: var(--bg-card-hover); }
.dfs-player-row .value-score {
  font-weight: 700;
  font-family: var(--font-mono);
}
.dfs-player-row .value-score.high { color: var(--green); }
.dfs-player-row .value-score.mid { color: var(--yellow); }

/* ── Tabs ── */
.tab-bar {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}
.tab-btn {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Model Stats ── */
.metric-card {
  text-align: center;
  padding: 1.25rem;
}
.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.metric-value.good { color: var(--green); }
.metric-value.ok { color: var(--yellow); }
.metric-value.bad { color: var(--red); }
.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* ── Sections ── */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title .count {
  font-size: 0.75rem;
  background: var(--bg-accent);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  color: var(--text-secondary);
}

/* ── Sport Coming Soon ── */
.coming-soon {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.coming-soon h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

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

/* ── Loading ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
}
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.75rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Auth Forms ── */
.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1rem;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.auth-header p { color: var(--text-secondary); font-size: 0.9rem; }
.auth-header .brand-accent { color: var(--blue); font-weight: 700; }
.auth-errors {
  background: var(--red-dim);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #fca5a5;
}
.auth-errors p { margin: 0; }
.auth-errors p + p { margin-top: 0.35rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-group input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.15s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--blue);
}
.form-group input::placeholder { color: var(--text-muted); }
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ── Pricing Page ── */
.pricing-wrap { max-width: 1100px; margin: 0 auto; padding: 3rem 1rem 4rem; }
.pricing-header { text-align: center; margin-bottom: 3rem; }
.pricing-header h1 { font-size: 2rem; margin-bottom: 0.6rem; }
.pricing-header p { color: var(--text-secondary); font-size: 1rem; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.pricing-card.featured {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), var(--shadow);
}
.pricing-card.current-plan { border-color: var(--green); }
.plan-popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.plan-badge {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.plan-price { display: flex; align-items: baseline; gap: 0.25rem; }
.price-amount { font-size: 2.25rem; font-weight: 700; }
.price-period { font-size: 0.875rem; color: var(--text-muted); }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; flex: 1; }
.plan-features li {
  font-size: 0.875rem;
  padding-left: 1.4rem;
  position: relative;
  color: var(--text-secondary);
}
.plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feat-yes { color: var(--text-primary); }
.feat-yes::before { content: '✓'; color: var(--green); font-weight: 700; font-size: 0.8rem; top: 0; transform: none; border-radius: 0; width: auto; }
.feat-no { opacity: 0.45; }
.feat-no::before { content: '✕'; color: var(--text-muted); font-size: 0.75rem; top: 0; transform: none; border-radius: 0; width: auto; }
.plan-current-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  padding: 0.55rem;
  border: 1px solid var(--green);
  border-radius: var(--radius);
}
.pricing-footer {
  text-align: center;
  margin-top: 2.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ── Alerts ── */
.alert {
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.alert-success { background: var(--green-dim); border: 1px solid var(--green); color: #86efac; }
.alert-warning { background: #422006; border: 1px solid var(--orange); color: #fdba74; }
.alert-error   { background: var(--red-dim); border: 1px solid var(--red); color: #fca5a5; }

/* ── Responsive Helpers ── */
.hide-mobile { }
@media (max-width: 768px) {
  .hide-mobile { display: none; }
  .container { padding: 1rem; }
  .navbar-inner { gap: 1rem; }
  .nav-user-email { display: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 1.75rem 1.25rem; }
}

/* ══════════════════════════════════════════════════════════════════
   MOBILE / PWA STYLES
   ══════════════════════════════════════════════════════════════════ */

/* ── Hamburger Button ─────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 10px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.25s ease;
  transform-origin: center;
}
/* Animate to X when open — JS toggles .active on the button element */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Nav Drawer ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .navbar-inner { flex-wrap: wrap; height: auto; padding: 0.5rem 0; }
  .navbar-brand { flex: 1; }

  /* Hide sport tabs + user area in mobile header — moved into drawer */
  .nav-sport-tabs { display: none; }
  .nav-user { display: none; }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    overflow-x: visible;
    border-top: 1px solid var(--border);
    padding: 0.5rem 0;
    order: 3;
  }
  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }
  .nav-links a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 0;
    min-height: 44px;
  }
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--bg-accent);
    border-radius: var(--radius);
  }
}

/* ── Touch-friendly tap targets ──────────────────────────────────── */
@media (max-width: 768px) {
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn-sm { min-height: 36px; }
  .sport-tab { min-height: 36px; }
  .tab-btn { min-height: 44px; }
  .stat-table td, .stat-table th { padding: 0.75rem 0.5rem; }

  /* Prediction / game cards stack full-width */
  .game-card { margin-bottom: 0.75rem; }
}

/* ── Responsive Stats Tables → Card layout ───────────────────────── */
@media (max-width: 600px) {
  .table-responsive-cards thead { display: none; }
  .table-responsive-cards tbody tr {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    padding: 0.75rem;
  }
  .table-responsive-cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border: none;
    font-size: 0.85rem;
    text-align: left;
  }
  .table-responsive-cards td.num { text-align: left; }
  .table-responsive-cards td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 0.5rem;
  }
}

/* ── Mobile Bottom Navigation ────────────────────────────────────── */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  /* Push page content up so it isn't hidden behind bottom nav */
  body { padding-bottom: 64px; }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    z-index: 200;
    justify-content: space-around;
    align-items: stretch;
    /* Safe area inset for notched phones */
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.4rem 0.25rem;
    transition: color 0.15s;
    min-height: 44px;
  }
  .mobile-nav-item svg { flex-shrink: 0; }
  .mobile-nav-item:hover,
  .mobile-nav-item.active {
    color: var(--blue);
  }
}

/* ── H2H Matchup Page Styles ─────────────────────────────────────── */
.h2h-picker-form { }
.h2h-picker-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.h2h-picker-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 140px;
}
.h2h-picker-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.h2h-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.875rem;
  cursor: pointer;
  min-height: 44px;
}
.h2h-select:focus { outline: none; border-color: var(--blue); }
.h2h-vs-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 0.65rem;
  flex-shrink: 0;
}
.h2h-submit-btn { flex-shrink: 0; align-self: flex-end; }

.h2h-edge-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.edge-strong  { background: rgba(34,197,94,0.08);  border-color: var(--green); }
.edge-moderate{ background: rgba(59,130,246,0.08); border-color: var(--blue); }
.edge-even    { background: var(--bg-card);         border-color: var(--border-light); }

.h2h-edge-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.h2h-edge-team  { font-weight: 700; font-size: 1rem; }
.h2h-edge-pct   { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-secondary); }
.h2h-edge-strength {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.strength-strong   { background: var(--green-dim);  color: var(--green); }
.strength-moderate { background: var(--blue-dim);   color: var(--blue); }
.strength-even     { background: var(--bg-accent);  color: var(--text-muted); }

.h2h-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.h2h-stat-row:last-child { border-bottom: none; }
.h2h-stat-label { color: var(--text-secondary); }
.h2h-stat-value { font-weight: 600; font-family: var(--font-mono); }

.h2h-form-pills { display: flex; gap: 0.3rem; }
.form-pill {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  line-height: 24px;
  cursor: default;
}
.form-w { background: var(--green-dim); color: var(--green); }
.form-l { background: var(--red-dim);   color: var(--red); }

@media (max-width: 600px) {
  .h2h-picker-row { flex-direction: column; }
  .h2h-vs-badge { display: none; }
  .h2h-picker-field { min-width: 100%; }
  .h2h-submit-btn { width: 100%; }
}
