:root {
  /* Paleta "La Guarida del Dragón" */
  --emerald-deep: #0F382C;
  --emerald-mid: #134E3F;
  --mint: #34D399;
  --salvia: #10B981;
  --lilac-soft: #C4B5FD;
  --lavender: #8B5CF6;
  --purple-night: #1E1B4B;
  --purple-deep: #2E1065;
  --bone-white: #F8FAFC;
  --gold: #FBBF24;
  --gold-glow: #F59E0B;
  --danger-crimson: #EF4444;
  --surface-glass: rgba(30, 27, 75, 0.75);
  --surface-glass-border: rgba(196, 181, 253, 0.2);
  --font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: radial-gradient(circle at 50% 20%, var(--purple-deep) 0%, #0d0b21 60%, #06050e 100%);
  color: var(--bone-white);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Glassmorphism Cards */
.dragon-card {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-glass-border);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(139, 92, 246, 0.15);
}

/* Dragon Emblems and Badges */
.dragon-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--mint);
  color: var(--mint);
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Large Code Display */
.giant-room-code {
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-shadow: 0 0 25px rgba(251, 191, 36, 0.6), 0 4px 10px rgba(0, 0, 0, 0.8);
  font-family: 'Courier New', Courier, monospace;
}

/* Action Buttons */
.btn-dragon-primary {
  background: linear-gradient(135deg, var(--salvia) 0%, #059669 100%);
  color: #064e3b;
  color: #ffffff;
  font-weight: 800;
  border: none;
  border-radius: 16px;
  padding: 18px 32px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
}

.btn-dragon-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 30px rgba(16, 185, 129, 0.5);
  filter: brightness(1.1);
}

.btn-dragon-primary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-dragon-secondary {
  background: linear-gradient(135deg, var(--lavender) 0%, #6d28d9 100%);
  color: var(--bone-white);
  font-weight: 700;
  border: none;
  border-radius: 16px;
  padding: 16px 28px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
  text-decoration: none;
}

.btn-dragon-secondary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Player Controller Buttons */
.mobile-touch-pad {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  border: none;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--bone-white);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s, filter 0.1s;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  user-select: none;
}

.mobile-touch-pad:active {
  transform: scale(0.96);
  filter: brightness(1.25);
}

/* Options Color Coding */
.option-btn-a { background: linear-gradient(135deg, #10B981, #047857); }
.option-btn-b { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.option-btn-c { background: linear-gradient(135deg, #F59E0B, #D97706); }
.option-btn-d { background: linear-gradient(135deg, #EF4444, #B91C1C); }

/* Animated Timer Bar & Circle */
.timer-container {
  position: relative;
  width: 90px;
  height: 90px;
}

.timer-svg {
  transform: rotate(-90deg);
  width: 90px;
  height: 90px;
}

.timer-circle-bg {
  fill: none;
  stroke: rgba(196, 181, 253, 0.15);
  stroke-width: 8;
}

.timer-circle-progress {
  fill: none;
  stroke: var(--gold);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
}

/* Player Avatar Badges */
.player-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(30, 27, 75, 0.85);
  border: 1px solid var(--lilac-soft);
  border-radius: 9999px;
  font-size: 1.15rem;
  font-weight: 700;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-avatar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--purple-deep);
  border: 2px solid var(--mint);
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* TV Podium */
.podium-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.podium-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 180px;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  text-align: center;
}

.podium-1 {
  height: 280px;
  background: linear-gradient(180deg, var(--gold) 0%, #b45309 100%);
  color: #1a1001;
  order: 2;
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.4);
}

.podium-2 {
  height: 220px;
  background: linear-gradient(180deg, #94A3B8 0%, #475569 100%);
  color: #0f172a;
  order: 1;
}

.podium-3 {
  height: 170px;
  background: linear-gradient(180deg, #D97706 0%, #78350F 100%);
  color: #fff;
  order: 3;
}
