/* ============================================================
   SportMerlin — Global Design System
   Wizard-themed sports analytics: navy + emerald + sparkle
   ============================================================ */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  /* Brand — pulled from logo */
  --brand-navy:        #1e3a5f;
  --brand-navy-dark:   #15263d;
  --brand-navy-deep:   #0a1628;
  --brand-green:       #22c55e;
  --brand-green-dark:  #15803d;
  --brand-green-light: #4ade80;
  --brand-cyan:        #38bdf8;        /* matches the sparkle/star tone */

  --nav-bg:        var(--brand-navy-deep);
  --nav-border:    rgba(255,255,255,.07);
  --accent:        var(--brand-green);
  --accent-dark:   var(--brand-green-dark);
  --accent-dim:    rgba(34,197,94,.14);
  --accent-glow:   rgba(34,197,94,.35);

  /* Magic gradient (used on brand, CTAs, cards) */
  --magic-gradient:
      linear-gradient(135deg, var(--brand-navy) 0%, #2563eb 40%, var(--brand-green) 100%);
  --magic-gradient-soft:
      linear-gradient(135deg, rgba(30,58,95,.08) 0%, rgba(34,197,94,.08) 100%);

  --surface:       #ffffff;
  --surface-alt:   #f8fafc;
  --surface-hover: #f1f5f9;

  --border-base:   rgba(0,0,0,.08);
  --border-strong: rgba(0,0,0,.14);

  --text-base:     #0f172a;
  --text-muted:    #64748b;
  --text-lighter:  #94a3b8;

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

  --shadow-xs:     0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:     0 2px 8px rgba(0,0,0,.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.14);
  --shadow-glow:   0 0 0 4px rgba(34,197,94,.12), 0 8px 24px rgba(34,197,94,.18);

  --role-gk:  #f59e0b;
  --role-def: #10b981;
  --role-mid: #38bdf8;
  --role-att: #6366f1;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(ellipse 800px 400px at 50% -100px, rgba(34,197,94,.06), transparent 70%),
    radial-gradient(ellipse 600px 300px at 90% 20%, rgba(56,189,248,.04), transparent 70%),
    #f4f7fb;
  color: var(--text-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.main-content { flex: 1; }

/* Brand text gradient — used on hero & login */
.text-magic {
  background: linear-gradient(90deg, var(--brand-navy) 0%, var(--brand-green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.sn-navbar {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  padding: .65rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.sn-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.015em;
  color: #fff !important;
  text-decoration: none;
}

.sn-brand-logo {
  height: 36px;
  width: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(34,197,94,.25));
}

/* Fallback when no logo image */
.sn-brand-logo-fallback {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(34,197,94,.18), 0 4px 12px rgba(34,197,94,.25);
}

.sn-brand-text {
  display: flex;
  align-items: baseline;
  gap: 0;
  letter-spacing: -.02em;
}
.sn-brand-text .b1 { color: #fff; font-weight: 700; }
.sn-brand-text .b2 { color: var(--brand-green); font-weight: 700; }

.sn-nav-link {
  color: rgba(255,255,255,.7) !important;
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem .85rem !important;
  border-radius: 999px;
  transition: color .15s, background .15s;
}

.sn-nav-link:hover,
.sn-nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.08);
}

.sn-nav-link .bi {
  font-size: .95rem;
  margin-right: .3rem;
  vertical-align: -.08em;
  color: var(--brand-green);
}

.sn-user-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.sn-user-chip .bi { color: var(--accent); }

.btn-logout {
  font-size: .85rem;
  padding: .35rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.75);
  background: transparent;
  transition: all .15s;
}
.btn-logout:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.32);
  color: #fff;
}

.btn-login-nav {
  font-size: .85rem;
  padding: .4rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 600;
  transition: background .15s, transform .1s, box-shadow .2s;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-login-nav:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.navbar-toggler { border-color: rgba(255,255,255,.2) !important; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ── Page header band ───────────────────────────────────────── */
.page-header {
  position: relative;
  background:
    radial-gradient(ellipse 600px 200px at 20% 100%, rgba(34,197,94,.18), transparent 70%),
    radial-gradient(ellipse 500px 200px at 90% 0%, rgba(56,189,248,.10), transparent 70%),
    var(--nav-bg);
  color: #fff;
  padding: 2rem 0 1.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--nav-border);
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.05) 100%);
  pointer-events: none;
}

.page-header > .container { position: relative; z-index: 1; }

