body {
  margin: 0;
  overflow: hidden;
  font-family: 'Exo 2', sans-serif;
  background: #000;
}

/* === ROOT VARIABLES === */
:root {
  --accent-cyan: #00e5ff;
  --accent-blue: #2979ff;
  --accent-red: #ff1744;
  --accent-green: #00e676;
  --accent-orange: #ff9100;
  --accent-purple: #d500f9;
  --bg-dark: rgba(8, 12, 20, 0.85);
  --bg-panel: rgba(10, 18, 30, 0.9);
  --border-glow: rgba(0, 200, 255, 0.4);
  --glass-blur: blur(12px);
}

#gameContainer {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#ui-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: white;
}

/* === STATUS PANEL - Modern Glass Design === */
#status-panel {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-container {
  margin-bottom: 16px;
}

.class-indicator {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#player-class-display {
  display: flex;
  align-items: center;
  gap: 12px;
}

#class-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px currentColor);
}

#class-name-display {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

/* Class-specific colors */
#player-class-display.soldier #class-name-display {
  color: #5588ff;
}
#player-class-display.medic #class-name-display {
  color: #00e676;
}
#player-class-display.scout #class-name-display {
  color: #ffea00;
}
#player-class-display.heavy #class-name-display {
  color: #ff5252;
}
#player-class-display.assassin #class-name-display {
  color: #d500f9;
}
#player-class-display.engineer #class-name-display {
  color: #ff9100;
}

.weapon-container {
  margin-top: 8px;
}

.status-label {
  font-size: 11px;
  margin-bottom: 6px;
  font-weight: 600;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.bar-container {
  position: relative;
  width: 200px;
  height: 8px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.05);
}

.stamina-bar-container {
  height: 6px;
  margin-top: 8px;
}

.bar {
  height: 100%;
  transition: width 0.2s ease-out;
  border-radius: 4px;
}

#health-bar {
  background: linear-gradient(90deg, #ff1744, #ff5252, #ff1744);
  box-shadow: 0 0 12px rgba(255, 23, 68, 0.5);
}

#stamina-bar {
  background: linear-gradient(90deg, #00c853, #69f0ae, #00c853);
  box-shadow: 0 0 8px rgba(0, 200, 83, 0.4);
  transition: width 0.1s linear;
}

#health-text {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

#weapon-display {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

#weapon-image-container {
  position: relative;
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#weapon-image {
  max-width: 100%;
  max-height: 100%;
  filter: brightness(1.1) drop-shadow(0 0 4px rgba(0, 200, 255, 0.3));
  transition: transform 0.2s ease;
}

#weapon-image:hover {
  transform: scale(1.08);
}

#weapon-info {
  text-align: left;
}

#weapon-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

#ammo-counter {
  font-size: 24px;
  font-weight: 900;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 2px;
  color: var(--accent-cyan);
}

/* === CROSSHAIR - Minimal & Clean === */
#crosshair {
  position: absolute;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 100;
}

#crosshair::before,
#crosshair::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 6px var(--accent-cyan);
}

#crosshair::before {
  width: 2px;
  height: 24px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

#crosshair::after {
  width: 24px;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

/* Center dot */
#crosshair .dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-cyan);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* Low health pulse animation */
@keyframes healthPulse {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(255, 23, 68, 0.5);
  }
  50% {
    box-shadow: 0 0 24px rgba(255, 23, 68, 0.9);
  }
}

#health-bar.low-health {
  animation: healthPulse 0.8s ease-in-out infinite;
}

#instructions {
  position: absolute;
  top: 20px;
  right: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  padding: 16px 20px;
  border-radius: 12px;
  user-select: none;
  z-index: 100;
  text-align: right;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* === MINIMAP - Sleek Radar Design === */
#minimap-container {
  position: absolute;
  bottom: 24px;
  left: 24px;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#minimap {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid rgba(0, 200, 255, 0.3);
  overflow: hidden;
  background: radial-gradient(
    circle,
    rgba(0, 40, 60, 0.8) 0%,
    rgba(0, 15, 25, 0.95) 100%
  );
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(0, 200, 255, 0.15);
  margin-top: 8px;
}

#pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 200, 255, 0.6);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  transition:
    width 0.05s linear,
    height 0.05s linear,
    opacity 0.3s ease-out;
  opacity: 0.7;
}

#minimap-canvas {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

#player-indicator {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid var(--accent-cyan);
  transform-origin: 50% 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 4px var(--accent-cyan));
  pointer-events: none;
  z-index: 3;
}

/* === WELCOME SCREEN - Cinematic Entry === */
#welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(5, 10, 20, 0.98) 0%,
    rgba(10, 20, 35, 0.98) 100%
  );
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.welcome-content {
  width: 480px;
  padding: 48px;
  background: linear-gradient(
    180deg,
    rgba(15, 25, 40, 0.95) 0%,
    rgba(8, 15, 25, 0.98) 100%
  );
  border-radius: 24px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: white;
}

.welcome-content h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 42px;
  font-weight: 900;
  margin: 0;
  letter-spacing: 6px;
  background: linear-gradient(135deg, #00e5ff 0%, #2979ff 50%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  filter: drop-shadow(0 0 20px rgba(0, 200, 255, 0.4));
}

.welcome-content h2 {
  font-family: 'Exo 2', sans-serif;
  font-size: 18px;
  font-weight: 400;
  margin: 12px 0 36px;
  color: rgba(255, 100, 100, 0.9);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.welcome-form {
  margin: 36px 0;
}

.input-group {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-group label {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  text-transform: uppercase;
}

.input-group input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(0, 20, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-family: 'Exo 2', sans-serif;
  font-size: 16px;
  outline: none;
  transition: all 0.25s ease;
  text-align: center;
  box-sizing: border-box;
}

.input-group input:focus {
  background: rgba(0, 30, 50, 0.8);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

#join-game-btn {
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(
    135deg,
    var(--accent-cyan) 0%,
    var(--accent-blue) 100%
  );
  border: none;
  border-radius: 12px;
  color: white;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 200, 255, 0.3);
  text-transform: uppercase;
}

#join-game-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 200, 255, 0.5);
  filter: brightness(1.1);
}

#join-game-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 200, 255, 0.3);
}

.game-description {
  margin-top: 32px;
  font-family: 'Exo 2', sans-serif;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  line-height: 1.8;
  font-style: italic;
}

.game-description p {
  margin: 4px 0;
}

/* Animation for invalid input shake */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  50% {
    transform: translateX(10px);
  }
  75% {
    transform: translateX(-5px);
  }
}

.shake {
  animation: shake 0.5s ease-in-out;
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 15px rgba(255, 50, 50, 0.5) !important;
}

/* === CLASS SELECTION SCREEN === */
#class-selection-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(5, 10, 20, 0.98) 0%,
    rgba(10, 20, 35, 0.98) 100%
  );
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.class-selection-content {
  width: 95%;
  max-width: 1100px;
  max-height: 90vh;
  padding: 32px 40px;
  background: linear-gradient(
    180deg,
    rgba(15, 25, 40, 0.95) 0%,
    rgba(8, 15, 25, 0.98) 100%
  );
  border-radius: 24px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: white;
  overflow-y: auto;
}

.class-selection-content h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 900;
  margin: 0;
  letter-spacing: 5px;
  background: linear-gradient(135deg, #00e5ff 0%, #2979ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
}

