: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);
  --live: #34d399;
  --live2: #10b981;
  --live-glow: rgba(52, 211, 153, 0.45);
  --gold: #fbbf24;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-md: 14px;
  --nav-h: 68px;
  --topbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: system-ui, "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, 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);
  flex-shrink: 0;
}

.brand strong { display: block; font-size: 0.95rem; }
.brand small { color: var(--muted); font-size: 0.72rem; }

.header-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  color: var(--text);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.header-back svg {
  width: 20px;
  height: 20px;
}

.header-back:active { transform: scale(0.96); }

.header-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
  color: var(--muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.header-icon-btn svg {
  width: 18px;
  height: 18px;
}

.header-icon-btn.active,
.header-icon-btn:hover {
  color: var(--accent);
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.08);
}

.header-icon-btn:active { transform: scale(0.96); }

.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);
}

.stars-chip {
  color: #fbbf24;
}

.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;
}

.hero-matches .hero-main-title {
  font-size: 1.05rem;
  line-height: 1.35;
}

.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.28rem; font-weight: 800; display: block; }
.stat-box .lbl { font-size: 0.74rem; 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: left; }
.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); }
.badge-knockout { background: rgba(96,165,250,0.18); color: #93c5fd; margin-inline-end: 6px; }

.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);
}

.wallet-vip-btn {
  margin-top: 10px;
}

.btn-vip-active {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.4;
}

.btn-vip-active:active {
  transform: none;
}

.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.disabled {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.35);
}

.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;
  margin-bottom: 20px;
}

.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;
  pointer-events: auto;
}

.loader.hidden {
  pointer-events: none !important;
}

.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);
}

.rank-tier-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.rank-tier-tabs::-webkit-scrollbar { display: none; }

.rank-tier-tab {
  flex: 1;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.rank-tier-tab.active {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.leaderboard-head {
  display: grid;
  grid-template-columns: 44px 1fr 56px;
  gap: 8px;
  padding: 0 12px 8px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}

.leaderboard-head span:last-child {
  text-align: left;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 44px 1fr 56px;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.leaderboard-row > *:not(.lb-row-bg-layer):not(.lb-row-scrim) {
  position: relative;
  z-index: 2;
}

.lb-row-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  overflow: hidden;
}

.lb-row-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.38) 45%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.leaderboard-row.leaderboard-me {
  border-color: rgba(52, 211, 153, 0.45);
}

.leaderboard-row.leaderboard-me:not([class*="bg-"]) {
  background: rgba(52, 211, 153, 0.08);
}

.leaderboard-rank {
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
}

.leaderboard-name {
  font-weight: 800;
  font-size: 0.86rem;
  line-height: 1.35;
}

.leaderboard-you {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.leaderboard-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}

.leaderboard-pts {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent);
  text-align: left;
}

.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 frame like 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-family: var(--font);
  font-size: 0.78rem;
  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-click {
  cursor: pointer;
}

.team-card-click:hover,
.team-card-click:focus-visible {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.12);
  outline: none;
}

.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); }
}

