/* Football Brain — Premium Dark Football Aesthetic v1.0.0 */

/* ── Root vars ───────────────────────────────────────────────────────────── */
:root {
  --fb-bg:       #080c14;
  --fb-surface:  #0f1623;
  --fb-surface2: #161f30;
  --fb-surface3: #1d2840;
  --fb-border:   rgba(255,255,255,0.07);
  --fb-border2:  rgba(255,255,255,0.12);
  --fb-accent:   #00ff87;
  --fb-accent2:  #00d4ff;
  --fb-accent-dim: rgba(0,255,135,0.12);
  --fb-text:     #f0f4f8;
  --fb-text2:    #7a8ba0;
  --fb-text3:    #3d4f63;
  --fb-green:    #00ff87;
  --fb-red:      #ff4757;
  --fb-orange:   #ffa502;
  --fb-yellow:   #ffd32a;
  --fb-glow:     0 0 20px rgba(0,255,135,0.25);
  --fb-glow-blue: 0 0 20px rgba(0,212,255,0.25);

  /* Career accent */  --career-accent: #00ff87;
  /* Imposter accent */ --imposter-accent: #ff6b6b;
  /* HL accent */       --hl-accent: #00d4ff;
}

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

.fb-body {
  background: var(--fb-bg);
  color: var(--fb-text);
  font-family: -apple-system, 'Segoe UI', system-ui, sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
  /* Pitch line grid effect */
  background-image:
    repeating-linear-gradient(0deg,   transparent, transparent 59px, rgba(0,255,135,0.025) 59px, rgba(0,255,135,0.025) 60px),
    repeating-linear-gradient(90deg,  transparent, transparent 59px, rgba(0,255,135,0.025) 59px, rgba(0,255,135,0.025) 60px);
  background-attachment: fixed;
}

/* Dark mode compatibility */
body:not(.fb-body) { background: var(--fb-bg); }

#app {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 0 40px;
  position: relative;
}

/* ── iPhone notch safe area ─────────────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #app { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}

.fb-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
  min-height: 100dvh;
}
.fb-screen.hidden { display: none !important; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 4px;
  gap: 8px;
}
.fb-back-link {
  color: var(--fb-text2);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: color 0.15s;
  white-space: nowrap;
}
.fb-back-link:hover { color: var(--fb-accent); }

.fb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
}
.fb-logo-icon { font-size: 1.6rem; }
.fb-title {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--fb-accent), var(--fb-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.fb-subtitle {
  font-size: 0.68rem;
  color: var(--fb-text2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.fb-settings {
  display: flex;
  gap: 8px;
}
.fb-icon-btn {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  color: var(--fb-text);
  line-height: 1;
}
.fb-icon-btn:hover  { transform: scale(1.14); box-shadow: 0 4px 14px rgba(0,0,0,0.22); }
.fb-icon-btn:active {
  transform: scale(0.88);
  transition: transform 0.07s ease;
}
.fb-icon-btn svg { fill: var(--fb-text); }

/* ── Stats strip ─────────────────────────────────────────────────────────── */
.fb-stats-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 2px;
}
.fb-stat-pill {
  background: var(--fb-surface2);
  border: 1px solid var(--fb-border);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: var(--fb-text2);
  font-weight: 600;
}
.fb-stat-pill strong { color: var(--fb-accent); }

/* ── Mode grid ───────────────────────────────────────────────────────────── */
.fb-mode-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--fb-text2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 2px;
}

