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

:root {
  --bg:        #05080f;
  --surface:   #0a1020;
  --border:    #1e2a3a;
  --text:      #e2eaf3;
  --muted:     #6b7e94;
  --green:     #00e5a0;
  --red:       #ff4b6e;
  --yellow:    #f0b429;
  --blue:      #00c2ff;
  --accent:    #0080cc;
  --radius:    10px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
}

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

a { color: var(--blue); text-decoration: none; }

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

/* ── Header ───────────────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  margin-bottom: 28px;
}

header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.3px;
}

.logo span { color: var(--blue); }

.last-updated {
  font-size: 12px;
  color: var(--muted);
}

/* ── Toggle ───────────────────────────────────────────────── */
.toggle-group {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 20px;
  width: fit-content;
}

.toggle-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
}

.toggle-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ── Stat cards ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.stat-card .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .sub {
  font-size: 11px;
  color: var(--muted);
}

.positive { color: var(--green); }
.negative { color: var(--red); }
.neutral  { color: var(--text); }

/* ── Chart ────────────────────────────────────────────────── */
.chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 16px;
}

.chart-wrap {
  position: relative;
  height: 220px;
}

/* ── Today's picks banner ─────────────────────────────────── */
.today-section {
  margin-bottom: 28px;
}

.picks-empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--muted);
  font-style: italic;
}

.pick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pick-card .game-label {
  font-weight: 600;
  min-width: 140px;
}

.pick-card .pick-team {
  font-weight: 700;
  color: var(--blue);
  min-width: 60px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.badge-pending { background: rgba(139,148,158,.15); color: var(--muted); }
.badge-win     { background: rgba(63,185,80,.15);   color: var(--green); }
.badge-loss    { background: rgba(248,81,73,.15);   color: var(--red);   }

.pick-meta { color: var(--muted); font-size: 12px; }

/* ── History table ────────────────────────────────────────── */
.table-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.table-filter input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  padding: 6px 12px;
  outline: none;
  width: 200px;
}

.table-filter input:focus { border-color: var(--accent); }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.03); }

tbody td {
  padding: 10px 14px;
  white-space: nowrap;
}

tr.row-win  td:first-child { border-left: 3px solid var(--green); }
tr.row-loss td:first-child { border-left: 3px solid var(--red);   }
tr.row-pending td:first-child { border-left: 3px solid var(--border); }

.profit-pos { color: var(--green); font-weight: 600; }
.profit-neg { color: var(--red);   font-weight: 600; }

/* ── Loading / error states ───────────────────────────────── */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.error-banner {
  background: rgba(248,81,73,.1);
  border: 1px solid rgba(248,81,73,.3);
  border-radius: var(--radius);
  color: var(--red);
  padding: 14px 18px;
  margin-bottom: 20px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card .value { font-size: 22px; }
  .table-filter input { width: 140px; }
}

/* ── Header right group ───────────────────────────────────── */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}


/* ── Pick of the Day ──────────────────────────────────────── */
.potd-section { margin-bottom: 28px; }

.potd-inner {
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.potd-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.potd-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), var(--accent));
}

.potd-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 8px;
}

