/* ============================================================
   PassionPulse — Design System & Styles
   World Cup 2026 Live Dashboard
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Base colors */
  --bg-primary: #06080f;
  --bg-secondary: #0c1020;
  --bg-card: rgba(15, 20, 40, 0.7);
  --bg-card-hover: rgba(20, 28, 55, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);

  /* Fire gradient */
  --fire-start: #ff4500;
  --fire-mid: #ff6a00;
  --fire-end: #ffd700;
  --fire-gradient: linear-gradient(135deg, var(--fire-start), var(--fire-mid), var(--fire-end));
  --fire-glow: 0 0 40px rgba(255, 69, 0, 0.3), 0 0 80px rgba(255, 106, 0, 0.15);

  /* Text */
  --text-primary: #f0f0f5;
  --text-secondary: rgba(240, 240, 245, 0.65);
  --text-tertiary: rgba(240, 240, 245, 0.4);
  --text-fire: transparent;

  /* Accent */
  --accent-green: #00e676;
  --accent-red: #ff1744;
  --accent-blue: #448aff;
  --accent-purple: #7c4dff;
  --accent-yellow: #ffd740;

  /* Glass */
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-particles: 0;
  --z-content: 1;
  --z-nav: 100;
  --z-modal: 200;
  --z-loading: 300;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background: rgba(255, 69, 0, 0.3);
  color: var(--text-primary);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 69, 0, 0.3);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 69, 0, 0.5);
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: var(--font-body);
}

/* ---------- Loading Screen ---------- */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-loading);
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  text-align: center;
}

.loading-flame {
  font-size: 4rem;
  animation: flameFloat 1.5s ease-in-out infinite;
}

.loading-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--fire-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: var(--space-md);
}

.loading-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: var(--space-sm);
}

.loading-bar {
  width: 200px;
  height: 3px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  margin: var(--space-lg) auto 0;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--fire-gradient);
  border-radius: var(--radius-full);
  animation: loadingFill 1.8s ease-in-out forwards;
}

@keyframes loadingFill {
  0% { width: 0%; }
  50% { width: 60%; }
  100% { width: 100%; }
}

@keyframes flameFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.1); }
}

/* ---------- Particle Canvas ---------- */
.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: var(--z-particles);
  pointer-events: none;
  opacity: 0.6;
}

/* ---------- Navigation ---------- */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-xl);
  background: rgba(6, 8, 15, 0.85);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: transform var(--transition-base), background var(--transition-base);
}

.main-nav.hidden {
  transform: translateY(-100%);
}

.main-nav.scrolled {
  background: rgba(6, 8, 15, 0.95);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-fire {
  font-size: 1.5rem;
  animation: flameFloat 2s ease-in-out infinite;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--fire-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: var(--space-xs);
}

.nav-link {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}

.nav-link.active {
  color: var(--fire-start);
  background: rgba(255, 69, 0, 0.1);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: var(--radius-full);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: livePulse 2s ease-in-out infinite;
}

.status-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.6); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
}

/* ---------- Hero Section ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-3xl) var(--space-xl);
  overflow: hidden;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(255, 69, 0, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(255, 215, 0, 0.08), transparent),
    radial-gradient(ellipse 50% 80% at 50% 80%, rgba(124, 77, 255, 0.06), transparent);
  z-index: 0;
  animation: heroGradientShift 15s ease-in-out infinite alternate;
}

@keyframes heroGradientShift {
  0% {
    background:
      radial-gradient(ellipse 80% 60% at 20% 50%, rgba(255, 69, 0, 0.12), transparent),
      radial-gradient(ellipse 60% 50% at 80% 30%, rgba(255, 215, 0, 0.08), transparent),
      radial-gradient(ellipse 50% 80% at 50% 80%, rgba(124, 77, 255, 0.06), transparent);
  }
  100% {
    background:
      radial-gradient(ellipse 80% 60% at 40% 60%, rgba(255, 106, 0, 0.15), transparent),
      radial-gradient(ellipse 60% 50% at 60% 20%, rgba(255, 69, 0, 0.10), transparent),
      radial-gradient(ellipse 50% 80% at 30% 70%, rgba(68, 138, 255, 0.06), transparent);
  }
}

.hero-content {
  position: relative;
  z-index: var(--z-content);
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  animation: fadeSlideUp 0.8s ease-out;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: livePulse 2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: var(--space-lg);
  animation: fadeSlideUp 0.8s ease-out 0.1s both;
}

.hero-title-line {
  display: block;
  color: var(--text-primary);
}

.hero-title-fire {
  background: var(--fire-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.fire-emoji {
  -webkit-text-fill-color: initial;
  font-size: 0.7em;
  position: relative;
  top: -5px;
  animation: flameFloat 1.5s ease-in-out infinite;
}

.hero-description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: var(--space-xl);
  animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

.hero-stats-row {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  animation: fadeSlideUp 0.8s ease-out 0.3s both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--fire-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-top: var(--space-xs);
}

.hero-cta-row {
  display: flex;
  gap: var(--space-md);
  animation: fadeSlideUp 0.8s ease-out 0.4s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  background: var(--fire-gradient);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(255, 69, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 69, 0, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(255, 69, 0, 0.3);
  transform: translateY(-2px);
}

/* Trophy */
.hero-trophy {
  position: absolute;
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-content);
  animation: fadeSlideUp 1s ease-out 0.5s both;
}

