/* ============================================================
   World Cup Bingo - Premium Light UI
   Fonts: Outfit (headings) + Inter (body)
   Theme: World Cup Gold
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

:root {
  /* Surface & background */
  --bg: #F4F2EE;
  --bg-warm: #FAF9F7;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-solid: #ffffff;

  /* Borders */
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.12);

  /* Text */
  --text: #1A1A2E;
  --text-secondary: #4A4A68;
  --muted: #8888A4;

  /* Accent - World Cup Gold */
  --accent: #C8911E;
  --accent-light: #E6A817;
  --accent-glow: rgba(200, 145, 30, 0.15);
  --accent-surface: rgba(200, 145, 30, 0.06);
  --gold: #E6A817;
  --gold-light: #F5CD5A;

  /* Status */
  --green: #16A34A;
  --green-bg: rgba(22, 163, 74, 0.08);
  --green-fg: #15803D;
  --free: #F5F3EF;
  --free-fg: #7A786E;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 0 3px var(--accent-glow);

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Warm radial gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(200, 145, 30, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(230, 168, 23, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(255, 255, 255, 0.6) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body>* {
  position: relative;
  z-index: 1;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.muted {
  color: var(--muted);
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s var(--ease-out);
}

.brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
  background: linear-gradient(135deg, #A67413 0%, var(--accent) 40%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.8;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 80px;
  animation: fadeUp 0.5s var(--ease-out) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  max-width: 580px;
  margin: 16px auto 8px;
}

.hero h1 {
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 800;
  margin: 0 0 10px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.6s var(--ease-out) 0.1s both;
}

.sub {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 460px;
  margin: 0 auto;
  animation: fadeUp 0.6s var(--ease-out) 0.2s both;
}

/* ---------- Section header ---------- */
.sec {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- Score pill ---------- */
.pill {
  background: linear-gradient(135deg, rgba(200, 145, 30, 0.1) 0%, var(--green-bg) 100%);
  color: var(--green-fg);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  border: 1px solid rgba(22, 163, 74, 0.12);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
  transition: transform 0.2s var(--ease-spring);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--panel-solid);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: var(--shadow-sm);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border: none;
  color: #fff;
  box-shadow: 0 2px 12px rgba(200, 145, 30, 0.3);
  padding: 10px 20px;
}

.btn.primary:hover {
  box-shadow: 0 4px 20px rgba(200, 145, 30, 0.4);
  transform: translateY(-2px);
  color: #fff;
}

.btn.primary:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 2px 8px rgba(200, 145, 30, 0.25);
}

.btn.secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--muted);
  box-shadow: none;
}

.btn.secondary:hover {
  color: var(--text);
  border-color: var(--text);
  background: var(--bg-warm);
}

/* ---------- Fixtures list ---------- */
.fixture {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.fixture:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.fixture .teams {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.fixture .meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--free);
  color: var(--free-fg);
  letter-spacing: 0.02em;
}

.badge.live {
  background: rgba(220, 38, 38, 0.08);
  color: #DC2626;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

/* ---------- Bingo card ---------- */
.match-title {
  margin: 6px 0;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.conn {
  font-size: 12.5px;
  margin-bottom: 12px;
  font-weight: 500;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.cell {
  aspect-ratio: 1 / 1;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-spring), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: default;
}

.cell:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.cell.checked {
  background: linear-gradient(135deg, var(--green-bg) 0%, rgba(22, 163, 74, 0.12) 100%);
  color: var(--green-fg);
  font-weight: 700;
  border-color: rgba(22, 163, 74, 0.2);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.1);
}

.cell.free {
  background: var(--free);
  color: var(--free-fg);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.03em;
}

.cell.pop {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.15);
}

.cell.line {
  border: 2.5px solid var(--gold);
  box-shadow: 0 0 12px rgba(230, 168, 23, 0.2), 0 2px 8px rgba(230, 168, 23, 0.1);
}

/* ---------- Actions & result ---------- */
.actions {
  display: flex;
  gap: 10px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.result {
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-top: 14px;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.4s var(--ease-out) both;
}

.result h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.hidden {
  display: none;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
  pointer-events: none;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ---------- Selection ---------- */
::selection {
  background: var(--accent-glow);
  color: var(--accent);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .wrap {
    padding: 20px 14px 64px;
  }

  .topbar {
    padding: 12px 16px;
  }

  .cell {
    font-size: 9.5px;
    border-radius: 8px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .card-grid {
    gap: 5px;
  }

  .fixture {
    padding: 12px 14px;
  }
}