/* ============================================
   BET BUILDER AI - Theme
   Imports design-system.css tokens, then defines
   app-specific layout and component styles.
   ============================================ */

@import url('/betbuilderai/design-system.css');

/* === PAGE-SPECIFIC AMBIENT GLOWS === */
/* Default red/blue glow is in design-system.css body::before */

/* Assist-ant page uses purple/blue ambient glow */
body.page-assistant::before {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(124,58,237,0.03) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(2,87,255,0.02) 0%, transparent 60%);
}
/* SoT Finder page uses blue/green ambient glow */
body.page-sot::before {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(2,87,255,0.03) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(0,224,112,0.02) 0%, transparent 60%);
}
/* Goals Lab uses green ambient glow */
body.page-goals::before {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(0,224,112,0.03) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(0,212,255,0.02) 0%, transparent 60%);
}

/* === WORLD CUP MODE OVERLAY ===
   body.wc-mode is set on every /wc/* page (alongside the legacy
   page-wc class) and supplies the WC badge tokens + gold-accent
   surface helpers. The main BetBuilderAI nav (rendered by shared.js
   into #nav-container) shows on every WC page exactly the same as
   Streaks / Referees / Dashboard - wc-mode does NOT hide it. The
   WC sibling strip sits BELOW the main nav, styled by wc-public.css's
   .wc-subnav. */
body.wc-mode .site-footer { border-top-color: rgba(255, 255, 255, 0.06); }

/* WC accent + badge tokens (lifted from wc-radar.css so site-wide surfaces
   can share them - the cards/fouls + goals/shots radars still own their
   own podium styles in wc-radar.css). */
