/* ═══════════════════════════════════════════════════
   SUPERBUZZER 2 - TV SHOW AESTHETIC V2
   ═══════════════════════════════════════════════════ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  background: #000;
  color: #fff;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ── PORTRAIT OVERLAY ── */
#portrait-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #0d0d2b;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

#portrait-overlay .rotate-icon {
  font-size: 64px;
  animation: rotatePhone 2s ease-in-out infinite;
}

#portrait-overlay p {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 3px;
}

#portrait-overlay span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

@keyframes rotatePhone {

  0%,
  100% {
    transform: rotate(0)
  }

  25%,
  75% {
    transform: rotate(90deg)
  }
}

@media (orientation: portrait) {
  #portrait-overlay {
    display: flex !important;
  }

  .screen {
    display: none !important;
  }
}

/* ── SCREENS ── */
.screen {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.screen.active {
  display: flex;
}

/* ═══════════════════════════════════════════════════
   AUTH SCREEN
   ═══════════════════════════════════════════════════ */
#auth-screen {
  background: radial-gradient(ellipse at center, #0d0d2b 0%, #000 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.auth-container {
  text-align: center;
  max-width: 420px;
  width: 100%;
  padding: 0 20px;
}

.lobby-logo {
  margin-bottom: 10px;
}

.logo-text {
  font-family: 'Orbitron', monospace;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 5px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.4);
}

.logo-accent {
  color: #ffd700;
}

.logo-subtitle {
  font-family: 'Orbitron', monospace;
  font-size: 64px;
  font-weight: 900;
  color: #ff3333;
  text-shadow: 0 0 20px rgba(255, 51, 51, 0.8);
  margin-top: -10px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
}

.auth-tab:first-child {
  border-radius: 10px 0 0 10px;
}

.auth-tab:last-child {
  border-radius: 0 10px 10px 0;
}

