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

:root {
  --bg: #050510;
  --bg2: #0a0a1e;
  --bg3: #0f0f2a;
  --surface: rgba(15,15,42,0.7);
  --surface2: rgba(20,20,55,0.6);
  --border: rgba(0,255,255,0.08);
  --border-glow: rgba(0,255,255,0.15);
  --text: #e8eaff;
  --text2: #8888bb;
  --text3: #555580;
  /* Neon palette */
  --cyan: #00f0ff;
  --cyan-dim: rgba(0,240,255,0.12);
  --cyan-glow: rgba(0,240,255,0.4);
  --magenta: #ff00e5;
  --magenta-dim: rgba(255,0,229,0.12);
  --magenta-glow: rgba(255,0,229,0.4);
  --lime: #39ff14;
  --lime-dim: rgba(57,255,20,0.12);
  --lime-glow: rgba(57,255,20,0.3);
  --electric: #4d6dff;
  --electric-glow: rgba(77,109,255,0.3);
  --orange: #ff6b2b;
  --orange-dim: rgba(255,107,43,0.12);
  --orange-glow: rgba(255,107,43,0.3);
  --yellow: #ffe600;
  --yellow-dim: rgba(255,230,0,0.12);
  --red: #ff2d55;
  --red-dim: rgba(255,45,85,0.1);
  --purple: #bf5af2;
  --purple-glow: rgba(191,90,242,0.3);
  --home-color: #00f0ff;
  --away-color: #ff6b2b;
  --draw-color: #888;
  --green: #39ff14;
  --radius: 16px;
  --radius-sm: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  /* Flex column so the global-disclaimer is pinned at the bottom on every
     screen: short screens (auth, sport select) push it down via margin-top:auto,
     long screens (results, admin) just flow past it naturally. */
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

/* ─── Animated Background ─── */
#app::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,240,255,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255,0,229,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(57,255,20,0.02) 0%, transparent 50%);
  animation: bgDrift 20s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}
@keyframes bgDrift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -1%) rotate(1deg); }
  66% { transform: translate(-1%, 2%) rotate(-1deg); }
}

/* Scan lines overlay */
#app::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,240,255,0.008) 2px,
    rgba(0,240,255,0.008) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* ═══════════ WELCOME SCREEN ═══════════ */
.welcome-hero {
  padding: 60px 20px 32px;
  text-align: center;
  position: relative;
}
.welcome-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}
.welcome-logo-icon {
  font-size: 42px;
  color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan-glow), 0 0 40px rgba(0,240,255,0.3);
  animation: logoSpin 8s linear infinite;
  display: inline-block;
}
@keyframes logoSpin {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.05); }
}
.welcome-brand {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--magenta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  filter: drop-shadow(0 0 18px rgba(0,240,255,0.3));
}
.welcome-tagline {
  font-size: 13px;
  color: var(--text2);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0 0 24px;
}

.welcome-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  max-width: 340px;
  margin: 0 auto;
  box-shadow: 0 0 30px rgba(0,240,255,0.05);
}
.welcome-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.welcome-stat .ws-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
  letter-spacing: -1px;
}
.welcome-stat .ws-label {
  font-size: 9px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.welcome-stat-divider {
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, transparent 0%, var(--border-glow) 50%, transparent 100%);
}

.welcome-intro {
  padding: 0 24px 24px;
}
.welcome-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  text-align: center;
  margin: 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Sport Cards Grid ─── */
.sports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 24px;
}
.sport-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  animation: cardFadeIn 0.6s ease backwards;
}
.sport-card:nth-child(1) { animation-delay: 0.05s; }
.sport-card:nth-child(2) { animation-delay: 0.12s; }
.sport-card:nth-child(3) { animation-delay: 0.19s; }
.sport-card:nth-child(4) { animation-delay: 0.26s; }
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.sport-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--cyan-glow) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.sport-card.active::before { opacity: 1; }
.sport-card.active:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 30px rgba(0,240,255,0.2), 0 0 40px rgba(0,240,255,0.1);
  border-color: var(--cyan);
}
.sport-card.coming-soon {
  opacity: 0.7;
  cursor: pointer;
}
.sport-card.coming-soon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent, transparent 10px,
    rgba(255,255,255,0.015) 10px, rgba(255,255,255,0.015) 20px
  );
  pointer-events: none;
}
.sport-card.coming-soon:hover {
  opacity: 0.9;
  border-color: var(--border-glow);
}
.sport-icon {
  font-size: 48px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(0,240,255,0.2));
  animation: iconFloat 3s ease-in-out infinite;
}
.sport-card:nth-child(2) .sport-icon { animation-delay: 0.3s; }
.sport-card:nth-child(3) .sport-icon { animation-delay: 0.6s; }
.sport-card:nth-child(4) .sport-icon { animation-delay: 0.9s; }
@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.sport-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.sport-status {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.sport-status.active {
  background: var(--lime-dim);
  color: var(--lime);
  border: 1px solid rgba(57,255,20,0.3);
  box-shadow: 0 0 10px rgba(57,255,20,0.15);
  text-shadow: 0 0 6px var(--lime-glow);
}
.sport-status.soon {
  background: rgba(255,230,0,0.08);
  color: var(--yellow);
  border: 1px solid rgba(255,230,0,0.2);
}
.sport-features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 4px;
}
.sf-chip {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(0,240,255,0.08);
  color: var(--cyan);
  border: 1px solid rgba(0,240,255,0.12);
}
.sport-features-placeholder {
  font-size: 10px;
  color: var(--text3);
  font-style: italic;
  font-weight: 500;
  padding-top: 4px;
}

