/* Modern Dinosaur Game CSS */
:root {
  --primary-color: #4a6bff;
  --secondary-color: #ff6b6b;
  --background-color: #1a1a2e;
  --ground-color: #16213e;
  --text-color: #ffffff;
  --cloud-color: rgba(255, 255, 255, 0.7);
  --obstacle-color: #ff9e00;
  --dino-color: #00ff9d;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

.game-container {
  position: relative;
  width: 800px;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background: linear-gradient(to bottom, #2a2a4a 0%, var(--background-color) 100%);
}

.score-container {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color);
  background-color: rgba(0, 0, 0, 0.3);
  padding: 5px 15px;
  border-radius: 20px;
  z-index: 10;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.high-score {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 16px;
  color: var(--text-color);
  background-color: rgba(0, 0, 0, 0.3);
  padding: 5px 15px;
  border-radius: 20px;
  z-index: 10;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ground {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 50px;
  background-color: var(--ground-color);
  z-index: 1;
}

.dino {
  position: absolute;
  bottom: 50px;
  left: 50px;
  width: 60px;
  height: 60px;
  background-color: var(--dino-color);
  border-radius: 5px;
  z-index: 2;
  transition: transform 0.1s;
}

.dino::before {
  content: '';
  position: absolute;
  top: -15px;
  width: 30px;
  height: 15px;
  background-color: var(--dino-color);
  border-radius: 5px 5px 0 0;
}

.dino::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 40px;
  width: 10px;
  height: 10px;
  background-color: #000;
  border-radius: 50%;
}

.obstacle {
  position: absolute;
  bottom: 50px;
  width: 30px;
  height: 60px;
  background-color: var(--obstacle-color);
  border-radius: 5px;
  z-index: 2;
}

.cloud {
  position: absolute;
  background-color: var(--cloud-color);
  border-radius: 50px;
  z-index: 0;
  opacity: 0.7;
}

.start-screen, .game-over-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 100;
  backdrop-filter: blur(5px);
}

.start-screen h1, .game-over-screen h1 {
  font-size: 36px;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.start-screen p, .game-over-screen p {
  font-size: 18px;
  margin-bottom: 30px;
  text-align: center;
  max-width: 80%;
}

.btn {
  padding: 12px 30px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.btn:active {
  transform: translateY(1px);
}

.controls {
  position: absolute;
  bottom: 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* Animations */
@keyframes jump {
  0%, 100% {
    bottom: 50px;
  }
  50% {
    bottom: 150px;
  }
}

@keyframes duck {
  0%, 100% {
    height: 60px;
  }
  50% {
    height: 30px;
  }
}

/* Responsive design */
@media (max-width: 850px) {
  .game-container {
    width: 95%;
    max-width: 600px;
    height: 250px;
  }
}

@media (max-width: 500px) {
  .game-container {
    height: 200px;
  }
  
  .dino {
    width: 50px;
    height: 50px;
  }
  
  .obstacle {
    width: 25px;
    height: 50px;
  }
}

/* Day/Night mode toggle */
.mode-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 24px;
  cursor: pointer;
  z-index: 101;
}

/* Night mode */
.night-mode {
  --background-color: #0a0a1a;
  --ground-color: #0d1425;
  --dino-color: #00cc7e;
  --obstacle-color: #cc7000;
}

/* Particle effects */
.particle {
  position: absolute;
  width: 5px;
  height: 5px;
  background-color: var(--dino-color);
  border-radius: 50%;
  z-index: 1;
  opacity: 0.7;
}

/* Game elements animation */
.animate {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}