.trophy-glow {
  position: absolute;
  inset: -60px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.15), transparent 70%);
  animation: trophyGlow 4s ease-in-out infinite;
  border-radius: 50%;
}

.trophy-icon {
  font-size: 10rem;
  filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.3));
  animation: trophyFloat 6s ease-in-out infinite;
}

@keyframes trophyFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes trophyGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  animation: fadeSlideUp 0.8s ease-out 0.6s both;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.4; }
  50% { transform: rotate(45deg) translate(5px, 5px); opacity: 1; }
}

/* ---------- Sections (Shared) ---------- */
.section {
  position: relative;
  z-index: var(--z-content);
  padding: var(--space-3xl) var(--space-xl);
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: livePulse 1.5s ease-in-out infinite;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: var(--fire-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Live Matches Section ---------- */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: var(--glass-blur);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: cardReveal 0.6s ease-out forwards;
}

.match-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 69, 0, 0.2);
  transform: translateY(-4px);
  box-shadow: var(--fire-glow);
}

.match-card.live {
  border-color: rgba(255, 23, 68, 0.4);
}

.match-card.live::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--fire-gradient);
  animation: liveBar 2s ease-in-out infinite;
}

@keyframes liveBar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.match-card.completed {
  opacity: 0.85;
}

.match-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.match-stage-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

.match-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.match-status.live {
  background: rgba(255, 23, 68, 0.15);
  color: var(--accent-red);
  animation: statusPulse 2s ease-in-out infinite;
}

.match-status.completed {
  background: rgba(0, 230, 118, 0.1);
  color: var(--accent-green);
}

.match-status.upcoming {
  background: rgba(68, 138, 255, 0.1);
  color: var(--accent-blue);
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
}

.team-flag {
  font-size: 2.5rem;
  line-height: 1;
}

.team-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.team-name.winner {
  color: var(--fire-end);
}

.match-score {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  min-width: 80px;
  text-align: center;
}

.match-score.live-score {
  color: var(--accent-red);
  animation: scoreFlash 3s ease-in-out infinite;
}

@keyframes scoreFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.match-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--glass-border);
}

.match-highlight {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 69, 0, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--fire-mid);
  font-weight: 500;
  font-style: italic;
}

.match-minute {
  font-weight: 700;
  color: var(--accent-red);
}

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

/* ---------- Timeline ---------- */
.timeline-container {
  margin-top: var(--space-2xl);
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  text-align: center;
}

.timeline {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding: var(--space-md) 0;
  scrollbar-width: thin;
}

.timeline-item {
  flex: 0 0 220px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.timeline-item:hover {
  border-color: rgba(255, 69, 0, 0.3);
  transform: translateY(-2px);
}

.timeline-item.highlight {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.05);
}

.timeline-round {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fire-mid);
  margin-bottom: var(--space-xs);
}

.timeline-match {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.timeline-score {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.timeline-detail {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

/* ---------- Bracket Section ---------- */
.bracket-container {
  overflow-x: auto;
  padding: var(--space-lg) 0;
}

.bracket-wrapper {
  display: flex;
  gap: var(--space-2xl);
  align-items: center;
  min-width: 1100px;
  padding: var(--space-lg);
}

.bracket-round {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  align-items: center;
}

.bracket-round-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
  text-align: center;
}

.bracket-match {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  min-width: 180px;
  transition: all var(--transition-base);
  cursor: pointer;
}

.bracket-match:hover {
  border-color: rgba(255, 69, 0, 0.3);
  background: var(--bg-card-hover);
  box-shadow: 0 0 20px rgba(255, 69, 0, 0.1);
}

.bracket-match.live {
  border-color: rgba(255, 23, 68, 0.5);
  box-shadow: 0 0 20px rgba(255, 23, 68, 0.15);
}

.bracket-match.upcoming {
  border-style: dashed;
  opacity: 0.7;
}

.bracket-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  gap: var(--space-sm);
}

.bracket-team-row + .bracket-team-row {
  border-top: 1px solid var(--glass-border);
}

.bracket-team-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 500;
}