.welcome-footer {
  padding: 20px;
  text-align: center;
  color: var(--text3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.wf-version {
  color: var(--cyan);
  font-weight: 700;
}
.wf-dot { opacity: 0.5; }

.brand-sport {
  font-size: 13px;
  color: var(--text3);
  font-weight: 600;
  margin-left: 4px;
}

/* ═══════════ ADMIN PAGE ═══════════ */
.admin-container {
  padding: 16px;
}
.admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 14px;
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}
.admin-stat-card:hover { border-color: var(--border-glow); }
.admin-stat-card .asc-label {
  font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px;
}
.admin-stat-card .asc-value {
  font-size: 28px; font-weight: 900; letter-spacing: -1px;
}
.admin-stat-card .asc-delta {
  font-size: 11px; color: var(--text2); margin-top: 2px; font-weight: 500;
}
.admin-stat-card.total .asc-value { color: var(--cyan); text-shadow: 0 0 10px var(--cyan-glow); }
.admin-stat-card.premium .asc-value { color: var(--lime); text-shadow: 0 0 10px var(--lime-glow); }
.admin-stat-card.free .asc-value { color: var(--text2); }
.admin-stat-card.admin .asc-value { color: var(--magenta); text-shadow: 0 0 10px var(--magenta-glow); }

.admin-users-search { margin-bottom: 12px; }

.admin-users-list { display: flex; flex-direction: column; gap: 8px; }
.admin-user-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}
.admin-user-row:hover { border-color: var(--border-glow); transform: translateX(2px); }
.aur-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  color: #000; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.aur-info { min-width: 0; }
.aur-name { font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aur-email { font-size: 10px; color: var(--text3); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aur-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.aur-badge {
  font-size: 8px; font-weight: 800; padding: 2px 6px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.aur-badge.premium { background: linear-gradient(135deg, rgba(255,230,0,0.15), rgba(255,107,43,0.15)); color: var(--yellow); border: 1px solid rgba(255,230,0,0.25); }
.aur-badge.free { background: rgba(136,136,136,0.1); color: var(--text3); }
.aur-badge.admin { background: rgba(255,0,229,0.12); color: var(--magenta); border: 1px solid rgba(255,0,229,0.25); }
.aur-badge.cancelled { background: var(--red-dim); color: var(--red); }

/* ═══════════ TOP BAR (Football home) ═══════════ */
.top-bar {
  display: flex;
  align-items: center;
  padding: 12px 16px 8px;
  gap: 8px;
  background: rgba(5,5,16,0.85);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.back-btn-inline {
  background: none; border: none; color: var(--cyan);
  font-size: 18px; font-family: var(--font); cursor: pointer;
  padding: 4px 8px; border-radius: 8px;
  transition: background 0.2s;
}
.back-btn-inline:hover { background: var(--cyan-dim); }
.top-bar-brand {
  display: flex; align-items: center; gap: 6px; flex: 1;
}
.brand-name-sm {
  font-size: 16px; font-weight: 800; color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-glow);
}
.top-bar-right {
  display: flex; align-items: center; gap: 6px;
}

/* ═══════════ USER DROPDOWN MENU ═══════════ */
.user-menu {
  display: none;
  position: fixed;
  top: 52px;
  right: 12px;
  z-index: 200;
  background: var(--bg2);
  border: 1px solid var(--border-glow);
  border-radius: 14px;
  padding: 12px 0;
  min-width: 200px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 20px rgba(0,240,255,0.08);
  backdrop-filter: blur(20px);
  animation: fadeSlideIn 0.2s ease;
}
.user-menu.visible { display: block; }
.um-header {
  padding: 8px 16px 10px;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}
.um-header .um-email { font-size: 11px; color: var(--text3); font-weight: 500; }
.um-header .um-role {
  display: inline-block;
  font-size: 8px; font-weight: 800; padding: 2px 6px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px;
}
.um-role.admin { background: rgba(255,0,229,0.15); color: var(--magenta); }
.um-role.premium { background: linear-gradient(135deg, rgba(255,230,0,0.15), rgba(255,107,43,0.15)); color: var(--yellow); }
.um-role.free { background: var(--surface); color: var(--text3); }
.um-divider { height: 1px; background: var(--border); margin: 6px 0; }
.um-item {
  display: block; width: 100%; padding: 10px 16px;
  background: none; border: none; color: var(--text);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  text-align: left; cursor: pointer; transition: background 0.2s;
}
.um-item:hover { background: rgba(255,255,255,0.04); }
.um-item.um-danger { color: #ff8a7a; }
.um-item.um-danger:hover { background: rgba(255,90,90,0.08); }
.dam-list {
  margin: 8px 0 12px;
  padding-left: 22px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}
.dam-list li { margin: 2px 0; }

/* ═══════════ AUTH SCREEN ═══════════ */
.auth-container {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-logo {
  font-size: 32px;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 15px var(--cyan-glow);
  margin-bottom: 8px;
}
.auth-logo span { background: linear-gradient(135deg, var(--cyan), var(--magenta)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-title { font-size: 18px; font-weight: 800; color: var(--text); margin: 0 0 24px; }
.auth-form { width: 100%; max-width: 320px; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.auth-field input {
  width: 100%; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-family: var(--font); font-size: 14px; outline: none;
  transition: border-color 0.3s;
}
.auth-field input:focus { border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,240,255,0.1); }
.auth-hint { font-size: 10px; color: var(--text3); margin-top: 4px; font-weight: 500; }
.auth-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--electric));
  color: #000; font-family: var(--font); font-size: 15px; font-weight: 800;
  cursor: pointer; transition: all 0.3s; text-transform: uppercase; letter-spacing: 1px;
  box-shadow: 0 0 15px var(--cyan-glow);
}
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px var(--cyan-glow); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.auth-toggle {
  margin-top: 16px; background: none; border: none; color: var(--cyan);
  font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer;
}
.auth-skip {
  margin-top: 12px; background: none; border: none; color: var(--text3);
  font-family: var(--font); font-size: 12px; font-weight: 500; cursor: pointer;
  text-decoration: underline;
}

/* ═══════════ USER CHIP (header) ═══════════ */
.user-chip {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 3px 4px; border-radius: 16px; transition: background 0.2s;
}
.user-chip:hover { background: rgba(255,255,255,0.05); }
.user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  color: #000; font-size: 10px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.user-premium-badge {
  font-size: 8px; font-weight: 800; padding: 2px 6px; border-radius: 10px;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: #000; text-transform: uppercase; letter-spacing: 0.5px;
}
.user-free-badge {
  font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 10px;
  background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,240,255,0.2);
  cursor: pointer; transition: all 0.2s;
}
.user-free-badge:hover { background: rgba(0,240,255,0.15); box-shadow: 0 0 10px var(--cyan-glow); }
.login-link {
  font-size: 11px; font-weight: 700; color: var(--cyan); cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ═══════════ PREMIUM GATE OVERLAY ═══════════ */
.premium-gate { position: relative; }
.premium-gate:not(.unlocked) > *:not(.premium-overlay) {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}
.premium-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 50;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
  background: rgba(5,5,16,0.4);
  border-radius: var(--radius);
}
.premium-gate:not(.unlocked) .premium-overlay { display: flex; }
.po-icon { font-size: 32px; filter: drop-shadow(0 0 12px var(--cyan-glow)); }

/* ═══════════ PREMIUM MODAL ═══════════ */
.premium-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
.premium-modal-backdrop.visible { display: flex; }
.premium-modal {
  background: var(--bg2);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 0 40px rgba(0,240,255,0.15);
  animation: fadeSlideIn 0.3s ease;
}
.pm-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: var(--text3);
  font-size: 22px; cursor: pointer;
}
.pm-icon { font-size: 48px; margin-bottom: 8px; }
.pm-title { font-size: 22px; font-weight: 900; color: var(--text); margin: 0 0 8px; }
.pm-desc { font-size: 13px; color: var(--text2); line-height: 1.5; margin: 0 0 20px; }
.pm-plans { display: flex; gap: 12px; }
.pm-plan {
  flex: 1; padding: 16px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.3s; position: relative;
}
.pm-plan:hover { border-color: var(--cyan); box-shadow: 0 0 15px rgba(0,240,255,0.1); }
.pm-plan.best {
  border-color: var(--lime);
  box-shadow: 0 0 15px rgba(57,255,20,0.15);
}
.pm-plan-badge {
  position: absolute; top: -8px; right: -4px;
  background: var(--lime); color: #000;
  font-size: 9px; font-weight: 900; padding: 2px 8px;
  border-radius: 10px; text-transform: uppercase;
}
.pm-plan-name { font-size: 12px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.pm-plan-price { font-size: 22px; font-weight: 900; color: var(--text); }
.pm-plan-price span { font-size: 11px; font-weight: 600; color: var(--text3); }
.pm-plan-sub { font-size: 10px; color: var(--lime); font-weight: 700; margin-top: 4px; }

/* ═══════════ Screens ═══════════ */
/* ─── Screens ─── */
/* Flex item — grows to fill space above disclaimer. Dropped the 100dvh
   min-height since the flex container already guarantees full-viewport sizing. */
.screen { display: none; min-height: 0; flex: 1 0 auto; }
.screen.active { display: block; animation: fadeSlideIn 0.4s ease; }

/* ─── HOME SCREEN ─── */
.home-header {
  padding: 24px 20px 12px;
  text-align: center;
}
.home-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}
.brand-dot {
  width: 10px; height: 10px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--lime), 0 0 25px var(--lime-glow);
  animation: neonPulse 1.5s ease-in-out infinite;
}
.brand-name {
  font-size: 24px;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 15px var(--cyan-glow);
  letter-spacing: 1px;
}
.home-subtitle {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Date bar */
.date-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
}
.date-arrow {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--cyan);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: var(--font);
}
.date-arrow:active { transform: scale(0.92); }
.date-picker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  text-align: center;
  cursor: pointer;
  color-scheme: dark;
}

/* Search */
.search-bar { padding: 0 20px 12px; }
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  outline: none;
  transition: border-color 0.3s;
}
.search-input::placeholder { color: var(--text3); }
.search-input:focus { border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,240,255,0.1); }

/* Fixtures list */
.fixtures-list { padding: 0 16px 32px; }
.league-group { margin-bottom: 20px; }
.league-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  margin-bottom: 8px;
}
.league-logo {
  width: 24px; height: 24px;
  border-radius: 6px;
  object-fit: contain;
}
.league-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 6px var(--cyan-glow);
}
.league-country {
  font-size: 10px;
  color: var(--text3);
  font-weight: 600;
}
/* Three-column layout: home (logo + name) | center (time/score/live) | away (logo + name) */
.match-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.match-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0,240,255,0.08);
}
.match-card:active { transform: scale(0.98); }

/* Each side: logo above (or beside) the team name */
.mc-side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mc-home { justify-content: flex-start; }
.mc-away { justify-content: flex-end; flex-direction: row-reverse; }

.match-card-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.1));
  flex-shrink: 0;
}
.match-card-team {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  /* Wrap onto a second line when the team name doesn't fit instead of
     truncating with an ellipsis — better recognizability on Android phones
     where horizontal real estate is limited. Cap at 2 lines for layout
     stability; the third+ line gets clipped (rare). */
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.25;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.mc-away .match-card-team { text-align: right; }

/* Center column: time / score / live status */
.mc-center {
  text-align: center;
  min-width: 50px;
  padding: 0 4px;
}
.match-card-time {
  font-size: 13px;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan-glow);
  font-variant-numeric: tabular-nums;
  display: inline-block;
}
.match-card-status {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.match-card-status.live { background: var(--lime-dim); color: var(--lime); border: 1px solid rgba(57,255,20,0.2); }
.match-card-status.ft { background: rgba(136,136,136,0.1); color: var(--text3); }
.match-card-status.ns { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,240,255,0.15); }

