/* MPA Sports Edge — Global Styles */
:root {
  --bg:       #1C1C1C;
  --surface:  #252525;
  --surface2: #2E2E2E;
  --blue:     #0B5394;
  --blue-light:#1a6bb5;
  --gold:     #D4AF37;
  --gold-dim: #a88c2a;
  --text:     #FFFFFF;
  --text-dim: #CFE2F3;
  --text-muted:#888;
  --danger:   #e05555;
  --success:  #4caf7d;
  --border:   rgba(255,255,255,0.08);
  --radius:   8px;
  --font:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --mono:     'Courier New', Courier, monospace;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

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

/* ── Layout ── */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.screen { display: none; flex-direction: column; flex: 1; padding-bottom: 80px; }
.screen.active { display: flex; }

/* ── Nav ── */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 4px 8px;
  color: var(--text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  border: none; background: none;
  transition: color 0.2s;
  gap: 4px;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--gold); }

/* ── Header ── */
.header {
  padding: 16px 20px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.header-logo { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.header-logo span { color: var(--gold); }
.header-badge {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 8px;
  border-radius: 20px; border: 1px solid;
}
.badge-free { color: var(--text-muted); border-color: var(--text-muted); }
.badge-analyst { color: var(--gold); border-color: var(--gold); }
.badge-sharp { color: #7eb8f7; border-color: #7eb8f7; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 16px 12px;
}
.card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px;
}

/* ── Game Card ── */
.game-card { position: relative; overflow: hidden; }
.game-teams { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.team-name { font-weight: 600; font-size: 0.95rem; flex: 1; }
.team-price {
  font-weight: 700; font-size: 1rem;
  font-family: var(--mono);
  min-width: 52px; text-align: right;
}
.price-fav { color: var(--text-dim); }
.price-dog { color: var(--gold); }
.prob-bar { height: 4px; background: var(--surface2); border-radius: 2px; margin-bottom: 12px; overflow: hidden; }
.prob-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--gold)); border-radius: 2px; transition: width 0.4s ease; }
.game-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.75rem; color: var(--text-muted);
}
.game-time { display: flex; align-items: center; gap: 4px; }
.vig-badge {
  font-size: 0.65rem; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.06);
}

/* ── Lock overlay ── */
.lock-overlay {
  position: absolute; inset: 0;
  background: rgba(28,28,28,0.85);
  backdrop-filter: blur(3px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
}
.lock-icon { font-size: 1.5rem; }
.lock-text { font-size: 0.8rem; color: var(--text-muted); text-align: center; }
.lock-cta {
  font-size: 0.75rem; font-weight: 600;
  color: var(--gold); border: 1px solid var(--gold);
  padding: 5px 14px; border-radius: 20px;
  cursor: pointer; background: none;
  transition: background 0.2s;
}
.lock-cta:hover { background: rgba(212,175,55,0.1); }

/* ── Efficiency badge ── */
.efficiency {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
}
.eff-sharp { background: rgba(76,175,125,0.15); color: var(--success); }
.eff-neutral { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.eff-soft { background: rgba(212,175,55,0.15); color: var(--gold); }

/* ── EV score ── */
.ev-score { font-family: var(--mono); font-weight: 700; }
.ev-pos { color: var(--success); }
.ev-neg { color: var(--danger); }
.ev-neutral { color: var(--text-muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 24px;
  border-radius: var(--radius); border: none;
  font-family: var(--font); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-light); }
.btn-gold { background: var(--gold); color: #1C1C1C; }
.btn-gold:hover { background: #e6c555; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--text-muted); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.form-input {
  width: 100%; padding: 12px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font); font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--blue); }
.form-input::placeholder { color: var(--text-muted); }

/* ── Auth screen ── */
.auth-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; padding: 32px 24px;
}
.auth-logo { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.auth-logo span { color: var(--gold); }
.auth-tagline { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 40px; text-align: center; }
.auth-box { width: 100%; max-width: 380px; }
.auth-tabs { display: flex; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; padding: 10px; text-align: center;
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  background: none; border-top: none; border-left: none; border-right: none;
  color: inherit; transition: all 0.2s;
}
.auth-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.auth-error { color: var(--danger); font-size: 0.8rem; margin-bottom: 12px; min-height: 18px; }

/* ── Pricing ── */
.pricing-grid { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.pricing-card.featured { border-color: var(--gold); }
.pricing-name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.pricing-price { font-size: 1.8rem; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.pricing-price span { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.pricing-features { list-style: none; margin: 12px 0 16px; display: flex; flex-direction: column; gap: 6px; }
.pricing-features li { font-size: 0.85rem; color: var(--text-dim); display: flex; gap: 8px; }
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ── Section headers ── */
.section-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 20px 16px 10px;
}

/* ── Disclaimer ── */
.disclaimer {
  font-size: 0.7rem; color: var(--text-muted);
  padding: 12px 16px 24px; line-height: 1.6;
  border-top: 1px solid var(--border); margin-top: 8px;
}

/* ── Loading ── */
.loading { display: flex; align-items: center; justify-content: center; padding: 48px; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--surface2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ── */
.empty { text-align: center; padding: 48px 24px; color: var(--text-muted); font-size: 0.9rem; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 10px 18px;
  border-radius: 20px; font-size: 0.85rem;
  z-index: 200; opacity: 0; transition: opacity 0.2s;
  white-space: nowrap; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ── Responsive ── */
@media (min-width: 600px) {
  .pricing-grid { flex-direction: row; }
  .pricing-card { flex: 1; }
}