.team-flag-wrap.xl {
  width: 88px;
  height: 66px;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.team-detail-sheet {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.team-detail-sheet.visible {
  pointer-events: auto;
}

.team-detail-sheet.closing .team-detail-backdrop {
  opacity: 0;
}

.team-detail-sheet.closing .team-detail-panel {
  transform: translateY(100%);
}

.team-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 6, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.team-detail-sheet.visible .team-detail-backdrop {
  opacity: 1;
}

.team-detail-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  background: linear-gradient(180deg, #0f2a1c 0%, #071510 100%);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}

.team-detail-sheet.visible .team-detail-panel {
  transform: translateY(0);
}

.team-detail-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  margin: 6px auto 12px;
}

.team-detail-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

.team-detail-hero {
  text-align: center;
  padding: 4px 8px 18px;
}

.team-detail-flag {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.team-detail-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.team-detail-en {
  margin: 4px 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

.team-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.team-detail-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.team-detail-badge.group {
  background: rgba(251, 191, 36, 0.14);
  color: var(--gold);
  border-color: rgba(251, 191, 36, 0.25);
}

.team-detail-badge.nick {
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.25);
}

.team-detail-badge.conf {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border-color: var(--border);
}

.team-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.team-info-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.team-info-row-full {
  grid-column: 1 / -1;
}

.team-info-row-star {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(52, 211, 153, 0.08));
  border-color: rgba(251, 191, 36, 0.28);
}

.team-info-row-quote .team-info-value {
  font-style: italic;
  color: #a7f3d0;
}

.team-info-emoji {
  font-size: 1.05rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.team-info-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.team-info-label {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
}

.team-info-value {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.teams-search {
  margin-bottom: 12px;
}

.search-field {
  position: relative;
}

.search-field .input {
  margin-bottom: 0;
  padding-inline-start: 40px;
  padding-inline-end: 14px;
}

.search-field-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.92rem;
  line-height: 1;
  opacity: 0.7;
  z-index: 1;
}

.search-field .input:focus {
  padding-inline-start: 40px;
}

.search-field .input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* ── 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: 200;
  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-modal .input,
.team-picker-modal .textarea {
  touch-action: manipulation;
}

.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;
  direction: ltr;
}

.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);
  direction: ltr;
  text-align: left;
}

.fixture-stage-head {
  background: rgba(96, 165, 250, 0.08);
  color: #bfdbfe;
  border-bottom-color: rgba(96, 165, 250, 0.2);
}

.fixture-knockout .fixture-row {
  border-left: 2px solid rgba(96, 165, 250, 0.35);
}

.fixture-day:last-child .fixture-row:last-child {
  border-bottom: none;
}

.fixture-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s;
  direction: ltr;
}

.fixture-row:active {
  background: rgba(52, 211, 153, 0.08);
}

.fixture-row.fixture-lock {
  opacity: 0.75;
}

.fixture-row.fixture-live {
  position: relative;
  background: linear-gradient(
    90deg,
    rgba(52, 211, 153, 0.16) 0%,
    rgba(52, 211, 153, 0.06) 45%,
    rgba(52, 211, 153, 0.16) 100%
  );
  border-inline-start: 3px solid var(--live);
  animation: liveRowGlow 2.4s ease-in-out infinite;
}

.fixture-row.fixture-live:active {
  background: rgba(52, 211, 153, 0.2);
}

.fixture-row.fixture-closed {
  opacity: 0.88;
}

.fixture-time-live,
.fixture-live .fixture-time {
  color: var(--live);
  font-weight: 800;
  font-size: 0.68rem;
  white-space: nowrap;
  animation: liveTextPulse 1.3s ease-in-out infinite;
}

.fixture-closed .fixture-time {
  color: var(--muted);
  font-size: 0.72rem;
}

.live-matches-banner.live-banner-clickable {
  cursor: pointer;
}

.live-matches-banner.live-banner-clickable .live-banner-inner:active {
  opacity: 0.85;
}

.live-page-head {
  text-align: center;
  margin-bottom: 18px;
}

.live-page-title {
  margin: 12px 0 6px;
  font-size: 1.15rem;
  color: var(--live);
}

.live-page-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.live-games-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.live-game-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(12, 31, 22, 0.85);
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  text-align: center;
  animation: liveChipIn 0.45s ease backwards;
  transition: transform 0.15s, background 0.15s;
}

.live-game-card:active {
  transform: scale(0.98);
  background: rgba(52, 211, 153, 0.12);
}

.live-game-card .live-match-card {
  margin: 0 auto;
}

.live-game-card-static {
  cursor: default;
}

.live-game-card-static:active {
  transform: none;
  background: rgba(12, 31, 22, 0.85);
}

.live-game-card-status {
  margin: 0;
  font-size: 0.78rem;
  color: var(--live);
  text-align: center;
}

.live-game-card .live-chip-dot {
  align-self: center;
}