.page-header h1, .page-header h2, .page-header h3 {
  color: #fff;
  margin: 0;
  font-weight: 700;
  letter-spacing: -.015em;
}

.page-header .page-subtitle {
  color: rgba(255,255,255,.55);
  font-size: .9rem;
  margin-top: .25rem;
}

/* ── Cards ──────────────────────────────────────────────────── */
.sn-card {
  background: var(--surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .15s, border-color .2s;
}

.sn-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(34,197,94,.25);
}

.sn-card-header {
  background: linear-gradient(to right, #f8fafc, #f1f5f9);
  border-bottom: 1px solid var(--border-base);
  padding: .85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sn-card-header .header-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}

.sn-card-header .header-icon.home-color  { background: rgba(99,102,241,.12); color: #6366f1; }
.sn-card-header .header-icon.away-color  { background: rgba(239,68,68,.12);  color: #ef4444; }
.sn-card-header .header-icon.match-color { background: rgba(34,197,94,.12);  color: #22c55e; }

/* ── Hero — magical & dynamic ───────────────────────────────── */
.hero-section {
  position: relative;
  background:
    radial-gradient(ellipse 700px 500px at 15% 30%, rgba(34,197,94,.18), transparent 60%),
    radial-gradient(ellipse 600px 400px at 85% 70%, rgba(56,189,248,.14), transparent 60%),
    radial-gradient(ellipse 400px 300px at 50% 0%, rgba(99,102,241,.10), transparent 60%),
    linear-gradient(135deg, #0a1628 0%, #15263d 50%, #0a1f1a 100%);
  color: #fff;
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
}

/* Animated mesh blob */
.hero-section::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  top: -200px; right: -200px;
  background: radial-gradient(circle, rgba(34,197,94,.18) 0%, transparent 70%);
  filter: blur(40px);
  animation: floatBlob 14s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-30px, 30px) scale(1.08); }
}

/* Sparkle field */
.sparkle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px 1px rgba(255,255,255,.7);
  animation: twinkle 3s ease-in-out infinite;
  opacity: 0;
}

.sparkle.sk-cyan {
  background: var(--brand-cyan);
  box-shadow: 0 0 8px 2px rgba(56,189,248,.7);
}
.sparkle.sk-green {
  background: var(--brand-green);
  box-shadow: 0 0 10px 2px rgba(34,197,94,.7);
}

@keyframes twinkle {
  0%, 100% { opacity: 0;   transform: scale(.5); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-section::before, .sparkle { animation: none; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(34,197,94,.15);
  color: #86efac;
  border: 1px solid rgba(34,197,94,.3);
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(6px);
}

.hero-badge .pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 6px var(--brand-green);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .4;  transform: scale(1.4); }
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
}

.hero-title .accent {
  background: linear-gradient(90deg, var(--brand-green-light), var(--brand-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.68);
  max-width: 540px;
  margin-bottom: 2.25rem;
  line-height: 1.65;
}

.btn-hero-primary {
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-green-dark) 100%);
  color: #fff;
  border: none;
  padding: .8rem 1.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: all .2s;
  box-shadow: 0 4px 20px var(--accent-glow), 0 0 0 0 var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.btn-hero-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  transition: left .6s;
}
.btn-hero-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow), 0 0 0 6px rgba(34,197,94,.15);
}
.btn-hero-primary:hover::before { left: 100%; }

.btn-hero-secondary {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.18);
  padding: .8rem 1.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  transition: all .2s;
  backdrop-filter: blur(6px);
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 2.5rem;
}

.hero-feature-chip {
  display: flex;
  align-items: center;
  gap: .45rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: .4rem .9rem;
  font-size: .8rem;
  color: rgba(255,255,255,.78);
  backdrop-filter: blur(6px);
  transition: all .2s;
}
.hero-feature-chip:hover {
  border-color: rgba(34,197,94,.4);
  background: rgba(34,197,94,.08);
  transform: translateY(-2px);
}
.hero-feature-chip .bi {
  color: var(--accent);
  font-size: .85rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero-stat {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 1.35rem 1rem;
  text-align: center;
  transition: all .25s;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.hero-stat::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(34,197,94,.08));
  opacity: 0;
  transition: opacity .25s;
}