.bracket-team-info.winner {
  color: var(--fire-end);
  font-weight: 700;
}

.bracket-team-flag {
  font-size: 1.2rem;
}

.bracket-team-score {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.bracket-team-score.winner {
  color: var(--fire-end);
}

.bracket-connector {
  width: 40px;
  position: relative;
}

.bracket-connector::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--glass-border);
}

.bracket-live-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.bracket-match-date {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--glass-border);
}

.bracket-extra-info {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--fire-end);
  background: rgba(255, 107, 53, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.bracket-highlight {
  font-size: 0.6rem;
  color: var(--accent-gold, #ffd700);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.3;
}

.connectors-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  height: 100%;
  gap: var(--space-xl);
}

.connector-pair {
  position: relative;
  width: 40px;
  height: 80px;
}

.connector-line {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: var(--glass-border);
}

.connector-line::before,
.connector-line::after {
  content: '';
  position: absolute;
  right: 0;
  width: 40px;
  height: 1px;
  background: var(--glass-border);
}

.connector-line::before {
  top: 0;
}

.connector-line::after {
  bottom: 0;
}

/* ---------- Passion Heatmap Section ---------- */
.heatmap-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 2/1;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.heatmap-canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.heatmap-tooltip {
  position: absolute;
  padding: var(--space-sm) var(--space-md);
  background: rgba(6, 8, 15, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 10;
  white-space: nowrap;
}

.heatmap-tooltip.visible {
  opacity: 1;
}

.passion-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ---------- AI Commentary Section ---------- */
.commentary-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  max-width: 1100px;
  margin: 0 auto;
}

.commentary-box {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: var(--glass-blur);
  position: relative;
  overflow: hidden;
}

.commentary-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--fire-gradient);
}

.commentary-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.commentary-avatar {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
}

.commentary-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.commentary-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}

.commentary-powered {
  display: flex;
  gap: var(--space-sm);
}

.powered-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.powered-badge.gemini {
  background: rgba(68, 138, 255, 0.15);
  color: var(--accent-blue);
}

.powered-badge.elevenlabs {
  background: rgba(124, 77, 255, 0.15);
  color: var(--accent-purple);
}

.commentary-text {
  min-height: 120px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.commentary-text p {
  margin: 0;
}

.commentary-placeholder {
  color: var(--text-tertiary);
  font-style: italic;
}

.commentary-text .typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--fire-start);
  margin-left: 2px;
  animation: blink 0.8s ease-in-out infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Waveform */
.commentary-waveform {
  margin-bottom: var(--space-lg);
  display: none;
}

.commentary-waveform.active {
  display: block;
}

.waveform-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 40px;
}

.waveform-bars span {
  width: 3px;
  height: 6px;
  background: var(--fire-gradient);
  border-radius: var(--radius-full);
  transition: height var(--transition-fast);
}

.waveform-bars.playing span {
  animation: waveform 0.8s ease-in-out infinite;
}

.waveform-bars.playing span:nth-child(1) { animation-delay: 0.0s; }
.waveform-bars.playing span:nth-child(2) { animation-delay: 0.05s; }
.waveform-bars.playing span:nth-child(3) { animation-delay: 0.1s; }
.waveform-bars.playing span:nth-child(4) { animation-delay: 0.15s; }
.waveform-bars.playing span:nth-child(5) { animation-delay: 0.2s; }
.waveform-bars.playing span:nth-child(6) { animation-delay: 0.25s; }
.waveform-bars.playing span:nth-child(7) { animation-delay: 0.3s; }
.waveform-bars.playing span:nth-child(8) { animation-delay: 0.35s; }
.waveform-bars.playing span:nth-child(9) { animation-delay: 0.4s; }
.waveform-bars.playing span:nth-child(10) { animation-delay: 0.45s; }
.waveform-bars.playing span:nth-child(11) { animation-delay: 0.5s; }
.waveform-bars.playing span:nth-child(12) { animation-delay: 0.55s; }
.waveform-bars.playing span:nth-child(13) { animation-delay: 0.6s; }
.waveform-bars.playing span:nth-child(14) { animation-delay: 0.65s; }
.waveform-bars.playing span:nth-child(15) { animation-delay: 0.7s; }
.waveform-bars.playing span:nth-child(16) { animation-delay: 0.75s; }
.waveform-bars.playing span:nth-child(17) { animation-delay: 0.8s; }
.waveform-bars.playing span:nth-child(18) { animation-delay: 0.85s; }
.waveform-bars.playing span:nth-child(19) { animation-delay: 0.9s; }
.waveform-bars.playing span:nth-child(20) { animation-delay: 0.95s; }