.live-matches-banner {
  position: relative;
  margin: 0 0 16px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(6, 78, 59, 0.45));
  border: 1px solid rgba(52, 211, 153, 0.45);
  overflow: hidden;
  animation: liveBannerIn 0.6s ease-out;
}

.live-banner-pulse {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(52, 211, 153, 0.28), transparent 55%);
  animation: liveBannerPulse 2s ease-in-out infinite;
  pointer-events: none;
}

.live-banner-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.live-dot,
.live-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 var(--live-glow);
  animation: liveDotPulse 1.4s ease-out infinite;
  flex-shrink: 0;
}

.live-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}

.live-banner-text strong {
  font-size: 0.92rem;
  color: #a7f3d0;
}

.live-banner-text span {
  font-size: 0.78rem;
  color: rgba(167, 243, 208, 0.85);
}

.live-banner-games {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-game-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, 0.5);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  text-align: left;
  direction: ltr;
  animation: liveChipIn 0.45s ease backwards;
}

.live-chip-teams {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  text-align: center;
}

.live-chip-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.live-game-chip .team-flag-wrap.sm {
  width: 32px;
  height: 24px;
  --flag-radius: 8px;
}

.live-chip-go {
  opacity: 0.7;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.live-banner-loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}

.live-banner-loading span {
  display: block;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.08), rgba(52, 211, 153, 0.18), rgba(52, 211, 153, 0.08));
  background-size: 200% 100%;
  animation: liveBannerShimmer 1.2s ease-in-out infinite;
}

.live-banner-loading span:nth-child(2) { animation-delay: 0.15s; }
.live-banner-loading span:nth-child(3) { animation-delay: 0.3s; }

.live-matches-banner-loading .live-banner-games {
  min-height: 130px;
}

.live-banner-empty {
  margin: 0;
  padding: 8px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

@keyframes liveChipIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes liveBannerShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.live-game-chip:active {
  transform: scale(0.97);
  background: rgba(52, 211, 153, 0.22);
}

.live-chip-vs {
  color: var(--muted);
  font-size: 0.72rem;
}

.empty-state.live-state .live-pulse-icon {
  animation: liveIconPulse 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px var(--live-glow));
}

.live-state-title {
  color: var(--live) !important;
}

.live-match-card {
  width: 100%;
  max-width: 340px;
  margin: 0 auto 18px;
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.38);
}

.live-match-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.live-match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.live-match-team .team-flag-wrap.sm {
  width: 36px;
  height: 27px;
}

.live-match-name {
  font-weight: 800;
  font-size: 0.84rem;
  text-align: center;
  line-height: 1.35;
}

.live-match-vs {
  flex-shrink: 0;
  font-size: 0.68rem;
  opacity: 0.85;
}

.live-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.4);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--live);
  width: fit-content;
  display: flex;
  justify-content: center;
}

@keyframes liveDetailIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes liveRowGlow {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(52, 211, 153, 0); }
  50% { box-shadow: inset 0 0 24px 0 rgba(52, 211, 153, 0.14); }
}

@keyframes liveTextPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(0.98); }
}

@keyframes liveDotPulse {
  0% { box-shadow: 0 0 0 0 var(--live-glow); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes liveBannerPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes liveBannerIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes liveIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.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: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  direction: ltr;
}

.fixture-side {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.fixture-home {
  justify-content: flex-start;
}

.fixture-home .fixture-name {
  text-align: left;
}

.fixture-away {
  justify-content: flex-end;
}

.fixture-away .fixture-name {
  text-align: right;
}

.fixture-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 0 2px;
}

.fixture-center .team-flag-wrap.sm {
  width: 28px;
  height: 21px;
  --flag-radius: 6px;
  animation: none;
}

.fixture-center .team-flag-bg {
  animation: none;
}

.fixture-name {
  font-size: clamp(0.64rem, 2.5vw, 0.76rem);
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  min-width: 0;
}

.fixture-time {
  font-weight: 800;
  font-size: 0.82rem;
  text-align: center;
  min-width: 40px;
  padding: 0 2px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  white-space: nowrap;
}

.fixture-chevron {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.55;
  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;
  direction: ltr;
  text-align: left;
}

.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;
}