body.wc-mode {
  --wc-accent: var(--accent-gold, #ff2740);
}

/* Inline flag badges (group letter, role-gap, playing-on-yellow,
   penalty-taker, partial-coverage). Used by squad rows, podium rows,
   detail tables. Shared across every WC surface. */
body.wc-mode .wc-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.5;
  min-height: 18px;
}
body.wc-mode .wc-badge--group     { color: #fff; background: #ff2740; border-color: #ff2740; }
body.wc-mode .wc-badge--role-gap  { color: #ff2740; background: rgba(255, 39, 64, 0.10); border-color: rgba(255, 39, 64, 0.32); }
body.wc-mode .wc-badge--yellow    { color: #ffd24d; background: rgba(255, 210, 77, 0.10); border-color: rgba(255, 210, 77, 0.36); }
body.wc-mode .wc-badge--pen       { color: #4ea3ff; background: rgba(78, 163, 255, 0.10); border-color: rgba(78, 163, 255, 0.36); }
body.wc-mode .wc-badge--partial   { color: #ff2740; background: rgba(255, 39, 64, 0.08); border: 1px dashed rgba(255, 39, 64, 0.40); }
body.wc-mode .wc-badge--host      { color: #ff2740; background: rgba(255, 39, 64, 0.08); border-color: rgba(255, 39, 64, 0.40); }
body.wc-mode .wc-badge--stub      { color: var(--text-muted); border-color: var(--border-subtle); }

/* === FIXED NAV OFFSET === */
body { padding-top: 80px; }

/* === NAV === */
:root { --nav-ease: cubic-bezier(0.23, 1, 0.32, 1); }
/* Verified tick shown next to select community handles (window.LGVerified) */
.lg-verified { display: inline-block; vertical-align: middle; margin-left: 3px; flex: none; position: relative; top: -1px; }
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  background: rgba(11, 13, 18, 0.74);
  backdrop-filter: var(--blur-md); -webkit-backdrop-filter: var(--blur-md);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 clamp(32px, 4vw, 64px);
  transition: background 240ms var(--nav-ease), border-color 240ms var(--nav-ease), box-shadow 240ms var(--nav-ease);
}
/* Scroll-aware: the bar settles into a touch more depth once the page moves. */
.nav.scrolled {
  background: rgba(9,11,17,0.9);
  border-bottom-color: rgba(255,255,255,0.09);
  box-shadow: 0 10px 30px -16px rgba(0,0,0,0.7);
}
.nav-inner {
  margin: 0 auto;
  display: flex; align-items: center;
  height: 80px; gap: 32px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.5px; text-transform: uppercase;
  text-decoration: none;
}
.nav-brand img { height: 48px; }
.nav-gdc-back {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.4px; text-transform: uppercase;
  text-decoration: none;
  transition: color 160ms var(--nav-ease), background 160ms var(--nav-ease), border-color 160ms var(--nav-ease), transform 160ms var(--nav-ease);
  flex-shrink: 0;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .nav-gdc-back:hover {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    transform: translateY(-1px);
  }
}
.nav-gdc-back:active { transform: scale(0.98); }
.nav-gdc-back-chev { flex-shrink: 0; opacity: 0.85; }
.nav-gdc-back-logo { height: 22px; display: block; flex-shrink: 0; }
.nav-gdc-back--mobile { display: none; }
.nav-brand-icon {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
}
.nav-brand-icon svg { width: 16px; height: 16px; }
.nav-links { display: flex; gap: 4px; }
.nav-burger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; margin-left: auto;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--text-secondary);
  margin: 5px 0; border-radius: 2px; transition: all 0.3s;
}
/* ── Sport switcher ─────────────────────────────────────────────────────
 * The product covers two sports now, so the nav has to say which one you
 * are in. A segmented pair rather than a dropdown: two options, both worth
 * showing, and it reads as a state rather than a menu.
 * Uses --wc-gold (the brand RED #ff2740, misnamed) for the active segment,
 * matching every other active-state in the hub.
 */
.nav-sport-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  margin-right: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.028);
  flex: none;
}
.nav-sport {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* Body font in sentence case. This was uppercase mono at 11px with 0.08em
   * tracking, which made the two most important words in the nav read like a
   * system label rather than the names of two sports. Mono is for numbers. */
  font-family: var(--font-body, 'Red Hat Display', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text-muted, #7B839F);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms var(--wc-ease-out, ease),
              background 160ms var(--wc-ease-out, ease);
}
.nav-sport { position: relative; z-index: 1; }
.nav-sport:hover { color: var(--text-primary, #f0f2f8); background: rgba(255, 255, 255, 0.05); }
/* The fill lives on the thumb, not on the active link, so it can slide between
 * the two. The link keeps only what cannot move: its text colour and weight. */
.nav-sport.active {
  color: #fff;
  font-weight: 700;
  background: transparent;
}
.nav-sport.active:hover { background: transparent; color: #fff; }
/* The sliding fill. Hidden until JS has measured the active link, because a
 * thumb at x=0 with no width is a red smudge in the corner; .is-ready is set by
 * the same call that positions it. */
.nav-sport-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--wc-gold, #ff2740);
  /* A soft throw of the brand colour so the active side lifts off the track
     rather than just being filled in. */
  box-shadow: 0 1px 10px rgba(255, 39, 64, 0.34);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  /* A spring-ish curve: the fill overshoots a hair and settles, which is what
   * makes it read as a physical switch rather than a fade. */
  transition: transform 320ms cubic-bezier(0.34, 1.32, 0.5, 1),
              width 320ms cubic-bezier(0.34, 1.32, 0.5, 1),
              opacity 160ms ease;
}
.nav-sport-switch.is-ready .nav-sport-thumb { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .nav-sport-thumb { transition: opacity 160ms ease; }
}
.nav-sport:focus-visible {
  outline: 2px solid var(--wc-gold, #ff2740);
  outline-offset: 2px;
}
/* In the mobile drawer the nav stacks, so the switcher goes full width and
   splits evenly rather than sitting as a stray pill.
 *
 * 768px, matching the drawer itself (.nav-burger/.nav-links below). This was
 * 900px, so between 769 and 900 the switcher went full width while the nav was
 * still a horizontal row: it grew to ~554px and pushed Matches and Squads off
 * the right edge. The full-width treatment is only correct once the nav has
 * actually stacked, so it has to share the drawer's breakpoint. */
@media (max-width: 768px) {
  .nav-sport-switch {
    width: 100%;
    margin: 0 0 10px;
    border-radius: 10px;
  }
  .nav-sport { flex: 1 1 0; justify-content: center; border-radius: 8px; }
  /* The track is a rounded rectangle rather than a pill at this width, so the
   * thumb has to match it or it looks like a different component. */
  .nav-sport-thumb { border-radius: 8px; }
}

.nav-link {
  padding: 8px 16px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border: none; background: none;
  transition: color 160ms var(--nav-ease), background 160ms var(--nav-ease), transform 120ms var(--nav-ease);
  position: relative;
  text-decoration: none; font-family: var(--font-body);
}
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
  }
}
.nav-link:active { transform: scale(0.97); }
.nav-link.active {
  color: var(--text-primary);
  background: rgba(255,0,0,0.06);
}
.nav-link.active::after {
  content: ''; position: absolute;
  bottom: -1px; left: 16px; right: 16px;
  height: 2px; background: var(--gradient-primary);
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(255,0,0,0.45);
}
/* Assist-ant uses purple active */
.nav-link.active[data-tool="assistant"] {
  background: rgba(124,58,237,0.08);
}
.nav-link.active[data-tool="assistant"]::after {
  background: var(--gradient-hype);
}
/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dd-trigger { display: flex; align-items: center; }
.nav-dd-trigger svg { transition: transform 0.2s; }
.nav-dropdown.open .nav-dd-trigger svg { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: calc(100% + 10px); left: 50%;
  background: rgba(19,22,31,0.98); backdrop-filter: var(--blur-md); -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-default); border-radius: var(--r-md);
  padding: 6px; min-width: 180px; z-index: 110;
  box-shadow: var(--shadow-lg);
  transform-origin: top center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateX(-50%) translateY(-6px) scale(0.97);
  transition: opacity 160ms var(--nav-ease), transform 160ms var(--nav-ease), visibility 160ms;
}
.nav-dropdown.open .nav-dd-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.nav-dd-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); text-decoration: none; transition: all 0.15s;
}
.nav-dd-item:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.nav-dd-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* Top-level nav link with a small NEW badge to draw the eye to a fresh tool. */
.nav-link-with-badge { display: inline-flex; align-items: center; gap: 7px; }
.nav-link-badge {
  padding: 2px 6px;
  border-radius: 4px;
  background: #00e070;
  color: var(--surface-base);
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(0,224,112,0.35);
}
@media(max-width:768px) {
  .nav-link-with-badge { justify-content: flex-start; }
  .nav-link-badge { margin-left: auto; }
}
.nav-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px;
  background: var(--gradient-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--r-full);
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: var(--glow-red);
  letter-spacing: 0.3px;
}
.nav-cta:hover {
  box-shadow: var(--glow-red-strong);
  transform: translateY(-1px);
}
/* Dashboard is duplicated into the burger menu on mobile; hidden on desktop. */
.nav-cta-mobile { display: none; }
.nav-api {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-muted);
  background: var(--surface-default);
  padding: 4px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border-default);
}
/* Auth nav */
.auth-nav {
  display: flex; align-items: center;
}
.nav-login-btn {
  display: inline-flex; align-items: center;
  padding: 8px 20px;
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700;
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  cursor: pointer;
  text-decoration: none;
  transition: color 160ms var(--nav-ease), background 160ms var(--nav-ease), border-color 160ms var(--nav-ease), box-shadow 160ms var(--nav-ease), transform 120ms var(--nav-ease);
  letter-spacing: 0.3px;
}
@media (hover: hover) and (pointer: fine) {
  .nav-login-btn:hover {
    border-color: rgba(255,255,255,0.18);
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 6px 18px -10px rgba(0,0,0,0.7);
  }
}
.nav-login-btn:active { transform: scale(0.97); }
.auth-user-menu { position: relative; }
.auth-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.auth-avatar:hover {
  box-shadow: var(--glow-red);
  transform: scale(1.05);
}
.auth-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: rgba(19,22,31,0.98); backdrop-filter: var(--blur-md); -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid var(--border-default); border-radius: var(--r-md);
  padding: 6px; min-width: 210px; z-index: 110;
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 160ms var(--nav-ease), transform 160ms var(--nav-ease), visibility 160ms;
}
.auth-user-menu.open .auth-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0) scale(1);
}
.auth-user-info {
  padding: 10px 12px 8px;
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.auth-menu-link,
.auth-logout-btn {
  display: flex; align-items: center; width: 100%;
  padding: 8px 12px; border-radius: 6px;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  background: none; border: none; cursor: pointer;
  transition: all 0.15s; text-align: left;
  text-decoration: none;
}
.auth-menu-link:hover,
.auth-logout-btn:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}
/* Signed-in account chip: avatar + name, opens the account menu */
.auth-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-default);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: border-color 160ms var(--nav-ease), background 160ms var(--nav-ease), box-shadow 160ms var(--nav-ease), transform 120ms var(--nav-ease);
}
@media (hover: hover) and (pointer: fine) {
  .auth-chip:hover {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 6px 18px -10px rgba(0,0,0,0.7);
  }
}
.auth-chip:active { transform: scale(0.98); }
.auth-chip .auth-avatar {
  width: 26px; height: 26px; font-size: 11px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14), 0 2px 8px -2px rgba(255,0,0,0.4);
}
.auth-chip-name {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700;
  color: var(--text-primary); letter-spacing: 0.2px;
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.auth-chip-caret { color: var(--text-muted); flex: none; transition: transform 180ms var(--nav-ease); }
.auth-user-menu.open .auth-chip-caret { transform: rotate(180deg); }
/* Cohesive press feedback across the nav's pressable elements */
.nav-brand { transition: transform 160ms var(--nav-ease); }
.nav-brand:active { transform: scale(0.98); }
.nav-dd-item, .auth-menu-link, .auth-logout-btn { transition: background 150ms var(--nav-ease), color 150ms var(--nav-ease), transform 120ms var(--nav-ease); }
.nav-dd-item:active, .auth-menu-link:active, .auth-logout-btn:active { transform: scale(0.98); }
/* Respect reduced motion: keep the fades, drop the movement (menus stay put) */
@media (prefers-reduced-motion: reduce) {
  .nav-link:active, .nav-login-btn:active, .auth-chip:active, .nav-brand:active,
  .nav-gdc-back:active, .nav-dd-item:active, .auth-menu-link:active, .auth-logout-btn:active { transform: none; }
  .auth-chip-caret, .auth-user-menu.open .auth-chip-caret { transition: none; }
  .auth-dropdown, .auth-user-menu.open .auth-dropdown { transform: none; }
  .nav-dd-menu, .nav-dropdown.open .nav-dd-menu { transform: translateX(-50%); }
}

/* === AUTH GATE SCREEN === */
.auth-gate {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}
.auth-gate--hiding {
  opacity: 0;
  pointer-events: none;
}
.auth-gate-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
@supports not (backdrop-filter: blur(16px)) {
  .auth-gate-backdrop { background: rgba(10, 11, 15, 0.92); }
}
/* Loading state */
.auth-gate-loader {
  position: relative; z-index: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.auth-gate--loading .auth-gate-loader { display: flex; }
.auth-gate--loading .auth-gate-modal { display: none !important; }
.auth-gate--modal .auth-gate-loader { display: none; }
.auth-gate--modal .auth-gate-modal { display: flex; }
.auth-gate-loader-logo {
  height: 48px;
  opacity: 0.9;
}
.auth-gate-loader-spin {
  width: 24px; height: 24px;
  border: 2.5px solid rgba(255,255,255,0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
/* Gate modal */
.auth-gate-modal {
  position: relative; z-index: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 20px;
  padding: 48px 44px 40px;
  max-width: 440px;
  width: calc(100% - 32px);
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}
.auth-gate-logo {
  height: 44px;
  margin-bottom: 32px;
}
.auth-gate-title {
  font-family: 'Anton', sans-serif;
  font-style: normal;
  font-weight: 800;
  font-size: 32px;
  line-height: 1.1;
  color: #1A1A1A;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  text-transform: none;
}
.auth-gate-sub {
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: #1A1A1A;
  margin: 0 0 8px;
}
.auth-gate-copy {
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: #666;
  margin: 0 0 28px;
  line-height: 1.6;
}
.auth-gate-error {
  display: none;
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: #EC2024;
  margin: 0 0 16px;
  padding: 10px 16px;
  background: rgba(236,32,36,0.06);
  border-radius: 8px;
  width: 100%;
}
.auth-gate-cta {
  display: block;
  width: 100%;
  padding: 15px 24px;
  background: #EC2024;
  color: #fff;
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}
.auth-gate-cta:hover {
  background: #d41c1f;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(236,32,36,0.35);
}
.auth-gate-cta:active {
  transform: translateY(0);
}
.auth-gate-cta:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(236,32,36,0.3);
}
.auth-gate-fine {
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: #1A1A1A;
  margin: 20px 0 0;
  opacity: 0.6;
}
/* Gate responsive */
@media (max-width: 480px) {
  .auth-gate-modal {
    padding: 36px 20px 32px;
    border-radius: 16px;
    width: calc(100% - 32px);
  }
  .auth-gate-title { font-size: 26px; }
  .auth-gate-sub { font-size: 16px; }
  .auth-gate-copy { font-size: 13px; margin-bottom: 24px; }
  .auth-gate-cta { padding: 16px 24px; font-size: 15px; }
}
@media (min-width: 481px) and (max-width: 768px) {
  .auth-gate-modal {
    padding: 44px 36px 36px;
    max-width: 420px;
  }
}

/* === LAYOUT === */
.page {
  margin: 0 auto;
  padding: 24px 32px;
  position: relative; z-index: 1;
}

/* === HERO === */
.hero {
  display: flex; align-items: center;
  gap: 16px; margin-bottom: 32px; padding: 20px 0;
  overflow: visible;
}
.hero-text { flex: 1; min-width: 0; }
.hero-text h1 {
  font-size: 48px;
  background: var(--gradient-fire);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
.hero-text .hero-sub {
  font-size: 18px; color: var(--text-secondary);
  margin-top: 8px; font-weight: 500;
}
.hero-text .hero-desc {
  font-size: 13px; color: var(--text-muted);
  margin-top: 8px; max-width: 520px; line-height: 1.6;
}
.hero-text .hero-desc strong { color: var(--text-secondary); }
.hero-graphic {
  width: 520px; height: 380px;
  flex-shrink: 0; margin-right: -40px;
}
.hero-graphic svg { width: 100%; height: 100%; }
/* Page-specific hero gradients */
body.page-assistant .hero-text h1 {
  background: var(--gradient-electric);
  -webkit-background-clip: text;
  background-clip: text;
}
body.page-goals .hero-text h1 {
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* SoT Finder uses sf-tool-title in page CSS */
@media(max-width:768px) {
  .hero { flex-direction: column; }
  .hero-graphic { width: 100%; height: 200px; margin-right: 0; }
}

/* === CONTROLS ROW === */
.controls {
  display: flex; align-items: center;
  gap: 10px; margin-bottom: 24px; flex-wrap: wrap;
}
.date-input, .ctrl-input {
  background: var(--surface-default);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 10px 14px; border-radius: var(--r-md);
  font-size: 13px; font-family: var(--font-body); font-weight: 500;
  transition: border-color 0.2s;
}
.date-input:hover, .date-input:focus,
.ctrl-input:hover, .ctrl-input:focus {
  border-color: var(--border-strong); outline: none;
}
.date-input::-webkit-calendar-picker-indicator { filter: invert(0.6); cursor: pointer; }
.chip, .ctrl-btn {
  padding: 8px 14px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border-default);
  background: var(--surface-default); color: var(--text-secondary);
  transition: all 0.2s; font-family: var(--font-body);
}
.chip:hover, .ctrl-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--surface-hover);
}
.btn-load, .btn-go {
  padding: 10px 24px; border-radius: var(--r-md);
  border: none; font-weight: 700; font-size: 13px;
  cursor: pointer; color: #fff;
  background: var(--gradient-primary);
  transition: all 0.2s;
  box-shadow: var(--glow-red);
  margin-left: auto; font-family: var(--font-body);
}
.btn-load:hover, .btn-go:hover {
  box-shadow: var(--glow-red-strong);
  transform: translateY(-1px);
}
.btn-load:disabled, .btn-go:disabled {
  background: var(--gray-600); box-shadow: none;
  cursor: not-allowed; opacity: 0.5; transform: none;
}
/* Assist-ant uses blue gradient for btn-go */
body.page-assistant .btn-go {
  background: var(--gradient-secondary);
  box-shadow: var(--glow-blue);
}
body.page-assistant .btn-go:hover {
  box-shadow: var(--glow-blue-strong);
}
.btn-refresh {
  padding: 8px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--border-default);
  background: var(--surface-default); color: var(--text-secondary);
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-refresh:hover { border-color: var(--red-500); color: var(--red-500); }
.btn-refresh:disabled { opacity: 0.3; cursor: not-allowed; }

/* === SELECTORS (Stat Packs) === */
.sel {
  background: var(--surface-default); border: 1px solid var(--border-default);
  color: var(--text-primary); padding: 10px 14px;
  border-radius: var(--r-md); font-size: 13px;
  font-family: var(--font-body); font-weight: 500;
  transition: border-color 0.2s; min-width: 180px; cursor: pointer;
}
.sel:hover, .sel:focus { border-color: var(--border-strong); outline: none; }
.sel option { background: var(--surface-default); color: var(--text-primary); }

/* === DASHBOARD SUMMARY === */
.dashboard {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 24px;
}
.dash-card {
  background: var(--surface-default); border: 1px solid var(--border-default);
  border-radius: var(--r-lg); padding: 18px 20px;
  transition: all 0.3s; position: relative; overflow: hidden;
  cursor: pointer;
}
.dash-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  opacity: 0; transition: opacity 0.3s;
}
.dash-card:hover::before { opacity: 1; }
.dash-card:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.dash-card.active-filter { border-color: var(--red-500); background: rgba(255,0,0,0.04); }
.dash-card.fire::before { background: var(--gradient-fire); }
.dash-card.amber::before { background: var(--gradient-warm); }
.dash-card.blue::before { background: var(--blue-500); }
.dash-card.green::before { background: var(--color-success); }
.dash-card.purple::before { background: var(--gradient-hype); }
.dash-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 8px;
}
.dash-value {
  font-size: 28px; font-weight: 700;
  font-family: var(--font-mono);
}
.dash-value.fire { color: var(--red-500); }
.dash-value.amber { color: var(--accent-gold); }
.dash-value.blue { color: var(--blue-500); }
.dash-value.green { color: var(--color-success); }
.dash-value.purple { color: var(--accent-purple); }
.dash-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* === FILTER PILLS === */
.filter-pill {
  padding: 5px 12px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border-default);
  background: transparent; color: var(--text-muted);
  transition: all 0.2s; font-family: var(--font-body);
}
.filter-pill:hover { border-color: var(--border-strong); color: var(--text-secondary); }
.filter-pill.active {
  border-color: var(--red-500);
  color: var(--red-500);
  background: rgba(255,0,0,0.06);
}
body.page-assistant .filter-pill.active {
  background: rgba(124,58,237,0.08);
  border-color: rgba(124,58,237,0.3);
  color: var(--text-accent-purple);
}