.fb-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fb-mode-card {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  padding: 14px 12px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.24s cubic-bezier(0.34, 1.4, 0.64, 1),
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fb-mode-card:hover:not(.fb-mode-locked):not(.fb-mode-selected) {
  border-color: var(--fb-border2);
  background: var(--fb-surface2);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.fb-mode-card:active:not(.fb-mode-locked) {
  transform: scale(0.96) translateY(1px);
  transition: transform 0.07s ease;
}
.fb-mode-card.fb-mode-locked { cursor: default; opacity: 0.45; }

/* Selection state — selected card highlights, others dim */
.fb-mode-grid.has-selection .fb-mode-card:not(.fb-mode-selected) {
  opacity: 0.38;
  transform: scale(0.97);
}
.fb-mode-card.fb-mode-selected {
  border-color: var(--fb-accent);
  background: var(--fb-surface2);
  box-shadow: 0 0 0 2px rgba(0,255,135,0.25), 0 8px 24px rgba(0,0,0,0.3);
  transform: scale(1.02);
}

.fb-mode-accent {
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  border-radius: 3px 0 0 3px;
}
.career-accent  { background: var(--career-accent); }
.imposter-accent { background: var(--imposter-accent); }
.hl-accent      { background: var(--hl-accent); }

.fb-mode-icon { font-size: 1.5rem; margin-left: 6px; }

.fb-mode-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 6px;
  flex: 1;
}
.fb-mode-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--fb-text);
}
.fb-mode-desc {
  font-size: 0.7rem;
  color: var(--fb-text2);
  line-height: 1.3;
}
.fb-mode-arrow {
  font-size: 0.9rem;
  color: var(--fb-text3);
  align-self: flex-end;
}
.fb-coming-soon {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--fb-surface3);
  color: var(--fb-text3);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 99px;
}

/* ── Daily banner ────────────────────────────────────────────────────────── */
.fb-daily-banner {
  background: linear-gradient(135deg, var(--fb-surface2), var(--fb-surface3));
  border: 1px solid rgba(0,255,135,0.2);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
.fb-daily-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(0,255,135,0.06), transparent 60%);
  pointer-events: none;
}
.fb-daily-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 12px;
}
.fb-daily-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fb-daily-icon { font-size: 1.4rem; }
.fb-daily-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--fb-text);
}
.fb-daily-sub {
  font-size: 0.72rem;
  color: var(--fb-text2);
  margin-top: 2px;
}
.fb-daily-btn {
  background: var(--fb-accent);
  color: #000;
  border: none;
  border-radius: 99px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fb-daily-btn:hover { opacity: 0.9; transform: scale(1.03); }
.fb-daily-btn:active { transform: scale(0.97); }
.fb-daily-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

/* ── Submode bottom-sheet overlay ────────────────────────────────────────── */
.fb-submode-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
  /* visibility toggles via .is-open */
}
.fb-submode-overlay.is-open { pointer-events: all; }

.fb-submode-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.28s ease;
}
.fb-submode-overlay.is-open .fb-submode-backdrop {
  background: rgba(0,0,0,0.72);
}

.fb-submode-sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--fb-surface2);
  border: 1px solid var(--fb-border2);
  border-radius: 22px 22px 0 0;
  padding: 10px 16px 32px;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.fb-submode-overlay.is-open .fb-submode-sheet {
  transform: translateY(0);
}

.fb-submode-handle {
  width: 36px;
  height: 4px;
  background: var(--fb-border2);
  border-radius: 99px;
  margin: 0 auto 14px;
}

.fb-submode-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--fb-accent);
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: 0.2px;
}
.fb-submode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.fb-submode-btn {
  background: var(--fb-surface3);
  border: 1.5px solid var(--fb-border);
  border-radius: 14px;
  padding: 16px 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--fb-text2);
  transition:
    transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1),
    border-color 0.14s ease,
    background 0.14s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-family: inherit;
}
.fb-submode-btn span:first-child { font-size: 1.5rem; }
.fb-submode-btn strong { color: var(--fb-text); font-size: 0.82rem; display: block; }
.fb-submode-btn:hover  { border-color: var(--fb-accent); background: rgba(0,255,135,0.08); transform: translateY(-1px); }
.fb-submode-btn:active {
  transform: scale(0.93) translateY(1px);
  transition: transform 0.07s ease;
}