/* ---------- Admin panel tabs ---------- */
.admin-hero {
  margin-bottom: 14px;
  padding: 4px 2px;
}

.admin-hero h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.admin-hero p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab.active {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--accent);
}

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.admin-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.admin-stat-card .num {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
}

.admin-stat-card .lbl {
  font-size: 0.72rem;
  color: var(--muted);
}

.admin-collapse {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.admin-collapse summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  list-style: none;
}

.admin-collapse summary::-webkit-details-marker { display: none; }

.admin-schedule-compact {
  margin-top: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.admin-games-list,
.admin-players-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-game-card,
.admin-player-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 12px;
}

.admin-game-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-game-names {
  flex: 1;
  text-align: center;
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1.35;
}

.admin-game-names span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.admin-player-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-player-main { flex: 1; min-width: 0; }

.admin-player-name {
  font-weight: 800;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.admin-player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.admin-id-badge {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.admin-player-stats {
  font-size: 0.72rem;
  color: var(--muted);
}

.admin-msg-btn { flex-shrink: 0; }

.admin-player-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.admin-player-actions .btn-sm {
  min-width: 64px;
  padding: 6px 6px;
  font-size: 0.68rem;
}

.admin-danger-panel {
  border-color: rgba(239, 68, 68, 0.25) !important;
}

.admin-reset-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-reset-steps .done {
  color: var(--accent);
  font-weight: 700;
}

.admin-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

.admin-check input { margin-top: 3px; }

.dual-tier-hint,
.dual-tier-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 12px;
  text-align: left;
  direction: ltr;
}

.dual-tier-btn { margin-top: 8px; }

.invite-hero {
  text-align: center;
  padding: 20px 12px;
  margin-bottom: 14px;
}

.invite-hero h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
  color: var(--accent);
}

.invite-reward-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.invite-reward-num {
  margin-inline: 4px;
}

.invite-reward-star {
  margin-inline-start: 2px;
}

.invite-copy-lines {
  margin: 0 auto 16px;
  max-width: 320px;
}

.invite-copy-lines p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
}

.invite-copy-gap {
  margin-top: 14px !important;
}

.invite-copy-note {
  margin-top: 10px !important;
  color: var(--text) !important;
  font-weight: 600;
}

.invite-share-btn {
  margin-top: 10px;
}

.wallet-action-btn {
  margin-top: 10px;
}

.predict-submit-btn {
  margin-top: 14px;
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 800;
  padding: 14px 16px;
}

.predict-edit-btn {
  margin-top: 0;
}

.invite-hero p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.invite-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.invite-stats .num {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
}

.invite-stats .lbl {
  font-size: 0.72rem;
  color: var(--muted);
}

.invite-link-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.75rem;
  word-break: break-all;
  direction: ltr;
  text-align: left;
  margin-bottom: 12px;
}

.invite-steps {
  margin: 0;
  padding-right: 18px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ── Shop ── */
.shop-hero {
  position: relative;
  text-align: center;
  padding: 24px 16px 20px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.12), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(52, 211, 153, 0.22);
  overflow: hidden;
}

.shop-hero-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.15), transparent 60%);
  animation: shopGlow 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shopGlow {
  0%, 100% { transform: translate(0, 0); opacity: 0.6; }
  50% { transform: translate(10%, -8%); opacity: 1; }
}

.shop-hero-icon {
  font-size: 2.4rem;
  margin-bottom: 6px;
  animation: lbEmojiPop 2.5s ease-in-out infinite;
}

.shop-hero h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.shop-hero p {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.shop-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.9rem;
}

.shop-tabs { margin-bottom: 8px; }

.shop-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.shop-card {
  position: relative;
  padding: 12px 10px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.shop-card.owned {
  border-color: rgba(52, 211, 153, 0.35);
}

.shop-card.equipped {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.12);
}

