/* ============================================================
   BADMINTON TMS — Master Stylesheet
   Theme: Deep Sapphire Blues · Electric Greens · White
   Architecture: CSS Custom Properties + Grid + Flexbox
   ============================================================ */

/* ── 1. DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Sapphire palette */
  --sapphire-950: #000d26;
  --sapphire-900: #001840;
  --sapphire-800: #002060;
  --sapphire-700: #002d87;
  --sapphire-600: #0041a8;
  --sapphire-500: #0052cc;
  --sapphire-400: #1a6fe0;
  --sapphire-300: #4d94f0;
  --sapphire-200: #99c0f8;
  --sapphire-100: #e0edff;

  /* Electric green accent */
  --green-500:  #00e676;
  --green-400:  #00ff87;
  --green-600:  #00c853;
  --green-glow: rgba(0, 230, 118, 0.35);

  /* Neutrals */
  --white:    #ffffff;
  --gray-50:  #f8faff;
  --gray-100: #edf2ff;
  --gray-200: #d6e3ff;
  --gray-400: #8ba3cc;
  --gray-600: #4a5f80;
  --gray-900: #0d1b30;

  /* Semantic */
  --color-bg:         var(--sapphire-900);
  --color-surface:    rgba(255,255,255,.035);
  --color-border:     rgba(255,255,255,.08);
  --color-text:       var(--white);
  --color-text-muted: var(--sapphire-200);
  --color-accent:     var(--green-500);

  /* Typography */
  --font-display: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Radius */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,.25);
  --shadow:     0 8px 32px rgba(0,0,0,.4);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.55);
  --shadow-glow:0 0 40px var(--green-glow);

  /* Transitions */
  --transition: 200ms cubic-bezier(.4,0,.2,1);
  --transition-slow: 600ms cubic-bezier(.4,0,.2,1);

  /* Layout */
  --navbar-h: 70px;
  --container-w: 1280px;
}

/* ── 2. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-h);
}

body {
  font-family: var(--font-body);
  background: var(--sapphire-900);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── 3. LAYOUT UTILITIES ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.fw-bold { font-weight: 600; }
.positive { color: var(--green-500); }
.negative { color: #ff5252; }

/* ── 4. NAVBAR ────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--navbar-h);
  background: rgba(0, 24, 64, 0.75);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-slow);
}

.navbar.scrolled {
  background: rgba(0, 20, 55, 0.97);
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: .02em;
  color: var(--white);
  transition: opacity var(--transition);
}
.nav-brand:hover { opacity: .85; }

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--sapphire-600), var(--green-600));
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-title {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--sapphire-200);
  transition: color var(--transition);
  letter-spacing: .02em;
}
.nav-link:hover        { color: var(--white); }
.nav-link--active      { color: var(--white); border-bottom: 2px solid var(--green-500); padding-bottom: 2px; }

.nav-link--ref {
  color: var(--green-500);
}
.nav-link--ref:hover { color: var(--green-400); }

.nav-btn {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: var(--sapphire-600);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: background var(--transition), transform var(--transition);
}
.nav-btn:hover {
  background: var(--sapphire-500);
  transform: translateY(-1px);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6) var(--space-6);
  background: var(--sapphire-900);
  border-top: 1px solid var(--color-border);
}
.nav-mobile a {
  color: var(--sapphire-200);
  font-weight: 500;
}
.nav-mobile.open { display: flex; }

/* ── 5. HERO SECTION ──────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--navbar-h);
  /* Radial gradient base */
  background:
    radial-gradient(ellipse 120% 80% at 20% 50%,  rgba(0,65,168,.55) 0%, transparent 60%),
    radial-gradient(ellipse 100% 70% at 80% 30%,  rgba(0,230,118,.1) 0%, transparent 55%),
    linear-gradient(160deg, var(--sapphire-950) 0%, var(--sapphire-900) 50%, #001030 100%);
}

/* ── 5a. Background animations ────────────────────────────── */
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .18;
  animation: glowPulse 8s ease-in-out infinite alternate;
}
.hero-glow--1 {
  width: 600px; height: 600px;
  background: var(--sapphire-500);
  top: -150px; left: -100px;
}
.hero-glow--2 {
  width: 500px; height: 500px;
  background: var(--green-600);
  bottom: -100px; right: -80px;
  animation-delay: -4s;
}

