:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: dark light;
  color: rgba(255, 255, 255, 0.87);
  background-color: #0a0a0a;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  overflow: hidden;
}

#app {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#gameContainer {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  max-height: 800px;
  border: 2px solid #646cff;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 8px 32px rgba(100, 108, 255, 0.3);
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: radial-gradient(circle at center, #001122 0%, #000000 100%);
}

#ui {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}

#score,
#timer,
#personalBest {
  background: rgba(0, 0, 0, 0.8);
  color: #00ff88;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 18px;
  border: 2px solid #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

#personalBest {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

#timer {
  color: #ff6b6b;
  border-color: #ff6b6b;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

#gameOver,
#instructions {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  color: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  border: 2px solid #646cff;
  box-shadow: 0 8px 32px rgba(100, 108, 255, 0.5);
  z-index: 20;
  backdrop-filter: blur(10px);
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

#gameOver h2,
#instructions h3 {
  color: #646cff;
  margin-bottom: 20px;
  font-size: 2.5em;
  text-shadow: 0 0 10px rgba(100, 108, 255, 0.5);
}

#gameOver p,
#instructions p {
  margin: 10px 0;
  font-size: 1.2em;
  color: #cccccc;
}

#restartBtn,
#startBtn {
  background: linear-gradient(45deg, #646cff, #4f46e5);
  color: white;
  border: none;
  padding: 15px 30px;
  margin-top: 20px;
  border-radius: 30px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(100, 108, 255, 0.4);
}

#restartBtn:hover,
#startBtn:hover {
  background: linear-gradient(45deg, #4f46e5, #646cff);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(100, 108, 255, 0.6);
}

#restartBtn:active,
#startBtn:active {
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

#bossWarning {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 0, 102, 0.9);
  color: #ffffff;
  padding: 20px 40px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 32px;
  text-align: center;
  border: 3px solid #ff3388;
  box-shadow: 0 0 30px rgba(255, 0, 102, 0.8);
  animation: pulse 0.5s infinite alternate;
  z-index: 1000;
}

@keyframes pulse {
  from {
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.instructions-content {
  text-align: left;
  margin-bottom: 20px;
}

.controls-section,
.features-section,
.customization-section {
  margin-bottom: 20px;
}

.controls-section h4,
.features-section h4,
.customization-section h4 {
  color: #00ff88;
  margin-bottom: 10px;
  font-size: 16px;
  text-align: center;
}

.features-section p {
  margin: 5px 0;
  font-size: 14px;
}

.color-picker {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.color-option:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.color-option.selected {
  border-color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
  #gameContainer {
    border-radius: 0;
    border: none;
    max-width: 100%;
    max-height: 100%;
  }

  #ui {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  #score,
  #timer,
  #personalBest {
    font-size: 14px;
    padding: 8px 16px;
  }

  #gameOver,
  #instructions {
    padding: 30px 20px;
    margin: 20px;
    width: calc(100% - 40px);
  }

  #gameOver h2,
  #instructions h3 {
    font-size: 2em;
  }
}