.shop-card.tier-5 {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.12), rgba(255, 255, 255, 0.03));
}

.shop-badge {
  position: static;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.shop-badge-price {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.shop-badge-owned {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.shop-badge-on {
  background: rgba(251, 191, 36, 0.2);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.shop-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 8px 0 10px;
}

.shop-emoji-big {
  font-size: 2.2rem;
  line-height: 1;
  animation: lbEmojiPop 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.shop-theme-preview .lb-name-badge {
  font-size: 0.72rem;
}

.shop-card-title {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.shop-card-desc {
  margin: 0 0 10px;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
  min-height: 2.2em;
}

/* ── Leaderboard name badge & themes ── */
.leaderboard-name {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.leaderboard-you {
  flex-shrink: 0;
  white-space: nowrap;
}

.lb-name-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  vertical-align: middle;
}

.lb-name-text {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.lb-name-emoji {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
  animation: lbEmojiPop 2.2s ease-in-out infinite;
}

@keyframes lbEmojiPop {
  0%, 100% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(1.12) rotate(-6deg); }
  70% { transform: scale(1.05) rotate(4deg); }
}

@keyframes themeGlow {
  0%, 100% { box-shadow: 0 0 8px var(--glow, rgba(52, 211, 153, 0.25)); }
  50% { box-shadow: 0 0 16px var(--glow, rgba(52, 211, 153, 0.45)); }
}

@keyframes themeShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.theme-pitch {
  --glow: rgba(52, 211, 153, 0.4);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.28), rgba(16, 185, 129, 0.1));
  border-color: rgba(52, 211, 153, 0.5);
  animation: themeGlow 3s ease-in-out infinite;
}

.theme-ocean {
  --glow: rgba(56, 189, 248, 0.45);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35), rgba(59, 130, 246, 0.12));
  background-size: 200% 200%;
  border-color: rgba(56, 189, 248, 0.5);
  animation: themeShift 5s ease infinite, themeGlow 3.5s ease-in-out infinite;
}

.theme-ocean .lb-name-text { color: #7dd3fc; }

.theme-gamer {
  --glow: rgba(168, 85, 247, 0.5);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(6, 182, 212, 0.2));
  background-size: 200% 200%;
  border-color: rgba(168, 85, 247, 0.55);
  animation: themeShift 3s ease infinite, themeGlow 2.5s ease-in-out infinite;
}

.theme-gamer .lb-name-text {
  color: #c4b5fd;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.75);
}

.theme-sunset {
  --glow: rgba(251, 146, 60, 0.45);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.35), rgba(244, 63, 94, 0.2));
  background-size: 200% 200%;
  border-color: rgba(251, 146, 60, 0.5);
  animation: themeShift 4s ease infinite, themeGlow 3s ease-in-out infinite;
}

.theme-sunset .lb-name-text { color: #fdba74; }

.theme-gold {
  --glow: rgba(251, 191, 36, 0.5);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.35), rgba(245, 158, 11, 0.15));
  background-size: 200% 200%;
  border-color: rgba(251, 191, 36, 0.55);
  animation: themeShift 3.5s ease infinite, themeGlow 2.8s ease-in-out infinite;
}

.theme-gold .lb-name-text {
  background: linear-gradient(90deg, #fde68a, #fbbf24, #fde68a);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: galaxyText 3s linear infinite;
}

.theme-neon {
  --glow: rgba(236, 72, 153, 0.5);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(236, 72, 153, 0.25));
  background-size: 200% 200%;
  border-color: rgba(236, 72, 153, 0.55);
  animation: themeShift 2.5s ease infinite, themeGlow 2s ease-in-out infinite;
}

.theme-neon .lb-name-text {
  color: #f0abfc;
  text-shadow: 0 0 8px rgba(236, 72, 153, 0.8);
}

.theme-fire {
  --glow: rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(251, 146, 60, 0.25));
  background-size: 200% 200%;
  border-color: rgba(239, 68, 68, 0.55);
  animation: themeShift 2s ease infinite, themeGlow 1.8s ease-in-out infinite;
}

