/* ============================================
   World Cup 2026 — Modern SaaS Design
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base: #0a0e1a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-header: rgba(10, 14, 26, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(99, 179, 237, 0.3);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);

  --accent-1: #6366f1;
  --accent-2: #ec4899;
  --accent-3: #22d3ee;
  --accent-gold: #fbbf24;
  --accent-mine: #10b981;

  --poly-color: #2D9CDB;
  --kalshi-color: #00C896;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --font-display: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  /* padding-top no longer needed — nav is sticky (not fixed) */
}

body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  animation: float1 20s ease-in-out infinite;
}

body::after {
  content: '';
  position: fixed;
  top: 30%;
  right: -15%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.18) 0%, transparent 70%);
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
  animation: float2 25s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(50px, 80px); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-80px, -50px); }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============================================
   FIXED HEADER
   ============================================ */
/* .app-header is now a controls slot inside .top-nav-controls — no fixed positioning needed */
.app-header {
  display: contents; /* pass-through, children flow into flex parent */
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.header-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-cta {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px -4px rgba(99, 102, 241, 0.5);
}
.header-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.7); }

.header-team-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.header-team-btn:hover { background: var(--bg-card-hover); border-color: var(--accent-mine); }

.team-flag { font-size: 20px; }
.team-name { font-weight: 600; }
.header-next-match {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 10px;
  border-left: 1px solid var(--border);
}
/* .team-change removed — text label deleted to prevent nav overflow */

.lang-select {
  padding: 8px 32px 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%23ffffff80' d='M6 9L1 4h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.lang-select option { background: #1a1f2e; color: white; }

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 60px 0 80px;
  text-align: center;
  z-index: 1;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 50%, #f9a8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 0.8s ease-out;
}

.hero .tagline {
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 60px;
  animation: fadeUp 0.8s ease-out 0.15s backwards;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 700px;
  margin: 0 auto 40px;
  animation: fadeUp 0.8s ease-out 0.3s backwards;
}

.cd-item {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cd-item:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.3);
}

.cd-item span {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

.cd-item label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.kickoff {
  font-size: 15px;
  color: var(--text-muted);
  animation: fadeUp 0.8s ease-out 0.45s backwards;
}

/* ============================================
   SECTIONS
   ============================================ */
main {
  position: relative;
  z-index: 1;
  padding: 32px 0 60px;
}

section {
  margin: 32px 0;
}

/* Comfortable but compact spacing between major sections */
main > section + section {
  margin-top: 96px !important;
  padding-top: 32px;
}
@media (max-width: 700px) {
  main > section + section { margin-top: 56px !important; padding-top: 16px; }
}

section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

section > p {
  font-size: 17px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

/* ============================================
   FEATURES
   ============================================ */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.feature {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 30px 60px -20px rgba(99, 102, 241, 0.3);
}

.feature .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 28px;
  margin-bottom: 20px;
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.feature p { font-size: 15px; color: var(--text-secondary); line-height: 1.65; }

/* ============================================
   SIGNUP
   ============================================ */
.signup {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.signup-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 32px auto 16px;
  flex-wrap: wrap;
}

.signup-form input {
  flex: 1;
  min-width: 220px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
}

.signup-form input::placeholder { color: var(--text-muted); }
.signup-form input:focus {
  outline: none;
  border-color: var(--accent-1);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.signup-form button {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.5);
}
.signup-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.6);
}

.signup-note { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.signup-note.success { color: #10b981; font-weight: 600; }
.signup-note.error { color: #ef4444; font-weight: 600; }

/* ============================================
   SCHEDULE
   ============================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 20px -4px rgba(99, 102, 241, 0.5);
}

.schedule-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  font-size: 16px;
}

.schedule-day {
  margin-bottom: 40px;
}

.schedule-day-head {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-3);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.schedule-matches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.match-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.match-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
}

.match-card.match-mine {
  border-color: var(--accent-mine);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.02));
}

.match-time {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.match-clock {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: none;
}

.match-group {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-weight: 500;
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.match-team {
  display: flex;
  align-items: center;
  gap: 10px;
}
.match-team:last-of-type { justify-content: flex-end; flex-direction: row-reverse; }

.match-flag { font-size: 28px; }

.match-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.match-vs {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.match-venue {
  font-size: 13px;
  color: var(--text-muted);
}

.match-bets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.bet-btn {
  text-align: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid var(--border-strong);
}

.bet-poly {
  color: var(--poly-color);
  background: rgba(45, 156, 219, 0.08);
  border-color: rgba(45, 156, 219, 0.3);
}
.bet-poly:hover {
  background: rgba(45, 156, 219, 0.18);
  border-color: var(--poly-color);
  transform: translateY(-1px);
}

.bet-kalshi {
  color: var(--kalshi-color);
  background: rgba(0, 200, 150, 0.08);
  border-color: rgba(0, 200, 150, 0.3);
}
.bet-kalshi:hover {
  background: rgba(0, 200, 150, 0.18);
  border-color: var(--kalshi-color);
  transform: translateY(-1px);
}

/* ============================================
   GROUPS
   ============================================ */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.group-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s;
}
.group-card:hover { transform: translateY(-2px); border-color: var(--border-glow); }

.group-card h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-3);
  margin-bottom: 16px;
}