.match-card-score {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  min-width: 45px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Skeletons */
.skeleton-league {
  height: 20px;
  width: 120px;
  background: linear-gradient(90deg, var(--surface) 25%, rgba(0,240,255,0.04) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  margin-bottom: 12px;
}
.skeleton-card {
  height: 65px;
  background: linear-gradient(90deg, var(--surface) 25%, rgba(0,240,255,0.04) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
  margin-bottom: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* No matches */
.no-matches {
  text-align: center;
  padding: 40px 20px;
  color: var(--text3);
  font-size: 14px;
  font-weight: 600;
}

/* ─── LOADING SCREEN ─── */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 40px 20px;
  text-align: center;
}
.loading-orb {
  width: 120px; height: 120px;
  position: relative;
  margin-bottom: 32px;
}
.orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}
.ring1 {
  border-top-color: var(--cyan);
  border-bottom-color: var(--cyan);
  animation: spin 2s linear infinite;
  box-shadow: 0 0 15px var(--cyan-glow);
}
.ring2 {
  inset: 10px;
  border-left-color: var(--magenta);
  border-right-color: var(--magenta);
  animation: spin 3s linear infinite reverse;
  box-shadow: 0 0 15px var(--magenta-glow);
}
.ring3 {
  inset: 20px;
  border-top-color: var(--lime);
  animation: spin 1.5s linear infinite;
  box-shadow: 0 0 10px var(--lime-glow);
}
.orb-core {
  position: absolute;
  inset: 35px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,240,255,0.3), transparent);
  animation: coreGlow 2s ease-in-out infinite;
}
@keyframes spin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
@keyframes coreGlow {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}
.loading-teams {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.loading-text {
  font-size: 18px;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-glow);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.loading-sub {
  font-size: 12px;
  color: var(--text2);
  font-weight: 600;
  margin-bottom: 24px;
  min-height: 18px;
}
.loading-bar {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 20px;
}
.loading-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--lime));
  background-size: 200% 100%;
  animation: gradientMove 2s linear infinite;
  transition: width 0.5s ease;
}
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.loading-steps {
  display: flex;
  gap: 12px;
}
.step {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}
.step.active { color: var(--cyan); text-shadow: 0 0 6px var(--cyan-glow); }
.step.done { color: var(--lime); text-shadow: 0 0 6px var(--lime-glow); }

/* Back button */
.back-btn {
  display: block;
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--cyan);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}
.back-btn:hover { background: var(--cyan-dim); }

/* ─── Status Bar ─── */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 10px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5,5,16,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.status-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-glow);
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--lime), 0 0 20px var(--lime-glow);
  animation: neonPulse 1.5s ease-in-out infinite;
}
@keyframes neonPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--lime), 0 0 20px var(--lime-glow); }
  50% { opacity: 0.6; box-shadow: 0 0 4px var(--lime), 0 0 10px var(--lime-glow); }
}
.status-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sim-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  background: var(--cyan-dim);
  color: var(--cyan);
  border-radius: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(0,240,255,0.2);
  box-shadow: 0 0 10px rgba(0,240,255,0.1);
  animation: badgeGlow 3s ease-in-out infinite;
}
.reliability-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.reliability-badge.very_high {
  background: rgba(57,255,20,0.12);
  color: var(--lime);
  border: 1px solid rgba(57,255,20,0.3);
  box-shadow: 0 0 8px var(--lime-glow);
  text-shadow: 0 0 4px var(--lime-glow);
}
.reliability-badge.high {
  background: rgba(0,240,255,0.12);
  color: var(--cyan);
  border: 1px solid rgba(0,240,255,0.3);
  box-shadow: 0 0 8px var(--cyan-glow);
}
.reliability-badge.medium {
  background: rgba(255,230,0,0.12);
  color: var(--yellow);
  border: 1px solid rgba(255,230,0,0.3);
}
.reliability-badge.low {
  background: rgba(255,45,85,0.12);
  color: var(--red);
  border: 1px solid rgba(255,45,85,0.3);
}
.reliability-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 5px currentColor;
}