.theme-fire .lb-name-text { color: #fca5a5; }

.theme-aurora {
  --glow: rgba(52, 211, 153, 0.45);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.3), rgba(139, 92, 246, 0.25), rgba(59, 130, 246, 0.2));
  background-size: 300% 300%;
  border-color: rgba(167, 243, 208, 0.45);
  animation: themeShift 6s ease infinite, themeGlow 3s ease-in-out infinite;
}

.theme-aurora .lb-name-text {
  background: linear-gradient(90deg, #6ee7b7, #a78bfa, #93c5fd);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: galaxyText 4s linear infinite;
}

.theme-galaxy {
  --glow: rgba(139, 92, 246, 0.55);
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e, #0f0c29);
  background-size: 300% 300%;
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.35), inset 0 0 16px rgba(255, 255, 255, 0.04);
  animation: themeShift 8s ease infinite, themeGlow 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.theme-galaxy::before,
.theme-galaxy::after {
  position: absolute;
  font-size: 0.45rem;
  opacity: 0.75;
  pointer-events: none;
  animation: galaxySpark 2.5s ease-in-out infinite;
}

.theme-galaxy::before {
  content: "✦";
  top: 2px;
  right: 12%;
}

.theme-galaxy::after {
  content: "·";
  bottom: 2px;
  left: 10%;
  animation-delay: 1.2s;
  font-size: 0.8rem;
}

.theme-galaxy .lb-name-text {
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg, #e9d5ff, #93c5fd, #f0abfc, #e9d5ff);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: galaxyText 5s linear infinite;
}

@keyframes galaxyText {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@keyframes galaxySpark {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ── Shop extras ── */
.shop-tabs-4 .rank-tier-tab,
.shop-tabs-5 .rank-tier-tab {
  font-size: 0.72rem;
  padding: 9px 4px;
}

.shop-grid-flags {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.shop-grid-flags .shop-card {
  padding: 10px 8px;
}

.shop-grid-flags .shop-card-title {
  font-size: 0.78rem;
  margin-bottom: 2px;
}

.team-flag-wrap.xs {
  width: 28px;
  height: 21px;
  --flag-radius: 6px;
  animation: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.team-flag-wrap.xs .team-flag-bg {
  animation: none;
}

.team-flag-wrap.shop {
  width: 72px;
  height: 54px;
  margin: 0 auto;
  --flag-radius: 10px;
}

.lb-name-badge .team-flag-wrap.xs {
  margin-inline-end: 4px;
}

.shop-flag-card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 8px 0;
}

.shop-grid-flags .shop-card-desc {
  display: none;
}

.shop-grid-flags .shop-flag-card-preview + .shop-card-title {
  margin-top: 4px;
}

.shop-grid-bundles {
  grid-template-columns: 1fr;
}

.shop-card-bundle {
  padding: 14px 12px;
}

.shop-card-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 24px;
  margin-bottom: 8px;
}

.shop-badge-save {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.shop-bundle-owned-note {
  margin: 8px 0 0;
  font-size: 0.68rem;
  line-height: 1.55;
  color: #a7f3d0;
  text-align: center;
}

.shop-bg-preview {
  padding: 4px;
}

.lb-row-preview {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.lb-row-preview .lb-row-bg-layer,
.lb-row-preview .lb-row-scrim {
  border-radius: 12px;
}

.lb-row-preview-name {
  position: relative;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.shop-bundle-minis {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.shop-bundle-mini {
  font-size: 1.2rem;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.shop-bundle-mini.theme-mini,
.shop-bundle-mini.bg-mini {
  font-size: 0.62rem;
  font-weight: 800;
  min-width: 36px;
  text-align: center;
}

.shop-bundle-retail {
  margin: 6px 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
}

.shop-bundle-done {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
}

/* ── Leaderboard row backgrounds (layer) ── */
.lb-row-bg-layer.bg-field {
  background: linear-gradient(180deg, #14532d 0%, #166534 40%, #15803d 100%);
}
.lb-row-bg-layer.bg-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 18px,
    rgba(255, 255, 255, 0.05) 18px,
    rgba(255, 255, 255, 0.05) 20px
  );
  animation: bgFieldScroll 8s linear infinite;
}
.leaderboard-row.bg-field { border-color: rgba(34, 197, 94, 0.4); }

.lb-row-bg-layer.bg-ball {
  background: linear-gradient(135deg, #0f2918, #14532d);
}
.lb-row-bg-layer.bg-ball::after {
  content: "⚽";
  position: absolute;
  right: 6px;
  bottom: 4px;
  font-size: 1.1rem;
  opacity: 0.22;
  animation: bgBallCorner 6s ease-in-out infinite;
}
.leaderboard-row.bg-ball { border-color: rgba(251, 191, 36, 0.35); }

.lb-row-bg-layer.bg-gamer {
  background: linear-gradient(135deg, #1e1b4b, #312e81, #1e3a5f);
  background-size: 200% 200%;
  animation: themeShift 8s ease infinite;
}
.lb-row-bg-layer.bg-gamer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.12) 1px, transparent 1px);
  background-size: 14px 14px;
  animation: bgFieldScroll 12s linear infinite;
}
.lb-row-bg-layer.bg-gamer::before {
  content: "🕹️";
  position: absolute;
  right: 8px;
  bottom: 2px;
  font-size: 0.85rem;
  opacity: 0.3;
}
.leaderboard-row.bg-gamer { border-color: rgba(168, 85, 247, 0.45); }

.lb-row-bg-layer.bg-fire {
  background: linear-gradient(180deg, #7f1d1d, #ea580c, #fbbf24);
  background-size: 100% 200%;
  animation: bgFireShift 3s ease infinite;
}
.lb-row-bg-layer.bg-fire::after {
  content: "🔥";
  position: absolute;
  right: 8px;
  bottom: 2px;
  font-size: 0.9rem;
  opacity: 0.28;
}
.leaderboard-row.bg-fire { border-color: rgba(239, 68, 68, 0.5); }

.lb-row-bg-layer.bg-galaxy {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e, #0f0c29);
  background-size: 300% 300%;
  animation: themeShift 10s ease infinite;
}
.lb-row-bg-layer.bg-galaxy::after {
  content: "✦ ✧ ✦";
  position: absolute;
  right: 8px;
  bottom: 5px;
  font-size: 0.45rem;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.3);
  animation: galaxySpark 3s ease-in-out infinite;
}
.leaderboard-row.bg-galaxy { border-color: rgba(139, 92, 246, 0.45); }

.lb-row-bg-layer.bg-messi {
  background: repeating-linear-gradient(
    135deg,
    #75aadb 0px,
    #75aadb 10px,
    #fff 10px,
    #fff 20px
  );
  animation: bgMessiShift 8s linear infinite;
}
.lb-row-bg-layer.bg-messi::after {
  content: "10 ⚽";
  position: absolute;
  right: 6px;
  bottom: 3px;
  font-weight: 900;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.35);
}
.leaderboard-row.bg-messi { border-color: rgba(56, 189, 248, 0.5); }

.lb-row-bg-layer.bg-ronaldo {
  background: linear-gradient(135deg, #dc2626 0%, #dc2626 45%, #059669 45%, #059669 100%);
  animation: bgRonaldoShift 5s ease-in-out infinite;
}
.lb-row-bg-layer.bg-ronaldo::after {
  content: "CR7";
  position: absolute;
  right: 6px;
  bottom: 4px;
  font-weight: 900;
  font-size: 0.62rem;
  color: rgba(253, 230, 138, 0.4);
}
.leaderboard-row.bg-ronaldo { border-color: rgba(220, 38, 38, 0.5); }

.leaderboard-row[class*="bg-"] .leaderboard-meta {
  color: rgba(255, 255, 255, 0.82);
}

.leaderboard-row[class*="bg-"] .leaderboard-pts {
  color: #fde68a;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.leaderboard-row[class*="bg-"] .leaderboard-rank {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.leaderboard-row[class*="bg-"] .lb-name-badge {
  backdrop-filter: blur(4px);
}

@keyframes bgFieldScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-20px); }
}

@keyframes bgBallCorner {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.22; }
  50% { transform: translateY(-3px) rotate(90deg); opacity: 0.32; }
}

@keyframes bgFireShift {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
}

@keyframes bgMessiShift {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

@keyframes bgRonaldoShift {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.05); }
}

@media (max-width: 360px) {
  .nav-item { font-size: 0.58rem; }
  .nav-item svg { width: 20px; height: 20px; }
  .shop-tabs-4 .rank-tier-tab,
  .shop-tabs-5 .rank-tier-tab { font-size: 0.65rem; }
}

/* ── Ads (user view) ── */
.ad-view-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 8px;
}

