*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0a0a0f;
  --bg-card: rgba(15, 15, 25, 0.92);
  --neon-cyan: #00fff2;
  --neon-magenta: #ff00aa;
  --neon-green: #00ff88;
  --neon-yellow: #ffcc00;
  --neon-red: #ff0044;
  --neon-orange: #ff6600;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-dim: #555570;
  --border-glow: rgba(0, 255, 242, 0.2);
  --font-display: 'Orbitron', monospace;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --arena-color: #00fff2;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#game-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Overlays */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background: rgba(5, 5, 12, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

.menu-content {
  text-align: center;
  animation: fadeSlideUp 0.6s ease forwards;
  max-width: 520px;
  width: 90%;
}

.logo-container {
  margin-bottom: 24px;
}

.game-logo {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 0 20px rgba(0, 255, 242, 0.5), 0 0 60px rgba(0, 255, 242, 0.3);
  line-height: 1;
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {

  0%,
  100% {
    text-shadow: 0 0 20px rgba(0, 255, 242, 0.5), 0 0 60px rgba(0, 255, 242, 0.3);
  }

  50% {
    text-shadow: 0 0 30px rgba(0, 255, 242, 0.7), 0 0 80px rgba(0, 255, 242, 0.4), 0 0 200px rgba(255, 0, 170, 0.1);
  }
}

.logo-accent {
  color: var(--neon-magenta);
  text-shadow: 0 0 20px rgba(255, 0, 170, 0.6), 0 0 60px rgba(255, 0, 170, 0.3);
}

.logo-io {
  font-size: 36px;
  color: var(--text-secondary);
  text-shadow: none;
}

.tagline {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 3px;
  margin-top: 8px;
  text-transform: uppercase;
}

.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 4px 14px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-green);
  letter-spacing: 2px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--neon-green);
  border-radius: 50%;
  animation: pulseDot 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px var(--neon-green);
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

/* Tournament Preview */
.tournament-preview {
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.tp-title {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.tp-levels {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.tp-level {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 3px;
  border: 1px solid;
  opacity: 0.7;
}

.tp-level:hover {
  opacity: 1;
}

/* Nickname */
.nickname-container {
  margin-bottom: 20px;
}

.nickname-input {
  display: block;
  margin: 0 auto;
  width: 320px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(0, 255, 242, 0.2);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  letter-spacing: 3px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  caret-color: var(--neon-cyan);
}

.nickname-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 242, 0.15);
}

.nickname-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 1px;
  font-size: 14px;
}

.nickname-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
  letter-spacing: 1px;
}

/* Buttons */
.btn-play {
  position: relative;
  display: inline-block;
  padding: 18px 56px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 255, 242, 0.15), rgba(255, 0, 170, 0.15));
  border: 2px solid var(--neon-cyan);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s;
  margin-bottom: 24px;
}

.btn-play:hover {
  background: linear-gradient(135deg, rgba(0, 255, 242, 0.3), rgba(255, 0, 170, 0.3));
  box-shadow: 0 0 30px rgba(0, 255, 242, 0.4);
  transform: translateY(-2px);
}

.btn-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 242, 0.15) 0%, transparent 50%);
  transform: translate(-50%, -50%);
  animation: pulseGlow 2s ease-in-out infinite;
}

.btn-respawn {
  animation: pulse 1.5s ease-in-out infinite;
}

.controls-hint {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.key-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
}

.key.wide {
  width: 70px;
  font-size: 10px;
}

.key-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 6px;
  letter-spacing: 2px;
}

.player-stats {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.8;
}

.player-stats .stat-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.player-stats .stat-value {
  color: var(--neon-cyan);
}

/* Arena Popup */
.arena-popup {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  pointer-events: none;
}

.arena-popup.hidden {
  display: none;
}

.arena-popup-inner {
  text-align: center;
  padding: 16px 40px;
  background: rgba(0, 0, 0, 0.92);
  border: 2px solid var(--arena-color);
  border-radius: 12px;
  animation: arenaPopIn 3s ease forwards;
}