.fb-submode-cancel {
  width: 100%;
  background: transparent;
  border: 1px solid var(--fb-border);
  border-radius: 12px;
  padding: 10px;
  color: var(--fb-text2);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.fb-submode-cancel:hover { background: var(--fb-surface3); }

/* ── In-game nav ─────────────────────────────────────────────────────────── */
.fb-in-game-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 2px;
}
.fb-back-btn {
  background: var(--fb-surface2);
  border: 1px solid var(--fb-border);
  border-radius: 8px;
  color: var(--fb-text2);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.fb-back-btn:hover { background: var(--fb-surface3); color: var(--fb-text); }
.fb-mode-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--fb-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fb-sub-badge {
  font-size: 0.7rem;
  color: var(--fb-text2);
  font-weight: 600;
  background: var(--fb-surface2);
  border-radius: 99px;
  padding: 2px 8px;
  margin-left: auto;
}

/* ── HUD ─────────────────────────────────────────────────────────────────── */
.fb-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: 12px;
  padding: 10px 14px;
  gap: 8px;
}
.fb-hud-left, .fb-hud-right { min-width: 70px; }
.fb-hud-right { text-align: right; }
.fb-hud-lives { font-size: 0.92rem; letter-spacing: 1px; }
.fb-hud-mode  { font-size: 0.62rem; color: var(--fb-text2); font-weight: 700; text-transform: uppercase; margin-top: 2px; }
.fb-hud-mid   { flex: 1; }
.fb-progress-wrap {
  background: var(--fb-surface3);
  border-radius: 99px;
  height: 5px;
  overflow: hidden;
}
.fb-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--fb-accent), var(--fb-accent2));
  border-radius: 99px;
  transition: width 0.4s ease;
  width: 0%;
}
.fb-round-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--fb-text2);
  text-align: center;
  margin-top: 3px;
  letter-spacing: 0.3px;
}
.fb-score {
  font-size: 0.78rem;
  color: var(--fb-text2);
  font-weight: 700;
}
.fb-score strong { color: var(--fb-accent); font-size: 0.95rem; }
.fb-streak {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--fb-orange);
  min-height: 16px;
}

/* ── Meta row ────────────────────────────────────────────────────────────── */
.fb-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
}
.fb-category-badge, .fb-diff-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.fb-category-badge {
  background: rgba(0,255,135,0.12);
  color: var(--fb-accent);
}
.fb-diff-badge.easy   { background: rgba(0,255,135,0.1); color: var(--fb-green); }
.fb-diff-badge.medium { background: rgba(255,165,2,0.1); color: var(--fb-orange); }
.fb-diff-badge.hard   { background: rgba(255,71,87,0.1); color: var(--fb-red); }