@keyframes glowPulse {
  from { transform: scale(1);    opacity: .12; }
  to   { transform: scale(1.25); opacity: .22; }
}

/* Floating shuttlecock decorations */
.shuttle {
  position: absolute;
  color: rgba(255,255,255,.06);
  animation: floatShuttle linear infinite;
  will-change: transform;
}

/* Individual shuttle sizes, positions, speeds */
.shuttle-1 { width:70px;  top:  8%; left:  5%; animation-duration: 18s; }
.shuttle-2 { width:45px;  top: 15%; left: 80%; animation-duration: 22s; animation-delay: -8s;  transform: rotate(45deg); }
.shuttle-3 { width:90px;  top: 55%; left: 88%; animation-duration: 26s; animation-delay: -5s;  transform: rotate(-30deg); }
.shuttle-4 { width:55px;  top: 72%; left:  8%; animation-duration: 20s; animation-delay: -12s; color: rgba(0,230,118,.08); }
.shuttle-5 { width:38px;  top: 38%; left: 45%; animation-duration: 30s; animation-delay: -3s;  transform: rotate(60deg); }
.shuttle-6 { width:65px;  top: 82%; left: 60%; animation-duration: 24s; animation-delay: -16s; }
.shuttle-7 { width:48px;  top: 25%; left: 25%; animation-duration: 19s; animation-delay: -9s;  color: rgba(0,230,118,.06); }
.shuttle-8 { width:80px;  top: 50%; left: 15%; animation-duration: 28s; animation-delay: -20s; transform: rotate(-45deg); }

@keyframes floatShuttle {
  0%   { transform: translateY(0px)   rotate(0deg);   opacity: .06; }
  33%  { transform: translateY(-28px) rotate(12deg);  opacity: .09; }
  66%  { transform: translateY(-10px) rotate(-8deg);  opacity: .07; }
  100% { transform: translateY(0px)   rotate(0deg);   opacity: .06; }
}

/* ── 5b. Hero content ─────────────────────────────────────── */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: var(--space-16);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  margin-bottom: var(--space-6);
  border: 1px solid;
}
.hero-badge--upcoming { background: rgba(0,82,204,.25); border-color: var(--sapphire-400); color: var(--sapphire-200); }
.hero-badge--active   { background: rgba(0,230,118,.15); border-color: var(--green-500);   color: var(--green-400); }
.hero-badge--completed{ background: rgba(255,255,255,.08); border-color: var(--gray-400);  color: var(--gray-400); }

.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 0 var(--green-glow);
  animation: livePulse 1.5s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0    var(--green-glow); }
  70%  { box-shadow: 0 0 0 10px rgba(0,230,118,0); }
  100% { box-shadow: 0 0 0 0    rgba(0,230,118,0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--white);
  text-shadow: 0 2px 40px rgba(0,0,0,.6);
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--sapphire-200);
  margin-bottom: var(--space-4);
  font-weight: 300;
  letter-spacing: .04em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-12);
  color: var(--sapphire-200);
  font-size: .9rem;
}
.hero-meta__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.hero-meta__item svg { flex-shrink: 0; stroke: var(--green-500); }

/* ── 6. COUNTDOWN ─────────────────────────────────────────── */
.countdown-wrapper { text-align: center; }

.countdown-label {
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sapphire-200);
  margin-bottom: var(--space-4);
}

.countdown {
  display: inline-flex;
  align-items: flex-start;
  gap: 0;
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 95px;
}

.countdown__value {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  text-shadow: 0 0 30px rgba(0,82,204,.6);
  /* Card style */
  background: rgba(0,32,96,.6);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
  min-width: 90px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform .3s ease, text-shadow .3s ease;
  position: relative;
  overflow: hidden;
}
.countdown__value::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.06) 0%, transparent 60%);
  pointer-events: none;
}
.countdown__value.flip {
  animation: countFlip .35s ease;
}
@keyframes countFlip {
  0%   { transform: rotateX(0deg); }
  50%  { transform: rotateX(-90deg); }
  100% { transform: rotateX(0deg); }
}

.countdown__label {
  font-size: .7rem;
  letter-spacing: .16em;
  color: var(--sapphire-300);
  text-transform: uppercase;
  margin-top: var(--space-2);
}