.arena-popup-level {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--arena-color);
  letter-spacing: 4px;
  margin-bottom: 4px;
}

.arena-popup-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px var(--arena-color);
  letter-spacing: 3px;
}

.arena-popup-players {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 2px;
}

@keyframes arenaPopIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  10% {
    transform: scale(1.05);
    opacity: 1;
  }

  20% {
    transform: scale(1);
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Level Badge */
.level-badge {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: 8px 20px;
  background: rgba(10, 10, 20, 0.95);
  border: 1px solid var(--arena-color);
  border-radius: 8px;
  z-index: 51;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.level-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 3px;
}

.level-number {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--arena-color);
  text-shadow: 0 0 15px var(--arena-color);
}

.arena-name-hud {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 2px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Level Up */
.levelup-content {
  text-align: center;
  animation: victoryZoom 0.5s ease forwards;
}

.levelup-title {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 900;
  color: var(--neon-green);
  text-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
  letter-spacing: 6px;
  margin-bottom: 20px;
}

.levelup-from,
.levelup-to {
  font-family: var(--font-display);
  font-size: 32px;
  color: #fff;
}

.levelup-arrow {
  font-size: 28px;
  color: var(--neon-green);
  margin: 8px 0;
  animation: bounceDown 0.8s ease-in-out infinite;
}

@keyframes bounceDown {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

.levelup-arena {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--arena-color);
  margin-top: 16px;
  letter-spacing: 3px;
}

.levelup-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
  letter-spacing: 2px;
  animation: blink 1.5s ease-in-out infinite;
}

/* Champion */
.champion-content {
  text-align: center;
  animation: championIn 1s ease forwards;
}

.champion-title {
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 900;
  color: var(--neon-yellow);
  text-shadow: 0 0 40px rgba(255, 204, 0, 0.8), 0 0 100px rgba(255, 204, 0, 0.4);
  letter-spacing: 8px;
  margin-bottom: 20px;
  animation: championPulse 1.5s ease-in-out infinite;
}

@keyframes championPulse {

  0%,
  100% {
    transform: scale(1);
    text-shadow: 0 0 40px rgba(255, 204, 0, 0.8);
  }

  50% {
    transform: scale(1.05);
    text-shadow: 0 0 60px rgba(255, 204, 0, 1), 0 0 120px rgba(255, 204, 0, 0.5);
  }
}

@keyframes championIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.champion-name {
  font-family: var(--font-display);
  font-size: 36px;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.champion-subtitle {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--neon-yellow);
  letter-spacing: 3px;
}

/* Death */
.death-content {
  text-align: center;
  animation: shakeIn 0.4s ease forwards;
}

.death-title {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 900;
  color: var(--neon-red);
  text-shadow: 0 0 40px rgba(255, 0, 68, 0.5);
  letter-spacing: 8px;
  margin-bottom: 20px;
}

.killed-by {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.killed-by .killer-name {
  color: var(--neon-magenta);
  font-weight: 700;
}

.match-stats {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 2;
}

.match-stats .stat-highlight {
  color: var(--neon-yellow);
}

.death-reset-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--neon-red);
  letter-spacing: 2px;
  margin-bottom: 16px;
  animation: blink 1s ease-in-out infinite;
}

/* Victory */
.victory-content {
  text-align: center;
  animation: victoryZoom 0.5s ease forwards;
}

.victory-title {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 900;
  color: var(--neon-yellow);
  text-shadow: 0 0 40px rgba(255, 204, 0, 0.6), 0 0 100px rgba(255, 204, 0, 0.3);
  letter-spacing: 8px;
  margin-bottom: 20px;
}

.winner-name {
  font-family: var(--font-display);
  font-size: 32px;
  color: #fff;
  margin-bottom: 16px;
}

.auto-restart {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 2px;
  animation: blink 1s ease-in-out infinite;
}