.hero-stat:hover {
  border-color: rgba(34,197,94,.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.hero-stat:hover::after { opacity: 1; }

.hero-stat-val {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-green-light), var(--brand-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  display: block;
  position: relative;
  z-index: 1;
}

.hero-stat-label {
  font-size: .76rem;
  color: rgba(255,255,255,.55);
  margin-top: .4rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* Live preview card */
.preview-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 1rem;
  backdrop-filter: blur(8px);
  position: relative;
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
}

.preview-card-header .live-tag {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  color: rgba(255,255,255,.6);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.preview-card-header .live-tag::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 8px var(--brand-green);
  animation: pulseDot 1.5s ease-in-out infinite;
}

.preview-odd {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: .7rem .5rem;
  text-align: center;
  transition: all .2s;
}

.preview-odd:hover {
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.3);
}

.preview-odd .lbl {
  font-size: .65rem;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 600;
}

.preview-odd .val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-green-light);
  line-height: 1.1;
  margin-top: .15rem;
}

/* ── Feature strip ──────────────────────────────────────────── */
.feature-strip {
  padding: 4rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border-base);
  position: relative;
}

.feature-strip-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}

.feature-strip-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .85rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg);
  transition: all .25s;
  height: 100%;
}

.feature-item:hover {
  border-color: rgba(34,197,94,.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.feature-title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}

.feature-desc {
  font-size: .88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ── League cards ───────────────────────────────────────────── */
.league-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.league-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--text-base);
  transition: all .2s;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.league-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}