/* ── Streak burst ────────────────────────────────────────────────────────── */
.fb-streak-burst {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--fb-orange);
  animation: fbStreakPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  margin: -4px 0;
}
.fb-streak-burst.hidden { display: none !important; }
@keyframes fbStreakPop {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Reveal panel ────────────────────────────────────────────────────────── */
.fb-reveal {
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border2);
  border-radius: 14px;
  padding: 16px 18px;
  animation: fbRevealSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.fb-reveal.hidden { display: none !important; }
@keyframes fbRevealSlide {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.fb-reveal-result {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.fb-reveal-result.correct { color: var(--fb-green); }
.fb-reveal-result.wrong   { color: var(--fb-red); }
.fb-reveal-explanation {
  font-size: 0.84rem;
  color: var(--fb-text2);
  line-height: 1.5;
  border-top: 1px solid var(--fb-border);
  padding-top: 8px;
}
.fb-reveal-next {
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  font-size: 0.95rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.fb-btn {
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.15s ease,
    box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.fb-btn:active {
  transform: scale(0.93) translateY(1px);
  transition: transform 0.07s ease;
}
.fb-btn-primary   { background: var(--fb-accent);  color: #000; }
.fb-btn-primary:hover { box-shadow: var(--fb-glow); }
.fb-btn-success   { background: #00b09b; color: #fff; }
.fb-btn-secondary { background: var(--fb-surface2); color: var(--fb-text); border: 1px solid var(--fb-border2); }
.fb-btn-full      { width: 100%; }
.fb-btn-reddit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--fb-surface2);
  border: 1px solid rgba(255,69,0,0.25);
  border-radius: 12px;
  color: #ff6534;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.fb-btn-reddit:hover { background: var(--fb-surface3); }

/* ── Career Path ─────────────────────────────────────────────────────────── */
.cp-prompt {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fb-text2);
  text-align: center;
  margin-bottom: 4px;
}
.cp-clubs-wrap {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  padding: 16px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cp-clubs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.cp-club {
  background: var(--fb-surface2);
  border: 1px solid var(--fb-border2);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fb-text);
  white-space: nowrap;
  animation: cpClubIn 0.25s ease both;
}
@keyframes cpClubIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cp-arrow {
  font-size: 0.9rem;
  color: var(--fb-accent);
  font-weight: 900;
  flex-shrink: 0;
}
.cp-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cp-option {
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border2);
  border-radius: 12px;
  padding: 14px 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fb-text);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  line-height: 1.3;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cp-option:hover:not(:disabled) {
  border-color: var(--fb-accent);
  background: var(--fb-accent-dim);
}
.cp-option:active:not(:disabled) { transform: scale(0.96); }
.cp-option:disabled { cursor: default; }
.cp-option.correct {
  background: rgba(0,255,135,0.12);
  border-color: var(--fb-green);
  color: var(--fb-green);
  animation: fbCardCorrect 0.45s ease both;
}
.cp-option.wrong {
  background: rgba(255,71,87,0.1);
  border-color: var(--fb-red);
  color: var(--fb-red);
  animation: fbCardWrong 0.4s ease both;
}
.cp-option.reveal {
  background: rgba(255,165,2,0.08);
  border-color: var(--fb-orange);
  color: var(--fb-orange);
}

/* ── Footy Imposter ──────────────────────────────────────────────────────── */
.fi-prompt {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fb-text);
  text-align: center;
  padding: 4px 0;
}
.fi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fi-card {
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border2);
  border-radius: 14px;
  padding: 18px 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fb-text);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  transition: border-color 0.12s, background 0.12s, transform 0.08s, box-shadow 0.12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  word-break: break-word;
  hyphens: auto;
}
.fi-card:hover:not(:disabled):not(.fi-correct):not(.fi-wrong):not(.fi-reveal) {
  border-color: var(--imposter-accent);
  background: rgba(255,107,107,0.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255,107,107,0.15);
}
.fi-card:active:not(:disabled) { transform: scale(0.96); }
.fi-card:disabled { cursor: default; }
.fi-card.fi-correct {
  background: rgba(0,255,135,0.12); border-color: var(--fb-green); color: var(--fb-green);
  animation: fbCardCorrect 0.45s ease both;
}
.fi-card.fi-wrong {
  background: rgba(255,71,87,0.1); border-color: var(--fb-red); color: var(--fb-red);
  animation: fbCardWrong 0.4s ease both;
}
.fi-card.fi-reveal {
  background: rgba(255,165,2,0.08); border-color: var(--fb-orange); color: var(--fb-orange);
}
.fi-card.fi-belongs { opacity: 0.35; border-color: var(--fb-border); }

/* ── Higher or Lower ─────────────────────────────────────────────────────── */
.hl-topic {
  font-size: 1rem;
  font-weight: 800;
  color: var(--fb-text);
  text-align: center;
  line-height: 1.3;
  padding: 4px 8px;
}
.hl-choices {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.hl-choice {
  background: var(--fb-surface);
  border: 2px solid var(--fb-border2);
  border-radius: 16px;
  padding: 20px 12px 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: border-color 0.12s, background 0.12s, transform 0.1s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 120px;
  justify-content: center;
}
.hl-choice:hover:not(:disabled):not(.hl-correct):not(.hl-wrong) {
  border-color: var(--hl-accent);
  background: rgba(0,212,255,0.05);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,212,255,0.15);
}
.hl-choice:active:not(:disabled) { transform: scale(0.96); }
.hl-choice:disabled { cursor: default; }
.hl-flag { font-size: 1.4rem; }
.hl-name { font-size: 0.9rem; font-weight: 800; color: var(--fb-text); line-height: 1.2; }
.hl-value { font-size: 1.5rem; font-weight: 900; color: var(--fb-accent2); display: none; }
.hl-unit  { font-size: 0.68rem; font-weight: 700; color: var(--fb-text2); text-transform: uppercase; letter-spacing: 0.4px; display: none; }
.hl-choice.revealed .hl-value,
.hl-choice.revealed .hl-unit { display: block; }
.hl-choice.hl-correct {
  border-color: var(--fb-green); background: rgba(0,255,135,0.08);
  animation: fbCardCorrect 0.45s ease both;
}
.hl-choice.hl-correct .hl-name { color: var(--fb-green); }
.hl-choice.hl-correct .hl-value { color: var(--fb-green); }
.hl-choice.hl-wrong {
  border-color: var(--fb-red); background: rgba(255,71,87,0.08);
  animation: fbCardWrong 0.4s ease both;
}
.hl-choice.hl-wrong .hl-name { color: var(--fb-red); }
.hl-vs {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--fb-text2);
  text-align: center;
  flex-shrink: 0;
}