.potd-game { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.potd-pick { font-size: 24px; font-weight: 700; color: var(--blue); margin-bottom: 8px; }

.potd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.subscribe-banner {
  background: linear-gradient(135deg, #1a2332, #0d1117);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 210px;
}

.subscribe-banner .sub-title { font-size: 13px; font-weight: 600; }
.subscribe-banner .sub-desc  { font-size: 12px; color: var(--muted); line-height: 1.4; }

.subscribe-btn {
  display: inline-block;
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.subscribe-btn:hover { background: #1a60d0; color: #fff; }

@media (max-width: 600px) {
  .potd-inner     { flex-direction: column; }
  .subscribe-banner { min-width: 0; }
}

/* ── Confidence badge ─────────────────────────────────────────── */
.badge.conf-high {
  background: rgba(0,229,160,.12);
  color: var(--green);
  font-size: 11px;
  letter-spacing: .5px;
}

.badge.conf-mid {
  background: rgba(0,194,255,.12);
  color: var(--blue);
  font-size: 11px;
  letter-spacing: .5px;
}

.badge.conf-low {
  background: rgba(107,126,148,.12);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .5px;
}

/* ── EV badge (inline text) ───────────────────────────────────── */
.ev-positive {
  display: inline;
  color: var(--green);
  font-weight: 600;
}

.ev-negative {
  display: inline;
  color: var(--red);
  font-weight: 600;
}

/* ── Score prediction display ─────────────────────────────────── */
.pick-meta.score-pred {
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
}

/* ── Pick card badges row ─────────────────────────────────────── */
.pick-card .pick-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Header auth controls ─────────────────────────────────────── */
.header-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-email {
  font-size: 12px;
  color: var(--muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-btn {
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  padding: 5px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}

.auth-btn:hover { border-color: var(--muted); }

.auth-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.auth-btn-primary:hover { background: #1a60d0; border-color: #1a60d0; }

/* ── Auth modal ───────────────────────────────────────────────── */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 380px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,.06); }

.modal-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 20px;
}

.modal-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
}
.modal-tab.active { background: var(--accent); color: #fff; }

.modal-panel {
  flex-direction: column;
  gap: 14px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.modal-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.modal-field input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  padding: 9px 12px;
  outline: none;
  transition: border-color .15s;
}
.modal-field input:focus { border-color: var(--accent); }

.modal-submit {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  padding: 10px;
  cursor: pointer;
  transition: background .15s;
  margin-top: 4px;
}
.modal-submit:hover:not(:disabled) { background: #1a60d0; }
.modal-submit:disabled { opacity: .6; cursor: not-allowed; }

.modal-error {
  background: rgba(248,81,73,.1);
  border: 1px solid rgba(248,81,73,.3);
  border-radius: 6px;
  color: var(--red);
  font-size: 12px;
  padding: 8px 12px;
}

.modal-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  margin-top: -6px;
}

.modal-note a { color: var(--blue); }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 18px 0 28px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.site-footer a {
  color: var(--muted);
  margin: 0 8px;
}
.site-footer a:hover { color: var(--text); }

.modal-success {
  text-align: center;
  padding: 12px 0;
}
.success-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.success-body  { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ── Paywall overlay ──────────────────────────────────────────── */
.paywall-overlay {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.paywall-icon  { font-size: 2rem; }
.paywall-title { font-size: 15px; font-weight: 600; }

.paywall-desc {
  font-size: 13px;
  color: var(--muted);
  max-width: 360px;
  line-height: 1.5;
}

.paywall-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.paywall-sub-btn {
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  padding: 8px 18px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.paywall-sub-btn:hover:not(:disabled) { background: #1a60d0; }
.paywall-sub-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Manage subscription modal ───────────────────────────────── */
.modal-title-row { margin-bottom: 20px; }
.modal-heading   { font-size: 16px; font-weight: 600; }

.manage-body { display: flex; flex-direction: column; gap: 16px; }

.manage-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}

.status-active   { background: rgba(0,229,160,.15);  color: var(--green); }
.status-trial    { background: rgba(0,194,255,.15);  color: var(--blue);  }
.status-lifetime { background: rgba(240,180,41,.15); color: var(--yellow);}
.status-inactive { background: rgba(107,126,148,.12);color: var(--muted); }
.status-pastdue  { background: rgba(248,81,73,.12);  color: var(--red);   }

.manage-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.manage-cancel-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manage-cancel-info {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.cancel-btn {
  align-self: flex-start;
  background: transparent;
  border: 1px solid rgba(248,81,73,.5);
  border-radius: var(--radius);
  color: var(--red);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  transition: background .15s, border-color .15s;
}
.cancel-btn:hover:not(:disabled) {
  background: rgba(248,81,73,.08);
  border-color: var(--red);
}
.cancel-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Promo code form (in paywall) ─────────────────────────────── */
.promo-section {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.promo-toggle-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.promo-toggle-link:hover { color: var(--text); }

.promo-inline-form {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 280px;
}

.promo-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  width: 100%;
  text-align: center;
  letter-spacing: 1px;
  transition: border-color .15s;
}
.promo-input:focus { border-color: var(--accent); }

.promo-submit-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  transition: border-color .15s;
  width: 100%;
}
.promo-submit-btn:hover:not(:disabled) { border-color: var(--muted); }
.promo-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.promo-error {
  background: rgba(248,81,73,.1);
  border: 1px solid rgba(248,81,73,.3);
  border-radius: 6px;
  color: var(--red);
  font-size: 12px;
  padding: 6px 10px;
  width: 100%;
  text-align: center;
}

/* ── Stat card gradient border upgrade ───────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  opacity: .5;
}