.class-selection-content h2 {
  font-family: 'Exo 2', sans-serif;
  font-size: 16px;
  font-weight: 400;
  margin: 8px 0 24px;
  color: var(--accent-green);
  letter-spacing: 2px;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

@media (max-width: 900px) {
  .class-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .class-grid {
    grid-template-columns: 1fr;
  }
}

.class-card {
  background: rgba(15, 25, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.class-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-cyan),
    transparent
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

.class-card:hover {
  border-color: rgba(0, 200, 255, 0.3);
  transform: translateY(-4px);
  background: rgba(20, 35, 55, 0.9);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.class-card:hover::before {
  opacity: 1;
}

.class-card.selected {
  border-color: var(--accent-green);
  box-shadow:
    0 0 0 2px rgba(0, 230, 118, 0.3),
    0 12px 40px rgba(0, 230, 118, 0.15);
  background: rgba(15, 40, 35, 0.9);
}

.class-card.selected::before {
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-green),
    transparent
  );
  opacity: 1;
}

.class-icon {
  font-size: 40px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.class-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.class-card.selected .class-name {
  color: var(--accent-green);
}

.class-description {
  font-family: 'Exo 2', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
  min-height: 32px;
  line-height: 1.5;
}

.class-stats {
  width: 100%;
  margin-bottom: 12px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: 'Exo 2', sans-serif;
  font-size: 11px;
}

.stat-row span {
  width: 60px;
  text-align: left;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-bar {
  flex: 1;
  height: 6px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  overflow: hidden;
  margin-left: 10px;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.class-card[data-class='soldier'] .stat-fill {
  background: linear-gradient(90deg, #4488ff, #66aaff);
}
.class-card[data-class='medic'] .stat-fill {
  background: linear-gradient(90deg, #44cc77, #66eebb);
}
.class-card[data-class='scout'] .stat-fill {
  background: linear-gradient(90deg, #eebb44, #ffdd66);
}
.class-card[data-class='heavy'] .stat-fill {
  background: linear-gradient(90deg, #ff5555, #ff7777);
}
.class-card[data-class='assassin'] .stat-fill {
  background: linear-gradient(90deg, #aa55dd, #cc77ff);
}
.class-card[data-class='engineer'] .stat-fill {
  background: linear-gradient(90deg, #ff8844, #ffaa66);
}

.class-abilities {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  margin-top: 4px;
}

.ability {
  font-family: 'Exo 2', sans-serif;
  font-size: 10px;
  color: var(--accent-green);
  padding: 5px 10px;
  margin: 4px 0;
  background: rgba(0, 230, 118, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(0, 230, 118, 0.15);
  letter-spacing: 0.5px;
}

#confirm-class-btn {
  padding: 16px 48px;
  background: rgba(60, 60, 70, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  cursor: not-allowed;
  transition: all 0.25s ease;
  margin-top: 16px;
  text-transform: uppercase;
}

#confirm-class-btn:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-green), #00cc88);
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 230, 118, 0.3);
  border-color: rgba(0, 230, 118, 0.5);
}

#confirm-class-btn:not(:disabled):hover {
  background: linear-gradient(135deg, #00ff99, var(--accent-green));
  box-shadow: 0 12px 40px rgba(0, 230, 118, 0.4);
  transform: translateY(-2px);
}

#confirm-class-btn:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: 0 4px 16px rgba(0, 230, 118, 0.3);
}

/* === LOADING SCREEN === */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(5, 10, 20, 0.98) 0%,
    rgba(10, 20, 35, 0.98) 100%
  );
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.loading-content {
  width: 420px;
  padding: 48px 40px;
  background: var(--bg-panel);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: white;
}

.loading-content h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 32px;
  font-weight: 900;
  margin: 0 0 32px 0;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #00e5ff 0%, #2979ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
}

.loading-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

#loading-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

#loading-text {
  font-family: 'Exo 2', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 2px;
  text-transform: uppercase;
}

@keyframes pulse-text {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

#loading-text {
  animation: pulse-text 2s infinite;
}

/* === SCORE PANEL === */
#score-panel {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 24px;
  backdrop-filter: var(--glass-blur);
  min-width: 180px;
  font-family: 'Orbitron', sans-serif;
  z-index: 10;
  text-align: center;
}

.score-text {
  color: rgba(255, 255, 255, 0.7);
  margin: 4px 0;
  font-size: 13px;
  letter-spacing: 1px;
}

#score-display {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-cyan);
}

#kill-counter {
  font-size: 12px;
  color: rgba(200, 255, 200, 0.9);
}

/* Animation for scoring points */
@keyframes score-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
    color: rgba(255, 255, 0, 1);
  }
  100% {
    transform: scale(1);
  }
}