/* === EMPTY / LOADING === */
.empty-state {
  background: var(--surface-default); border: 1px solid var(--border-default);
  border-radius: var(--r-lg); padding: 60px 40px;
  text-align: center;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.empty-desc { font-size: 13px; color: var(--text-muted); }
.progress {
  width: 100%; background: var(--surface-elevated);
  border-radius: 3px; height: 3px;
  margin-top: 12px; overflow: hidden;
}
.progress-bar {
  height: 3px; background: var(--gradient-primary);
  border-radius: 3px; transition: width 0.3s;
}
body.page-assistant .progress-bar { background: var(--gradient-secondary); }

/* === LOADING ANIMATIONS === */
/* Card flip (Card Radar) */
@keyframes cardFlip { 0%,45% { transform: rotateY(0deg); } 50%,95% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }
@keyframes cardBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes cardPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,200,0,0.3); } 50% { box-shadow: 0 0 20px 6px rgba(255,200,0,0.15); } }
.loading-anim { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; }
.loading-card { width: 28px; height: 40px; border-radius: 4px; position: relative; perspective: 100px; animation: cardBounce 1.2s ease-in-out infinite; }
.loading-card:nth-child(2) { animation-delay: 0.15s; }
.loading-card:nth-child(3) { animation-delay: 0.3s; }
.loading-card-inner { width: 100%; height: 100%; border-radius: 4px; animation: cardFlip 2.4s ease-in-out infinite, cardPulse 2.4s ease-in-out infinite; transform-style: preserve-3d; position: relative; }
.loading-card:nth-child(2) .loading-card-inner { animation-delay: 0.4s; }
.loading-card:nth-child(3) .loading-card-inner { animation-delay: 0.8s; }
.loading-card-face { position: absolute; inset: 0; border-radius: 4px; backface-visibility: hidden; }
.loading-card-front { background: var(--accent-gold); }
.loading-card-back { background: var(--red-500); transform: rotateY(180deg); }