/* Confidence interval on score */
.score-ci {
  font-size: 9px;
  color: var(--text3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Context Strip */
.context-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ctx-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}
.ctx-chip:hover { border-color: var(--border-glow); transform: translateY(-1px); }
.ctx-chip .ctx-icon { font-size: 12px; }
.ctx-chip .ctx-label {
  font-size: 9px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
}
.ctx-chip .ctx-value {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ctx-chip.fresh { color: var(--lime); border-color: rgba(57,255,20,0.2); box-shadow: 0 0 6px rgba(57,255,20,0.1); }
.ctx-chip.fresh .ctx-value { color: var(--lime); text-shadow: 0 0 4px var(--lime-glow); }
.ctx-chip.normal { color: var(--cyan); }
.ctx-chip.normal .ctx-value { color: var(--cyan); }
.ctx-chip.tired { color: var(--orange); border-color: rgba(255,107,43,0.2); box-shadow: 0 0 6px var(--orange-glow); }
.ctx-chip.tired .ctx-value { color: var(--orange); text-shadow: 0 0 4px var(--orange-glow); }
.ctx-chip.exhausted { color: var(--red); border-color: rgba(255,45,85,0.25); box-shadow: 0 0 8px rgba(255,45,85,0.15); }
.ctx-chip.exhausted .ctx-value { color: var(--red); }
.ctx-chip.formation {
  background: var(--bg2);
  font-variant-numeric: tabular-nums;
}
.ctx-chip.formation.home {
  border-color: rgba(0,240,255,0.25);
  color: var(--cyan);
  box-shadow: 0 0 6px rgba(0,240,255,0.1);
}
.ctx-chip.formation.home .ctx-value { color: var(--cyan); text-shadow: 0 0 4px var(--cyan-glow); }
.ctx-chip.formation.away {
  border-color: rgba(255,107,43,0.25);
  color: var(--orange);
  box-shadow: 0 0 6px var(--orange-glow);
}
.ctx-chip.formation.away .ctx-value { color: var(--orange); text-shadow: 0 0 4px var(--orange-glow); }

.ctx-chip.derby {
  background: linear-gradient(135deg, rgba(255,0,229,0.15), rgba(255,107,43,0.15));
  border: 1px solid rgba(255,0,229,0.35);
  color: var(--magenta);
  box-shadow: 0 0 12px var(--magenta-glow);
  animation: derbyPulse 2s ease-in-out infinite;
}
@keyframes derbyPulse {
  0%, 100% { box-shadow: 0 0 12px var(--magenta-glow); }
  50% { box-shadow: 0 0 20px var(--magenta-glow), 0 0 30px rgba(255,0,229,0.15); }
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(0,240,255,0.1); }
  50% { box-shadow: 0 0 20px rgba(0,240,255,0.2); }
}

/* ─── Match Header ─── */
.match-header {
  padding: 16px 20px 20px;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  position: relative;
}
.league-tag {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  text-shadow: 0 0 8px var(--cyan-glow);
}
.teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.team-logo {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  position: relative;
  animation: logoFloat 4s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.team.home .team-logo {
  background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(0,240,255,0.03));
  border: 1px solid rgba(0,240,255,0.3);
  color: var(--cyan);
  box-shadow: 0 0 20px rgba(0,240,255,0.1), inset 0 0 15px rgba(0,240,255,0.05);
  text-shadow: 0 0 10px var(--cyan-glow);
}
.team.away .team-logo {
  background: linear-gradient(135deg, rgba(255,107,43,0.15), rgba(255,107,43,0.03));
  border: 1px solid rgba(255,107,43,0.3);
  color: var(--orange);
  box-shadow: 0 0 20px rgba(255,107,43,0.1), inset 0 0 15px rgba(255,107,43,0.05);
  text-shadow: 0 0 10px var(--orange-glow);
  animation-delay: 0.5s;
}
.team-name {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  max-width: 100px;
  line-height: 1.3;
}
.vs-block { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.predicted-score {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
}
.predicted-score span:first-child { color: var(--cyan); text-shadow: 0 0 15px var(--cyan-glow); }
.predicted-score span:last-child { color: var(--orange); text-shadow: 0 0 15px var(--orange-glow); }
.score-sep { color: var(--text3); font-weight: 300; }
.predicted-label {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* ─── 1X2 Probability Bar ─── */
.proba-bar-container { margin-top: 20px; }
.proba-bar {
  display: flex;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  gap: 2px;
  background: rgba(255,255,255,0.03);
}
.proba-segment {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.proba-segment.home { background: var(--cyan); box-shadow: 0 0 8px var(--cyan-glow); }
.proba-segment.draw { background: var(--draw-color); }
.proba-segment.away { background: var(--orange); box-shadow: 0 0 8px var(--orange-glow); }
.proba-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  gap: 6px;
}
.proba-labels > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.proba-team {
  font-size: 10px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.proba-pct {
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.proba-labels .home .proba-pct { color: var(--cyan); text-shadow: 0 0 8px var(--cyan-glow); }
.proba-labels .home .proba-team { color: var(--cyan); }
.proba-labels .draw .proba-pct { color: var(--draw-color); }
.proba-labels .away .proba-pct { color: var(--orange); text-shadow: 0 0 8px var(--orange-glow); }
.proba-labels .away .proba-team { color: var(--orange); }

/* ─── Tab Navigation ─── */
.tab-nav {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 48px;
  z-index: 99;
  background: rgba(5,5,16,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text3);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tab.active {
  background: linear-gradient(135deg, var(--cyan), var(--electric));
  color: #000;
  border-color: transparent;
  box-shadow: 0 0 15px var(--cyan-glow), 0 0 30px rgba(0,240,255,0.1);
}
.tab:not(.active):hover { color: var(--text2); border-color: var(--border); }

/* ─── Tab Content ─── */
.tab-content { padding: 16px; position: relative; z-index: 1; }
.tab-panel { display: none; animation: fadeSlideIn 0.4s ease; }
.tab-panel.active { display: block; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  text-shadow: 0 0 8px var(--cyan-glow);
}

/* ─── Stat Comparison Bars ─── */
.stat-bars { display: flex; flex-direction: column; gap: 14px; }
.stat-row {
  display: grid;
  grid-template-columns: 50px 1fr 70px 1fr 50px;
  align-items: center;
  gap: 8px;
}
.stat-value {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stat-value.home { text-align: right; color: var(--cyan); text-shadow: 0 0 6px var(--cyan-glow); }
.stat-value.away { text-align: left; color: var(--orange); text-shadow: 0 0 6px var(--orange-glow); }
.stat-label {
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-bar-track {
  height: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
  overflow: hidden;
}
.stat-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.stat-bar-track.home .stat-bar-fill {
  background: linear-gradient(90deg, transparent, var(--cyan));
  box-shadow: 0 0 8px var(--cyan-glow);
  float: right;
}
.stat-bar-track.away .stat-bar-fill {
  background: linear-gradient(270deg, transparent, var(--orange));
  box-shadow: 0 0 8px var(--orange-glow);
  float: left;
}

/* ─── Distribution Cards ─── */
.distributions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dist-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.dist-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 15px rgba(0,240,255,0.05);
}
.dist-card .dist-title {
  font-size: 9px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.dist-card .dist-mean {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
}
.dist-card .dist-std {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}
.dist-percentiles { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.dist-percentiles .pctl {
  font-size: 9px;
  padding: 3px 7px;
  background: rgba(0,240,255,0.06);
  border-radius: 6px;
  color: var(--text2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(0,240,255,0.06);
}

/* ─── Over/Under Grid ─── */
.ou-grid { display: flex; flex-direction: column; gap: 8px; }
.ou-row {
  display: grid;
  grid-template-columns: 55px 1fr;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.2s;
}
.ou-row:hover { border-color: var(--border-glow); transform: translateX(2px); }
.ou-threshold {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ou-bars { display: flex; flex-direction: column; gap: 6px; }
.ou-bar-row { display: flex; align-items: center; gap: 8px; }
.ou-bar-label {
  font-size: 9px;
  font-weight: 700;
  width: 36px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ou-bar-label.over { color: var(--lime); text-shadow: 0 0 4px var(--lime-glow); }
.ou-bar-label.under { color: var(--red); }
.ou-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.03);
  border-radius: 3px;
  overflow: hidden;
}
.ou-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.ou-bar-fill.over { background: var(--lime); box-shadow: 0 0 6px var(--lime-glow); }
.ou-bar-fill.under { background: var(--red); box-shadow: 0 0 6px rgba(255,45,85,0.3); }
.ou-bar-value {
  font-size: 12px;
  font-weight: 800;
  width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ou-bar-value.over { color: var(--lime); text-shadow: 0 0 4px var(--lime-glow); }
.ou-bar-value.under { color: var(--red); }

/* ─── BTTS ─── */
.btts-display { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 16px; }
.btts-circle {
  width: 82px; height: 82px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  position: relative;
}
.btts-circle::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(var(--lime) var(--pct), rgba(255,255,255,0.05) var(--pct));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
}
.btts-label { font-size: 11px; color: var(--text2); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* ─── Card / Glass ─── */
.card {
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}
.card.glass {
  background: var(--surface);
  backdrop-filter: blur(12px);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.card-icon { font-size: 16px; }

/* ─── Player List ─── */
.player-list { display: flex; flex-direction: column; gap: 6px; }
.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}
.player-row:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 15px rgba(0,240,255,0.05);
  transform: translateX(3px);
}
.player-rank {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}
.player-rank.gold {
  background: rgba(255,230,0,0.15);
  color: var(--yellow);
  box-shadow: 0 0 10px rgba(255,230,0,0.15);
  text-shadow: 0 0 6px rgba(255,230,0,0.5);
}
.player-rank.silver { background: rgba(148,163,184,0.15); color: #94a3b8; }
.player-rank.bronze { background: rgba(255,107,43,0.15); color: var(--orange); }
.player-rank.default { background: rgba(255,255,255,0.04); color: var(--text3); }
.player-info { flex: 1; min-width: 0; }
.player-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-team { font-size: 10px; color: var(--text3); font-weight: 500; margin-top: 2px; }
.player-proba {
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.player-proba.high { color: var(--lime); text-shadow: 0 0 6px var(--lime-glow); }
.player-proba.medium { color: var(--yellow); text-shadow: 0 0 6px rgba(255,230,0,0.3); }
.player-proba.low { color: var(--text2); }
.player-bar-mini {
  width: 50px; height: 3px;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.player-bar-mini-fill { height: 100%; border-radius: 2px; transition: width 0.8s ease; }

/* ─── Halftime 1X2 ─── */
.ht-1x2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.ht-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}
.ht-card:hover { border-color: var(--border-glow); }
.ht-card .ht-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.ht-card .ht-value { font-size: 24px; font-weight: 900; letter-spacing: -1px; }
.ht-card.home .ht-value { color: var(--cyan); text-shadow: 0 0 10px var(--cyan-glow); }
.ht-card.draw .ht-value { color: var(--draw-color); }
.ht-card.away .ht-value { color: var(--orange); text-shadow: 0 0 10px var(--orange-glow); }

/* ─── Score Exact Podium ─── */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 10px 0 0; }
.podium-item { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.podium-block {
  width: 100%;
  border-radius: 14px 14px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  position: relative;
  border: 1px solid var(--border);
  border-bottom: none;
  backdrop-filter: blur(8px);
}
.podium-item:nth-child(1) .podium-block {
  background: linear-gradient(180deg, rgba(255,230,0,0.12) 0%, rgba(255,230,0,0.02) 100%);
  border-color: rgba(255,230,0,0.2);
  min-height: 140px;
}
.podium-item:nth-child(2) .podium-block {
  background: linear-gradient(180deg, rgba(148,163,184,0.1) 0%, rgba(148,163,184,0.02) 100%);
  border-color: rgba(148,163,184,0.15);
  min-height: 115px;
}
.podium-item:nth-child(3) .podium-block {
  background: linear-gradient(180deg, rgba(255,107,43,0.1) 0%, rgba(255,107,43,0.02) 100%);
  border-color: rgba(255,107,43,0.15);
  min-height: 95px;
}
.podium-rank {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; margin-bottom: 4px;
}
.podium-item:nth-child(1) .podium-rank { background: rgba(255,230,0,0.15); color: var(--yellow); text-shadow: 0 0 6px rgba(255,230,0,0.5); }
.podium-item:nth-child(2) .podium-rank { background: rgba(148,163,184,0.15); color: #94a3b8; }
.podium-item:nth-child(3) .podium-rank { background: rgba(255,107,43,0.15); color: var(--orange); }
.podium-score { font-size: 28px; font-weight: 900; letter-spacing: -1px; }
.podium-score .ps-home { color: var(--cyan); text-shadow: 0 0 8px var(--cyan-glow); }
.podium-score .ps-sep { color: var(--text3); font-weight: 300; }
.podium-score .ps-away { color: var(--orange); text-shadow: 0 0 8px var(--orange-glow); }
.podium-proba { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.podium-item:nth-child(1) .podium-proba { color: var(--yellow); text-shadow: 0 0 8px rgba(255,230,0,0.4); }
.podium-item:nth-child(2) .podium-proba { color: #94a3b8; }
.podium-item:nth-child(3) .podium-proba { color: var(--orange); text-shadow: 0 0 6px var(--orange-glow); }
.podium-count { font-size: 10px; color: var(--text3); font-weight: 500; }
.podium-result-tag {
  font-size: 8px; font-weight: 800; padding: 3px 8px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px;
}
.podium-result-tag.away-win { background: var(--orange-dim); color: var(--orange); }
.podium-result-tag.home-win { background: var(--cyan-dim); color: var(--cyan); }
.podium-result-tag.draw { background: rgba(136,136,136,0.12); color: var(--draw-color); }

/* ─── Scores List ─── */
.scores-list { display: flex; flex-direction: column; gap: 6px; }
.score-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--border);
  backdrop-filter: blur(8px); transition: all 0.3s;
}
.score-row:hover { border-color: var(--border-glow); transform: translateX(3px); }
.score-row-rank { font-size: 12px; font-weight: 700; color: var(--text3); width: 20px; text-align: center; flex-shrink: 0; }
.score-row-value { font-size: 16px; font-weight: 900; letter-spacing: -0.5px; width: 50px; text-align: center; flex-shrink: 0; color: var(--text); }
.score-row-bar { flex: 1; height: 5px; background: rgba(255,255,255,0.03); border-radius: 3px; overflow: hidden; }
.score-row-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 8px rgba(0,240,255,0.2);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.score-row-pct { font-size: 13px; font-weight: 800; color: var(--cyan); width: 50px; text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; text-shadow: 0 0 4px var(--cyan-glow); }
.score-row-tag {
  font-size: 8px; font-weight: 800; padding: 2px 6px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0; width: 18px; text-align: center;
}
.score-row-tag.away-win { background: var(--orange-dim); color: var(--orange); }
.score-row-tag.home-win { background: var(--cyan-dim); color: var(--cyan); }
.score-row-tag.draw { background: rgba(136,136,136,0.1); color: var(--draw-color); }

/* ─── Exact Scores (Goals tab) ─── */
.exact-scores { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.exact-score-card {
  background: var(--surface); border-radius: var(--radius-sm); padding: 12px; text-align: center;
  border: 1px solid var(--border); backdrop-filter: blur(8px); transition: all 0.3s;
}
.exact-score-card:hover { border-color: var(--border-glow); }
.exact-score-card .es-score { font-size: 18px; font-weight: 900; color: var(--text); }
.exact-score-card .es-proba { font-size: 11px; font-weight: 700; color: var(--cyan); margin-top: 4px; text-shadow: 0 0 4px var(--cyan-glow); }

/* ─── Timing Tab : First Goal ─── */
.first-goal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fg-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  text-align: center;
  transition: all 0.3s;
}
.fg-card:hover { border-color: var(--border-glow); }
.fg-card .fg-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.fg-card .fg-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
  letter-spacing: -1px;
  margin-top: 4px;
}
.fg-card.avg .fg-value { color: var(--magenta); text-shadow: 0 0 10px var(--magenta-glow); }
.fg-card.noGoal .fg-value { color: var(--red); text-shadow: 0 0 8px rgba(255,45,85,0.3); }
.fg-card .fg-sub { font-size: 10px; color: var(--text3); margin-top: 2px; }

/* First Goal Team (pie-like bars) */
.first-goal-team {
  display: flex;
  gap: 8px;
}
.fgt-bar {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.fgt-bar::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: var(--pct, 0%);
  opacity: 0.15;
  z-index: 0;
}
.fgt-bar.home::before { background: var(--cyan); }
.fgt-bar.away::before { background: var(--orange); }
.fgt-bar.none::before { background: var(--draw-color); }
.fgt-bar > * { position: relative; z-index: 1; }
.fgt-bar .fgt-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fgt-bar .fgt-pct {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-top: 4px;
}
.fgt-bar.home .fgt-pct { color: var(--cyan); text-shadow: 0 0 8px var(--cyan-glow); }
.fgt-bar.away .fgt-pct { color: var(--orange); text-shadow: 0 0 8px var(--orange-glow); }
.fgt-bar.none .fgt-pct { color: var(--draw-color); }

/* Intervals grid */
.intervals-grid { display: flex; flex-direction: column; gap: 8px; }
.interval-row {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}
.interval-row:hover { border-color: var(--border-glow); transform: translateX(2px); }
.interval-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 4px var(--cyan-glow);
  font-variant-numeric: tabular-nums;
}
.interval-bar-track {
  height: 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.interval-bar-track {
  position: relative;
}
.interval-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 10px rgba(0,240,255,0.25);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.interval-bar-track::after {
  content: attr(data-label);
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  font-weight: 700;
  color: var(--text2);
  letter-spacing: 0.3px;
  pointer-events: none;
}
.interval-avg {
  font-size: 14px;
  font-weight: 900;
  color: var(--lime);
  text-shadow: 0 0 6px var(--lime-glow);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Possession Timeline */
.possession-timeline {
  display: flex;
  gap: 3px;
  height: 90px;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  align-items: flex-end;
  backdrop-filter: blur(8px);
}
.pt-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  position: relative;
}
.pt-home {
  background: linear-gradient(180deg, var(--cyan) 0%, rgba(0,240,255,0.3) 100%);
  box-shadow: 0 0 6px var(--cyan-glow);
}
.pt-away {
  background: linear-gradient(180deg, rgba(255,107,43,0.3) 0%, var(--orange) 100%);
  box-shadow: 0 0 6px var(--orange-glow);
}
.pt-label {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: var(--text3);
  font-weight: 600;
  white-space: nowrap;
}

/* ─── Match Analysis (Stats tab only) ─── */
.match-analysis {
  background: linear-gradient(135deg, rgba(191,90,242,0.08), rgba(0,240,255,0.05));
  border: 1px solid rgba(191,90,242,0.18);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.match-analysis::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--magenta) 0%, var(--cyan) 100%);
  box-shadow: 0 0 10px var(--magenta-glow);
}
.ma-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ma-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(191,90,242,0.25), rgba(0,240,255,0.15));
  border: 1px solid rgba(191,90,242,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: 0 0 12px var(--purple-glow);
  animation: tipIconPulse 3s ease-in-out infinite;
}
.ma-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  text-shadow: 0 0 8px var(--purple-glow);
}
.ma-paragraph {
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
  margin: 0 0 8px;
  font-weight: 500;
}
.ma-paragraph:last-child { margin-bottom: 0; }
.ma-paragraph strong {
  color: var(--cyan);
  font-weight: 700;
  text-shadow: 0 0 4px var(--cyan-glow);
}
.ma-insights {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ma-insights li {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  padding: 6px 10px 6px 22px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 6px;
  position: relative;
}
.ma-insights li::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan-glow);
  transform: translateY(-50%);
}
.ma-watchout {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 0;
  padding: 8px 10px;
  background: rgba(243, 156, 18, 0.08);
  border-left: 3px solid rgba(243, 156, 18, 0.7);
  border-radius: 4px;
  font-size: 12px;
  color: rgba(255, 206, 126, 0.95);
  line-height: 1.5;
}
.ma-watchout-icon {
  flex-shrink: 0;
  font-size: 13px;
}

/* ─── Expert Tips Card ─── */
.tips-container { margin-top: 4px; margin-bottom: 16px; }
.tips-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tips-header-icon {
  width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(191,90,242,0.2), rgba(0,240,255,0.1));
  border: 1px solid rgba(191,90,242,0.3);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  box-shadow: 0 0 12px var(--purple-glow);
  animation: tipIconPulse 3s ease-in-out infinite;
}
@keyframes tipIconPulse {
  0%, 100% { box-shadow: 0 0 12px var(--purple-glow); }
  50% { box-shadow: 0 0 20px var(--purple-glow), 0 0 30px rgba(191,90,242,0.15); }
}
.tips-header-text {
  font-size: 11px; font-weight: 800; color: var(--purple);
  text-transform: uppercase; letter-spacing: 1.5px;
  text-shadow: 0 0 8px var(--purple-glow);
}
.tip-card {
  background: linear-gradient(135deg, rgba(191,90,242,0.06), rgba(0,240,255,0.04));
  border: 1px solid rgba(191,90,242,0.15);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  animation: slideUp 0.5s ease backwards;
  transition: all 0.3s;
}
.tip-card:hover {
  border-color: rgba(191,90,242,0.3);
  box-shadow: 0 0 20px rgba(191,90,242,0.08);
}
.tip-card:nth-child(2) { animation-delay: 0.1s; }
.tip-card:nth-child(3) { animation-delay: 0.15s; }
.tip-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  border-radius: 3px 0 0 3px;
}
.tip-card.high::before { background: var(--lime); box-shadow: 0 0 8px var(--lime-glow); }
.tip-card.medium::before { background: var(--yellow); box-shadow: 0 0 8px rgba(255,230,0,0.3); }
.tip-card.low::before { background: var(--electric); box-shadow: 0 0 8px var(--electric-glow); }
.tip-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tip-bet { font-size: 14px; font-weight: 900; color: var(--text); letter-spacing: -0.3px; }
.tip-confidence { display: flex; align-items: center; gap: 6px; }
.tip-confidence-bar { width: 40px; height: 3px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.tip-confidence-bar-fill { height: 100%; border-radius: 2px; transition: width 0.8s ease; }
.tip-confidence-bar-fill.high { background: var(--lime); box-shadow: 0 0 6px var(--lime-glow); }
.tip-confidence-bar-fill.medium { background: var(--yellow); }
.tip-confidence-bar-fill.low { background: var(--electric); }
.tip-confidence-value { font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }
.tip-confidence-value.high { color: var(--lime); text-shadow: 0 0 6px var(--lime-glow); }
.tip-confidence-value.medium { color: var(--yellow); text-shadow: 0 0 4px rgba(255,230,0,0.3); }
.tip-confidence-value.low { color: var(--electric); }
.tip-reason { font-size: 12px; color: var(--text2); line-height: 1.5; margin-top: 4px; }
.tip-reason strong { color: var(--text); font-weight: 700; }
.tip-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tip-tag {
  font-size: 8px; font-weight: 800; padding: 3px 8px; border-radius: 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.tip-tag.edge { background: var(--lime-dim); color: var(--lime); border: 1px solid rgba(57,255,20,0.15); }
.tip-tag.safe { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,240,255,0.15); }
.tip-tag.value { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(255,230,0,0.15); }
.tip-tag.risky { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,45,85,0.1); }

/* ─── Error Toast ─── */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  min-width: 280px;
  max-width: 400px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 1;
}
.toast.error {
  background: linear-gradient(135deg, rgba(255,45,85,0.15), rgba(255,45,85,0.05));
  border: 1px solid rgba(255,45,85,0.35);
  color: var(--red);
  box-shadow: 0 0 24px rgba(255,45,85,0.15);
}
.toast.warning {
  background: linear-gradient(135deg, rgba(255,230,0,0.15), rgba(255,230,0,0.05));
  border: 1px solid rgba(255,230,0,0.35);
  color: var(--yellow);
}
.toast.info {
  background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(0,240,255,0.05));
  border: 1px solid rgba(0,240,255,0.35);
  color: var(--cyan);
}
.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast-content { flex: 1; }
.toast-title { font-weight: 800; margin-bottom: 2px; }
.toast-msg { font-weight: 500; opacity: 0.9; font-size: 12px; }
.toast-close {
  cursor: pointer;
  opacity: 0.5;
  font-size: 18px;
  line-height: 1;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
}
.toast-close:hover { opacity: 1; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-20px); }
}
.toast.fading { animation: toastOut 0.25s ease forwards; }

/* ─── Footer ─── */
.app-footer { padding: 20px 16px 32px; text-align: center; }
.footer-meta {
  font-size: 10px; color: var(--text3); letter-spacing: 0.5px;
}

/* ─── Animations ─── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.stat-row, .ou-row, .player-row, .dist-card, .ht-card, .exact-score-card, .score-row {
  animation: slideUp 0.4s ease backwards;
}
.stat-row:nth-child(1), .ou-row:nth-child(1), .player-row:nth-child(1) { animation-delay: 0.05s; }
.stat-row:nth-child(2), .ou-row:nth-child(2), .player-row:nth-child(2) { animation-delay: 0.1s; }
.stat-row:nth-child(3), .ou-row:nth-child(3), .player-row:nth-child(3) { animation-delay: 0.15s; }
.stat-row:nth-child(4), .ou-row:nth-child(4), .player-row:nth-child(4) { animation-delay: 0.2s; }
.stat-row:nth-child(5), .ou-row:nth-child(5), .player-row:nth-child(5) { animation-delay: 0.25s; }
.stat-row:nth-child(6), .ou-row:nth-child(6), .player-row:nth-child(6) { animation-delay: 0.3s; }

/* ─── Glow border animation for active elements ─── */
@keyframes borderGlow {
  0%, 100% { border-color: rgba(0,240,255,0.08); }
  50% { border-color: rgba(0,240,255,0.2); }
}
.podium-item:nth-child(2) .podium-block {
  animation: borderGlow 3s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════
   Admin: Learning Engine block
   ═══════════════════════════════════════════════════════════ */

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.btn-retrain {
  background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(255,0,229,0.15));
  border: 1px solid rgba(0,240,255,0.35);
  color: #00f0ff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-retrain:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0,240,255,0.25), rgba(255,0,229,0.25));
  border-color: #00f0ff;
  transform: translateY(-1px);
}
.btn-retrain:disabled {
  opacity: 0.5;
  cursor: wait;
}

.learning-block {
  background: rgba(10, 10, 26, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 14px;
  padding: 16px;
  margin-top: 8px;
}

.le-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.le-card {
  background: rgba(5, 5, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px;
}
.le-card.le-main {
  grid-column: 1 / -1;
  border-color: rgba(0, 240, 255, 0.3);
  background: linear-gradient(135deg, rgba(0,240,255,0.08), rgba(255,0,229,0.08));
}
.le-card-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.le-card-value {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.le-card.le-main .le-card-value {
  font-size: 26px;
  color: #00f0ff;
  font-family: 'SF Mono', Menlo, monospace;
}
.le-card-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
}

.le-progress-wrap {
  margin-top: 14px;
}
.le-progress-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.le-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.le-progress-fill {
  height: 100%;
  background: #00f0ff;
  border-radius: 4px;
  transition: width 0.6s ease-out;
}
.le-progress-value {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
  margin-top: 4px;
}

.le-versions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.le-versions summary {
  cursor: pointer;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 0;
  user-select: none;
}
.le-versions summary:hover {
  color: #00f0ff;
}
.le-versions-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.le-version-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  border: 1px solid transparent;
}
.le-version-row.active {
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.06);
}
.lev-ver {
  font-family: 'SF Mono', Menlo, monospace;
  color: #fff;
}
.lev-date {
  color: rgba(255, 255, 255, 0.4);
  flex: 1;
  text-align: right;
}
.lev-active-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #050510;
  background: #00f0ff;
  padding: 2px 6px;
  border-radius: 3px;
}