/* HUD */
.hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  pointer-events: none;
}

.hud.hidden {
  display: none;
}

.hud-item {
  position: absolute;
  background: rgba(10, 10, 20, 0.95);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-icon {
  font-size: 18px;
}

.hud-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  min-width: 20px;
}

.hud-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.alive-counter {
  top: 60px;
  left: 20px;
}

.kill-counter {
  top: 112px;
  left: 20px;
}

.timer-display {
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  border-color: rgba(255, 204, 0, 0.3);
}

.timer-value {
  color: var(--neon-yellow) !important;
  font-size: 28px !important;
  min-width: 40px;
  text-align: center;
}

/* Active powerups */
.active-powerups {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.active-pu-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fff;
  border: 1px solid;
  animation: puIn 0.3s ease;
}

@keyframes puIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Dash CD */
.dash-cooldown-container {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 242, 0.12);
}

.dash-cooldown-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
  border-radius: 5px;
  transition: width 0.06s linear;
  box-shadow: 0 0 12px rgba(0, 255, 242, 0.4);
}

.dash-cooldown-text {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
  letter-spacing: 3px;
  white-space: nowrap;
}

/* Leaderboard */
.leaderboard {
  position: absolute;
  top: 60px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 200px;
  backdrop-filter: blur(8px);
}

.lb-title {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 3px;
  margin-bottom: 8px;
  text-align: center;
}

.lb-entries {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lb-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 0;
}

.lb-rank {
  color: var(--text-dim);
  width: 22px;
  font-size: 11px;
}

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

.lb-name {
  flex: 1;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-name.dead {
  color: var(--text-dim);
  text-decoration: line-through;
  opacity: 0.5;
}

.lb-name.bot::after {
  content: ' 🤖';
  font-size: 9px;
  opacity: 0.5;
}

.lb-kills {
  color: var(--neon-yellow);
  font-weight: 700;
  min-width: 14px;
  text-align: right;
}

.lb-streak {
  font-size: 9px;
  color: var(--neon-orange);
}

/* Minimap */
.minimap {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 160px;
  height: 160px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 255, 242, 0.15);
  border-radius: 8px;
}

/* Countdown / Waiting / Kill Feed */
.countdown-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 120px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 40px rgba(0, 255, 242, 0.8);
  animation: countdownPop 0.5s ease;
  z-index: 1000;
}

.countdown-display.hidden {
  display: none;
}

.waiting-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 6px;
  animation: blink 1.5s ease-in-out infinite;
}

.waiting-display.hidden {
  display: none;
}

.kill-feed {
  position: absolute;
  top: 120px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 280px;
}

.kill-feed-item {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(10, 10, 15, 0.85);
  padding: 5px 12px;
  border-radius: 4px;
  border-left: 2px solid var(--neon-red);
  animation: killFeedIn 0.3s ease forwards;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kill-feed-item .kf-killer {
  color: var(--neon-magenta);
}

.kill-feed-item .kf-victim {
  color: var(--neon-red);
}

.kill-feed-item.powerup-feed {
  border-left-color: var(--neon-green);
}

.multikill-display,
.streak-display {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 4px;
  animation: multikillPop 1.5s ease forwards;
}

.multikill-display {
  top: 35%;
  font-size: 36px;
  color: var(--neon-yellow);
  text-shadow: 0 0 30px rgba(255, 204, 0, 0.6);
}

.streak-display {
  top: 42%;
  font-size: 28px;
  color: var(--neon-orange);
  text-shadow: 0 0 30px rgba(255, 102, 0, 0.6);
}

.multikill-display.hidden,
.streak-display.hidden {
  display: none;
}

.powerup-toast {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  padding: 8px 24px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid;
  letter-spacing: 2px;
  animation: toastIn 2s ease forwards;
  white-space: nowrap;
}

.powerup-toast.hidden {
  display: none;
}

@keyframes toastIn {
  0% {
    transform: translateX(-50%) scale(0.5);
    opacity: 0;
  }

  15% {
    transform: translateX(-50%) scale(1.1);
    opacity: 1;
  }

  30% {
    transform: translateX(-50%) scale(1);
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

/* Mobile */
.mobile-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  z-index: 60;
  pointer-events: none;
}

.mobile-controls.hidden {
  display: none;
}

.joystick-zone {
  position: absolute;
  bottom: 40px;
  left: 40px;
  width: 140px;
  height: 140px;
  pointer-events: all;
  touch-action: none;
}

.joystick-base {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(0, 255, 242, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.joystick-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 242, 0.4), rgba(0, 255, 242, 0.1));
  border: 2px solid rgba(0, 255, 242, 0.5);
  position: absolute;
  transition: transform 0.05s ease;
}

.mobile-dash-btn {
  position: absolute;
  bottom: 60px;
  right: 40px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 0, 170, 0.3), rgba(255, 0, 170, 0.1));
  border: 2px solid rgba(255, 0, 170, 0.5);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  pointer-events: all;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Debug */