/* ── Shared card animations ──────────────────────────────────────────────── */
@keyframes fbCardCorrect {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.05); box-shadow: 0 0 24px rgba(0,255,135,0.4); }
  60%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}
@keyframes fbCardWrong {
  0%,100% { transform: translateX(0); }
  20%  { transform: translateX(-7px); }
  40%  { transform: translateX(7px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
}

/* ── Game over ───────────────────────────────────────────────────────────── */
.fb-over-card {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border2);
  border-radius: 16px;
  padding: 26px 20px 20px;
  text-align: center;
}
.fb-over-title {
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--fb-accent), var(--fb-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.fb-over-sub {
  font-size: 0.82rem;
  color: var(--fb-text2);
  margin-bottom: 16px;
}
.fb-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.fb-stat-item {
  background: var(--fb-surface2);
  border-radius: 10px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fb-stat-val { font-size: 1.5rem; font-weight: 900; color: var(--fb-accent); }
.fb-stat-lbl { font-size: 0.7rem; color: var(--fb-text2); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.fb-new-record {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--fb-yellow);
  margin: 8px 0;
}
.fb-earned-title {
  background: var(--fb-accent-dim);
  color: var(--fb-accent);
  border-radius: 99px;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  margin: 8px 0;
  display: inline-block;
}
.fb-over-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

/* ── Title ladder card ───────────────────────────────────────────────────── */
.fb-title-ladder-card {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  overflow: hidden;
}
.fb-ladder-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--fb-border);
}
.fb-ladder-label { font-size: 0.88rem; font-weight: 800; color: var(--fb-text); }
.fb-ladder-sub   { font-size: 0.72rem; color: var(--fb-text2); margin-top: 2px; }

/* ladder rows (reuse game-shell-style but fb-themed) */
.ladder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--fb-border);
  font-size: 0.82rem;
}
.ladder-row:last-child { border-bottom: none; }
.ladder-icon { font-size: 1rem; min-width: 24px; text-align: center; }
.ladder-name { flex: 1; font-weight: 700; color: var(--fb-text); }
.ladder-badge { font-size: 0.68rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.current-badge { background: rgba(0,255,135,0.15); color: var(--fb-green); }
.earned-badge  { background: var(--fb-surface3); color: var(--fb-text2); }
.locked-name   { color: var(--fb-text3); }
.ladder-hint   { font-size: 0.7rem; color: var(--fb-text3); }
.ladder-current { background: rgba(0,255,135,0.04); }

/* ── Guess The Club ──────────────────────────────────────────────────────── */
.gc-clue-type {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--fb-accent);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: center;
  margin-bottom: 8px;
}
.gc-clue-box {
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border2);
  border-radius: 14px;
  padding: 18px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fb-text);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 14px;
}
.gc-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gc-option {
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border2);
  border-radius: 12px;
  padding: 14px 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fb-text);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  line-height: 1.3;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.gc-option:hover:not(:disabled) { border-color: var(--fb-accent); background: var(--fb-accent-dim); }
