/* ===================================================================
   RED vs BLUE: MODERN SPLIT-SCREEN DUEL
   Esports / Sports App Landing Page UI
   Clean & Confident Rivalry • Red vs Blue Diagonal Split
   =================================================================== */

:root {
  /* -----------------------------------------------------------------
     1. SPLIT-SCREEN DUEL GRADIENTS & GEOMETRY (CSS Variables)
     ----------------------------------------------------------------- */
  /* Red gradient (left / top): WCAG AA compliant (>4.5:1) stops against white text */
  --gradient-red-split: linear-gradient(145deg, #E11D48 0%, #C81E4B 50%, #881337 100%);
  /* Blue gradient (right / bottom): WCAG AA compliant (>4.5:1) stops against white text */
  --gradient-blue-split: linear-gradient(145deg, #0284C7 0%, #0369A1 50%, #172554 100%);

  /* Diagonal divider offset across viewport (controls 8-10 degree slant) */
  --split-diagonal-offset: clamp(60px, 8vw, 120px);

  /* Card & Surface Geometry */
  --card-radius: 24px;
  --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  --btn-radius: 14px;
  --input-radius: 12px;

  /* Card Accent Tints */
  --tint-host-bg: #FFE4E6;
  --tint-host-text: #E11D48;
  --tint-join-bg: #E0F2FE;
  --tint-join-text: #0284C7;

  /* Button Gradients & Soft Colored Shadows */
  --btn-host-gradient: linear-gradient(135deg, #FF4D5E 0%, #FF8A3D 100%);
  --btn-host-shadow: 0 10px 25px rgba(255, 77, 94, 0.35);
  --btn-join-gradient: linear-gradient(135deg, #2E9BFF 0%, #22D3EE 100%);
  --btn-join-shadow: 0 10px 25px rgba(46, 155, 255, 0.35);

  /* Font Families */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* -----------------------------------------------------------------
     2. STRICT 5-TIER TYPOGRAPHY SYSTEM
     ----------------------------------------------------------------- */
  --font-size-hero: clamp(2.6rem, 7.5vw, 6.2rem);   /* 1. Hero Display */
  --font-size-h2: clamp(1.35rem, 2.2vw, 1.65rem);    /* 2. Card H2 Headings */
  --font-size-body: 1rem;                            /* 3. Body text, helper text, buttons */
  --font-size-label: 0.88rem;                        /* 4. Labels, chips, inputs, steps */
  --font-size-caption: 0.78rem;                      /* 5. Subtext, audience tags, pills */

  /* -----------------------------------------------------------------
     3. COMPATIBILITY TOKENS FOR GAME SCREENS 2 & 3
     ----------------------------------------------------------------- */
  --color-red: #E11D48;
  --color-blue: #0284C7;
  --red-start: #FF4D5E;
  --red-end: #FF7A45;
  --gradient-red: linear-gradient(135deg, #FF4D5E, #FF7A45);
  --team-red: #FF4D5E;
  --red-primary: #FF4D5E;
  --blue-start: #2E9BFF;
  --blue-end: #00E0FF;
  --gradient-blue: linear-gradient(135deg, #2E9BFF, #00E0FF);
  --team-blue: #2E9BFF;
  --blue-primary: #2E9BFF;
  --purple-blend: #7C3AED;
  --purple-light: #A855F7;
  --status-green: #10B981;
  --text-primary: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --bg-base: #0B0B14;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(255, 255, 255, 0.05);
  --border-input: rgba(255, 255, 255, 0.12);
  --bg-elevated: rgba(255, 255, 255, 0.07);
  --radius-card: 24px;
  --radius-tile: 16px;
  --radius-btn: 14px;
  --radius-input: 12px;
  --radius-chip: 9999px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --glow-red: rgba(255, 59, 92, 0.4);
  --glow-blue: rgba(46, 155, 255, 0.4);
}

/* ===================================================================
   BASE RESET & CANVAS SETUP
   =================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: #0F172A;
  color: #FFFFFF;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===================================================================
   FULL-PAGE SPLIT-SCREEN BACKDROP
   Left Half Red Gradient • Right Half Blue Gradient • 8-10° Diagonal
   =================================================================== */

.split-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.split-half {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Left Half: Red Gradient (Base Layer) */
.split-red {
  background: var(--gradient-red-split);
  z-index: 1;
}

/* Right Half: Blue Gradient (Overlay with Diagonal Clip-Path) */
.split-blue {
  background: var(--gradient-blue-split);
  z-index: 2;
  clip-path: polygon(
    calc(50% + var(--split-diagonal-offset)) 0%,
    100% 0%,
    100% 100%,
    calc(50% - var(--split-diagonal-offset)) 100%
  );
}

/* Large Faint Watermark Letters "R" and "B" (6% Opacity, No Blur, No Glow) */
.watermark-letter {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(260px, 32vw, 480px);
  color: #FFFFFF;
  opacity: 0.06;
  line-height: 0.8;
  user-select: none;
  pointer-events: none;
}

.split-red .watermark-letter {
  left: clamp(20px, 4vw, 80px);
  top: clamp(60px, 12vh, 180px);
}

.split-blue .watermark-letter {
  right: clamp(20px, 4vw, 80px);
  bottom: clamp(40px, 10vh, 140px);
}

/* Large Faint Decorative Rings (6% Opacity, No Blur, No Glow) */
.watermark-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.ring-red {
  width: clamp(380px, 45vw, 680px);
  height: clamp(380px, 45vw, 680px);
  left: -120px;
  top: -80px;
}

.ring-blue {
  width: clamp(420px, 50vw, 750px);
  height: clamp(420px, 50vw, 750px);
  right: -160px;
  bottom: -120px;
}

/* ===================================================================
   TOP HEADER BAR (TRANSPARENT, CRISP WHITE CONTROLS)
   =================================================================== */

.app-navbar {
  position: relative;
  z-index: 10;
  background: transparent;
  border: none;
  height: 68px;
}

.nav-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-hub-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  color: #FFFFFF;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-hub-nav:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.btn-hub-nav .hub-icon {
  font-size: 0.7rem;
  opacity: 0.8;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-word {
  color: #FFFFFF;
}

.brand-vs-circle {
  font-size: 0.65rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ONLINE Pill (White pill with green dot and dark text) */
.nav-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #FFFFFF;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  display: inline-block;
}

.online-text {
  font-family: var(--font-body);
  font-size: var(--font-size-caption);
  font-weight: 700;
  color: #0F172A;
  letter-spacing: 0.6px;
}

/* Round White Sound Toggle Button */
.btn-audio-pill {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: none;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-audio-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.btn-audio-pill:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

.audio-toggle-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* ===================================================================
   MAIN APPLICATION CONTAINER
   =================================================================== */

.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 24px 64px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  flex-direction: column;
  width: 100%;
}

.screen.active {
  display: flex;
}

/* ===================================================================
   SCREEN 1: MODERN SPLIT-SCREEN DUEL HERO SECTION
   =================================================================== */

.hero-section {
  text-align: center;
  margin: 8px 0 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
}

/* Huge Bold Split Duel Title */
.hero-duel-title {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

.hero-duel-half {
  flex: 1;
  display: flex;
  align-items: center;
}

.duel-red {
  justify-content: flex-end;
  padding-right: clamp(14px, 2.5vw, 32px);
  text-align: right;
}

.duel-blue {
  justify-content: flex-start;
  padding-left: clamp(14px, 2.5vw, 32px);
  text-align: left;
}

.hero-duel-word {
  font-family: var(--font-display);
  font-size: var(--font-size-hero);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #FFFFFF;
  text-transform: uppercase;
}

/* VS Badge: Small Solid White Circle on the Diagonal */
.hero-vs-badge {
  width: clamp(48px, 5.5vw, 64px);
  height: clamp(48px, 5.5vw, 64px);
  border-radius: 50%;
  background: #FFFFFF;
  color: #0F172A;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 5;
  flex-shrink: 0;
}

/* White Tagline at 85% Opacity */
.hero-subtitle {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 28px;
  text-align: center;
  max-width: 540px;
}

/* Step Strip: Three simple inline items in white text, outlined circles, thin dividers, NO container box */
.step-strip-minimal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.2vw, 24px);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
}

.step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--font-size-caption);
  font-weight: 800;
  color: #FFFFFF;
  flex-shrink: 0;
}

.step-label {
  font-family: var(--font-body);
  font-size: var(--font-size-label);
  font-weight: 600;
  color: #FFFFFF;
}

.step-divider {
  width: 28px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* ===================================================================
   MAIN ACTION CARDS (SOLID WHITE #FFFFFF, 24px RADIUS, SOFT SHADOW)
   Host on Red Half • Join on Blue Half
   =================================================================== */

.landing-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3.5vw, 44px);
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.party-card {
  background: #FFFFFF;
  border: none;
  border-radius: var(--card-radius);
  padding: 32px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  color: #0F172A;
  animation: fadeUpCards 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1 forwards;
}

@keyframes fadeUpCards {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* Small Colored Tags at Top of Each Card */
.card-colored-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: var(--font-size-caption);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.tag-host {
  background: var(--tint-host-bg);
  color: var(--tint-host-text);
}

.tag-join {
  background: var(--tint-join-bg);
  color: var(--tint-join-text);
}

.card-audience {
  font-family: var(--font-body);
  font-size: var(--font-size-caption);
  color: #64748B;
  font-weight: 600;
}

.card-intro h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-h2);
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.card-intro p {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  color: #475569;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 24px;
  min-height: 48px;
}

.card-form-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 28px;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.field-label-text {
  font-family: var(--font-body);
  font-size: var(--font-size-label);
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 8px;
}

.field-helper-text {
  font-family: var(--font-body);
  font-size: var(--font-size-caption);
  font-weight: 400;
  color: #475569;
  margin-top: 6px;
}

/* Inputs: Light gray fill (#F1F5F9), no border, 12px radius, 52px tall */
.duel-input {
  width: 100%;
  height: 52px;
  background-color: #F1F5F9;
  border: none;
  border-radius: var(--input-radius);
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: 500;
  color: #0F172A;
  outline: none;
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.duel-input::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

/* Team Color Focus Ring: 2px Ring in Team Color */
.card-host .duel-input:focus {
  background-color: #FFFFFF;
  box-shadow: 0 0 0 2px #E11D48;
}

.card-join .duel-input:focus {
  background-color: #FFFFFF;
  box-shadow: 0 0 0 2px #0284C7;
}

/* Duration Presets: Rounded chips row + inline custom seconds input */
.duration-row-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.duel-chips-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-chip {
  height: 44px;
  padding: 0 14px;
  border-radius: 9999px;
  border: none;
  background-color: #F1F5F9;
  color: #0F172A;
  font-family: var(--font-body);
  font-size: var(--font-size-label);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.btn-chip:hover {
  background-color: #E2E8F0;
}

/* Selected = solid red (#E11D48) fill with white text */
.btn-chip.active {
  background-color: #E11D48;
  color: #FFFFFF;
}

.custom-duration-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 90px;
}

.duel-custom-input {
  height: 44px;
  padding-right: 36px;
  padding-left: 12px;
  font-size: var(--font-size-label);
}

.custom-sec-tag {
  position: absolute;
  right: 12px;
  font-family: var(--font-body);
  font-size: var(--font-size-caption);
  font-weight: 600;
  color: #64748B;
  pointer-events: none;
}

/* Code Input with Team Indicator */
.input-with-badge {
  position: relative;
  display: flex;
  align-items: center;
}

.duel-code-input {
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.preview-team-badge {
  position: absolute;
  right: 12px;
  font-family: var(--font-body);
  font-size: var(--font-size-caption);
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  display: none;
}

.preview-team-badge.active {
  display: inline-block;
}

.preview-team-badge.red {
  background: var(--tint-host-bg);
  color: var(--tint-host-text);
}

.preview-team-badge.blue {
  background: var(--tint-join-bg);
  color: var(--tint-join-text);
}

/* Primary Action Buttons (56px tall, 14px radius, bold white text, hover translateY -2px) */
.card-actions {
  margin-top: auto;
}

.btn {
  width: 100%;
  height: 56px;
  border-radius: var(--btn-radius);
  border: none;
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  font-weight: 700;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 3px solid #0F172A;
  outline-offset: 2px;
}

.btn-icon {
  font-size: 1.25rem;
}

/* Create Arena Button (Red-to-Orange Gradient + Soft Colored Shadow) */
.btn-party-host {
  background: var(--btn-host-gradient);
  box-shadow: var(--btn-host-shadow);
}

.btn-party-host:hover {
  box-shadow: 0 14px 30px rgba(255, 77, 94, 0.45);
}

/* Join Battle Button (Blue-to-Cyan Gradient + Soft Colored Shadow) */
.btn-party-join {
  background: var(--btn-join-gradient);
  box-shadow: var(--btn-join-shadow);
}

.btn-party-join:hover {
  box-shadow: 0 14px 30px rgba(46, 155, 255, 0.45);
}

/* Shared Utility Button Classes for Screens 2 & 3 */
.btn-primary-neutral {
  background: #FFFFFF;
  color: #0F172A;
  font-weight: 700;
}

.btn-primary-neutral:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.25);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* ===================================================================
   RESPONSIVE DESIGN (MOBILE-FIRST BREAKPOINTS)
   =================================================================== */

@media (max-width: 768px) {
  /* On mobile, the split becomes top (red) and bottom (blue), stacked */
  .split-backdrop .split-blue {
    clip-path: polygon(0% 48%, 100% 48%, 100% 100%, 0% 100%);
  }

  .split-red .watermark-letter {
    left: 10px;
    top: 60px;
  }

  .split-blue .watermark-letter {
    right: 10px;
    bottom: 40px;
  }

  .app-container {
    padding: 12px 16px 48px;
  }

  .hero-section {
    margin: 4px 0 28px;
  }

  .hero-duel-title {
    margin-bottom: 10px;
  }

  .hero-duel-half.duel-red {
    padding-right: 10px;
  }

  .hero-duel-half.duel-blue {
    padding-left: 10px;
  }

  .step-strip-minimal {
    gap: 8px 14px;
    margin-bottom: 20px;
  }

  .step-divider {
    display: none;
  }

  .landing-cards-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .party-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  /* Tap targets at least 48px on mobile */
  .btn,
  .duel-input,
  .btn-audio-pill {
    min-height: 48px;
  }

  .btn-chip {
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .nav-container {
    padding: 0 16px;
  }

  .brand-text {
    font-size: 1.1rem;
  }

  .hero-subtitle {
    font-size: 0.92rem;
  }

  .card-intro p {
    min-height: auto;
  }

  .duration-row-group {
    gap: 6px;
  }

  .duel-chips-group {
    width: 100%;
    justify-content: space-between;
  }

  .custom-duration-wrapper {
    width: 100%;
  }
}

/* ===================================================================
   ACCESSIBILITY: PREFERS-REDUCED-MOTION
   =================================================================== */

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

  .party-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover,
  .btn-audio-pill:hover {
    transform: none !important;
  }
}

/* ===================================================================
   SCREEN 2: HOST ARENA DASHBOARD
   =================================================================== */

.host-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-card);
  padding: 16px 22px;
  margin-bottom: 20px;
}

.room-indicator-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.indicator-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.indicator-code {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.status-indicator {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.status-indicator.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--status-green);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.timer-display-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', monospace;
  font-size: 1.9rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  letter-spacing: 1px;
}

.timer-symbol {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.timer-display-box.urgent {
  color: var(--red-start);
  border-color: var(--red-start);
  background: rgba(255, 59, 92, 0.15);
  box-shadow: 0 0 20px var(--glow-red);
}

.host-lan-pill {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
}

.lan-icon {
  font-size: 1rem;
}

.lan-meta {
  display: flex;
  flex-direction: column;
}

.lan-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}

#host-lan-url {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Symmetrical Momentum & Scoreboard Panel */
.tug-arena-panel {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .tug-arena-panel {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 14px;
  }
}

.score-column {
  display: flex;
  flex-direction: column;
}

.score-team-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.blue-column .score-team-header {
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .score-column,
  .blue-column {
    align-items: center;
  }
  .score-team-header,
  .blue-column .score-team-header {
    justify-content: center;
  }
}

.team-marker-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot-red {
  background: var(--red-start);
  box-shadow: 0 0 8px var(--glow-red);
}

.dot-blue {
  background: var(--blue-end);
  box-shadow: 0 0 8px var(--glow-blue);
}

.team-title-text {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.red-column .team-title-text { color: var(--red-start); }
.blue-column .team-title-text { color: var(--blue-start); }

.live-score-number {
  font-family: 'Space Grotesk', monospace;
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}

.red-column .live-score-number { color: var(--red-start); }
.blue-column .live-score-number { color: var(--blue-end); }

.momentum-track-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.momentum-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.meta-red { color: var(--red-start); }
.meta-center { color: var(--text-muted); }
.meta-blue { color: var(--blue-end); }

.momentum-meter-track {
  position: relative;
  display: flex;
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.momentum-fill-red {
  height: 100%;
  background: var(--gradient-red);
  box-shadow: 0 0 14px var(--glow-red);
  transition: width 0.22s ease;
}

.momentum-fill-blue {
  height: 100%;
  background: var(--gradient-blue);
  box-shadow: 0 0 14px var(--glow-blue);
  transition: width 0.22s ease;
}

.momentum-divider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.5);
  transform: translateX(-50%);
  z-index: 2;
}

.momentum-clash-spark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  pointer-events: none;
  filter: drop-shadow(0 0 8px #fff);
  z-index: 4;
}

/* Host Dual Roster Cards */
.host-roster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .host-roster-grid {
    grid-template-columns: 1fr;
  }
}

.team-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.team-panel-red { border-top: 3px solid var(--red-start); }
.team-panel-blue { border-top: 3px solid var(--blue-start); }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.badge-red {
  background: rgba(255, 59, 92, 0.15);
  color: var(--red-start);
  border: 1px solid rgba(255, 59, 92, 0.35);
}

.badge-blue {
  background: rgba(29, 161, 242, 0.15);
  color: var(--blue-start);
  border: 1px solid rgba(29, 161, 242, 0.35);
}

.panel-heading h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.player-count-pill {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.invite-container {
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.red-border { border: 1px solid rgba(255, 59, 92, 0.25); }
.blue-border { border: 1px solid rgba(29, 161, 242, 0.25); }

.invite-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.invite-field-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.invite-field-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.code-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.display-code {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.code-red { color: var(--red-start); text-shadow: 0 0 10px var(--glow-red); }
.code-blue { color: var(--blue-end); text-shadow: 0 0 10px var(--glow-blue); }

.btn-action-small {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action-small:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.sub-actions-row {
  display: flex;
  gap: 8px;
}

.btn-action-outline {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.qr-popup-box {
  background: #FFFFFF;
  color: #0B0B14;
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
}

.qr-popup-box canvas {
  width: 130px !important;
  height: 130px !important;
  margin-bottom: 4px;
}

.qr-popup-box p {
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
}

.qr-popup-box.hidden {
  display: none;
}

.roster-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.roster-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.roster-list {
  list-style: none;
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.roster-list li {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.roster-list .empty-roster {
  color: var(--text-muted);
  font-style: italic;
  justify-content: center;
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: transparent;
}

.roster-player-taps {
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  font-size: 0.8rem;
}

.red-roster .roster-player-taps { color: var(--red-start); }
.blue-roster .roster-player-taps { color: var(--blue-end); }

/* Host Control Footer */
.host-arena-footer {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-card);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.duration-quick-adjust {
  display: flex;
  align-items: center;
  gap: 10px;
}

.duration-quick-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.quick-chip-group {
  display: flex;
  gap: 5px;
}

.host-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-start-match {
  background: var(--gradient-red);
  color: #FFFFFF;
  padding: 10px 24px;
  font-weight: 800;
  box-shadow: 0 4px 16px var(--glow-red);
}

.btn-start-match:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--glow-red-strong);
}

/* ===================================================================
   SCREEN 3: PLAYER TAP ARENA (MOBILE-FIRST)
   =================================================================== */

#screen-player {
  flex: 1;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

#screen-player.active {
  display: flex;
}

.player-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-card);
  padding: 12px 18px;
  margin-bottom: 12px;
}

.btn-player-leave {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #a0aec0;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-player-leave:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
}

.player-meta-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-team-pill {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.75rem;
}

.team-red-active .player-team-pill {
  background: var(--gradient-red);
  color: #FFFFFF;
  box-shadow: 0 0 12px var(--glow-red);
}

.team-blue-active .player-team-pill {
  background: var(--gradient-blue);
  color: #FFFFFF;
  box-shadow: 0 0 12px var(--glow-blue);
}

.player-display-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.player-timer-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2px 0 12px 0;
  width: 100%;
}

.player-timer-box {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 6px 20px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  letter-spacing: 1.5px;
}

.player-timer-box.urgent {
  color: var(--red-start);
  background: rgba(255, 59, 92, 0.18);
  border-color: var(--red-start);
  box-shadow: 0 0 16px var(--glow-red);
}

.player-mini-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-card);
  padding: 10px 16px;
  margin-bottom: 14px;
}

.mini-score-label {
  font-family: 'Space Grotesk', monospace;
  font-weight: 800;
  font-size: 1.05rem;
  min-width: 28px;
}

.mini-score-label.red { color: var(--red-start); }
.mini-score-label.blue { color: var(--blue-end); text-align: right; }

.mini-meter-track {
  flex: 1;
  height: 12px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.meter-bar-red {
  height: 100%;
  background: var(--gradient-red);
  box-shadow: 0 0 10px var(--glow-red);
  transition: width 0.2s ease;
}

.meter-bar-blue {
  height: 100%;
  background: var(--gradient-blue);
  box-shadow: 0 0 10px var(--glow-blue);
  transition: width 0.2s ease;
}

.mini-meter-center {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
}

/* Tap Stage & Button */
.tap-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 360px;
  padding: 10px 0;
}

#tap-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.tap-status-message {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 20px;
  text-align: center;
  min-height: 24px;
}

.tap-status-message.playing {
  color: var(--text-primary);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.tap-button-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.mega-tap-btn {
  position: relative;
  width: min(72vw, 260px);
  height: min(72vw, 260px);
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease;
  touch-action: manipulation;
  z-index: 5;
}

.mega-tap-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.mega-tap-btn:not(:disabled):active {
  transform: scale(0.93) translateY(4px);
}

.btn-depth-shadow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: translateY(8px);
  z-index: 1;
}

.team-red-active .btn-depth-shadow {
  background: #A32029;
  box-shadow: 0 16px 36px var(--glow-red);
}

.team-blue-active .btn-depth-shadow {
  background: #0B6EA8;
  box-shadow: 0 16px 36px var(--glow-blue);
}

.btn-inner-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.4);
}