.group-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-card li {
  display: grid;
  grid-template-columns: 22px auto 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-weight: 500;
}

.group-card li.my-team-row {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--text-primary);
}

.team-flag-sm { font-size: 18px; }

/* Group card thead row (#, Team, Pts) */
.gc-thead {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  padding: 4px 12px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 6px;
}
.gc-thead-rank { text-align: center; }
.gc-thead-pts { text-align: right; }

/* Rank cell in group card */
.gc-rank {
  display: inline-block;
  width: 22px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
}
.gc-pts {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  min-width: 24px;
  text-align: right;
}

/* Preview tag */
.gc-preview-tag,
.gp-st-preview-tag {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.30);
  border-radius: 4px;
  vertical-align: middle;
}

/* ============================================
   HOSTS
   ============================================ */
.hosts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.host {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.9;
  transition: all 0.3s;
}
.host:hover { transform: translateY(-4px); border-color: var(--border-glow); }
.host strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* ============================================
   MODAL — Pick Team
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  background: #131826;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 40px;
  z-index: 1;
}

.modal-content h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: left;
  background: none;
  -webkit-text-fill-color: white;
}

.modal-content > p {
  color: var(--text-secondary);
  font-size: 15px;
  text-align: left;
  max-width: none;
  margin: 0 0 24px;
}

.pick-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: white;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}
.pick-close:hover { background: rgba(255, 255, 255, 0.15); }

.pick-search {
  width: 100%;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  font-size: 15px;
  margin-bottom: 24px;
}
.pick-search:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.pick-team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.pick-team-card:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-1);
  transform: translateY(-2px);
}

.pick-flag { font-size: 32px; }
.pick-name { font-size: 14px; font-weight: 600; }
.pick-group { font-size: 11px; color: var(--text-muted); }

/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  z-index: 1;
  margin-top: 80px;
}

footer p { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
footer p.small { font-size: 12px; }

/* ============================================
   ANIMATIONS / RESPONSIVE
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .header-next-match { display: none; }

  .header-team-btn { padding: 6px 10px; }
}

@media (max-width: 640px) {
  /* body padding-top not needed; .app-header is display:contents */
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 60px; }
  .countdown { gap: 8px; }
  .cd-item { padding: 20px 8px; border-radius: 14px; }
  .signup { padding: 48px 24px; border-radius: 24px; }
  .signup-form { flex-direction: column; }
  .signup-form button { width: 100%; }
  section { margin: 60px 0; }
  .modal-content { padding: 24px; border-radius: 24px; max-height: 90vh; }
  .schedule-matches { grid-template-columns: 1fr; }
  .header-logo { font-size: 13px; }
  .lang-select { font-size: 12px; padding: 6px 28px 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   HERO COMPACT (schedule-first layout)
   ============================================ */
.hero-compact { padding: 40px 0 32px; }
.hero-compact h1 { font-size: clamp(36px, 6vw, 64px); margin-bottom: 12px; }
.hero-compact .tagline { font-size: clamp(15px, 1.8vw, 19px); margin-bottom: 28px; }
.hero-compact .countdown { margin-bottom: 16px; gap: 12px; }
.hero-compact .cd-item { padding: 16px 8px; }
.hero-compact .cd-item span { font-size: clamp(26px, 4vw, 40px); }
.hero-compact .cd-item label { font-size: 10px; letter-spacing: 0.12em; }
.hero-compact .kickoff { font-size: 13px; }

/* ============================================
   MATCH CARD — CLICKABLE
   ============================================ */
.match-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 16px;
  border-radius: var(--radius-lg);
  transition: background 0.2s;
}
.match-card-link:hover { background: var(--bg-card-hover); }
.match-details-cta {
  margin-top: 8px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-1, #818cf8);
  letter-spacing: 0.04em;
  opacity: 0.75;
}
.match-card-link:hover .match-details-cta { opacity: 1; }

