* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  background-color: black;
}

.game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
}

/* Background layers */
.background {
  position: absolute;
  width: 200%;
  height: 100%;
  background-repeat: repeat-x;
  background-size: cover;
  animation: scroll linear infinite;
}

.sky {
  background-image: url('images/sky.png');
  animation-duration: 60s;
  z-index: 1;
}

.stations {
  background-image: url('images/stations.png');
  animation-duration: 30s;
  z-index: 2;
}

.traffic {
  background-image: url('images/traffic.png');
  animation-duration: 10s;
  background-position: bottom left;
  z-index: 3;
}

@keyframes scroll {
  from { left: 0; }
  to { left: -100%; }
}

/* UFO */
#ufo {
  position: absolute;
  left: 10%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9rem;
  z-index: 5;
}

/* Food Stream */
#food-stream {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
}

.food {
  position: absolute;
  font-size: 5rem;
  z-index: 4;
  transition: right 3s linear;
  pointer-events: none;
}

/* HUD */
.hud {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10;
  color: white;
  font-size: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Game Controls */
.controls {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  display: flex;
  gap: 1rem;
}

.controls button {
  font-size: 1.6rem;
  padding: 0.5rem 1rem;
  background-color: #222;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.controls button:hover {
  background-color: #444;
}

/* Game Over */
#gameOverScreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 2rem;
  border-radius: 1rem;
  z-index: 20;
  text-align: center;
  font-size: 2rem;
  width: 80%;
  max-width: 500px;
}

.hidden {
  display: none;
}

/* Music Panel */
#control-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(0,0,0,0.6);
  padding: 1rem;
  border-radius: 0.5rem;
}

#control-panel select,
#control-panel button {
  font-size: 1rem;
  padding: 0.5rem;
  background-color: #222;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

#control-panel select:hover,
#control-panel button:hover {
  background-color: #444;
}

#nowPlaying {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #0f0;
  text-align: center;
}
