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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(to bottom, #1a1a1a, #4a4a4a);
  font-family: Arial, sans-serif;
  color: white;
}

#game-container {
  width: 800px;
  height: 400px;
  position: relative;
  overflow: hidden;
  background: #000;
  display: none;
}

#player {
  width: 30px;
  height: 30px;
  background: rgb(255, 217, 0);
  position: absolute;
  left: 50px;
  bottom: 50px;
  transform-origin: center;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 217, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.obstacle {
  position: absolute;
  width: 20px;
}

.obstacle svg {
  position: absolute;
  bottom: 0;
}

.obstacle[data-type="spike"] svg {
  filter: drop-shadow(0 0 2px rgba(255, 0, 0, 0.5));
}

#ground {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 50px;
  background: #333;
  border-top: 2px solid #444;
}

#score {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 24px;
  color: white;
  z-index: 1;
}

#menu, #game-over {
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 10px;
}

button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 18px;
  background: #ff0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s;
}

button:hover {
  transform: scale(1.1);
}

h1 {
  font-size: 48px;
  margin-bottom: 20px;
  color: #ff0;
}

.hidden {
  display: none;
}

.blue-background {
  background: linear-gradient(to bottom, #000066, #3333ff) !important;
}

.orange-background {
  background: linear-gradient(to bottom, #ff6600, #ff9933) !important;
}

.yellow-background {
  background: linear-gradient(to bottom, #ffcc00, #ffff00) !important;
}

@keyframes rainbow-background {
  0% { background: linear-gradient(to bottom, #ff0000, #ff6666); }
  16.67% { background: linear-gradient(to bottom, #ff9933, #ffcc00); }
  33.33% { background: linear-gradient(to bottom, #ffff00, #ffff99); }
  50% { background: linear-gradient(to bottom, #33cc33, #66ff66); }
  66.67% { background: linear-gradient(to bottom, #3333ff, #6666ff); }
  83.33% { background: linear-gradient(to bottom, #9933ff, #cc66ff); }
  100% { background: linear-gradient(to bottom, #ff0000, #ff6666); }
}

.rainbow-background {
  animation: rainbow-background 10s linear infinite !important;
}