.le-error {
  color: #ff6b6b;
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

/* ═══════════════════════════════════════════════════════════
   Admin: Accuracy per Market table
   ═══════════════════════════════════════════════════════════ */

.le-markets-wrap {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.le-markets-title {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.le-markets-empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  padding: 10px 0;
}
.le-markets-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.le-market-row {
  display: grid;
  grid-template-columns: 1.3fr 2fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 12px;
}
.lem-name {
  color: #fff;
  font-weight: 600;
}
.lem-bar-wrap {
  min-width: 0;
}
.lem-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.lem-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease-out;
}
.lem-pct {
  font-family: 'SF Mono', Menlo, monospace;
  font-weight: 700;
  font-size: 13px;
  min-width: 44px;
  text-align: right;
}
.lem-count {
  color: rgba(255, 255, 255, 0.4);
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 11px;
  min-width: 48px;
  text-align: right;
}

/* Admin: actions row in Learning Engine title */
.le-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   Admin: Expandable tip details per market
   ═══════════════════════════════════════════════════════════ */

.lem-hint {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.3);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 6px;
  font-size: 11px;
}

.le-market-details > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: grid;
  grid-template-columns: 1.3fr 2fr auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 12px;
  transition: background 0.15s;
}
.le-market-details > summary::-webkit-details-marker { display: none; }
.le-market-details > summary:hover {
  background: rgba(0, 240, 255, 0.05);
  border-color: rgba(0, 240, 255, 0.15);
}
.le-market-details[open] > summary {
  background: rgba(0, 240, 255, 0.06);
  border-color: rgba(0, 240, 255, 0.25);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.lem-caret {
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  transition: transform 0.2s;
}
.le-market-details[open] .lem-caret {
  transform: rotate(90deg);
  color: #00f0ff;
}

.le-tips-list {
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  background: rgba(5, 5, 16, 0.5);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
}
.le-tips-empty {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-style: italic;
  padding: 10px;
  text-align: center;
}
.le-tip-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  border-left: 3px solid transparent;
}
.le-tip-row.ok {
  background: rgba(0, 255, 0, 0.04);
  border-left-color: #0f0;
}
.le-tip-row.ko {
  background: rgba(255, 100, 0, 0.04);
  border-left-color: #f90;
}
.ltr-status {
  font-weight: 800;
  font-size: 14px;
  min-width: 14px;
  text-align: center;
}
.le-tip-row.ok .ltr-status { color: #0f0; }
.le-tip-row.ko .ltr-status { color: #f90; }
.ltr-main {
  min-width: 0;
  overflow: hidden;
}
.ltr-bet {
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ltr-match {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.ltr-conf {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  min-width: 40px;
  text-align: right;
}

/* Keep the old row grid aligned with the new summary grid */
.le-market-row {
  display: contents;
}

/* ═══════════════════════════════════════════════════════════
   Global disclaimer footer — visible on every screen
   ═══════════════════════════════════════════════════════════ */

.global-disclaimer {
  padding: 18px 18px 32px;
  background: linear-gradient(to top, rgba(5, 5, 16, 0.98), rgba(5, 5, 16, 0.85));
  border-top: 1px solid rgba(0, 240, 255, 0.12);
  font-size: 10px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  /* Pinned at bottom of #app via auto margin — works even when the active
     screen's content is shorter than the viewport. */
  flex: 0 0 auto;
  margin-top: auto;
  position: relative;
  z-index: 2;
}
.gd-warning {
  color: rgba(255, 200, 100, 0.9);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 10.5px;
  letter-spacing: 0.01em;
}
.gd-legal {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.5);
}
.gd-legal strong {
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.04em;
}
.gd-legal a {
  color: #00f0ff;
  text-decoration: none;
  font-weight: 600;
}
.gd-legal a:hover { text-decoration: underline; }
.gd-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}
.gd-links a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.2s;
}
.gd-links a:hover { color: #00f0ff; }
.gd-sep { color: rgba(255, 255, 255, 0.25); }
.gd-copy { color: rgba(255, 255, 255, 0.35); }

/* Legal modal — reuses .premium-modal-backdrop + .premium-modal */
.legal-modal {
  max-width: 540px;
  max-height: 80vh;
  overflow-y: auto;
}
.legal-body {
  text-align: left;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  padding-top: 8px;
}
.legal-body h3 {
  color: #00f0ff;
  font-size: 13px;
  margin: 14px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.legal-body p { margin: 0 0 10px; }
.legal-body a { color: #00f0ff; text-decoration: none; }
.legal-body a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   Admin: Per-market calibration controls
   ═══════════════════════════════════════════════════════════ */

.lem-cal-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  vertical-align: middle;
}
.le-cal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.btn-calibrate {
  background: linear-gradient(135deg, rgba(0,240,255,0.2), rgba(255,0,229,0.15));
  border: 1px solid rgba(0,240,255,0.4);
  color: #00f0ff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-calibrate:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0,240,255,0.35), rgba(255,0,229,0.25));
  transform: translateY(-1px);
}
.btn-cal-reset {
  background: rgba(255, 100, 100, 0.1);
  border-color: rgba(255, 100, 100, 0.3);
  color: #ff8080;
}
.btn-cal-reset:hover {
  background: rgba(255, 100, 100, 0.2);
}
.lem-cal-info {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'SF Mono', Menlo, monospace;
}

/* Cleanup button — destructive, shown in orange to warn */
.btn-cleanup {
  background: linear-gradient(135deg, rgba(255, 150, 50, 0.18), rgba(255, 100, 100, 0.15));
  border-color: rgba(255, 150, 50, 0.4);
  color: #ffb060;
}
.btn-cleanup:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(255, 150, 50, 0.32), rgba(255, 100, 100, 0.25));
  border-color: rgba(255, 150, 50, 0.7);
}

/* Backup button — non-destructive, shown in green */
.btn-backup {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.18), rgba(0, 240, 255, 0.10));
  border-color: rgba(46, 204, 113, 0.4);
  color: #7ee2b8;
}
.btn-backup:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.32), rgba(0, 240, 255, 0.20));
  border-color: rgba(46, 204, 113, 0.7);
}