/* Restore separation between link area and bet buttons */
.match-card { padding: 0; overflow: hidden; }
.match-card .match-bets {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

/* ============================================
   RTL SUPPORT (Arabic + future Hebrew)
   ============================================ */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .header-row,
html[dir="rtl"] .header-actions {
  flex-direction: row-reverse;
}
html[dir="rtl"] .match-teams { direction: rtl; }
html[dir="rtl"] .match-team { flex-direction: row-reverse; }
html[dir="rtl"] .match-time { text-align: right; flex-direction: row-reverse; }
html[dir="rtl"] .match-bets { flex-direction: row-reverse; }
html[dir="rtl"] .match-details-cta { text-align: left; }
html[dir="rtl"] .filter-bar { flex-direction: row-reverse; }
html[dir="rtl"] .team-flag,
html[dir="rtl"] .match-flag { margin-right: 0; margin-left: 8px; }
html[dir="rtl"] .header-next-match {
  padding-left: 0;
  padding-right: 10px;
  border-left: none;
  border-right: 1px solid var(--border);
}
html[dir="rtl"] .signup-form { flex-direction: row-reverse; }
html[dir="rtl"] .lang-select {
  background-position: left 10px center;
  padding: 8px 12px 8px 32px;
}
 center;
  padding: 8px 12px 8px 32px;
}

/* ============================================
   CLICKABLE GROUP CARDS + GROUP MATCHES MODAL
   ============================================ */
