:root {
  --bg: #071510;
  --bg2: #0c1f16;
  --surface: rgba(18, 38, 28, 0.72);
  --surface2: rgba(24, 50, 36, 0.85);
  --border: rgba(255, 255, 255, 0.09);
  --text: #ecfdf5;
  --muted: #86a897;
  --accent: #34d399;
  --accent2: #10b981;
  --accent-glow: rgba(52, 211, 153, 0.35);
  --gold: #fbbf24;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 68px;
  --topbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Vazirmatn", "Segoe UI", sans-serif;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}

.pitch-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(52, 211, 153, 0.18), transparent),
    radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.08), transparent),
    linear-gradient(180deg, #071510 0%, #0a1812 50%, #071510 100%);
  pointer-events: none;
}

.pitch-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 39px,
    rgba(255,255,255,0.5) 39px,
    rgba(255,255,255,0.5) 40px
  );
}

/* ── Splash ── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0a1f12 0%, #071510 100%);
  transition: opacity 0.5s, visibility 0.5s;
}

.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-logo { text-align: center; animation: float 2.5s ease-in-out infinite; }

.splash-logo .ball {
  font-size: 3.5rem;
  filter: drop-shadow(0 0 24px var(--accent-glow));
  margin-bottom: 12px;
}

.splash-logo h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash-logo p { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }

.splash-loader {
  display: flex;
  gap: 6px;
  margin-top: 32px;
}

.splash-loader span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 1.2s ease-in-out infinite;
}

.splash-loader span:nth-child(2) { animation-delay: 0.15s; }
.splash-loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── App shell ── */
.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
}

.app.sub-page { padding-bottom: calc(var(--safe-b) + 16px); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 16px 8px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(7, 21, 16, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent2), #059669);
  border-radius: 12px;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.brand strong { display: block; font-size: 0.95rem; }
.brand small { color: var(--muted); font-size: 0.72rem; }

.points-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold);
}

.main {
  padding: 16px;
  min-height: calc(100vh - var(--topbar-h) - var(--nav-h));
}

.main.fade-out { opacity: 0; transform: translateY(6px); transition: 0.12s ease; }
.main.fade-in { animation: slideUp 0.3s ease; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  align-items: stretch;
  background: rgba(10, 24, 18, 0.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 60;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  transition: color 0.2s;
  position: relative;
}

.nav-item svg { width: 22px; height: 22px; transition: transform 0.2s; }

.nav-item.active {
  color: var(--accent);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}

.nav-item.active svg { transform: scale(1.08); }

/* ── Hero ── */
.hero {
  position: relative;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #065f46 0%, #047857 40%, #059669 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.12);
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.hero-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
  margin-bottom: 6px;
}

.hero h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.5;
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.stats-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.wallet-hero .big {
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.35);
}

.stat-box {
  background: rgba(0,0,0,0.22);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  backdrop-filter: blur(4px);
}

.stat-box .num { font-size: 1.1rem; font-weight: 800; display: block; }
.stat-box .lbl { font-size: 0.65rem; opacity: 0.85; margin-top: 2px; }

/* ── Section title ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.section-head span { font-size: 0.75rem; color: var(--muted); }

/* ── Match card ── */
.match-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
  animation: cardIn 0.4s ease backwards;
}

.match-card:nth-child(2) { animation-delay: 0.05s; }
.match-card:nth-child(3) { animation-delay: 0.1s; }
.match-card:nth-child(4) { animation-delay: 0.15s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.match-card:active { transform: scale(0.985); }

.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.team.home { align-items: flex-start; text-align: right; }
.team.away { align-items: flex-end; text-align: left; }

.team-crest {
  width: 48px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.15);
}

.team-crest.sm { width: 40px; height: 30px; font-size: 0.75rem; border-radius: 10px; }
.team-crest.lg { width: 56px; height: 42px; }
.team-crest.xl { width: 64px; height: 48px; }

