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

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
}

.game-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.game-wrapper {
  position: relative;
}

#gameCanvas {
  border: 4px solid #e94560;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(233, 69, 96, 0.5), inset 0 0 60px rgba(0, 0, 0, 0.3);
  background: #0a0a15;
}

.info-panel {
  background: rgba(15, 52, 96, 0.8);
  border: 2px solid #e94560;
  border-radius: 12px;
  padding: 25px;
  color: #fff;
  min-width: 240px;
  max-width: 260px;
  backdrop-filter: blur(10px);
}

.info-panel h2 {
  color: #e94560;
  margin-bottom: 20px;
  font-size: 1.5em;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

.stat {
  margin: 15px 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(78, 204, 163, 0.1);
}

.stat-label {
  font-size: 0.8em;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 1.8em;
  font-weight: bold;
  color: #4ecca3;
  text-shadow: 0 0 10px rgba(78, 204, 163, 0.3);
}

.controls {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(233, 69, 96, 0.3);
  font-size: 0.85em;
  line-height: 2.2;
}

.controls h3 {
  color: #e94560;
  margin-bottom: 12px;
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.controls p {
  margin: 8px 0;
}

.key {
  display: inline-block;
  background: #e94560;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: bold;
  min-width: 32px;
  text-align: center;
  margin-right: 8px;
  margin-bottom: 4px;
  font-size: 0.95em;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  border-radius: 8px;
  z-index: 10;
}

.overlay.hidden {
  display: none;
}

.overlay h1 {
  font-size: 2.5em;
  color: #e94560;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(233, 69, 96, 0.8);
}

.overlay p {
  font-size: 1.2em;
  margin: 10px 0;
  color: #ccc;
}

.overlay .subtitle {
  font-size: 1em;
  color: #4ecca3;
  margin-bottom: 30px;
}

.btn {
  background: linear-gradient(135deg, #e94560, #c23a51);
  border: none;
  color: #fff;
  padding: 15px 40px;
  font-size: 1.2em;
  border-radius: 30px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(233, 69, 96, 0.6);
}

.game-over-stats {
  margin: 20px 0;
  text-align: center;
}

.win-message {
  color: #4ecca3 !important;
  text-shadow: 0 0 20px rgba(78, 204, 163, 0.8) !important;
}

.death-animation {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.difficulty-selector {
  margin: 20px 0;
  text-align: center;
}

.difficulty-selector label {
  display: block;
  margin-bottom: 10px;
  color: #ccc;
  font-size: 1em;
}

.difficulty-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.diff-btn,
.speed-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #4ecca3;
  color: #4ecca3;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.diff-btn:hover,
.speed-btn:hover {
  background: rgba(78, 204, 163, 0.2);
}

.diff-btn.selected,
.speed-btn.selected {
  background: #4ecca3;
  color: #1a1a2e;
  font-weight: bold;
}

.speed-btn {
  padding: 8px 12px;
  font-size: 0.9em;
}

.pause-hint {
  margin-top: 15px;
  font-size: 0.9em;
  color: #888;
}

.pause-hint .key {
  background: rgba(233, 69, 96, 0.6);
  padding: 3px 8px;
  margin: 0 4px;
  font-size: 0.9em;
}