.score-pulse {
  animation: score-pulse 0.5s ease-out;
}

/* === GAME OVER SCREEN === */
#game-over-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(30, 5, 10, 0.98) 0%,
    rgba(50, 10, 15, 0.98) 100%
  );
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
}

.game-over-content {
  width: 420px;
  padding: 48px 40px;
  background: linear-gradient(
    180deg,
    rgba(40, 15, 20, 0.95) 0%,
    rgba(25, 8, 12, 0.98) 100%
  );
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 50, 50, 0.15);
  text-align: center;
  color: white;
}

.game-over-content h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 36px;
  font-weight: 900;
  margin: 0;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #ff4444 0%, #ff6666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  animation: pulse 2s infinite;
}

.game-over-content h2 {
  font-family: 'Exo 2', sans-serif;
  font-size: 18px;
  font-weight: 400;
  margin: 8px 0 20px;
  color: rgba(255, 150, 150, 0.8);
  letter-spacing: 2px;
}

.final-class-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#final-class-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

#final-class-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.stats-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0;
}

.stat-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  font-family: 'Exo 2', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-red);
}

#restart-game-btn {
  padding: 16px 32px;
  background: linear-gradient(135deg, #ff4444, #cc3333);
  border: none;
  border-radius: 12px;
  color: white;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 32px rgba(255, 50, 50, 0.3);
  width: 100%;
  margin-top: 16px;
  text-transform: uppercase;
}

#restart-game-btn:hover {
  background: linear-gradient(135deg, #ff5555, #dd4444);
  box-shadow: 0 12px 40px rgba(255, 70, 70, 0.4);
  transform: translateY(-2px);
}

#restart-game-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 16px rgba(255, 50, 50, 0.3);
}

/* === WAVE PANEL === */
#wave-panel {
  position: absolute;
  top: 20px;
  right: 50%;
  transform: translateX(50%);
  margin-top: 60px;
  background-color: rgba(0, 20, 40, 0.6);
  backdrop-filter: blur(8px);
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  backdrop-filter: var(--glass-blur);
}

.wave-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  color: var(--accent-cyan);
  margin: 4px 0;
  letter-spacing: 2px;
}

#wave-display {
  font-weight: 700;
  font-size: 18px;
}

#wave-countdown {
  color: var(--accent-yellow);
}

@keyframes wave-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.wave-start {
  animation: wave-pulse 0.5s ease;
}

/* === PLAYER NAMETAGS === */
.player-nametag {
  background: rgba(10, 15, 25, 0.85);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'Exo 2', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(-10px);
  transition: opacity 0.3s;
}

.player-nametag.local {
  background: rgba(0, 60, 100, 0.85);
  border-color: rgba(0, 200, 255, 0.3);
}

.player-nametag.remote {
  background: rgba(20, 30, 50, 0.85);
}

/* === INVENTORY === */
#inventory-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  pointer-events: all;
  backdrop-filter: blur(8px);
}

.inventory-content {
  width: 80%;
  max-width: 900px;
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 28px;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.inventory-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  background: linear-gradient(135deg, #00e5ff 0%, #2979ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.inventory-container {
  display: flex;
  justify-content: center;
}

.inventory-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.inventory-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.inventory-slot {
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.inventory-slot:hover {
  border-color: rgba(0, 200, 255, 0.4);
  background: rgba(0, 50, 80, 0.4);
  transform: scale(1.05);
}

.inventory-slot.selected {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.3);
}

.inventory-slot img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.inventory-details {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#item-preview {
  width: 300px;
  height: 300px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#item-preview img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

#item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px;
}

#item-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

#item-description {
  font-family: 'Exo 2', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-height: 180px;
  overflow-y: auto;
  padding-right: 10px;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .inventory-details {
    flex-direction: column;
    align-items: center;
  }

  #item-preview {
    width: 250px;
    height: 250px;
  }

  .inventory-row {
    flex-wrap: wrap;
  }

  .inventory-slot {
    width: 48px;
    height: 48px;
  }
}