.ad-banner-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface2);
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow);
}

.ad-banner-wrap.ad-banner-preview.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.ad-banner-wrap.ad-banner-preview.empty::after {
  content: "Banner preview";
  color: var(--muted);
  font-size: 0.82rem;
}

.ad-banner-wrap.ad-banner-preview.empty .ad-banner-img {
  display: none;
}

.ad-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
}

.ad-upload-hint {
  margin: 0 0 10px;
}

.ad-upload-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.ad-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.ad-file-name {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.ad-fit-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.ad-fit-controls input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.ad-cta-btn {
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
}

.ad-return-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
}

.ad-return-star {
  font-size: 1.1rem;
}

.ad-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

/* ── Ads (admin) ── */
.ads-admin-summary {
  margin-bottom: 14px;
}

.ads-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.ads-stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
}

.ads-stat-card .num {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
}

.ads-stat-card .lbl {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 4px;
}

.admin-ad-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-ad-fields-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.header-ad-carousel {
  position: relative;
  width: 100%;
  height: 52px;
  margin: 0 0 12px;
  overflow: hidden;
}

.header-ad-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.header-ad-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.header-ad-slide .header-ad-strip {
  margin: 0;
  height: 100%;
}

.ads-admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.ads-admin-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.ads-admin-card.inactive {
  opacity: 0.72;
}

