/* ============================================================
   FORM SPORTS — formsports.store
   Aurora Glass design system, extended from the app's theme.ts
   ============================================================ */

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

:root {
  --canvas: #060A16;
  --canvas-deep: #0A1224;
  --surface: rgba(255,255,255,0.055);
  --surface-2: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.14);

  --accent: #4C8DFF;
  --accent-dim: #2F5FD1;
  --accent-glow: rgba(76,141,255,0.14);
  --accent-glow-strong: rgba(76,141,255,0.30);

  --secondary: #22D3EE;
  --secondary-glow: rgba(34,211,238,0.14);

  --energy: #FF7A45;
  --energy-glow: rgba(255,122,69,0.14);

  --muted: #8B95B4;
  --subtle: #48527A;
  --white: #F4F7FF;

  --danger: #FF5C77;
  --danger-glow: rgba(255,92,119,0.14);
  --warning: #FFB648;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---------------- Ambient light leaks ---------------- */
.light-leaks {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.light-leaks span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.leak-1 { width: 60vw; height: 60vw; background: var(--accent); top: -15vw; left: -20vw; }
.leak-2 { width: 46vw; height: 46vw; background: var(--secondary); top: 30vh; right: -12vw; opacity: 0.35; }
.leak-3 { width: 42vw; height: 42vw; background: rgba(255,255,255,0.5); bottom: -10vh; left: -10vw; opacity: 0.14; }

@media (prefers-reduced-motion: no-preference) {
  .leak-1, .leak-2, .leak-3 { transition: transform 0.2s ease-out; }
}

/* ---------------- Layout shell ---------------- */
.page { position: relative; z-index: 1; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------------- Nav ---------------- */
nav.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(6,10,22,0.72);
  border-bottom: 1px solid var(--border);
}
nav.topnav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--white);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ---------------- Buttons ---------------- */
.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14.5px;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 22px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow-strong);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 30px var(--accent-glow-strong); }
.btn-ghost {
  background: var(--surface);
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------------- Glass card ---------------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 40%, var(--secondary-glow) 100%);
  pointer-events: none;
}
.glass-strong {
  background: var(--surface-2);
  border-color: rgba(76,141,255,0.35);
}

/* ---------------- Hero ---------------- */
.hero { padding: 72px 0 56px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  background: var(--secondary-glow);
  border: 1px solid rgba(34,211,238,0.3);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.05;
  font-weight: 700;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.hero h1 .accent-text {
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 520px;
  margin: 0 0 32px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------------- Calculator (signature element) ---------------- */
.calc-card { padding: 28px; }
.calc-label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.calc-amount-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.calc-currency { font-size: 26px; font-weight: 700; color: var(--muted); }
.calc-input {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  background: none;
  border: none;
  color: var(--white);
  width: 100%;
  outline: none;
  padding: 0;
}
.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.calc-slider {
  width: 100%;
  margin: 18px 0 22px;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 3px;
  background: var(--surface-2);
  outline: none;
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-glow);
  cursor: pointer;
}
.calc-slider::-moz-range-thumb {
  width: 20px; height: 20px; border: none; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 6px var(--accent-glow); cursor: pointer;
}

.calc-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-glow);
  border: 1px solid rgba(76,141,255,0.28);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.calc-result .days-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--secondary);
}
.calc-result .days-label {
  font-size: 13px;
  color: var(--muted);
  max-width: 180px;
  text-align: right;
  line-height: 1.4;
}
.calc-presets { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.preset-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.preset-chip:hover { border-color: var(--accent); }
.preset-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------------- How it works ---------------- */
.section { padding: 64px 0; }
.section-head { max-width: 560px; margin: 0 auto 40px; text-align: center; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 700;
  margin: 0 0 12px;
}
.section-head p { color: var(--muted); font-size: 15.5px; line-height: 1.6; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step-card { padding: 26px; }
.step-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 20px;
}
.step-card h3 { font-family: var(--font-display); font-size: 17px; margin: 0 0 8px; }
.step-card p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }

/* ---------------- Trust strip ---------------- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: center;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--subtle);
  font-size: 13px;
  font-weight: 600;
}
.trust-strip span { display: flex; align-items: center; gap: 8px; }

/* ---------------- Footer ---------------- */
footer { padding: 48px 0 32px; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--white); }
.footer-disclosure {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--subtle);
  max-width: 640px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.footer-disclosure strong { color: var(--muted); }
.footer-copyright { font-size: 12px; color: var(--subtle); margin-top: 16px; }

/* ---------------- Modal / auth ---------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(6,10,22,0.78);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal-card {
  width: 100%; max-width: 420px;
  padding: 32px;
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  background: var(--surface-2); border: none; color: var(--muted);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.modal-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.modal-sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.tab-switch { display: flex; background: var(--surface-2); border-radius: 100px; padding: 4px; margin-bottom: 22px; }
.tab-btn {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 100px;
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  cursor: pointer; border: none; background: none;
}
.tab-btn.active { background: var(--accent); color: #fff; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--white);
  font-size: 14.5px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus { border-color: var(--accent); }
.form-error {
  background: var(--danger-glow);
  border: 1px solid rgba(255,92,119,0.3);
  color: #FFB4C0;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: none;
}
.form-error.visible { display: block; }
.form-success {
  background: rgba(76,141,255,0.14);
  border: 1px solid rgba(76,141,255,0.3);
  color: var(--secondary);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: none;
}
.form-success.visible { display: block; }

/* ---------------- Dashboard ---------------- */
#dashboard { display: none; }
#dashboard.active { display: block; }
#landing.hidden { display: none; }

.dash-header { padding: 40px 0 8px; }
.dash-greeting { color: var(--muted); font-size: 14.5px; margin: 0 0 4px; }
.dash-title { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin: 0; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  padding: 24px 0 64px;
  align-items: start;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

.balance-card { padding: 26px; }
.balance-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.balance-amount { font-family: var(--font-display); font-size: 40px; font-weight: 700; margin-bottom: 4px; }
.balance-days { font-size: 13.5px; color: var(--secondary); margin-bottom: 22px; }

.topup-row { display: flex; gap: 8px; margin-bottom: 12px; }
.topup-row input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-display);
  outline: none;
}
.topup-row input:focus { border-color: var(--accent); }

.tx-list { margin-top: 22px; }
.tx-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.tx-item:last-child { border-bottom: none; }
.tx-meta { color: var(--muted); font-size: 12px; }
.tx-amount.credit { color: var(--secondary); font-weight: 700; }
.tx-amount.debit { color: var(--muted); font-weight: 700; }

.picks-card { padding: 26px; }
.picks-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.picks-head h3 { font-family: var(--font-display); font-size: 17px; margin: 0; }
.pick-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  gap: 12px;
}
.pick-row:last-child { border-bottom: none; }
.pick-teams { font-size: 14px; font-weight: 600; }
.pick-league { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pick-market {
  font-size: 12.5px; font-weight: 700; color: var(--secondary);
  background: var(--secondary-glow); padding: 6px 10px; border-radius: 8px;
  white-space: nowrap;
}
.pick-locked {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  background: var(--surface-2); padding: 6px 10px; border-radius: 8px;
  white-space: nowrap;
}
.empty-note { color: var(--subtle); font-size: 13.5px; text-align: center; padding: 20px 0; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--canvas-deep); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 22px;
  font-size: 14px; font-weight: 600; z-index: 300;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  display: none;
  align-items: center; gap: 10px;
}
.toast.visible { display: flex; }
.toast.success { border-color: rgba(76,141,255,0.4); color: var(--secondary); }
.toast.error { border-color: rgba(255,92,119,0.4); color: #FFB4C0; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .hero { padding: 40px 0 32px; }
  nav.topnav .wrap { height: 64px; }
  .modal-card { padding: 26px 22px; }
}