/* Scanner (Stat Packs / Assist-ant) */
@keyframes scanMove { 0% { transform: translateX(-60px); } 50% { transform: translateX(60px); } 100% { transform: translateX(-60px); } }
@keyframes scanPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes statCycle { 0% { opacity:0; transform:translateY(8px); } 10% { opacity:1; transform:translateY(0); } 40% { opacity:1; transform:translateY(0); } 50% { opacity:0; transform:translateY(-8px); } 100% { opacity:0; transform:translateY(-8px); } }
.loading-scanner { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 20px; }
.scan-field { width: 180px; height: 100px; position: relative; border-radius: 8px; overflow: hidden; }
.scan-pitch { position: absolute; inset: 0; opacity: 0.12; }
.scan-pitch line, .scan-pitch rect, .scan-pitch circle { stroke: var(--gray-50); fill: none; stroke-width: 1.2; }
.scan-glass { position: absolute; top: 50%; transform: translate(-60px,-50%); animation: scanMove 3s ease-in-out infinite; }
.scan-glass-circle { width: 36px; height: 36px; border: 2px solid var(--blue-500); border-radius: 50%; position: relative; box-shadow: 0 0 12px rgba(2,87,255,0.3); }
.scan-glass-handle { width: 2px; height: 14px; background: var(--blue-500); position: absolute; bottom: -12px; right: -2px; transform: rotate(-45deg); border-radius: 1px; }
.scan-dot { position: absolute; width: 4px; height: 4px; border-radius: 50%; animation: scanPulse 1.5s ease-in-out infinite; }
.scan-dot:nth-child(1) { top: 25%; left: 30%; background: var(--red-500); animation-delay: 0s; }
.scan-dot:nth-child(2) { top: 60%; left: 55%; background: var(--accent-gold); animation-delay: 0.3s; }
.scan-dot:nth-child(3) { top: 35%; left: 70%; background: var(--color-success); animation-delay: 0.6s; }
.scan-dot:nth-child(4) { top: 70%; left: 25%; background: var(--blue-500); animation-delay: 0.9s; }
body.page-assistant .scan-glass-circle { border-color: var(--accent-purple); box-shadow: 0 0 12px rgba(124,58,237,0.3); }
body.page-assistant .scan-glass-handle { background: var(--accent-purple); }
body.page-assistant .scan-dot:nth-child(1) { background: var(--accent-purple); }
body.page-assistant .scan-dot:nth-child(2) { background: var(--blue-500); }
body.page-assistant .scan-dot:nth-child(3) { background: var(--color-success); }
body.page-assistant .scan-dot:nth-child(4) { background: var(--accent-gold); }
.stat-ticker { height: 18px; overflow: hidden; position: relative; }
.stat-ticker span { position: absolute; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); animation: statCycle 8s linear infinite; opacity: 0; }
.stat-ticker span:nth-child(1) { animation-delay: 0s; }
.stat-ticker span:nth-child(2) { animation-delay: 2s; }
.stat-ticker span:nth-child(3) { animation-delay: 4s; }
.stat-ticker span:nth-child(4) { animation-delay: 6s; }