.team-name {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.vs-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface2);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.match-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Badges & buttons ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.badge-open { background: rgba(52,211,153,0.15); color: var(--accent); }
.badge-lock { background: rgba(248,113,113,0.15); color: var(--danger); }
.badge-done { background: rgba(251,191,36,0.15); color: var(--gold); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active { transform: scale(0.96); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #022c22;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-ghost {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-sm { padding: 8px 14px; font-size: 0.78rem; }
.btn-block { width: 100%; }
.btn-danger { background: rgba(248,113,113,0.15); color: #fecaca; border: 1px solid rgba(248,113,113,0.3); }

.cta-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #022c22;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 12px var(--accent-glow);
}

/* ── Wizard ── */
.wizard-header {
  text-align: center;
  margin-bottom: 20px;
}

.wizard-match {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.progress-track {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.progress-step {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--surface2);
  transition: background 0.3s;
}

.progress-step.done { background: var(--accent); }
.progress-step.current { background: linear-gradient(90deg, var(--accent), var(--accent2)); }

.step-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.step-desc { font-size: 0.8rem; color: var(--muted); margin-bottom: 16px; }

.wizard-back { margin-top: 14px; }

.tier-cards {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.tier-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.tier-card.selected {
  border-color: var(--accent);
  background: rgba(52, 211, 153, 0.08);
}

.tier-card .icon { font-size: 1.6rem; }
.tier-card .info strong { display: block; font-size: 0.9rem; }
.tier-card .info small { color: var(--muted); font-size: 0.72rem; }

.result-options {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.result-opt {
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.result-opt.selected {
  border-color: var(--accent);
  background: rgba(52, 211, 153, 0.1);
  box-shadow: 0 0 0 1px var(--accent);
}

.num-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.num-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.num-btn.selected, .num-btn:active {
  background: rgba(52, 211, 153, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.summary-row:last-child { border-bottom: none; }
.summary-row span:last-child { font-weight: 700; color: var(--accent); }

/* ── Points page ── */
.score-hero {
  text-align: center;
  padding: 28px 20px;
  background: linear-gradient(160deg, rgba(251,191,36,0.12), rgba(52,211,153,0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.score-hero .big {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tier-points {
  display: grid;
  gap: 10px;
}

.tier-point-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.tier-point-row .val { font-size: 1.2rem; font-weight: 800; color: var(--accent); }

.info-box {
  margin-top: 16px;
  padding: 14px;
  background: rgba(52,211,153,0.06);
  border: 1px dashed rgba(52,211,153,0.25);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Prediction history ── */
.pred-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.pred-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.pred-teams { font-weight: 800; font-size: 0.88rem; }

.pred-meta { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

.score-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.dot {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.dot.ok { background: rgba(52,211,153,0.15); color: var(--accent); }
.dot.no { background: rgba(248,113,113,0.12); color: var(--danger); }

.points-earned {
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state .icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.6; }
.empty-state h4 { margin: 0 0 8px; font-size: 1rem; }
.empty-state p { margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.6; }

/* ── Admin ── */
.glass-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.glass-panel h4 { margin: 0 0 12px; font-size: 0.9rem; }

.input, .textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.admin-actions .btn { flex: 1; min-width: 100px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 16px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

.back-link:hover { color: var(--accent); }

/* ── Toast & loader ── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 150;
  max-width: 90%;
  font-size: 0.85rem;
  font-weight: 600;
  animation: toastIn 0.3s ease;
}

.app.sub-page .toast { bottom: calc(var(--safe-b) + 16px); }

.toast.error { border-color: rgba(248,113,113,0.4); background: rgba(127,29,29,0.9); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.loader {
  position: fixed;
  inset: 0;
  background: rgba(7, 21, 16, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 140;
}

.loader-ring {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

.correct { color: var(--accent); }
.wrong { color: var(--danger); }

.rank-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}

.rank-card h4 { margin: 0 0 10px; font-size: 0.9rem; color: var(--accent); }
.rank-card pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--font);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--muted);
}

.existing-pred {
  background: rgba(52,211,153,0.06);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.existing-pred button { margin-top: 8px; }

/* ── Team flags (animated) — قاب 4:3 مثل flagcdn ── */
.team-flag-wrap {
  --flag-radius: var(--radius-sm);
  position: relative;
  width: 48px;
  height: 36px;
  border-radius: var(--flag-radius);
  overflow: hidden;
  flex-shrink: 0;
  direction: ltr;
  isolation: isolate;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(255, 255, 255, 0.18),
    0 0 18px rgba(52, 211, 153, 0.15);
  animation: flagFloat 3.2s ease-in-out infinite;
}

.team-flag-bg {
  position: absolute;
  inset: 0;
  border-radius: var(--flag-radius);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform-origin: center center;
  animation: flagWave 5s ease-in-out infinite;
}

.team-flag-wrap.sm {
  width: 40px;
  height: 30px;
  --flag-radius: 10px;
}

.team-flag-wrap.lg {
  width: 56px;
  height: 42px;
  --flag-radius: var(--radius-sm);
}

.team-flag-wrap.xl {
  width: 64px;
  height: 48px;
  --flag-radius: var(--radius-sm);
}

.team-flag-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--flag-radius);
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 65%
  );
  animation: flagShine 4.5s ease-in-out infinite;
  pointer-events: none;
}

.match-row .team-flag-wrap:nth-child(1),
.match-row .team .team-flag-wrap { animation-delay: 0s; }
.match-row .team.away .team-flag-wrap { animation-delay: 0.6s; }

@keyframes flagFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-4px) rotate(1deg); }
}

@keyframes flagWave {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.03) rotate(0.4deg); }
  75% { transform: scale(1) rotate(-0.4deg); }
}

@keyframes flagShine {
  0%, 70%, 100% { transform: translateX(-120%) skewX(-12deg); opacity: 0; }
  85% { opacity: 0.9; }
  100% { transform: translateX(120%) skewX(-12deg); opacity: 0; }
}

/* ── Teams showcase page ── */
.teams-hero {
  text-align: center;
  padding: 22px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #0f3d2e 0%, #065f46 50%, #047857 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.teams-hero::before {
  content: "⚽";
  position: absolute;
  font-size: 5rem;
  opacity: 0.06;
  top: -10px;
  left: -10px;
  animation: flagFloat 6s ease-in-out infinite;
}

.teams-hero h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.teams-hero p {
  margin: 8px 0 0;
  font-size: 0.82rem;
  opacity: 0.85;
}

.teams-hero .big-num {
  font-size: 2rem;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 24px rgba(255, 215, 0, 0.4);
  margin-top: 10px;
}

.conf-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.conf-tabs::-webkit-scrollbar { display: none; }

.conf-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.conf-tab.active {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
  animation: teamCardIn 0.5s ease backwards;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.team-card:active {
  transform: scale(0.96);
}

.team-card .team-flag-wrap {
  margin: 0 auto 8px;
  width: 52px;
  height: 39px;
}

.team-card .name {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  min-height: 2.6em;
}

.team-card .group-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.62rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  color: var(--gold);
  font-weight: 700;
}

@keyframes teamCardIn {
  from { opacity: 0; transform: scale(0.85) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.teams-search {
  margin-bottom: 12px;
}

/* ── Admin team picker ── */
.admin-match-builder {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.pick-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}

.vs-pick {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold);
  padding-top: 18px;
}

.team-pick-btn {
  width: 100%;
  min-height: 88px;
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.2s, background 0.2s;
}

.team-pick-btn.selected {
  border-style: solid;
  border-color: var(--accent);
  background: rgba(52, 211, 153, 0.08);
}

.team-pick-btn .team-flag-wrap {
  width: 44px;
  height: 33px;
}

.admin-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.team-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(7, 21, 16, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.team-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.team-picker-head h4 {
  margin: 0;
  font-size: 0.95rem;
}

.team-picker-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-content: start;
  padding-bottom: 12px;
}

.picker-team {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.picker-team:active { transform: scale(0.95); }

.picker-team.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.picker-team .team-flag-wrap {
  width: 40px;
  height: 30px;
  margin: 0 auto 6px;
}

.picker-team span {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
  display: block;
}

.picker-team.selected-pick {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ── Fixture calendar ── */
.fixture-schedule {
  background: rgba(8, 22, 16, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

.fixture-date-head {
  font-weight: 800;
  font-size: 0.86rem;
  line-height: 1.55;
  padding: 16px 14px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fixture-day:last-child .fixture-row:last-child {
  border-bottom: none;
}

.fixture-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s;
}

.fixture-row:active {
  background: rgba(52, 211, 153, 0.08);
}

.fixture-row.fixture-lock {
  opacity: 0.75;
}

.fixture-row.fixture-done .fixture-time {
  color: var(--gold);
  font-size: 0.72rem;
  line-height: 1.35;
}

.fixture-body {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}

.fixture-side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fixture-side.home {
  justify-content: flex-end;
}

.fixture-side.away {
  justify-content: flex-start;
}

.fixture-name {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 88px;
}

.fixture-time {
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  min-width: 48px;
  padding: 0 4px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.fixture-chevron {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.65;
  padding-inline-start: 2px;
}

.fixture-admin-fields {
  margin-bottom: 12px;
}

.fixture-admin-fields .pick-label {
  display: block;
  margin-bottom: 8px;
}

.fixture-admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.teams-main-tabs {
  margin-bottom: 14px;
}

.schedule-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.schedule-admin-desc {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.6;
}

.schedule-admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.schedule-admin-stats strong {
  color: var(--text);
}

.fixture-row.fixture-preview {
  opacity: 0.82;
}

.fixture-row.fixture-preview .fixture-time {
  color: var(--accent);
}

.fixture-edit-btn {
  flex-shrink: 0;
  margin-inline-start: 4px;
  padding: 4px 8px !important;
  min-width: auto;
}