.countdown__sep {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--green-500);
  line-height: 1;
  padding: var(--space-4) var(--space-2) 0;
  animation: sepBlink 1s step-end infinite;
}
@keyframes sepBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

/* ── 7. LIVE SCORE PANEL ──────────────────────────────────── */
.live-panel { width: 100%; margin-top: var(--space-4); }

.live-courts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  max-width: 900px;
  margin-inline: auto;
}

.court-card {
  background: rgba(0,32,96,.55);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  backdrop-filter: blur(12px);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.court-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sapphire-500), var(--green-500));
}
.court-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.court-card--live::before {
  background: var(--green-500);
  box-shadow: 0 0 12px var(--green-glow);
  animation: liveBar 2s ease-in-out infinite alternate;
}
@keyframes liveBar {
  from { opacity: .8; }
  to   { opacity: 1; box-shadow: 0 0 24px var(--green-glow); }
}

.court-card--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--sapphire-200);
  font-size: .9rem;
  grid-column: 1 / -1;
  min-height: 120px;
}

.court-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}
.court-card__name {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sapphire-300);
}
.court-card__status {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--green-400);
  display: flex;
  align-items: center;
  gap: 4px;
}

.court-card__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
}

.court-team {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
}
.court-team:last-child { text-align: right; }

.court-score {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.court-score__val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  min-width: 2ch;
  text-align: center;
  transition: transform .2s ease, color .3s;
}
.court-score__val.updated {
  animation: scoreFlash .4s ease;
  color: var(--green-400);
}
@keyframes scoreFlash {
  0%  { transform: scale(1.3); }
  100%{ transform: scale(1); }
}
.court-score__sep { color: var(--sapphire-400); font-size: 1.2rem; }

/* ── 8. UP-NEXT BANNER ────────────────────────────────────── */
.upcoming-banner {
  background: rgba(0,16,48,.9);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
  overflow: hidden;
}
.upcoming-banner .container {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.upcoming-banner__label {
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--green-500);
  white-space: nowrap;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  padding-right: var(--space-4);
}
.upcoming-banner__scroll {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  scrollbar-width: none;
}
.upcoming-banner__scroll::-webkit-scrollbar { display: none; }

.upcoming-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  font-size: .85rem;
  color: var(--sapphire-200);
}
.upcoming-item__court {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--sapphire-400);
  white-space: nowrap;
}
.upcoming-item__time { color: var(--green-400); font-weight: 600; }
.upcoming-item__vs   { color: var(--sapphire-400); }

/* ── 9. SECTION SHARED STYLES ─────────────────────────────── */
section + section { padding-top: 0; }

.standings-section,
.schedule-section {
  padding-block: var(--space-16);
  background: var(--sapphire-950);
  position: relative;
}
.standings-section::before,
.schedule-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.01em;
  margin-bottom: var(--space-2);
}
.section-subtitle {
  color: var(--sapphire-300);
  font-size: .9rem;
  letter-spacing: .06em;
}

/* ── 10. STANDINGS ────────────────────────────────────────── */
.standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: var(--space-8);
}