.auth-tab.active {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-form input {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.3s;
}

.auth-form input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.auth-error {
  color: #ff6666;
  font-size: 13px;
  min-height: 18px;
  margin-top: 8px;
}

.btn-neon {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #000;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  transition: transform 0.15s;
}

.btn-neon:active {
  transform: scale(0.95);
}

.btn-neon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════
   ROOM SELECTION SCREEN
   ═══════════════════════════════════════════════════ */
#room-screen {
  background: radial-gradient(ellipse at center, #0d0d2b 0%, #000 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.room-container {
  text-align: center;
  max-width: 500px;
  width: 100%;
  padding: 0 20px;
}

.room-title {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 4px;
  margin-bottom: 20px;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.room-options {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

.room-card {
  flex: 1;
  padding: 20px 14px;
  border: 2px solid rgba(255, 215, 0, 0.2);
  border-radius: 14px;
  background: rgba(255, 215, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.room-card:hover,
.room-card:active {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.1);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
}

.room-card-icon {
  font-size: 36px;
}

.room-card-title {
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 1px;
}

.room-card-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

.room-card-private {
  border-color: rgba(100, 150, 255, 0.2);
  background: rgba(100, 150, 255, 0.04);
}

.room-card-private:hover,
.room-card-private:active {
  border-color: rgba(100, 150, 255, 0.5);
  background: rgba(100, 150, 255, 0.1);
  box-shadow: 0 0 20px rgba(100, 150, 255, 0.15);
}

.room-card-private .room-card-title {
  color: #7faaff;
}

.room-join-section {
  margin-top: 4px;
}

.room-join-label {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.room-join-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

#join-code-input {
  width: 100px;
  text-align: center;
  font-family: 'Orbitron', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 6px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  color: #ffd700;
  outline: none;
}

#join-code-input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

#join-code-input::placeholder {
  color: rgba(255, 215, 0, 0.2);
  letter-spacing: 2px;
  font-size: 14px;
}

.btn-join {
  padding: 10px 20px;
  font-size: 11px;
}

.room-code-display {
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.room-code-display span {
  font-size: 22px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 4px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ═══════════════════════════════════════════════════
   LOBBY SCREEN
   ═══════════════════════════════════════════════════ */
#lobby-screen {
  background: radial-gradient(ellipse at center, #0d0d2b 0%, #000 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
}

.lobby-back-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  width: auto;
  padding: 0 12px;
  border-radius: 8px;
}

.lobby-container {
  text-align: center;
  max-width: 500px;
  width: 100%;
  padding: 0 20px;
}

.lobby-title {
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 4px;
  margin-bottom: 12px;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.lobby-theme-section {
  margin-bottom: 16px;
}

.theme-label {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

#theme-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.3s;
  text-align: center;
}

#theme-input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

#theme-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.difficulty-selector {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.diff-btn {
  flex: 1;
  padding: 9px 6px;
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.4);
}

.diff-btn.active {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 215, 0, 0.12);
  color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
}

.diff-btn:active {
  transform: scale(0.95);
}

.lobby-players {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 8px 0;
}

.lobby-player-chip {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #ffd700;
}

.lobby-message {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  min-height: 18px;
  margin-bottom: 10px;
}

.btn-start {
  width: 100%;
  padding: 14px;
  font-size: 14px;
}

.btn-reset {
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 20px;
  border: 2px solid rgba(255, 80, 80, 0.4);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 50, 50, 0.12);
  color: #ff6666;
  margin-top: 10px;
  transition: all 0.2s;
}

.btn-reset:active {
  background: rgba(255, 50, 50, 0.3);
  transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════
   GAME SCREEN
   ═══════════════════════════════════════════════════ */
#game-screen {
  background: radial-gradient(ellipse at 50% 30%, #0a0a30 0%, #000 100%);
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ── LIGHT BEAMS ── */
.light-beams {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.beam {
  position: absolute;
  top: -50%;
  width: 2px;
  height: 200%;
  background: linear-gradient(180deg, transparent, rgba(255, 215, 0, 0.08), transparent);
  animation: beamSweep 8s ease-in-out infinite;
}

.beam-1 {
  left: 10%;
  animation-delay: 0s;
  width: 3px
}

.beam-2 {
  left: 30%;
  animation-delay: 1.5s;
  width: 2px
}

.beam-3 {
  left: 50%;
  animation-delay: 3s;
  width: 4px
}

.beam-4 {
  left: 70%;
  animation-delay: 4.5s;
  width: 2px
}

.beam-5 {
  left: 90%;
  animation-delay: 6s;
  width: 3px
}

@keyframes beamSweep {

  0%,
  100% {
    transform: rotate(-15deg) translateX(-20px);
    opacity: .05
  }

  50% {
    transform: rotate(15deg) translateX(20px);
    opacity: .12
  }
}

/* ── ROUND ANNOUNCE ── */
.round-announce {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  animation: fadeInScale .5s ease-out;
}

.round-announce.hidden {
  display: none;
}

.round-title {
  font-family: 'Orbitron', monospace;
  font-size: 34px;
  font-weight: 900;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 5px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.3);
  margin-bottom: 8px;
}

.round-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 3px;
  text-transform: uppercase;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(1.2)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

/* ── QUESTION BAR ── */
.question-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(13, 13, 43, 0.95), rgba(0, 0, 0, 0.8));
  border-bottom: 2px solid rgba(255, 215, 0, 0.2);
  min-height: 50px;
  flex-shrink: 0;
}

.btn-quit {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 80, 80, 0.4);
  background: rgba(255, 50, 50, 0.15);
  color: #ff6666;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-counter {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.question-text {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  min-height: 22px;
}

