/* ===================================
   COCOTR?N - Galaxy Neon Theme
   Deep Space with Animated Neon Effects
   =================================== */

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

/* ===================================
   CSS Variables
   =================================== */
:root {
  /* Background Colors */
  --bg-primary: #050a12;
  --bg-card: rgba(10, 18, 32, 0.85);
  --bg-input: rgba(255, 255, 255, 0.06);
  
  /* Accent Colors */
  --accent-gold: #FFE66D;
  --accent-pink: #00E5FF;
  --accent-cyan: #36B8FF;
  --accent-green: #3DFF9A;
  --accent-magenta: #18FFC8;
  --accent-purple: #4C6FFF;
  --accent-orange: #FFB454;
  
  /* Text Colors */
  --text-primary: #F5FAFF;
  --text-secondary: #B6C7DA;
  --text-muted: #70839C;
  
  /* Status Colors */
  --color-success: #3DFF9A;
  --color-error: #FF5B7A;
  --color-warning: #FFD166;
  
  /* Option Colors */
  --option-a: #00E5FF;
  --option-b: #4C6FFF;
  --option-c: #FFE66D;
  --option-d: #3DFF9A;
  
  /* Gradients */
  --gradient-neon: linear-gradient(135deg, #00E5FF, #4C6FFF, #18FFC8, #FFE66D);
  --gradient-pink: linear-gradient(90deg, #00E5FF, #4C6FFF);
  --gradient-gold: linear-gradient(135deg, #FFE66D, #FFB454);
  
  /* Shadows */
  --shadow-card: 0 0 50px rgba(3, 8, 18, 0.65);
  --shadow-neon: 0 0 30px rgba(0, 229, 255, 0.35);
  --shadow-glow-pink: 0 0 40px rgba(76, 111, 255, 0.45);
  
  /* Typography */
  --font-main: 'Poppins', sans-serif;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;
}

/* ===================================
   Animated Neon Border Keyframes
   =================================== */
@keyframes neon-border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@property --beam-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes border-beam-spin {
  to { --beam-angle: 360deg; }
}

@keyframes neon-glow-pulse {
  0%, 100% { 
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.55), 
                0 0 48px rgba(76, 111, 255, 0.35),
                0 0 72px rgba(54, 184, 255, 0.2),
                0 0 96px rgba(255, 230, 109, 0.12);
  }
  50% { 
    box-shadow: 0 0 36px rgba(0, 229, 255, 0.75), 
                0 0 72px rgba(76, 111, 255, 0.45),
                0 0 96px rgba(54, 184, 255, 0.3),
                0 0 120px rgba(255, 230, 109, 0.2);
  }
}

@keyframes option-neon-pulse {
  0%, 100% {
    box-shadow: 0 4px 0 rgba(0,0,0,0.3),
      0 0 16px var(--option-glow-soft),
      0 0 32px var(--option-glow-strong);
  }
  50% {
    box-shadow: 0 4px 0 rgba(0,0,0,0.3),
      0 0 24px var(--option-glow-soft),
      0 0 48px var(--option-glow-strong);
  }
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes nebula-float {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

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

html, body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

/* Galaxy Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    /* Stars scattered */
    radial-gradient(1px 1px at 20px 30px, white, transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 90px 40px, white, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 160px 120px, white, transparent),
    radial-gradient(1px 1px at 200px 50px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 250px 180px, white, transparent),
    radial-gradient(1.5px 1.5px at 300px 100px, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 350px 30px, white, transparent),
    /* Nebula effects */
    radial-gradient(ellipse 800px 600px at 20% 30%, rgba(0, 229, 255, 0.15), transparent),
    radial-gradient(ellipse 600px 800px at 80% 70%, rgba(76, 111, 255, 0.12), transparent),
    radial-gradient(ellipse 900px 500px at 60% 20%, rgba(54, 184, 255, 0.08), transparent),
    radial-gradient(ellipse 500px 700px at 10% 80%, rgba(255, 180, 84, 0.1), transparent),
    /* Base */
    linear-gradient(180deg, #050a12 0%, #0a1424 50%, #0c1526 100%);
  background-size: 400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px,
                   400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px,
                   100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  pointer-events: none;
  z-index: -2;
}

/* Animated nebula overlay */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: 
    radial-gradient(ellipse 40% 30% at 30% 40%, rgba(0, 229, 255, 0.1), transparent 50%),
    radial-gradient(ellipse 30% 40% at 70% 60%, rgba(76, 111, 255, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 25% at 50% 80%, rgba(54, 184, 255, 0.06), transparent 50%);
  animation: nebula-float 60s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

/* ===================================
   Screen Layouts
   =================================== */
.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
}

/* Background Effects */
.screen::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(circle at 15% 20%, rgba(0, 229, 255, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 85% 80%, rgba(54, 184, 255, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 50% 50%, rgba(255, 230, 109, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

.screen.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.text-center { text-align: center; }
.flex { display: flex; }
.gap-md { gap: var(--space-md); }
.justify-center { justify-content: center; }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.hidden { display: none !important; }

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4 {
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.logo {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
  filter: drop-shadow(0 0 20px rgba(255, 230, 109, 0.4));
}

.logo-image {
  width: clamp(80px, 15vw, 140px);
  height: auto;
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 0 20px rgba(255, 230, 109, 0.5));
}

.tagline {
  font-size: 1.1rem;
  color: var(--accent-pink);
  font-weight: 600;
}

/* ===================================
   Cards (Animated Neon Border)
   =================================== */
.card {
  --beam-size: 6px;
  --beam-color: rgba(0, 229, 255, 0.95);
  --beam-color-2: rgba(54, 184, 255, 0.95);
  --beam-speed: 4.2s;
  --beam-angle: 0deg;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  isolation: isolate;
  border: var(--beam-size) solid transparent;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    conic-gradient(
      from var(--beam-angle),
      transparent 0deg,
      transparent 260deg,
      var(--beam-color) 285deg,
      var(--beam-color-2) 310deg,
      transparent 335deg,
      transparent 360deg
    ) border-box;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  animation: border-beam-spin var(--beam-speed) linear infinite,
    neon-glow-pulse 2.8s ease-in-out infinite;
}

/* ===================================
   Form Elements
   =================================== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  font-size: 1rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--space-md);
  font-size: 1rem;
  font-family: var(--font-main);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 4px rgba(54, 184, 255, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* ===================================
   Buttons
   =================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-pink);
  color: white;
  box-shadow: var(--shadow-glow-pink);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(76, 111, 255, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  background: rgba(54, 184, 255, 0.1);
}

.btn-success {
  background: linear-gradient(135deg, #00C853, #00E676);
  color: #003300;
}

.btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Difficulty/Mode Buttons */
.difficulty-btn {
  background: var(--bg-input);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.difficulty-btn:hover {
  border-color: var(--accent-pink);
  color: var(--text-primary);
}

.difficulty-btn.active {
  background: var(--gradient-pink);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

/* ===================================
   Toggle Switch
   =================================== */
.toggle-container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.toggle {
  width: 56px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s ease;
}

.toggle.active {
  background: var(--gradient-pink);
}

.toggle.active::after {
  transform: translateX(28px);
}

/* ===================================
   Game Code Display
   =================================== */
.game-code-label {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.game-code {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  text-shadow: 0 0 30px rgba(255, 230, 109, 0.5);
}

/* ===================================
   Player List
   =================================== */
.player-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin: var(--space-xl) 0;
}

.player-tag {
  background: rgba(54, 184, 255, 0.2);
  color: var(--accent-cyan);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--accent-cyan);
  animation: pop-in 0.3s ease;
}

@keyframes pop-in {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===================================
   Question Display
   =================================== */
.question-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: center;
}

.question-number {
  font-size: 1.3rem;
  color: var(--accent-cyan);
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.question-text {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  margin: var(--space-xl) 0;
  color: var(--text-primary);
  max-width: 900px;
  font-weight: 600;
}

/* ===================================
   Timer
   =================================== */
.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
  margin: var(--space-lg) auto;
}

.timer {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--color-success);
  text-shadow: 0 0 30px rgba(0, 230, 118, 0.5);
}

.timer.warning {
  color: var(--color-warning);
  text-shadow: 0 0 30px rgba(255, 230, 109, 0.5);
}

.timer.danger {
  color: var(--color-error);
  text-shadow: 0 0 30px rgba(255, 45, 85, 0.5);
  animation: pulse-danger 0.5s ease infinite;
}

@keyframes pulse-danger {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.timer-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-md);
}

.timer-bar-fill {
  height: 100%;
  background: var(--gradient-neon);
  border-radius: var(--radius-full);
  transition: width 1s linear;
}

/* ===================================
   Options Display (Host Grid)
   =================================== */
.options-display {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  width: 100%;
  max-width: 1000px;
  margin: var(--space-xl) auto;
}

.option-card {
  --option-glow-strong: rgba(255, 255, 255, 0.35);
  --option-glow-soft: rgba(255, 255, 255, 0.18);
  --beam-size: 5px;
  --beam-speed: 3.6s;
  --beam-angle: 0deg;
  --beam-color: var(--option-glow-strong);
  --beam-color-2: var(--option-glow-soft);
  --option-bg: linear-gradient(135deg, var(--option-a), #C0004F);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  color: white;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 90px;
  border: var(--beam-size) solid transparent;
  background:
    var(--option-bg) padding-box,
    conic-gradient(
      from var(--beam-angle),
      transparent 0deg,
      transparent 260deg,
      var(--beam-color) 285deg,
      var(--beam-color-2) 310deg,
      transparent 335deg,
      transparent 360deg
    ) border-box;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  box-shadow: 0 4px 0 rgba(0,0,0,0.3),
    0 0 16px var(--option-glow-soft),
    0 0 32px var(--option-glow-strong);
  animation: border-beam-spin var(--beam-speed) linear infinite,
    option-neon-pulse 2.4s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.option-card:hover {
  transform: translateY(-3px);
}

.option-card.option-a {
  --option-glow-strong: rgba(0, 229, 255, 0.65);
  --option-glow-soft: rgba(0, 229, 255, 0.28);
  --beam-color: rgba(0, 229, 255, 0.9);
  --beam-color-2: rgba(140, 255, 244, 0.8);
  --option-bg: linear-gradient(135deg, var(--option-a), #C0004F);
}
.option-card.option-b {
  --option-glow-strong: rgba(54, 184, 255, 0.65);
  --option-glow-soft: rgba(54, 184, 255, 0.28);
  --beam-color: rgba(54, 184, 255, 0.9);
  --beam-color-2: rgba(120, 240, 255, 0.8);
  --option-bg: linear-gradient(135deg, var(--option-b), #009ACC);
}
.option-card.option-c {
  --option-glow-strong: rgba(255, 230, 109, 0.65);
  --option-glow-soft: rgba(255, 230, 109, 0.3);
  --beam-color: rgba(255, 230, 109, 0.9);
  --beam-color-2: rgba(255, 230, 140, 0.8);
  --option-bg: linear-gradient(135deg, var(--option-c), #E6A800);
}
.option-card.option-d {
  --option-glow-strong: rgba(0, 230, 118, 0.65);
  --option-glow-soft: rgba(0, 230, 118, 0.28);
  --beam-color: rgba(0, 230, 118, 0.9);
  --beam-color-2: rgba(140, 255, 190, 0.8);
  --option-bg: linear-gradient(135deg, var(--option-d), #00B35C);
}

.option-letter {
  width: 45px;
  height: 45px;
  background: rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ===================================
   Rankings
   =================================== */
.ranking-list {
  width: 100%;
  max-width: 500px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  border-left: 4px solid var(--accent-pink);
}

.ranking-item:nth-child(1) {
  border-left-color: gold;
  background: rgba(255, 230, 109, 0.1);
}

.ranking-item:nth-child(2) {
  border-left-color: silver;
}

.ranking-item:nth-child(3) {
  border-left-color: #CD7F32;
}

.ranking-position {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-gold);
  min-width: 40px;
}

.ranking-name {
  flex: 1;
  font-weight: 600;
  font-size: 1.1rem;
}

.ranking-score {
  font-weight: 700;
  color: var(--color-success);
}

/* ===================================
   Results Details
   =================================== */
.results-question-card {
  --beam-size: 6px;
  --beam-color: rgba(255, 230, 109, 0.95);
  --beam-color-2: rgba(0, 229, 255, 0.9);
  --beam-speed: 4.2s;
  --beam-angle: 0deg;
  width: 100%;
  max-width: 900px;
  margin: 0 auto var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: var(--beam-size) solid transparent;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.04)) padding-box,
    conic-gradient(
      from var(--beam-angle),
      transparent 0deg,
      transparent 260deg,
      var(--beam-color) 285deg,
      var(--beam-color-2) 310deg,
      transparent 335deg,
      transparent 360deg
    ) border-box;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  position: relative;
  animation: border-beam-spin var(--beam-speed) linear infinite,
    neon-glow-pulse 2.8s ease-in-out infinite;
  text-align: center;
}

.results-question-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-sm);
}

.results-question-text {
  font-size: clamp(1.25rem, 3.5vw, 2rem);
  font-weight: 700;
  margin: 0;
}

.results-answers {
  width: 100%;
  max-width: 900px;
  margin-top: var(--space-xl);
}

.results-answers-title {
  text-align: center;
  font-size: 1.35rem;
  margin-bottom: var(--space-md);
}

.results-answers-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  max-height: 45vh;
  overflow-y: auto;
  padding: 4px 0;
}

.results-answer-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px 14px;
  background: rgba(26, 26, 46, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.results-answer-item.is-correct {
  border-color: rgba(0, 230, 118, 0.5);
  background: rgba(0, 230, 118, 0.08);
}

.results-answer-item.is-incorrect {
  border-color: rgba(255, 82, 82, 0.5);
  background: rgba(255, 82, 82, 0.08);
}

.results-answer-avatar {
  width: clamp(44px, 6vw, 60px);
  height: clamp(44px, 6vw, 60px);
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  object-fit: cover;
  flex-shrink: 0;
}

.results-answer-info {
  min-width: 0;
  flex: 1;
}

.results-answer-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.results-answer-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-answer-time {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-success);
  flex-shrink: 0;
}

.results-answer-time.muted {
  color: var(--text-muted);
}

/* ===================================
   Phone Frame (Animated Neon Border)
   =================================== */
.phone-frame {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  border-radius: 40px;
  padding: 3px;
  background: linear-gradient(180deg, #00E5FF, #4C6FFF, #18FFC8, #FFE66D, #00E5FF);
  background-size: 100% 400%;
  animation: neon-border-flow 8s ease infinite, neon-glow-pulse 4s ease-in-out infinite;
}

.phone-content {
  background: rgba(15, 15, 30, 0.95);
  border-radius: 38px;
  padding: 30px 20px;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(10px);
}

/* Winner Styles */
.winner-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 30px;
  text-shadow: 0 0 20px rgba(255, 230, 109, 0.5);
}

.avatar-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.avatar-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 3px;
  background: var(--gradient-gold);
  box-shadow: 0 0 30px rgba(255, 230, 109, 0.3);
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  object-fit: cover;
}

.winner-name-lbl {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 25px;
}

.stats-row {
  display: flex;
  width: 100%;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.stats-row::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(255,255,255,0.1);
}

.stat-box {
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  display: block;
  line-height: 1;
}

.stat-num.points { color: var(--accent-gold); }
.stat-num.time { color: var(--accent-cyan); }

.stat-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-top: 5px;
  font-weight: 600;
}

.crown-quote {
  color: var(--accent-gold);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 25px;
}

/* Action Buttons */
.action-row {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
}

.btn-act {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--font-main);
}

.btn-whatsapp-rep {
  background: var(--accent-green);
  color: white;
}

.btn-save-rep {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
}

.btn-play-again {
  width: 100%;
  background: var(--gradient-pink);
  color: white;
  border: none;
  padding: 16px;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-glow-pink);
  font-family: var(--font-main);
}

/* Ranking Inset */
.ranking-inset {
  width: 100%;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 15px;
  margin-bottom: 20px;
}

.ranking-inset-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 12px;
  justify-content: center;
}

/* ===================================
   Messages / Feedback
   =================================== */
.coco-message {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-gold);
  text-align: center;
  padding: var(--space-md);
}

.feedback-icon {
  font-size: 5rem;
  margin-bottom: var(--space-lg);
}

.feedback-correct {
  animation: correct-bounce 0.5s ease;
  filter: drop-shadow(0 0 30px rgba(0, 230, 118, 0.8));
}

.feedback-incorrect {
  animation: shake 0.5s ease;
}

@keyframes correct-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.points-earned {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-success);
  margin: var(--space-lg) 0;
  text-shadow: 0 0 20px rgba(0, 230, 118, 0.5);
}

/* ===================================
   Question Preview
   =================================== */
.question-preview-list {
  max-height: 60vh;
  overflow-y: auto;
  padding: var(--space-md);
}

.question-preview-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.question-preview-number {
  font-weight: 700;
  color: var(--accent-pink);
  margin-bottom: var(--space-sm);
}

.question-preview-text {
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.question-preview-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.question-preview-option {
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.question-preview-option.correct {
  background: var(--color-success);
  color: #003300;
}

/* ===================================
   Loading Animation
   =================================== */
.loading-icon {
  font-size: 4rem;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* ===================================
   Waiting Room Specific
   =================================== */
.waiting-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.waiting-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.waiting-sidebar {
  width: 350px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  .waiting-layout {
    flex-direction: column;
  }
  .waiting-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* ===================================
   Container Sizes
   =================================== */
.container-narrow {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  padding: var(--space-lg);
}

/* ===================================
   Global Responsive Tweaks
   =================================== */
@media (min-width: 768px) {
  .container-narrow {
    max-width: 520px;
  }
}

@media (max-width: 1024px) {
  .question-container {
    padding: var(--space-lg);
    min-height: auto;
  }

  .options-display {
    gap: var(--space-md);
  }

  .option-card {
    padding: var(--space-lg);
    min-height: 80px;
  }

  .ranking-list {
    max-width: 100%;
  }

  .ranking-inset {
    padding: var(--space-md);
  }
}

@media (max-width: 900px) {
  .screen {
    overflow-y: auto;
  }
}

@media (max-width: 720px) {
  .screen {
    padding: var(--space-lg);
  }

  .card {
    padding: var(--space-lg);
  }

  .btn-lg {
    padding: var(--space-md) var(--space-lg);
    font-size: 1.05rem;
  }

  .options-display {
    grid-template-columns: 1fr;
  }

  .option-letter {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .ranking-item {
    flex-wrap: wrap;
  }

  .ranking-position {
    min-width: 32px;
  }

  .question-preview-options {
    grid-template-columns: 1fr;
  }

  .question-preview-item {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .screen {
    padding: var(--space-md);
  }

  .tagline {
    font-size: 1rem;
  }

  .timer {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .points-earned {
    font-size: 2rem;
  }

  .feedback-icon {
    font-size: 4rem;
  }

  .btn-play-again {
    padding: 14px;
    font-size: 1rem;
  }

  .action-row {
    flex-direction: column;
  }

  .stats-row {
    flex-direction: column;
    align-items: center;
  }

  .stats-row::after {
    display: none;
  }
}

@media (max-height: 720px) {
  .screen {
    overflow-y: auto;
  }

  .phone-content {
    min-height: auto;
    max-height: 85vh;
    overflow-y: auto;
  }

  .results-answers-list {
    max-height: 30vh;
  }
}