.league-card:hover {
  border-color: rgba(34,197,94,.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: var(--text-base);
}

.league-card:hover::before { transform: scaleX(1); }

.league-card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-navy-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.league-card.all-leagues .league-card-icon {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #a5b4fc;
}

.league-card-body { flex: 1; min-width: 0; }

.league-card-name {
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.league-card-meta {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

.league-card-arrow {
  color: var(--text-lighter);
  font-size: 1rem;
  transition: color .15s, transform .15s;
}

.league-card:hover .league-card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.league-card.locked {
  opacity: .65;
  cursor: not-allowed;
}
.league-card.locked:hover {
  transform: none;
  border-color: var(--border-base);
  box-shadow: var(--shadow-xs);
}
.league-card.locked:hover::before { transform: scaleX(0); }
.league-card.locked .league-card-icon {
  background: linear-gradient(135deg, #475569, #334155);
  color: #94a3b8;
}
.league-card.locked .league-card-arrow { color: #cbd5e1; }
.lock-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(148,163,184,.15);
  color: #475569;
  border: 1px solid rgba(148,163,184,.3);
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Match list ─────────────────────────────────────────────── */
.match-row {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .15s;
}

.match-row:hover { box-shadow: var(--shadow-sm); }

.match-teams {
  font-weight: 600;
  font-size: .95rem;
}

.match-teams .vs {
  color: var(--text-muted);
  font-weight: 400;
  font-size: .85rem;
  margin: 0 .4rem;
}

.match-date {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border-base);
  border-radius: 999px;
  padding: .25rem .7rem;
}

.btn-predict {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
  color: #fff;
  border: none;
  padding: .42rem 1.05rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .82rem;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(34,197,94,.25);
}
.btn-predict:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34,197,94,.4);
}

.btn-update-match {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  padding: .35rem .8rem;
  border-radius: 999px;
  font-size: .82rem;
  transition: all .15s;
}
.btn-update-match:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Freshness */
.refresh-note {
  margin-left: .5rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.fresh-dot {
  display: inline-block;
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15);
  box-shadow: 0 0 0 2px #fff inset;
  will-change: transform, box-shadow;
}

.fresh-success   { background: #22c55e; }
.fresh-warning   { background: #f59e0b; }
.fresh-secondary { background: #94a3b8; }

@keyframes breathe {
  0%  { transform: scale(.96); box-shadow: 0 0 0 4px rgba(34,197,94,.25), 0 0 0 2px #fff inset; }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(34,197,94,.06), 0 0 0 2px #fff inset; }
  100%{ transform: scale(.96); box-shadow: 0 0 0 4px rgba(34,197,94,.25), 0 0 0 2px #fff inset; }
}
.fresh-success.pulse { animation: breathe 2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .fresh-success.pulse { animation: none; }
}

/* ── Predict form ───────────────────────────────────────────── */
.section-label,
.form-section-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border-base);
}

.section-label .bi,
.form-section-label .bi { color: var(--accent); }

.role-pill-gk  { background: rgba(245,158,11,.15); color: #92400e; border: 1px solid rgba(245,158,11,.3); }
.role-pill-def { background: rgba(16,185,129,.12);  color: #065f46; border: 1px solid rgba(16,185,129,.3); }
.role-pill-mid { background: rgba(56,189,248,.12);  color: #0c4a6e; border: 1px solid rgba(56,189,248,.3); }
.role-pill-att { background: rgba(99,102,241,.12);  color: #3730a3; border: 1px solid rgba(99,102,241,.3); }

/* ── Market cards (results page) ────────────────────────────── */
.market-card {
  background: var(--surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  overflow: hidden;
  transition: all .2s;
}

.market-card:hover {
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px);
  border-color: rgba(34,197,94,.25);
}

.market-head {
  background: linear-gradient(to right, var(--brand-navy-deep), var(--brand-navy)) !important;
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  padding: .75rem 1rem !important;
}

.market-title {
  color: #fff !important;
  font-weight: 700 !important;
}

/* ── Login page ─────────────────────────────────────────────── */
.login-wrap {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 700px 500px at 20% 30%, rgba(34,197,94,.18), transparent 60%),
    radial-gradient(ellipse 600px 400px at 80% 70%, rgba(56,189,248,.15), transparent 60%),
    linear-gradient(135deg, var(--brand-navy-deep) 0%, var(--brand-navy) 60%, #0a1f1a 100%);
  position: relative;
  overflow: hidden;
}

.login-wrap .sparkle-field { z-index: 0; }

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  overflow: hidden;
}

.login-card-top {
  background: linear-gradient(135deg, var(--brand-navy-deep), var(--brand-navy));
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card-top::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(34,197,94,.2), transparent 60%);
  pointer-events: none;
}

.login-brand-img {
  height: 64px;
  margin-bottom: .75rem;
  filter: drop-shadow(0 0 16px rgba(34,197,94,.3));
  position: relative;
  z-index: 1;
}

.login-brand-fallback {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-green));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: .85rem;
  box-shadow: 0 8px 20px rgba(34,197,94,.35);
  position: relative;
  z-index: 1;
}

.login-card-top h1 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 .25rem;
  position: relative;
  z-index: 1;
}
.login-card-top h1 .green { color: var(--brand-green); }

.login-card-top p {
  color: rgba(255,255,255,.55);
  font-size: .85rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

.login-card-body { padding: 1.85rem 1.6rem; }

.btn-login-submit {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: .7rem;
  transition: all .2s;
  box-shadow: 0 4px 16px var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.btn-login-submit::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  transition: left .6s;
}
.btn-login-submit:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}
.btn-login-submit:hover::before { left: 100%; }

/* ── Footer ─────────────────────────────────────────────────── */
.sn-footer {
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  padding: 1.4rem 0;
  color: rgba(255,255,255,.4);
  font-size: .82rem;
  text-align: center;
  margin-top: auto;
}

.sn-footer a { color: rgba(255,255,255,.5); text-decoration: none; }
.sn-footer a:hover { color: var(--accent); }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255,255,255,.7);
  font-weight: 600;
}

.footer-brand .green { color: var(--brand-green); }

/* ── Utility overrides ──────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark)) !important;
  border-color: var(--brand-green) !important;
  color: #fff !important;
}
.btn-primary:hover {
  background: var(--brand-green-dark) !important;
  border-color: var(--brand-green-dark) !important;
}

.badge.bg-primary { background-color: #6366f1 !important; }
.badge.bg-success { background-color: var(--accent) !important; }
.badge.bg-info    { background-color: var(--brand-cyan) !important; }
.badge.bg-warning { background-color: var(--role-gk) !important; }

/* ── Pricing page ───────────────────────────────────────────── */
.pricing-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: .25rem;
  gap: .25rem;
  backdrop-filter: blur(8px);
}

.pricing-toggle button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.6);
  padding: .45rem 1.1rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.pricing-toggle button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.pricing-toggle .save-pill {
  background: rgba(34,197,94,.2);
  color: #86efac;
  font-size: .65rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  margin-left: .35rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all .25s;
  overflow: hidden;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(34,197,94,.3);
}

.plan-card.featured {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px var(--accent-dim), 0 12px 40px rgba(34,197,94,.18);
  transform: scale(1.03);
}

.plan-card.featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-green), var(--brand-cyan));
}

.plan-card.current::after {
  content: 'Your current plan';
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(34,197,94,.15);
  color: var(--brand-green-dark);
  border: 1px solid rgba(34,197,94,.35);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .25rem .55rem;
  border-radius: 999px;
}

