body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #222;
  font-family: "Arial", sans-serif;
  overflow: hidden;
}

.main-container {
  width: 100%;
  max-width: 1500px;
  padding: 20px;
  box-sizing: border-box;
}

.game-container {
  position: relative;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  text-align: center;
}

.game-screen {
  position: relative;
  width: 100%;
  height: 800px;
  background-color: #87ceeb;
  border: 4px solid #333;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

#gameCanvas {
  display: none;
}

.dino {
  position: absolute;
  width: 150px;
  height: 225px;
  background: url("/assets/dino.png") no-repeat center;
  background-size: contain;
  left: 100px;
  bottom: 10px;
  transition: bottom 0.2s, height 0.2s;
}

.dino.ducking {
  height: 112px;
}

.obstacle-low {
  position: absolute;
  background: url("/assets/fire.png") no-repeat center;
  background-size: contain;
  width: 80px;
  height: 120px;
  bottom: 20px;
}

.obstacle-high {
  position: absolute;
  background: url("/assets/fire.png") no-repeat center;
  background-size: contain;
  width: 80px;
  height: 120px;
  bottom: 280px;
}

.ground {
  position: absolute;
  width: 100%;
  height: 50px;
  background-color: rgb(151, 81, 11);
  bottom: 0;
}

.cloud {
  position: absolute;
  width: 200px;
  height: 90px;
  background: url("/assets/cloud.png") no-repeat center;
  background-size: contain;
}

.home-screen {
  background-color: #87ceeb;
  padding: 40px;
  border: 4px solid #333;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

.home-screen h1 {
  color: #228b22;
  font-size: 64px;
  margin-bottom: 40px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.level-selector {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.level-btn {
  padding: 15px 30px;
  background-color: darkblue;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 150px;
}

.level-btn:hover {
  background-color: black;
  transform: translateY(-5px);
}

.level-btn.active {
  background-color: black;
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.score-display {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 28px;
  font-weight: bold;
  color: black;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.controls {
  margin-top: 20px;
}

button {
  padding: 12px 25px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin: 10px;
}

button:hover {
  background-color: #45a049;
}

#startGameBtn {
  padding: 15px 40px;
  font-size: 24px;
  margin-bottom: 30px;
}

.instructions {
  margin-top: 20px;
  color: #333;
  font-size: 20px;
}

.game-win {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 128, 0, 0.9);
  padding: 40px;
  border-radius: 12px;
  color: white;
  text-align: center;
  display: none;
  z-index: 100;
  width: 80%;
  max-width: 500px;
}

.game-win h2 {
  color: #ffd700;
  margin-bottom: 30px;
  font-size: 36px;
}

.game-win p {
  font-size: 24px;
  margin-bottom: 30px;
}

.game-win button {
  margin: 15px;
  font-size: 18px;
  background-color: #ffd700;
  color: #000;
}

.game-win button:hover {
  background-color: #e6c200;
}

.game-over {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.9);
  padding: 40px;
  border-radius: 12px;
  color: white;
  text-align: center;
  display: none;
  z-index: 100;
  width: 80%;
  max-width: 500px;
}

.game-over h2 {
  color: #ff3333;
  margin-bottom: 30px;
  font-size: 36px;
}

.game-over p {
  font-size: 24px;
  margin-bottom: 30px;
}

.game-over button {
  margin: 15px;
  font-size: 18px;
}