.team-red-active .btn-inner-face { background: var(--gradient-red); }
.team-blue-active .btn-inner-face { background: var(--gradient-blue); }

.tap-callout {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.2rem, 7.5vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  line-height: 1;
}

.tap-subtext {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 5px;
}

/* Metrics Dock */
.player-metrics-dock {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-card);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 22px;
}

.metric-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.metric-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.metric-value {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ===================================================================
   MODALS: COUNTDOWN & VICTORY
   =================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.hidden {
  display: none;
}

.countdown-modal-content {
  text-align: center;
}

.countdown-header-tag {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.countdown-number {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(6.5rem, 24vw, 11rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
}

.countdown-caption {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 10px;
}

.gameover-modal-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(22, 22, 36, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-card);
  padding: 30px 24px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.winner-trophy-symbol {
  font-size: 3.2rem;
  margin-bottom: 6px;
}

.winner-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 4px;
}

.winner-title.red { color: var(--red-start); text-shadow: 0 0 16px var(--glow-red); }
.winner-title.blue { color: var(--blue-end); text-shadow: 0 0 16px var(--glow-blue); }
.winner-title.tie { color: var(--text-primary); }

.winner-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 22px;
}

.final-score-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 22px;
}

.final-score-item {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.final-team-name {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.final-score-item.red .final-team-name { color: var(--red-start); }
.final-score-item.blue .final-team-name { color: var(--blue-end); }

.final-team-score {
  font-family: 'Space Grotesk', monospace;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
}

.final-score-divider {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.mvp-summary-box {
  margin-bottom: 24px;
}

.mvp-section-heading {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.mvp-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mvp-cell {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: var(--radius-xs);
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.mvp-cell.red-border { border-left: 3px solid var(--red-start); }
.mvp-cell.blue-border { border-left: 3px solid var(--blue-end); }

.mvp-team-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.mvp-player-name {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mvp-player-taps {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* Full Team Rosters Scoreboard in Game Over Modal */
.team-results-scoreboard {
  margin-bottom: 22px;
  text-align: left;
}

.scoreboard-heading {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-align: center;
}

.team-results-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .team-results-split {
    grid-template-columns: 1fr;
  }
}

.team-result-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.team-result-box.red-result-box {
  border-top: 3px solid var(--red-start, #ff2a5f);
}

.team-result-box.blue-result-box {
  border-top: 3px solid var(--blue-end, #0099ff);
}

.team-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.team-title {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.team-count {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: monospace;
}

.team-players-scroll {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}

.team-players-scroll::-webkit-scrollbar {
  width: 4px;
}
.team-players-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.player-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.8rem;
  gap: 8px;
  transition: background 0.2s ease;
}

.player-result-row.is-me {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.player-result-row.is-mvp {
  background: rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.35);
}

.result-rank-col {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 24px;
  font-family: monospace;
}

.player-result-row.is-mvp .result-rank-col {
  color: #ffd700;
}

.result-info-col {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.result-player-name {
  font-weight: 600;
  text-overflow: ellipsis;
  overflow: hidden;
  color: #fff;
}

.you-indicator-pill {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
}

.result-score-col {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  white-space: nowrap;
}

.result-taps-unit {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: normal;
}

.empty-roster-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 0;
  font-style: italic;
}

.gameover-actions-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.helper-text-centered {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ===================================================================
   TOAST NOTIFICATIONS
   =================================================================== */

.toast-hub {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  background: rgba(22, 22, 36, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: toastSlideUp 150ms ease forwards;
}

@keyframes toastSlideUp {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===================================================================
   ACCESSIBILITY: PREFERS-REDUCED-MOTION
   =================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transform: none !important;
  }
  .glow-blob {
    animation: none !important;
  }
}