@keyframes waveform {
  0%, 100% { height: 6px; }
  50% { height: 30px; }
}

.commentary-controls {
  display: flex;
  gap: var(--space-md);
}

.btn-speak, .btn-regenerate {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-base);
}

.btn-speak {
  background: var(--fire-gradient);
  color: #000;
}

.btn-speak:disabled, .btn-regenerate:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-speak:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 69, 0, 0.4);
}

.btn-speak.playing {
  background: var(--accent-red);
  color: white;
}

.btn-regenerate {
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-regenerate:not(:disabled):hover {
  background: var(--bg-glass-hover);
  border-color: rgba(255, 69, 0, 0.3);
}

/* Match Selector */
.match-selector {
  display: flex;
  flex-direction: column;
}

.selector-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.selector-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.selector-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition-base);
  text-align: left;
  width: 100%;
}

.selector-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 69, 0, 0.3);
  transform: translateX(4px);
}

.selector-btn.active {
  border-color: var(--fire-start);
  background: rgba(255, 69, 0, 0.08);
}

.selector-flags {
  font-size: 1.5rem;
  display: flex;
  gap: 4px;
}

.selector-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.selector-match-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
}

.selector-match-detail {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* API Status */
.api-status {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.api-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.api-badge.active {
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.2);
  color: var(--accent-green);
}

.api-badge.inactive {
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  color: var(--text-tertiary);
}

.api-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.api-dot.active {
  background: var(--accent-green);
}

.api-dot.inactive {
  background: var(--text-tertiary);
}

/* ---------- Stats Section ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  border-color: rgba(255, 69, 0, 0.2);
  transform: translateY(-4px);
  box-shadow: var(--fire-glow);
}

.stat-card-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.stat-card-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--fire-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-top: var(--space-xs);
}

.stat-card-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  font-weight: 500;
}

/* Remaining Teams */
.remaining-teams {
  text-align: center;
}

.remaining-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.remaining-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.remaining-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  min-width: 140px;
}

.remaining-card:hover {
  border-color: rgba(255, 69, 0, 0.3);
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--fire-glow);
}

.remaining-flag {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
}

.remaining-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
}

.remaining-conf {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: var(--z-content);
  padding: var(--space-2xl) var(--space-xl);
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.footer-fire {
  font-size: 1.5rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--fire-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.footer-tech {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.tech-badge {
  padding: 4px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ---------- Animations ---------- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Commentary Loading Spinner ---------- */
.commentary-loading {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--text-secondary);
  font-style: italic;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--glass-border);
  border-top-color: var(--fire-start);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-trophy {
    display: none;
  }

  .commentary-container {
    grid-template-columns: 1fr;
  }

  .hero-stats-row {
    flex-wrap: wrap;
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .main-nav {
    padding: var(--space-sm) var(--space-md);
  }

  .nav-links {
    display: none;
  }

  .hero-section {
    padding: var(--space-2xl) var(--space-md);
  }

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .hero-cta-row {
    flex-direction: column;
  }

  .section {
    padding: var(--space-2xl) var(--space-md);
  }

  .matches-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bracket-wrapper {
    min-width: 900px;
    gap: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .hero-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .remaining-grid {
    gap: var(--space-sm);
  }

  .remaining-card {
    min-width: 100px;
    padding: var(--space-md);
  }
}

/* ---- Live Data Indicator ---- */
.live-data-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 9999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  cursor: default;
}

.live-data-indicator.live {
  background: rgba(0, 200, 83, 0.15);
  color: #00c853;
  border-color: rgba(0, 200, 83, 0.3);
}

.live-data-indicator.offline {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-tertiary);
}

.live-data-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.live-data-dot.live {
  background: #00c853;
  box-shadow: 0 0 8px #00c853;
  animation: liveDotPulse 2s ease-in-out infinite;
}

.live-data-dot.offline {
  background: var(--text-tertiary);
}

@keyframes liveDotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px #00c853; }
  50% { opacity: 0.5; box-shadow: 0 0 12px #00c853; }
}

.live-data-text {
  white-space: nowrap;
}