.theme-badge {
  font-family: 'Orbitron', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.answer-timer {
  flex-shrink: 0;
}

.answer-timer.hidden {
  display: none;
}

.timer-digit {
  font-family: 'Orbitron', monospace;
  font-size: 26px;
  font-weight: 900;
  color: #ff3333;
  text-shadow: 0 0 15px rgba(255, 51, 51, 0.8);
  animation: timerPulse 1s infinite;
}

@keyframes timerPulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .6
  }
}

/* ═══════════════════════════════════════════════════
   BUZZER AREA (centered above podiums)
   ═══════════════════════════════════════════════════ */
.buzzer-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
  min-height: 0;
}

.mega-buzzer {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
  background: radial-gradient(circle at 35% 35%, #ff6666, #cc0000, #880000);
  box-shadow: 0 8px 0 #660000, 0 0 30px rgba(255, 0, 0, 0.4), 0 0 60px rgba(255, 0, 0, 0.2),
    inset 0 -4px 8px rgba(0, 0, 0, 0.3), inset 0 4px 8px rgba(255, 255, 255, 0.15);
  animation: buzzerPulse 2s ease-in-out infinite;
  transition: transform .1s, box-shadow .1s;
}

.mega-buzzer:disabled {
  opacity: 0.4;
  animation: none;
  cursor: not-allowed;
}

.mega-buzzer:active:not(:disabled) {
  transform: scale(0.9) translateY(4px);
  box-shadow: 0 2px 0 #660000, 0 0 20px rgba(255, 0, 0, 0.6), inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.buzzer-inner {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.3), transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.buzzer-text {
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

@keyframes buzzerPulse {

  0%,
  100% {
    box-shadow: 0 8px 0 #660000, 0 0 30px rgba(255, 0, 0, .4), 0 0 60px rgba(255, 0, 0, .2), inset 0 -4px 8px rgba(0, 0, 0, .3), inset 0 4px 8px rgba(255, 255, 255, .15)
  }

  50% {
    box-shadow: 0 8px 0 #660000, 0 0 45px rgba(255, 0, 0, .6), 0 0 90px rgba(255, 0, 0, .3), inset 0 -4px 8px rgba(0, 0, 0, .3), inset 0 4px 8px rgba(255, 255, 255, .15)
  }
}

.buzz-status {
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-height: 14px;
  margin-top: 6px;
}

/* ═══════════════════════════════════════════════════
   PODIUMS ROW (6 aligned horizontally at bottom)
   ═══════════════════════════════════════════════════ */
.podiums-row {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 0 10px 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  gap: 4px;
}

.podium {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.6s ease;
  position: relative;
  flex: 1;
  max-width: 130px;
}

.podium.eliminated {
  opacity: 0.15;
  transform: translateY(20px) scale(0.85);
  pointer-events: none;
}

.podium.podium-hidden {
  display: none;
}

.podium.buzzing .avatar {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4);
  border-color: #ffd700;
}

.podium.correct .avatar {
  box-shadow: 0 0 20px rgba(0, 255, 100, 0.8), 0 0 40px rgba(0, 255, 100, 0.4);
  border-color: #00ff64;
}

.podium.wrong .avatar {
  box-shadow: 0 0 20px rgba(255, 50, 50, 0.8), 0 0 40px rgba(255, 50, 50, 0.4);
  border-color: #ff3232;
}

/* Speech bubble */
.speech-bubble {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  max-width: 120px;
  word-wrap: break-word;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  z-index: 20;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(255, 255, 255, 0.95);
}

.speech-bubble.hidden {
  display: none;
}

/* Avatar */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a4e, #2a2a6e);
  border: 3px solid rgba(100, 150, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(100, 150, 255, 0.3);
  transition: all .3s ease;
  flex-shrink: 0;
}

.avatar-letter {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

/* Podium Stand */
.podium-stand {
  width: 100%;
  text-align: center;
  background: linear-gradient(180deg, #1a2a5e, #0d1540);
  border: 1px solid rgba(100, 150, 255, 0.2);
  border-radius: 6px;
  padding: 3px 4px;
  margin-top: 2px;
  clip-path: polygon(8% 0%, 92% 0%, 100% 100%, 0% 100%);
}

.player-name {
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-display {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

/* HP Bar */
.hp-bar-container {
  width: 90%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 2px;
}

.hp-bar-container.hidden {
  display: none;
}

.hp-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff3333, #ff6600, #00ff64);
  border-radius: 3px;
  transition: width .5s ease;
}

/* ═══════════════════════════════════════════════════
   CUSTOM KEYBOARD
   ═══════════════════════════════════════════════════ */
.keyboard-zone {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95), rgba(13, 13, 43, 0.9));
  border-top: 1px solid rgba(255, 215, 0, 0.15);
  padding: 4px 8px 6px;
}

.keyboard-zone.hidden {
  display: none;
}

.keyboard-display {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 6px;
  padding: 4px 12px;
  margin-bottom: 4px;
  min-height: 28px;
}

.keyboard-input-text {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
}

.keyboard-cursor {
  color: #ffd700;
  font-weight: 300;
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0
  }
}

.keyboard-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
}