.gc-option:active:not(:disabled) { transform: scale(0.96); }
.gc-option:disabled { cursor: default; }
.gc-option.correct { background: rgba(0,255,135,0.12); border-color: var(--fb-green); color: var(--fb-green); animation: fbCardCorrect 0.45s ease both; }
.gc-option.wrong   { background: rgba(255,71,87,0.1); border-color: var(--fb-red); color: var(--fb-red); animation: fbCardWrong 0.4s ease both; }

/* ── Transfer Chaos ──────────────────────────────────────────────────────── */
.tc-prompt {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fb-text);
  text-align: center;
  margin-bottom: 10px;
}
.tc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tc-card {
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border2);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  width: 100%;
}
.tc-card:hover:not(:disabled) { border-color: var(--fb-accent); background: var(--fb-accent-dim); transform: translateY(-1px); }
.tc-card:active:not(:disabled) { transform: scale(0.98); }
.tc-card:disabled { cursor: default; }
.tc-player { font-size: 0.9rem; font-weight: 800; color: var(--fb-text); min-width: 0; flex: 1; }
.tc-move   { font-size: 0.75rem; color: var(--fb-text2); display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.tc-from, .tc-to { font-weight: 600; }
.tc-arrow  { color: var(--fb-accent); font-weight: 900; }
.tc-year   { font-size: 0.75rem; font-weight: 800; color: var(--fb-text3); flex-shrink: 0; }
.tc-card.tc-correct { background: rgba(0,255,135,0.1); border-color: var(--fb-green); animation: fbCardCorrect 0.45s ease both; }
.tc-card.tc-correct .tc-player { color: var(--fb-green); }
.tc-card.tc-wrong   { background: rgba(255,71,87,0.1); border-color: var(--fb-red); animation: fbCardWrong 0.4s ease both; }
.tc-card.tc-wrong .tc-player { color: var(--fb-red); }
.tc-card.tc-reveal  { background: rgba(255,165,2,0.08); border-color: var(--fb-orange); }
.tc-card.tc-reveal .tc-player { color: var(--fb-orange); }
.tc-card.tc-real    { opacity: 0.4; border-color: var(--fb-border); }

/* ── Football Connections ────────────────────────────────────────────────── */
.conn-prompt {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fb-text);
  text-align: center;
  margin-bottom: 4px;
}
.conn-hint {
  font-size: 0.75rem;
  color: var(--fb-text2);
  text-align: center;
  margin-bottom: 12px;
  font-style: italic;
}
.conn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}
.conn-item {
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border2);
  border-radius: 10px;
  padding: 10px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fb-text);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  line-height: 1.2;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.conn-item:hover:not(:disabled):not(.conn-selected):not(.conn-done) {
  border-color: var(--fb-accent); background: var(--fb-accent-dim);
}
.conn-item:active:not(:disabled) { transform: scale(0.94); }
.conn-item:disabled { cursor: default; }
.conn-item.conn-selected {
  border-color: var(--fb-accent2);
  background: rgba(0,212,255,0.12);
  color: var(--fb-accent2);
}
.conn-item.conn-done {
  background: rgba(0,255,135,0.1);
  border-color: var(--fb-green);
  color: var(--fb-green);
  opacity: 0.7;
}
.conn-item.conn-shake { animation: connShake 0.45s ease both; }
@keyframes connShake {
  0%,100% { transform: translateX(0); }
  20%  { transform: translateX(-5px); }
  40%  { transform: translateX(5px); }
  60%  { transform: translateX(-3px); }
  80%  { transform: translateX(3px); }
}
.conn-actions { text-align: center; margin-bottom: 10px; }
.conn-submit {
  background: var(--fb-accent);
  color: #000;
  border: none;
  border-radius: 99px;
  padding: 10px 24px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.conn-submit:disabled { opacity: 0.35; cursor: default; }
.conn-submit:not(:disabled):hover { transform: scale(1.03); }
.conn-solved { display: flex; flex-direction: column; gap: 6px; }
.conn-group-reveal {
  background: rgba(0,255,135,0.1);
  border: 1px solid rgba(0,255,135,0.3);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fb-green);
  text-align: center;
  animation: fbCardCorrect 0.4s ease both;
}