.plan-badge {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-green));
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(34,197,94,.3);
}

.plan-name {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 .35rem;
  letter-spacing: -.02em;
}

.plan-tagline {
  color: var(--text-muted);
  font-size: .88rem;
  min-height: 2.6em;
  margin-bottom: 1.25rem;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  margin-bottom: .35rem;
}

.plan-price .currency { font-size: 1.1rem; color: var(--text-muted); font-weight: 600; }
.plan-price .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--text-base); }
.plan-price .period { font-size: .9rem; color: var(--text-muted); margin-left: .25rem; }

.plan-yearly-note {
  font-size: .78rem;
  color: var(--brand-green-dark);
  margin-bottom: 1.25rem;
  font-weight: 500;
  min-height: 1.2em;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .88rem;
  line-height: 1.4;
}

.plan-features li .feat-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.plan-features li.included .feat-icon {
  background: rgba(34,197,94,.15);
  color: var(--brand-green-dark);
}

.plan-features li.excluded {
  color: var(--text-lighter);
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,.15);
}

.plan-features li.excluded .feat-icon {
  background: rgba(148,163,184,.15);
  color: var(--text-lighter);
}

.btn-plan {
  display: block;
  width: 100%;
  padding: .75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  transition: all .2s;
  cursor: pointer;
}

.btn-plan-primary {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
  color: #fff !important;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-plan-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--accent-glow);
  color: #fff;
}

.btn-plan-secondary {
  background: var(--surface-alt);
  color: var(--text-base) !important;
  border-color: var(--border-strong);
}
.btn-plan-secondary:hover {
  background: var(--brand-navy-deep);
  color: #fff !important;
  border-color: var(--brand-navy-deep);
}

.btn-plan-current {
  background: rgba(34,197,94,.1);
  color: var(--brand-green-dark) !important;
  border-color: rgba(34,197,94,.3);
  cursor: default;
}

/* ── Account dashboard ──────────────────────────────────────── */
.account-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .account-grid { grid-template-columns: 1fr; }
}

.account-sidebar {
  background: var(--surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  height: fit-content;
}

.account-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.account-nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .85rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: all .15s;
}

.account-nav a:hover {
  background: var(--surface-alt);
  color: var(--text-base);
}

.account-nav a.active {
  background: rgba(34,197,94,.1);
  color: var(--brand-green-dark);
  font-weight: 600;
}

.account-nav a .bi { font-size: 1rem; }

.profile-summary {
  text-align: center;
  padding: .5rem 0 1rem;
  border-bottom: 1px solid var(--border-base);
  margin-bottom: 1rem;
}

.profile-avatar {
  width: 64px; height: 64px;
  margin: 0 auto .65rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  font-family: 'Space Grotesk', Inter, sans-serif;
}

.profile-name {
  font-weight: 700;
  font-size: .95rem;
  margin: 0;
}

.profile-email {
  font-size: .78rem;
  color: var(--text-muted);
  margin: .15rem 0 0;
  word-break: break-all;
}

.plan-banner {
  background: linear-gradient(135deg, var(--brand-navy-deep), var(--brand-navy));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.plan-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 400px 200px at 80% 100%, rgba(34,197,94,.18), transparent 70%);
}

.plan-banner > * { position: relative; z-index: 1; }

.plan-banner .plan-banner-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.5);
  font-weight: 600;
}

.plan-banner h3 {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 1.6rem;
  margin: .25rem 0 .25rem;
  color: #fff;
}

.plan-banner .plan-banner-meta {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
}

.plan-banner .badge-status {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(34,197,94,.18);
  color: #86efac;
  border: 1px solid rgba(34,197,94,.35);
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.plan-banner .badge-status .pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 6px var(--brand-green);
  animation: pulseDot 2s ease-in-out infinite;
}

.no-plan-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}
.stat-tile .stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  font-weight: 600;
}
.stat-tile .stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.dash-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -.01em;
}

/* ── Auth card (signup) reuses login-card styles ────────────── */
.auth-link {
  color: var(--brand-green-dark);
  font-weight: 600;
  text-decoration: none;
}
.auth-link:hover { color: var(--brand-green); text-decoration: underline; }

.signup-card { max-width: 460px; }

.form-help-text {
  font-size: .76rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 576px) {
  .hero-title { font-size: 2.1rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .league-grid { grid-template-columns: 1fr; }
  .hero-section { padding: 4rem 0 3.5rem; }
}