.group-card-clickable {
  cursor: pointer;
  position: relative;
  outline: none;
}
.group-card-clickable:hover {
  border-color: var(--accent-3, #818cf8);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}
.group-card-clickable:focus-visible {
  border-color: var(--accent-3, #818cf8);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}
.group-card-chev {
  float: right;
  font-size: 18px;
  color: var(--text-secondary);
  transition: transform 0.2s;
  font-weight: 400;
}
.group-card-clickable:hover .group-card-chev { transform: translateX(4px); color: var(--accent-3, #818cf8); }
.group-card-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}
.group-card-clickable:hover .group-card-foot { color: var(--accent-3, #818cf8); }


/* RTL */
html[dir="rtl"] .group-card-chev { float: left; }
html[dir="rtl"] .group-card-clickable:hover .group-card-chev { transform: translateX(-4px); }

/* ============================================
   GROUP DETAIL PAGE (group.html)
   ============================================ */
.gp-hero {
  text-align: center;
  padding: 32px 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(99,102,241,0.10), rgba(168,85,247,0.10));
  border: 1px solid var(--border-glow, rgba(255,255,255,0.10));
  margin-bottom: 24px;
}
.gp-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #a78bfa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.gp-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.gp-teams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.gp-team-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}
.gp-team-flag { font-size: 28px; line-height: 1; }
.gp-team-name { flex: 1; font-weight: 600; color: var(--text-primary); }
.gp-team-code {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
}

.gp-matches {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gp-match-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.gp-match-row:hover {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.30);
  transform: translateX(2px);
}
.gp-match-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.gp-match-teams {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
}
.gp-match-team { display: inline-flex; align-items: center; gap: 6px; }
.gp-match-flag { font-size: 20px; }
.gp-match-vs { color: var(--text-muted); font-weight: 500; font-size: 13px; }
.gp-match-venue {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.gp-match-arrow {
  color: var(--text-muted);
  font-size: 18px;
  transition: transform 0.15s, color 0.15s;
}
.gp-match-row:hover .gp-match-arrow {
  color: var(--accent-3, #22d3ee);
  transform: translateX(3px);
}

@media (max-width: 700px) {
  .gp-title { font-size: 28px; }
  .gp-match-row {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
  }
  .gp-match-time { grid-column: 1 / -1; font-size: 12px; }
  .gp-match-teams { font-size: 13px; gap: 8px; }
  .gp-match-flag { font-size: 16px; }
  .gp-match-venue { display: none; }
  .gp-match-arrow { font-size: 16px; }
}

html[dir="rtl"] .gp-match-row:hover { transform: translateX(-2px); }
html[dir="rtl"] .gp-match-row:hover .gp-match-arrow { transform: translateX(-3px); }

/* Standings table (FIFA style) */
.gp-standings-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.gp-standings-wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}
.gp-st-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
.gp-st-table thead th {
  text-align: center;
  padding: 12px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
}
.gp-st-table tbody td {
  text-align: center;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
.gp-st-table tbody tr:last-child td { border-bottom: none; }
.gp-st-table tbody tr:hover { background: rgba(99,102,241,0.05); }

.gp-st-rank {
  width: 36px;
  font-weight: 700;
  color: var(--text-muted);
}
.gp-st-team {
  text-align: left !important;
  padding-left: 14px !important;
}
.gp-st-flag { font-size: 20px; margin-right: 8px; vertical-align: middle; }
.gp-st-name {
  font-weight: 600;
  color: var(--text-primary);
  vertical-align: middle;
}
.gp-st-pts {
  font-weight: 800;
  color: var(--text-primary);
  font-size: 15px;
  width: 60px;
}
.gp-st-gd { font-weight: 600; }

/* Advancement indicators (top 2 → knockout; 3 → playoff in 2026 expanded format) */
.gp-st-advance .gp-st-rank {
  position: relative;
  color: #10b981;
}
.gp-st-advance .gp-st-rank::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  background: #10b981;
  border-radius: 2px;
}
.gp-st-playoff .gp-st-rank {
  position: relative;
  color: #fbbf24;
}
.gp-st-playoff .gp-st-rank::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  background: #fbbf24;
  border-radius: 2px;
}

.gp-st-mine {
  background: rgba(16,185,129,0.10) !important;
}
.gp-st-mine .gp-st-name {
  color: #34d399;
}

@media (max-width: 700px) {
  .gp-st-table { font-size: 12px; }
  .gp-st-table thead th { padding: 8px 4px; font-size: 10px; }
  .gp-st-table tbody td { padding: 10px 4px; }
  .gp-st-flag { font-size: 16px; margin-right: 5px; }
  .gp-st-pts { width: 44px; font-size: 13px; }
}

/* ============================================
   TOP SCORERS / TOP TEAMS module
   ============================================ */
#scorers-section .sc-desc {
  color: var(--gray-600, #6b7280);
  margin-top: -4px;
  margin-bottom: 16px;
  font-size: 14px;
}

#scorers-section .sc-note {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

#scorers-section .sc-tabs {
  display: inline-flex;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}
#scorers-section .sc-tab {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all .15s;
}
#scorers-section .sc-tab.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

#scorers-section .sc-panel { display: none; }
#scorers-section .sc-panel.active { display: block; }

.sc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.sc-row {
  display: grid;
  grid-template-columns: 36px 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.sc-row:last-child { border-bottom: none; }
.sc-row:nth-child(-n+3) .sc-rank {
  background: #fde68a;
  color: #78350f;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.sc-rank {
  font-weight: 600;
  color: #6b7280;
  text-align: center;
}
.sc-flag { font-size: 20px; line-height: 1; }
.sc-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-name strong { color: #111827; font-size: 14px; }
.sc-meta { font-size: 12px; color: #6b7280; }
.sc-tag {
  font-size: 11px;
  color: #4b5563;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.sc-goals {
  font-weight: 700;
  font-size: 16px;
  color: #059669;
  min-width: 36px;
  text-align: right;
}

@media (max-width: 640px) {
  .sc-row {
    grid-template-columns: 28px 22px 1fr auto;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
  }
  .sc-tag { font-size: 10px; padding: 3px 8px; }
  .sc-flag { font-size: 16px; }
  .sc-meta { display: none; } /* save room on mobile */
}

/* RTL adjustments */
[dir="rtl"] .sc-tag { direction: rtl; }

/* ============================================
   TOP NAV
   ============================================ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #111827;
  color: #f9fafb;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  height: 56px;
}
.top-nav-inner {
  display: flex;
  align-items: center;
  height: 56px;
  gap: 0;
}
.top-nav-logo {
  font-weight: 800;
  font-size: 16px;
  color: #f9fafb;
  text-decoration: none;
  white-space: nowrap;
  margin-right: 20px;
  flex-shrink: 0;
}
.top-nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  flex: 1;
}
.top-nav-links li { position: relative; }
.top-nav-links > li > a {
  display: block;
  padding: 0 12px;
  height: 56px;
  line-height: 56px;
  font-size: 13px;
  font-weight: 600;
  color: #d1d5db;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background .15s;
  border-radius: 0;
}
.top-nav-links > li > a:hover,
.top-nav-links > li > a.active { color: #fff; background: rgba(255,255,255,.08); }

/* Dropdown sub */
.top-nav-has-sub .top-nav-sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: #1f2937;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  list-style: none;
  margin: 0; padding: 6px 0;
  z-index: 10;
}
.top-nav-has-sub:hover .top-nav-sub { display: block; }
.top-nav-sub li a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: #d1d5db;
  text-decoration: none;
  transition: background .1s;
}
.top-nav-sub li a:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Right controls slot */
.top-nav-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
/* Override header text colour inside nav */
.top-nav-controls .header-lang-select { color: #d1d5db; background: transparent; border-color: #374151; }
.top-nav-controls .header-team-btn,
.top-nav-controls .header-next-match { color: #d1d5db; font-size: 12px; }

/* Hamburger (mobile) */
.top-nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 8px;
  flex-shrink: 0;
}
.top-nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #d1d5db;
  border-radius: 2px;
  transition: .2s;
}

/* Hero spacing: push down past sticky nav */
.hero { scroll-margin-top: 56px; }
.container[id] { scroll-margin-top: 64px; }
#section-recent,#section-groups,#scorers-section,
#section-champion-odds,#section-schedule { scroll-margin-top: 64px; }

/* ============================================
   RECENT MATCHES
   ============================================ */
.recent-subtitle {
  color: #6b7280;
  font-size: 13px;
  margin-top: -4px;
  margin-bottom: 16px;
}
.recent-day { margin-bottom: 24px; }
.recent-day-head {
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}
.recent-today .recent-day-head { color: #dc2626; }
.recent-empty {
  text-align: center;
  padding: 32px;
  color: #9ca3af;
  font-size: 14px;
}

/* ============================================
   CHAMPION ODDS
   ============================================ */
.co-subtitle {
  color: #6b7280;
  font-size: 13px;
  margin-top: -4px;
  margin-bottom: 16px;
}
.co-loading, .co-error {
  color: #9ca3af;
  font-size: 14px;
  padding: 24px 0;
  text-align: center;
}
.co-list {
  list-style: none;
  margin: 0; padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.co-row {
  display: grid;
  grid-template-columns: 36px 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.co-row:last-child { border-bottom: none; }
.co-medal { font-size: 18px; text-align: center; }
.co-rank { font-size: 13px; font-weight: 600; color: #6b7280; text-align: center; }
.co-flag { font-size: 20px; line-height: 1; }
.co-name { font-weight: 600; color: #111827; }
.co-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  justify-content: flex-end;
}
.co-bar-wrap {
  width: 80px;
  height: 6px;
  background: #f3f4f6;
  border-radius: 99px;
  overflow: hidden;
  flex-shrink: 0;
}
.co-bar {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}
.co-pct {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
  min-width: 40px;
  text-align: right;
}
.co-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: #9ca3af;
  flex-wrap: wrap;
}
.co-updated-label { }
.co-updated-time { font-weight: 600; color: #6b7280; }
.co-cta-link {
  margin-left: auto;
  background: #7c3aed;
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
}
.co-cta-link:hover { background: #6d28d9; }

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .top-nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #111827;
    flex-direction: column;
    padding: 8px 0 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    z-index: 999;
    gap: 0;
  }
  .top-nav-links.open { display: flex; }
  .top-nav-links > li > a {
    height: auto;
    line-height: 1.4;
    padding: 12px 20px;
    font-size: 15px;
  }
  .top-nav-has-sub .top-nav-sub {
    display: block;
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,.04);
    border-radius: 0;
    padding-left: 12px;
  }
  .top-nav-burger { display: flex; }
  .top-nav-controls { margin-left: 0; }

  .co-row { grid-template-columns: 28px 22px 1fr auto; gap: 8px; padding: 10px 12px; }
  .co-bar-wrap { width: 50px; }
  .co-right { min-width: 80px; gap: 6px; }
}