.debug-info {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-green);
  display: flex;
  gap: 16px;
  border-radius: 0 0 6px 6px;
}

.debug-info.hidden {
  display: none;
}

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

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

@keyframes pulseGlow {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

@keyframes shakeIn {
  0% {
    transform: translateX(-10px);
    opacity: 0;
  }

  20% {
    transform: translateX(8px);
  }

  40% {
    transform: translateX(-6px);
  }

  60% {
    transform: translateX(4px);
  }

  80% {
    transform: translateX(-2px);
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes victoryZoom {
  from {
    transform: scale(0.5);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes countdownPop {
  from {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }

  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

@keyframes killFeedIn {
  from {
    transform: translateX(20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes multikillPop {
  0% {
    transform: translateX(-50%) scale(0.5);
    opacity: 0;
  }

  20% {
    transform: translateX(-50%) scale(1.3);
    opacity: 1;
  }

  40% {
    transform: translateX(-50%) scale(1);
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(1);
  }
}

::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

@media(max-width:768px) {
  .game-logo {
    font-size: 42px;
  }

  .logo-io {
    font-size: 22px;
  }

  .nickname-input {
    width: 240px;
    font-size: 14px;
  }

  .btn-play {
    padding: 14px 36px;
    font-size: 16px;
  }

  .controls-hint {
    flex-direction: column;
    gap: 12px;
  }

  .leaderboard {
    min-width: 140px;
    font-size: 10px;
  }

  .minimap {
    width: 100px;
    height: 100px;
  }

  .level-badge {
    padding: 4px 10px;
  }

  .level-number {
    font-size: 18px;
  }

  .tournament-preview {
    display: none;
  }
}

/* ======================== FULLSCREEN BUTTON ======================== */
.fullscreen-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9999;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: rgba(10, 10, 20, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(0, 255, 242, 0.18);
  color: rgba(0, 255, 242, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.fullscreen-btn:hover {
  background: rgba(0, 255, 242, 0.1);
  border-color: rgba(0, 255, 242, 0.6);
  color: #00fff2;
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(0, 255, 242, 0.25), 0 2px 12px rgba(0, 0, 0, 0.5);
}

.fullscreen-btn:active {
  transform: scale(0.94);
}

.fs-icon {
  width: 20px;
  height: 20px;
  transition: opacity 0.15s;
}

.fs-icon.hidden {
  display: none;
}

/* Tooltip */
.fullscreen-btn::after {
  content: attr(title);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(10, 10, 20, 0.95);
  color: #00fff2;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 242, 0.2);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.18s;
}

.fullscreen-btn:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* On mobile make it slightly smaller */
@media (max-width: 600px) {
  .fullscreen-btn {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 10px;
    border-radius: 8px;
  }

  .fs-icon {
    width: 17px;
    height: 17px;
  }
}