/* Danger button — full red, used by reset action */
.btn-danger {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.22), rgba(192, 30, 30, 0.18));
  border-color: rgba(231, 76, 60, 0.55);
  color: #ff8a7a;
}
.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.4), rgba(192, 30, 30, 0.32));
  border-color: rgba(231, 76, 60, 0.85);
}
.btn-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════
   Reset learning DB modal
   ═══════════════════════════════════════════════════════════ */
.reset-modal { max-width: 520px; text-align: left; }
.reset-modal .pm-title {
  font-size: 18px;
  text-align: center;
  color: #ff8a7a;
  margin-bottom: 14px;
}
.reset-body { font-size: 13px; color: var(--text); line-height: 1.55; }
.reset-warn {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: rgba(231, 76, 60, 0.1);
  border-left: 3px solid #ff8a7a;
  border-radius: 4px;
  color: #ffd0c8;
}
.reset-warn strong { color: #ff8a7a; }
.reset-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 14px;
}
.reset-tables-col {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
}
.reset-tables-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.reset-tables-title--del { color: #ff8a7a; }
.reset-tables-title--keep { color: #7ee2b8; }
.reset-tables ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.reset-tables li {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 11px;
  color: var(--text2);
  padding: 2px 0;
}
.reset-impact {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text2);
  font-style: italic;
}
.reset-confirm-label {
  display: block;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 6px;
}
.reset-confirm-label code {
  background: rgba(255, 138, 122, 0.15);
  color: #ff8a7a;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, monospace;
  font-weight: 700;
}
.reset-confirm-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.15s ease;
}
.reset-confirm-input:focus { border-color: rgba(231, 76, 60, 0.6); }
.reset-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.btn-cancel {
  padding: 9px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.btn-confirm-reset {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

/* ═══════════════════════════════════════════════════════════
   Admin-only Tips IA panel inside match analysis
   ═══════════════════════════════════════════════════════════ */
.admin-tips-block {
  margin: 14px 16px 0;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 0, 229, 0.05), rgba(0, 240, 255, 0.05));
  border: 1px solid rgba(255, 0, 229, 0.25);
  border-radius: 12px;
  position: relative;
}
.adm-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.adm-icon { font-size: 16px; }
.adm-title {
  color: #ff00e5;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.adm-count {
  margin-left: auto;
  font-size: 11px;
  font-family: 'SF Mono', Menlo, monospace;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 0, 229, 0.12);
  border: 1px solid rgba(255, 0, 229, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}
