/* Base styles */
html, body {
  margin: 0;
  padding: 0;
  background: #000;
  font-family: sans-serif;
  overflow: hidden;
  overflow-x: hidden;
}

/* Canvas covers full viewport */
#gameCanvas {
  display: block;
  touch-action: none;
  width: 100vw;
  height: 100vh;
  background: transparent;
}

/* Top Bar for Score, Lives, Streak and Inventory */
#topBar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 1000;
  pointer-events: none;
}

#scoreContainer {
  min-width: 120px;
  padding: 10px;
  background-color: rgba(0,0,0,0.4);
  color: #fff;
  border-radius: 8px;
  font-size: 24px;
  text-align: center;
  text-shadow: 0 0 8px #fff;
}

.label {
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: #ffcc00;
  text-shadow: 0 0 5px #000;
}

#scoreValue, #finalScore {
  font-family: 'Press Start 2P', cursive;
  background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#scoreValue { font-size: 28px; }
#finalScore { font-size: 36px; }
#longestStreak {
  font-family: 'Press Start 2P', cursive;
  background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 36px;
}

#livesValue, #streakValue {
  font-family: 'VT323', monospace;
  font-size: 24px;
  background: linear-gradient(45deg, #ffcc00, #ff6600);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  #gameTitle { font-size: 48px; }
  #gameTitle .title-line { font-size: 48px; }
  #gameTitle .title-line.title-line-burst { margin-left: 10px; font-size: 48px; }
  #gameOverOverlay { font-size: 20px; padding: 10px; }
  #overlayButtons button { width: 100%; max-width: 300px; padding: 10px 0; font-size: 18px; }
  #overlayFullscreenBtn { font-size: 24px; padding: 6px; }
  #scoreContainer { font-size: 20px; padding: 8px; }
  .inventoryCount { font-size: 24px; }
  .inventoryEmoji { font-size: 28px; }
}