.standings-card {
  background: rgba(0,24,64,.7);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.standings-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: rgba(0,65,168,.3);
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.standings-card__group {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .04em;
}
.standings-card__badge {
  font-size: .72rem;
  color: var(--green-500);
  border: 1px solid rgba(0,230,118,.35);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.standings-table th {
  padding: var(--space-3) var(--space-4);
  text-align: center;
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--sapphire-300);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.standings-table th.col-team { text-align: left; }
.standings-table td {
  padding: var(--space-3) var(--space-4);
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background var(--transition);
}
.standings-table td.col-team { text-align: left; }
.standings-table tbody tr:last-child td { border-bottom: none; }
.standings-table tbody tr:hover td {
  background: rgba(255,255,255,.04);
}
.standings-table .col-highlight {
  color: var(--white);
  font-weight: 600;
}

.standings-table .row--qualify { background: rgba(0,65,168,.18); }
.standings-table .row--leader  { background: rgba(0,230,118,.08); }

.col-pos { width: 40px; }

.medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
}
.medal--gold   { background: linear-gradient(135deg, #ffd700, #ffb800); color: #5a3a00; }
.medal--silver { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #2a2a2a; }

.flag { font-size: 1.1em; margin-right: var(--space-1); }

/* ── 11. TODAY'S SCHEDULE ─────────────────────────────────── */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.schedule-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: var(--space-4);
  background: rgba(0,24,64,.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
  transition: background var(--transition), border-color var(--transition);
}
.schedule-item:hover { background: rgba(0,32,96,.7); }
.schedule-item--live { border-color: rgba(0,230,118,.4); background: rgba(0,230,118,.06); }
.schedule-item--completed { opacity: .7; }

.schedule-item__time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.time-value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}
.court-name {
  font-size: .7rem;
  color: var(--sapphire-300);
  letter-spacing: .06em;
}

.schedule-item__match {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: center;
}
.team {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team:last-child { text-align: right; }
.team--winner { color: var(--green-400); }

.score-badge {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 70px;
  justify-content: center;
}
.vs {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--sapphire-400);
}
.score {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}
.score-sep { color: var(--sapphire-400); }

.schedule-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
}

.group-badge {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0,65,168,.4);
  color: var(--sapphire-200);
  white-space: nowrap;
}
.group-badge--ko { background: rgba(0,230,118,.15); color: var(--green-400); }

.status-badge {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}
.status-badge--live      { color: var(--green-400); }
.status-badge--completed { color: var(--sapphire-300); }
.status-badge--postponed { color: #ff9800; }
.status-badge--scheduled { color: var(--sapphire-400); }

/* ── 12. SPINNER ──────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: var(--green-500);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 13. HERO COMPLETED ───────────────────────────────────── */
.hero-completed {
  text-align: center;
  margin-top: var(--space-8);
}
.hero-completed__text {
  font-size: 1.1rem;
  color: var(--sapphire-200);
}

/* ── 14. FOOTER ───────────────────────────────────────────── */
.footer {
  background: var(--sapphire-950);
  border-top: 1px solid var(--color-border);
  padding: var(--space-8) 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer-copy {
  font-size: .85rem;
  color: var(--sapphire-400);
}
.footer-credit {
  font-size: .8rem;
  color: var(--sapphire-400);
}
.footer-credit strong { color: var(--green-500); }

/* ── 15. ADMIN / REFEREE SHARED STYLES ───────────────────── */
/* (used in admin/ and referee/ layouts) */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 30% 40%, rgba(0,65,168,.4) 0%, transparent 60%),
    linear-gradient(160deg, var(--sapphire-950) 0%, var(--sapphire-900) 100%);
  padding: var(--space-6);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(0,24,64,.8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-12) var(--space-8);
  backdrop-filter: blur(16px);
}
.auth-card__logo {
  text-align: center;
  margin-bottom: var(--space-8);
}
.auth-card__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-2);
}
.auth-card__sub {
  text-align: center;
  color: var(--sapphire-300);
  font-size: .875rem;
  margin-bottom: var(--space-8);
}