.adm-sub {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.4;
}
.adm-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.adm-section:first-of-type { border-top: none; padding-top: 0; }
.adm-section-title {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  font-weight: 700;
}
.adm-tip-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-tip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 12px;
}
.adm-tip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.adm-tip-bet {
  color: #fff;
  font-weight: 600;
}
.adm-tip-conf {
  font-family: 'SF Mono', Menlo, monospace;
  font-weight: 800;
  color: #00f0ff;
  min-width: 44px;
  text-align: right;
}
.adm-tip-reasoning {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-style: italic;
  line-height: 1.4;
  padding-left: 2px;
}

/* Role-tagged tips: visual highlight + colored badge inline with the bet */
.adm-tip--role {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.adm-role-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  font-family: 'SF Mono', Menlo, monospace;
}
.adm-role--hc {
  background: rgba(46, 204, 113, 0.18);
  color: #7ee2b8;
  border: 1px solid rgba(46, 204, 113, 0.45);
}
.adm-role--vp {
  background: rgba(0, 240, 255, 0.16);
  color: #5ee0f0;
  border: 1px solid rgba(0, 240, 255, 0.45);
}
.adm-role--fade {
  background: rgba(243, 156, 18, 0.18);
  color: #ffce7e;
  border: 1px solid rgba(243, 156, 18, 0.45);
}