.key {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(60, 60, 80, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 0;
  cursor: pointer;
  transition: all .1s;
  touch-action: manipulation;
}

.key:active {
  background: rgba(80, 120, 255, 0.4);
  border-color: rgba(80, 120, 255, 0.6);
  box-shadow: 0 0 10px rgba(80, 120, 255, 0.4);
  transform: scale(0.95);
}

.key-space {
  grid-column: span 2;
  font-size: 10px;
  letter-spacing: 2px;
}

.key-backspace {
  background: rgba(255, 140, 0, 0.3);
  border-color: rgba(255, 140, 0, 0.3);
  font-size: 16px;
}

.key-backspace:active {
  background: rgba(255, 140, 0, 0.6);
}

.key-validate {
  grid-column: span 2;
  background: rgba(0, 255, 100, 0.2);
  border-color: rgba(0, 255, 100, 0.3);
  color: #00ff64;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 255, 100, 0.4);
}

.key-validate:active {
  background: rgba(0, 255, 100, 0.5);
}

/* ═══════════════════════════════════════════════════
   END SCREEN
   ═══════════════════════════════════════════════════ */
#end-screen {
  background: radial-gradient(ellipse at center, #0d0d2b 0%, #000 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.end-container {
  text-align: center;
}

.trophy {
  font-size: 70px;
  animation: trophyBounce 1.5s ease-in-out infinite;
}

@keyframes trophyBounce {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-12px)
  }
}

.winner-name {
  font-family: 'Orbitron', monospace;
  font-size: 32px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.winner-label {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ── UTILITIES ── */
.hidden {
  display: none !important;
}

.score-flash {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 900;
  pointer-events: none;
  animation: scoreFloat 1.5s ease-out forwards;
  z-index: 50;
}

.score-flash.positive {
  color: #00ff64;
  text-shadow: 0 0 10px rgba(0, 255, 100, 0.6);
}

.score-flash.negative {
  color: #ff3333;
  text-shadow: 0 0 10px rgba(255, 51, 51, 0.6);
}

@keyframes scoreFloat {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-35px)
  }
}

@keyframes damageShake {

  0%,
  100% {
    transform: translateX(0)
  }

  25% {
    transform: translateX(-5px)
  }

  75% {
    transform: translateX(5px)
  }
}

.damage-shake {
  animation: damageShake .3s ease-in-out 3;
}

/* Final mode: center 2 players on bigger podiums */
.podiums-row.final-mode {
  justify-content: center;
  gap: 40px;
}

.podiums-row.final-mode .podium {
  max-width: 160px;
}

.podiums-row.final-mode .avatar {
  width: 60px;
  height: 60px;
}

.podiums-row.final-mode .avatar-letter {
  font-size: 24px;
}

.podiums-row.final-mode .digital-display {
  font-size: 22px;
}