.form-group { margin-bottom: var(--space-4); }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--sapphire-200);
  margin-bottom: var(--space-2);
}
.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font: inherit;
  font-size: .95rem;
  transition: border-color var(--transition), background var(--transition);
  outline: none;
}
.form-input::placeholder { color: var(--sapphire-400); }
.form-input:focus {
  border-color: var(--sapphire-400);
  background: rgba(255,255,255,.09);
  box-shadow: 0 0 0 3px rgba(0,82,204,.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .04em;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.btn--primary {
  background: var(--sapphire-600);
  color: var(--white);
  border: 1px solid transparent;
  width: 100%;
}
.btn--primary:hover {
  background: var(--sapphire-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,65,168,.5);
}
.btn--green {
  background: var(--green-600);
  color: #002a00;
  border: 1px solid transparent;
}
.btn--green:hover {
  background: var(--green-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,200,83,.4);
}
.btn--ghost {
  background: transparent;
  color: var(--sapphire-200);
  border: 1px solid var(--color-border);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.06);
  color: var(--white);
}
.btn--danger {
  background: #c62828;
  color: var(--white);
  border: 1px solid transparent;
}
.btn--danger:hover { background: #e53935; }
.btn--full { width: 100%; }

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: var(--space-4);
}
.alert--error   { background: rgba(198,40,40,.2); border: 1px solid rgba(198,40,40,.4); color: #ff8a80; }
.alert--success { background: rgba(0,200,83,.15);  border: 1px solid rgba(0,200,83,.35);  color: var(--green-400); }
.alert--info    { background: rgba(0,65,168,.2);   border: 1px solid var(--color-border); color: var(--sapphire-200); }

/* ── 16. ADMIN DASHBOARD LAYOUT ───────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--sapphire-950);
}

.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(0,16,40,.95);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar__brand {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}
.admin-sidebar__sub {
  font-size: .7rem;
  color: var(--green-500);
  letter-spacing: .08em;
}

.admin-nav {
  padding: var(--space-4);
  flex: 1;
}
.admin-nav__label {
  font-size: .65rem;
  letter-spacing: .2em;
  color: var(--sapphire-400);
  padding: var(--space-4) var(--space-2) var(--space-2);
  text-transform: uppercase;
}
.admin-nav__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  color: var(--sapphire-200);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.admin-nav__item:hover { background: rgba(255,255,255,.06); color: var(--white); }
.admin-nav__item.active { background: rgba(0,65,168,.4); color: var(--white); border-left: 3px solid var(--sapphire-400); }
.admin-nav__icon { width: 18px; height: 18px; flex-shrink: 0; }

.admin-sidebar__footer {
  padding: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.admin-content {
  flex: 1;
  overflow-x: hidden;
  min-width: 0;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-8);
  background: rgba(0,16,40,.8);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.admin-topbar__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}
.admin-topbar__user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--sapphire-200);
  font-size: .875rem;
}

.admin-main {
  padding: var(--space-8);
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.stat-card {
  background: rgba(0,24,64,.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.stat-card__label {
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--sapphire-300);
  text-transform: uppercase;
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
}
.stat-card__value.green { color: var(--green-400); }
.stat-card__sub {
  font-size: .75rem;
  color: var(--sapphire-400);
}

/* Data tables */
.data-table-wrapper {
  background: rgba(0,24,64,.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.data-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--sapphire-300);
  border-bottom: 1px solid var(--color-border);
  background: rgba(0,32,80,.5);
}
.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--sapphire-100);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,255,255,.03); }

/* Panel / card */
.panel {
  background: rgba(0,24,64,.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-6);
}
.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.panel__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}
.panel__body { padding: var(--space-6); }

/* ── 17. REFEREE SCORECARD ────────────────────────────────── */
.scorecard {
  max-width: 480px;
  margin: var(--space-4) auto;
  padding: var(--space-4);
}
.score-display {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
  background: rgba(0,24,64,.7);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  margin-bottom: var(--space-6);
}
.score-team {
  text-align: center;
}
.score-team__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
  line-height: 1.2;
}
.score-team__count {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  text-shadow: 0 0 40px rgba(0,82,204,.5);
  min-width: 2ch;
  display: block;
}
.score-divider {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--sapphire-500);
  align-self: center;
  padding-top: var(--space-6);
}
.score-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-4);
}
.score-controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.score-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.score-btn--add {
  background: var(--green-600);
  color: #002a00;
}
.score-btn--add:hover  { background: var(--green-500); transform: scale(1.08); }
.score-btn--add:active { transform: scale(.95); }
.score-btn--sub {
  background: rgba(198,40,40,.3);
  color: #ff8a80;
  border: 1px solid rgba(198,40,40,.4);
}
.score-btn--sub:hover  { background: rgba(198,40,40,.5); }
.score-btn--sub:active { transform: scale(.95); }

/* ── 18. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links  { display: none; }
  .nav-hamburger { display: flex; }

  .countdown__unit  { min-width: 70px; }
  .countdown__value { font-size: 2.5rem; min-width: 64px; padding: var(--space-3) var(--space-3); }
  .countdown__sep   { font-size: 2rem; }

  .hero-meta { gap: var(--space-2) var(--space-4); }

  .schedule-item {
    grid-template-columns: 75px 1fr;
    grid-template-rows: auto auto;
  }
  .schedule-item__meta {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .standings-grid { grid-template-columns: 1fr; }

  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  .admin-main { padding: var(--space-4); }
  .score-btn { width: 80px; height: 80px; }
}

@media (max-width: 480px) {
  .countdown { flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
  .countdown__sep { display: none; }
  .court-card__teams { gap: var(--space-2); font-size: .9rem; }
  .court-score__val  { font-size: 1.5rem; }
}
