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

body {
  background: #0C0D14;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
  color: #e0e0e0;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#gameCanvas {
  display: block;
  border-radius: 6px;
}

#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  pointer-events: none;
  z-index: 5;
}

#hud-left, #hud-right {
  display: flex;
  gap: 20px;
}

#hud span {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

#score {
  color: #fff;
}

#score::before {
  content: 'SCORE: ';
  opacity: 0.6;
}

#coins {
  color: #fbbf24;
}

#coins::before {
  content: 'COINS: ';
  opacity: 0.6;
}

#highscore {
  color: #8b5cf6;
  opacity: 0.8;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 13, 20, 0.85);
  z-index: 10;
}

#overlay.visible {
  display: flex;
}

.screen {
  text-align: center;
}

.screen h1 {
  font-size: 48px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.screen p {
  font-size: 20px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.screen .hint {
  font-size: 14px;
  opacity: 0.5;
  margin-top: 12px;
}

#final-score {
  font-size: 28px;
  color: #06b6d4;
  font-weight: 700;
}

#final-highscore {
  font-size: 18px;
  color: #8b5cf6;
}

#restart-btn {
  margin-top: 20px;
  padding: 12px 32px;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

#restart-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

#restart-btn:active {
  transform: scale(0.97);
}