.ads-admin-card-top {
  display: flex;
  gap: 12px;
}

.ads-admin-preview {
  width: 96px;
  min-width: 96px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface2);
}

.ads-admin-preview img {
  width: 100%;
  height: 100%;
  display: block;
}

.ads-admin-meta {
  flex: 1;
  min-width: 0;
}

.ads-admin-meta h4 {
  margin: 0 0 6px;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ads-admin-link {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 8px;
  word-break: break-all;
}

.ads-progress-wrap {
  margin-bottom: 8px;
}

.ads-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}

.ads-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 999px;
}

.ads-progress-label {
  font-size: 0.68rem;
  color: var(--muted);
}

.ads-admin-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.ads-admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ads-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.ads-badge-on {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent);
}

.ads-badge-off {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.ads-badge-full {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

@media (max-width: 400px) {
  .ads-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ads-admin-card-top {
    flex-direction: column;
  }
  .ads-admin-preview {
    width: 100%;
    height: 100px;
  }
}

.ads-section-title {
  margin: 20px 0 6px;
  font-size: 1rem;
  font-weight: 800;
}

.header-ad-strip {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.header-ad-strip:active {
  transform: scale(0.99);
}

.header-ad-strip img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.header-ad-strip-preview {
  margin-bottom: 10px;
}

.header-ad-strip-preview.empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-ad-strip-preview.empty::after {
  content: "Header banner preview";
  color: var(--muted);
  font-size: 0.78rem;
}

.header-ad-strip-preview.empty img {
  display: none;
}

.header-ad-strip-thumb {
  width: 100%;
  min-width: 0;
  height: 48px;
  margin-bottom: 0;
  flex: 1;
}

.header-ad-admin-card .ads-admin-card-top {
  flex-direction: column;
}