/* ═══════════════════════════════════════════════════════════
   Football fixtures — status filter + collapsible leagues
   ═══════════════════════════════════════════════════════════ */

.status-filter {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.status-filter::-webkit-scrollbar { display: none; }

.status-btn {
  flex: 1 0 auto;
  min-width: 78px;
  padding: 9px 14px;
  background: rgba(15, 15, 42, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: 22px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.status-btn:hover {
  border-color: rgba(0, 240, 255, 0.4);
  color: rgba(255, 255, 255, 0.85);
}
.status-btn.active {
  background: linear-gradient(135deg, rgba(0,240,255,0.2), rgba(255,0,229,0.15));
  border-color: rgba(0, 240, 255, 0.7);
  color: #00f0ff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.18);
}

/* Collapsible league groups via <details>/<summary> */
.fixtures-list .league-group {
  margin-bottom: 10px;
}
.fixtures-list .league-group > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: grid;
  grid-template-columns: 28px 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(15, 15, 42, 0.55);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: 12px;
  transition: all 0.2s;
}
.fixtures-list .league-group > summary::-webkit-details-marker { display: none; }
.fixtures-list .league-group > summary:hover {
  background: rgba(15, 15, 42, 0.75);
  border-color: rgba(0, 240, 255, 0.3);
}
.fixtures-list .league-group[open] > summary {
  border-color: rgba(0, 240, 255, 0.45);
  background: linear-gradient(135deg, rgba(0,240,255,0.06), rgba(255,0,229,0.04));
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.league-header .league-logo {
  width: 28px; height: 28px;
  object-fit: contain;
}
.league-header .league-name {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.league-header .league-country {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.league-header .league-count {
  font-size: 10px;
  font-family: 'SF Mono', Menlo, monospace;
  background: rgba(0, 240, 255, 0.12);
  color: #00f0ff;
  border-radius: 10px;
  padding: 2px 7px;
  font-weight: 700;
}
.league-header .league-caret {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  transition: transform 0.25s ease-out;
}
.league-group[open] .league-caret {
  transform: rotate(90deg);
  color: #00f0ff;
}

.league-fixtures {
  padding: 8px;
  background: rgba(5, 5, 16, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: leagueExpand 0.25s ease-out;
}
@keyframes leagueExpand {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   My Analyses — recent + favorites screen
   ═══════════════════════════════════════════════════════════ */

.analyses-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
}
.ana-tab {
  flex: 1;
  padding: 10px 14px;
  background: rgba(15, 15, 42, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.ana-tab.active {
  background: linear-gradient(135deg, rgba(0,240,255,0.2), rgba(255,0,229,0.15));
  border-color: rgba(0, 240, 255, 0.7);
  color: #00f0ff;
}

.analyses-container {
  padding: 0 16px 24px;
}

.ana-loading,
.ana-empty {
  text-align: center;
  padding: 48px 24px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  line-height: 1.6;
}
.ana-empty small {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
}

.ana-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(15, 15, 42, 0.55);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.ana-card:hover {
  background: rgba(15, 15, 42, 0.75);
  border-color: rgba(0, 240, 255, 0.3);
  transform: translateY(-1px);
}
.ana-card-main { min-width: 0; }
.ana-card-teams {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ana-card-meta {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.ana-star,
.ana-delete {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.ana-star:hover { color: #ffd700; border-color: rgba(255, 215, 0, 0.4); }
.ana-star.on { color: #ffd700; border-color: rgba(255, 215, 0, 0.5); }
.ana-delete:hover { color: #ff6b6b; border-color: rgba(255, 100, 100, 0.4); }

/* ─── Favorite (⭐) button on the live results screen status bar ─── */
.favorite-btn {
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: rgba(255, 255, 255, 0.5);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-right: 6px;
}
.favorite-btn:hover {
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.5);
}
.favorite-btn.on {
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.6);
  background: rgba(255, 215, 0, 0.08);
}

/* ═══════════════════════════════════════════════════════════
   Onboarding modal — first-run explanation
   ═══════════════════════════════════════════════════════════ */

.onboarding-modal {
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 24px 24px;
  text-align: left;
}

.onb-header {
  text-align: center;
  margin-bottom: 18px;
}
.onb-logo {
  display: inline-block;
  font-size: 36px;
  color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan-glow), 0 0 40px rgba(0, 240, 255, 0.3);
  margin-bottom: 8px;
}
.onboarding-modal .pm-title {
  margin: 0 0 6px;
  font-size: 22px;
}
.onb-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.4;
}

.onb-section {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.onb-section:first-of-type { border-top: none; padding-top: 0; }

.onb-section-icon {
  font-size: 22px;
  line-height: 1;
  text-align: center;
  padding-top: 2px;
}
.onb-section-title {
  font-weight: 800;
  color: var(--cyan);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.onb-section p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
}

.onb-disclaimer {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 100, 50, 0.06);
  border: 1px solid rgba(255, 150, 50, 0.25);
  border-radius: 10px;
}
.onb-disclaimer-title {
  color: rgba(255, 200, 100, 0.9);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.onb-disclaimer p {
  margin: 0 0 6px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}
.onb-disclaimer p:last-child { margin-bottom: 0; }
.onb-disclaimer a {
  color: #00f0ff;
  text-decoration: none;
  font-weight: 600;
}

.onb-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 14px;
  cursor: pointer;
  user-select: none;
  padding: 10px;
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 8px;
}
.onb-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: #00f0ff;
  cursor: pointer;
}
.onb-checkbox-row span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

.onb-continue-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  border: none;
  border-radius: 12px;
  color: #050510;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 24px rgba(0, 240, 255, 0.25);
}
.onb-continue-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(0, 240, 255, 0.4);
}
.onb-continue-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════
   Native safe-area — Capacitor iOS notch / Android gesture bar
   Activated by `viewport-fit=cover` already set in index.html.
   On the web (no insets), env() falls back to 0 so this is a no-op.
   ═══════════════════════════════════════════════════════════ */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* Push body content past the gesture bar / home indicator at the bottom. */
body {
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

/* Sticky headers — extend their top padding to clear the notch / status bar. */
.top-bar { padding-top: calc(12px + var(--safe-top)); }
.status-bar { padding-top: calc(14px + var(--safe-top)); }
.tab-nav { top: calc(48px + var(--safe-top)); }

/* Fixed-positioned overlays — offset their `top` value. */
.user-menu { top: calc(52px + var(--safe-top)); }
.toast-container { top: calc(20px + var(--safe-top)); }

/* ═══════════════════════════════════════════════════════════
   Offline banner — pinned to the top, above all screens but
   below toasts. Shown when navigator.onLine === false.
   ═══════════════════════════════════════════════════════════ */
.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  padding-top: calc(6px + var(--safe-top));
  background: linear-gradient(180deg, rgba(255,80,80,0.95), rgba(220,40,40,0.92));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  transform: translateY(-100%);
  transition: transform 240ms ease;
}
.offline-banner[hidden] { display: none; }
.offline-banner.visible {
  transform: translateY(0);
}
.offline-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  animation: offline-pulse 1.4s ease-in-out infinite;
}
@keyframes offline-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

/* ═══════════════════════════════════════════════════════════
   Inline button loading — used by setBtnLoading().
   ═══════════════════════════════════════════════════════════ */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spinner-rotate 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes btn-spinner-rotate {
  to { transform: rotate(360deg); }
}
/* When a plan card in the premium modal is loading, dim the others. */
.pm-plans.is-loading .pm-plan:not(.is-loading) {
  opacity: 0.4;
  pointer-events: none;
}
.pm-plan.is-loading {
  position: relative;
}
.pm-plan.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-plan-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.pm-plan-spinner > span {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spinner-rotate 0.7s linear infinite;
}

/* ═══════════════════════════════════════════════════════════
   Pull-to-refresh indicator — only wired up on native builds
   (initPullToRefresh bails on web).
   ═══════════════════════════════════════════════════════════ */
.pull-refresh-indicator {
  position: absolute;
  top: 0;
  left: 50%;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid var(--cyan, #00f0ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan, #00f0ff);
  font-size: 20px;
  font-weight: 700;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 200ms ease, transform 200ms ease;
}
.pull-refresh-indicator.dragging {
  transition: none;
}
.pull-refresh-indicator.refreshing .pri-icon {
  display: inline-block;
  animation: btn-spinner-rotate 0.7s linear infinite;
}
.screen { position: relative; }  /* anchors the indicator inside its screen */