/* === HIT RATE DOTS (shared by Stat Packs & Assist-ant) === */
.hr-dots { display: flex; gap: 2px; align-items: center; }
.hr-dot {
  width: 16px; height: 16px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 800; color: #fff;
}
.hr-dot.hit { background: var(--color-success); }
.hr-dot.miss { background: var(--red-500); }
.hr-dot.na { background: var(--surface-elevated); color: var(--text-muted); }

/* === RESPONSIVE === */
@media(max-width:1024px) {
  .nav { padding: 0 20px; }
  .nav-inner { gap: 16px; }
  .nav-link { padding: 6px 10px; font-size: 12px; }
  .nav-cta { padding: 7px 14px; font-size: 11px; }
  .nav-login-btn { padding: 6px 12px; font-size: 11px; }
  .nav-gdc-back { padding: 7px 12px; gap: 8px; font-size: 10px; }
  .nav-gdc-back-logo { height: 20px; }
  .page { overflow-x: hidden; }
  body { overflow-x: hidden; }
  .dashboard { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:768px) {
  .nav { padding: 0 16px; }
  .nav-inner { height: 60px; gap: 12px; }
  .nav-brand img { height: 40px; }
  .nav-burger { display: block; margin-left: auto; }  /* right-aligned on mobile */
  .nav-right { margin-left: 0; }
  .nav-right .nav-cta { display: none; }               /* top-bar Dashboard hidden on mobile */
  .nav-cta-mobile { display: flex; }                   /* ...it lives in the burger menu instead */
  .nav-cta { font-size: 11px; padding: 7px 16px; }
  .nav-gdc-back--desktop { display: none; }
  .nav-gdc-back--mobile {
    display: flex; align-items: center; gap: 12px;
    width: 100%; min-height: 44px;
    padding: 12px 16px; border-radius: 8px;
    font-size: 12px; letter-spacing: 0.4px;
    margin-top: 12px; box-sizing: border-box;
  }
  .nav-gdc-back--mobile .nav-gdc-back-logo { height: 22px; margin-left: auto; }
  .nav-login-btn { font-size: 11px; padding: 6px 14px; }
  /* Account control sits in the top bar just left of the burger on mobile */
  .nav-right { order: 2; }
  .nav-burger { order: 3; margin-left: 0; }
  .nav-brand { margin-right: auto; }
  .auth-chip-name, .auth-chip-caret { display: none; }
  .auth-chip { padding: 3px; border-color: transparent; gap: 0; }
  .auth-avatar { width: 28px; height: 28px; font-size: 11px; }
  .auth-dropdown { min-width: 180px; }
  .nav-links {
    display: none; flex-direction: column; gap: 2px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--gray-950); backdrop-filter: var(--blur-md);
    border-bottom: 1px solid var(--border-default);
    padding: 8px 16px 16px; z-index: 99;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 16px; font-size: 14px; border-radius: 8px; width: 100%; min-height: 44px; }
  .nav-dropdown { width: 100%; }
  .nav-dd-trigger { width: 100%; justify-content: space-between; }
  .nav-dd-menu {
    position: static; transform: none; display: none;
    background: rgba(255,255,255,0.02); border: none;
    box-shadow: none; padding: 4px 0 4px 12px; margin-top: 4px;
  }
  .nav-dropdown.open .nav-dd-menu { display: block; }
  .nav-dd-item { padding: 10px 12px; font-size: 13px; }
  .nav { position: relative; }
  .page { padding: 16px; overflow-x: hidden; }
  body { overflow-x: hidden; padding-top: 0; }
  .dashboard { grid-template-columns: repeat(2, 1fr); }
  .controls { gap: 6px; flex-wrap: wrap; }
  /* Tables scroll horizontally */
  .sp-grid { grid-template-columns: 1fr !important; }
  .sp-side.home { border-right: none; border-bottom: 1px solid var(--border-default); }
  table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  /* Selectors stack */
  .selectors, .hero-controls { flex-direction: column; gap: 8px; }
  .selectors select, .selectors .sel, .selectors .btn-go { width: 100%; }
  /* Hero sections */
  .hero { padding: 32px 0; }
  .hero h1, .tool-title { font-size: 28px; }
  .hero p, .tool-desc { font-size: 13px; }
  .hero-split { flex-direction: column; gap: 20px; }
  .hero-text { max-width: 100%; }
  /* Touch targets */
  .chip, .ctrl-btn, .filter-pill { min-height: 44px; display: inline-flex; align-items: center; }
  .btn-refresh { min-height: 44px; }
  .date-input, .ctrl-input { min-height: 44px; }
  /* Fixture strip scrollable */
  .fixture-strip { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  /* Player cards */
  .player-card { padding: 12px; }
  .player-expand { padding: 12px; }
  .expand-grid { grid-template-columns: 1fr; }
  /* Filter pills wrap */
  .filter-group { flex-wrap: wrap; }
  /* Stat pack specific */
  .fx-header { flex-direction: column; gap: 8px; padding: 16px; }
  .ts-grid { grid-template-columns: repeat(2, 1fr); }
  /* Hit rate dots smaller */
  .hr-dot { width: 11px; height: 11px; font-size: 7px; }
  /* Footer */
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-nav { gap: 32px; }
  .footer-brand img { height: 32px; }
}

@media(max-width:480px) {
  .nav-brand img { height: 34px; }
  .dashboard { grid-template-columns: 1fr; }
  .ts-grid { grid-template-columns: repeat(2, 1fr); }
  .mock-stats { grid-template-columns: repeat(2, 1fr); }
  .hp-feat-grid { grid-template-columns: 1fr; }
  .hp-how-layout { grid-template-columns: 1fr; }
}

/* ---- UNIFIED FOOTER ---- */
.site-footer { border-top: 1px solid var(--border-default); margin-top: 80px; padding: 48px 0 32px; }
.footer-inner { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.footer-brand { max-width: 280px; }
.footer-tagline { font-size: 12px; color: var(--text-muted); margin-top: 12px; line-height: 1.6; }
.footer-nav { display: flex; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 4px; }
.footer-col a { font-size: 12px; color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-social { display: flex; align-items: center; gap: 6px; }
.footer-social svg { opacity: 0.7; transition: opacity 0.2s; }
.footer-social:hover svg { opacity: 1; }
.footer-bottom { border-top: 1px solid var(--border-default); padding-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer-logos { display: flex; align-items: center; gap: 32px; }
.footer-logo { opacity: 0.5; transition: opacity 0.2s; height: 32px; }
.footer-logo:hover { opacity: 0.75; }
.footer-logo-18 { height: 32px; }
.footer-logo-ga { height: 32px; }
.footer-logo-gdc { height: 32px; }
.footer-disc { font-size: 10px; color: var(--text-muted); max-width: 560px; text-align: center; line-height: 1.7; }
.footer-disc a { color: var(--text-muted); text-decoration: underline; }
@media(max-width:600px) {
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-nav { gap: 32px; }
  .footer-logos { gap: 20px; }
  .footer-logo, .footer-logo-18, .footer-logo-ga, .footer-logo-gdc { height: 26px; }
}

/* ---- COMPETITION TOGGLE ---- */
.comp-toggle { display: flex; gap: 4px; padding: 4px; background: var(--surface-elevated); border: 1px solid var(--border-default); border-radius: var(--r-md); width: fit-content; margin: 12px 0; }
.comp-btn { padding: 8px 18px; border: none; border-radius: 8px; background: transparent; color: var(--text-muted); font-family: var(--font-body); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.comp-btn:hover { color: var(--text-secondary); }
.comp-btn.active { background: rgba(255,0,0,0.1); color: var(--red-500); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }

/* ---- ICON SYSTEM ---- */
.bb-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; line-height: 1; }
.bb-icon svg { display: block; }
