* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background-color: #05050d;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

.arcade-cabinet {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 640px;
  background: #0d0f1a;
  border: 4px solid #1a1e36;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.15), 0 0 100px rgba(255, 0, 128, 0.1);
  padding: 12px;
  position: relative;
}

.game-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 10px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-box .label {
  color: #7b88a8;
}

.stat-box .value {
  color: #00f0ff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
}

.lives-box {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 14px;
}

.life-ship {
  width: 16px;
  height: 12px;
  filter: drop-shadow(0 0 4px #00f0ff);
}

.canvas-container {
  position: relative;
  width: 100%;
  aspect-ratio: 600 / 720;
  max-height: 72vh;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9);
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Scanline effect */
.canvas-container::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  opacity: 0.7;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 13, 0.88);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  text-align: center;
  z-index: 10;
  gap: 16px;
}

.overlay.hidden {
  display: none;
}

.glow-title {
  font-size: 24px;
  line-height: 1.4;
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff;
}

.neon-pink {
  color: #ff007f;
  text-shadow: 0 0 10px #ff007f, 0 0 20px #ff007f;
}

.neon-green {
  color: #00ff66;
  text-shadow: 0 0 10px #00ff66;
}

.neon-yellow {
  color: #ffd700;
  text-shadow: 0 0 10px #ffd700;
}

.neon-cyan {
  color: #00f0ff;
}

.text-red {
  color: #ff3344;
  text-shadow: 0 0 15px #ff3344;
}

.subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  color: #a0aec0;
  letter-spacing: 2px;
}

.table-scores {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 11px;
  margin: 12px 0;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.alien-svg {
  filter: drop-shadow(0 0 5px currentColor);
}

.btn-retro {
  font-family: 'Press Start 2P', monospace;
  background: linear-gradient(180deg, #ff007f 0%, #aa0055 100%);
  color: #fff;
  border: 2px solid #ff66b2;
  padding: 14px 28px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.5);
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-retro:active {
  transform: scale(0.96);
  box-shadow: 0 0 5px rgba(255, 0, 127, 0.8);
}

.controls-hint {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: #718096;
  line-height: 1.5;
}

.mobile-controls {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px 4px 4px;
  gap: 16px;
}

.d-pad, .action-pad {
  display: flex;
  gap: 10px;
}

.touch-btn {
  background: #1a1e36;
  color: #00f0ff;
  border: 2px solid #2d3766;
  border-radius: 12px;
  padding: 16px 22px;
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.1s, transform 0.1s;
}

.touch-btn:active {
  background: #00f0ff;
  color: #000;
  transform: scale(0.92);
}

.fire-btn {
  background: #361a28;
  border-color: #662d47;
  color: #ff007f;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  padding: 16px 26px;
}

.fire-btn:active {
  background: #ff007f;
  color: #fff;
}

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  color: #718096;
  padding: 0 4px;
}

.btn-text {
  background: transparent;
  border: 1px solid #2d3766;
  border-radius: 4px;
  color: #00f0ff;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
  font-family: 'Rajdhani', sans-serif;
}

@media (min-width: 768px) {
  .mobile-controls {
    display: none;
  }
}