/* ── Who Scored? ─────────────────────────────────────────────────────────── */
.ws-clue-type {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--fb-accent2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: center;
  margin-bottom: 8px;
}
.ws-clue-box {
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border2);
  border-left: 3px solid var(--fb-accent2);
  border-radius: 14px;
  padding: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fb-text);
  text-align: left;
  line-height: 1.55;
  margin-bottom: 10px;
  font-style: italic;
}
.ws-context {
  font-size: 0.72rem;
  color: var(--fb-text2);
  text-align: center;
  margin-bottom: 12px;
  font-weight: 600;
}
.ws-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ws-option {
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border2);
  border-radius: 12px;
  padding: 14px 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fb-text);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ws-option:hover:not(:disabled) { border-color: var(--fb-accent2); background: rgba(0,212,255,0.06); }
.ws-option:active:not(:disabled) { transform: scale(0.96); }
.ws-option:disabled { cursor: default; }
.ws-option.correct { background: rgba(0,255,135,0.12); border-color: var(--fb-green); color: var(--fb-green); animation: fbCardCorrect 0.45s ease both; }
.ws-option.wrong   { background: rgba(255,71,87,0.1); border-color: var(--fb-red); color: var(--fb-red); animation: fbCardWrong 0.4s ease both; }

/* ── Football Bluff ──────────────────────────────────────────────────────── */
.bluff-prompt {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fb-text);
  text-align: center;
  margin-bottom: 12px;
}
.bluff-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bluff-card {
  background: var(--fb-surface);
  border: 1.5px solid var(--fb-border2);
  border-radius: 14px;
  padding: 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fb-text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  line-height: 1.45;
  width: 100%;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.bluff-card:hover:not(:disabled) { border-color: var(--fb-yellow); background: rgba(253,203,110,0.06); transform: translateY(-1px); }
.bluff-card:active:not(:disabled) { transform: scale(0.98); }
.bluff-card:disabled { cursor: default; }
.bluff-card.bluff-fake-correct { background: rgba(0,255,135,0.1); border-color: var(--fb-green); color: var(--fb-green); animation: fbCardCorrect 0.45s ease both; }
.bluff-card.bluff-wrong        { background: rgba(255,71,87,0.1); border-color: var(--fb-red); color: var(--fb-red); animation: fbCardWrong 0.4s ease both; }
.bluff-card.bluff-fake-reveal  { background: rgba(255,165,2,0.08); border-color: var(--fb-orange); color: var(--fb-orange); }
.bluff-card.bluff-real         { opacity: 0.4; border-color: var(--fb-border); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 360px) {
  .fb-mode-grid { grid-template-columns: 1fr; }
  .cp-option { font-size: 0.82rem; padding: 12px 8px; min-height: 50px; }
  .fi-card { font-size: 0.82rem; padding: 14px 8px; min-height: 66px; }
  .hl-name { font-size: 0.82rem; }
  .hl-choice { min-height: 100px; padding: 14px 8px 12px; }
}

@media (min-width: 480px) {
  .cp-option  { font-size: 0.92rem; min-height: 62px; }
  .fi-card    { font-size: 0.95rem; min-height: 82px; }
  .hl-choice  { min-height: 130px; }
}

@media (min-width: 600px) {
  .fb-title { font-size: 1.5rem; }
  .fb-mode-grid { grid-template-columns: repeat(2, 1fr); }
  .cp-option { min-height: 68px; }
  .fi-card { min-height: 88px; }
}

@media (min-width: 900px) {
  body { padding-top: 32px; }
  #app { max-width: 600px; }
  .fb-screen { padding: 14px 28px; }
  .fb-over-card { padding: 32px 28px 24px; }
}

@media (min-width: 1200px) {
  #app { max-width: 680px; }
}

/* ── Theme overrides — Football Brain inherits platform theme ────────────── */

/* Default light theme (no html class, no dark mode) */
html:not(.theme-sepia):not(.theme-bw) .fb-body:not(.dark) {
  --fb-bg:       #f0f4f8;
  --fb-surface:  #ffffff;
  --fb-surface2: #e8eef4;
  --fb-surface3: #dde5ef;
  --fb-border:   rgba(0,0,0,0.10);
  --fb-border2:  rgba(0,0,0,0.18);
  --fb-text:     #1a1a2e;
  --fb-text2:    #4a5568;
  --fb-text3:    #9aa5b4;
  background-image: none;
}

/* Sepia light */
html.theme-sepia .fb-body:not(.dark) {
  --fb-bg:       #f5ede0;
  --fb-surface:  #faf4ea;
  --fb-surface2: #ece2d0;
  --fb-surface3: #e0d4bc;
  --fb-border:   rgba(58,42,24,0.12);
  --fb-border2:  rgba(58,42,24,0.22);
  --fb-accent:   #8b5e3c;
  --fb-accent2:  #b8722a;
  --fb-text:     #3a2a18;
  --fb-text2:    #7a5c38;
  --fb-text3:    #a08060;
  --fb-green:    #4a6e3c;
  --fb-red:      #8b3a3a;
  background-image: none;
}

/* Sepia dark */
html.theme-sepia .fb-body.dark {
  --fb-bg:       #18100a;
  --fb-surface:  #231710;
  --fb-surface2: #2c1e12;
  --fb-surface3: #3a2818;
  --fb-border:   rgba(255,255,255,0.08);
  --fb-border2:  rgba(255,255,255,0.14);
  --fb-accent:   #c49060;
  --fb-accent2:  #d8a070;
  --fb-text:     #f0e6d0;
  --fb-text2:    #a08060;
  --fb-text3:    #5a4030;
}

/* B&W light */
html.theme-bw .fb-body:not(.dark) {
  --fb-bg:       #f0f0f0;
  --fb-surface:  #ffffff;
  --fb-surface2: #e4e4e4;
  --fb-surface3: #d4d4d4;
  --fb-border:   rgba(0,0,0,0.12);
  --fb-border2:  rgba(0,0,0,0.22);
  --fb-accent:   #222222;
  --fb-accent2:  #444444;
  --fb-text:     #111111;
  --fb-text2:    #555555;
  --fb-text3:    #999999;
  --fb-green:    #2a2a2a;
  --fb-red:      #444444;
  background-image: none;
}

/* B&W dark */
html.theme-bw .fb-body.dark {
  --fb-bg:       #0d0d0d;
  --fb-surface:  #1a1a1a;
  --fb-surface2: #222222;
  --fb-surface3: #2e2e2e;
  --fb-border:   rgba(255,255,255,0.08);
  --fb-border2:  rgba(255,255,255,0.15);
  --fb-accent:   #cccccc;
  --fb-accent2:  #999999;
  --fb-text:     #f0f0f0;
  --fb-text2:    #888888;
  --fb-text3:    #555555;
}
