body {
  margin: 0;
  overflow: hidden;
  background: linear-gradient(to top, #1e1e2f, #2b2d42);
  transition: background 0.3s;
}
.game {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#player {
  width: 150px;
  height: 150px;
  background-image: url('surfer.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  bottom: 1px; 
  left: 50px;
  z-index: 2;
}



#obstacles-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.obstacle {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}





@keyframes moveObstacle {
  0% { right: -50px; }
  100% { right: 100vw; }
}

#score {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 24px;
  color: #333;
}

.sea {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
  overflow: hidden;
  z-index: 0;
}

#sea-svg {
  width: 100%;
  height: 100%;
}

.wave-part {
  fill: #1e90ff;
}

#start-message {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffffff;
  background: rgba(0, 0, 50, 0.6);
  padding: 20px 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.7);
  animation: pulse 2s infinite ease-in-out;
  font-family: 'Orbitron', sans-serif; 
  letter-spacing: 2px;
  z-index: 1000;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 200, 255, 1);
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
    transform: translate(-50%, -50%) scale(1);
  }
}


.clouds {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 150px;
  z-index: 1;
  pointer-events: none;
}

.cloud {
  position: absolute;
  background: #dfdfdf;
  border-radius: 50%;
  opacity: 0.8;
  width: 100px;
  height: 60px;
  box-shadow:
    30px 10px 0 #dfdfdf,
    60px 0 0 #dfdfdf,
    90px 10px 0 #dfdfdf;
}

.cloud1 { top: 60px; left: 100px; animation-delay: 0s; }
.cloud2 { top: 10px; left: 300px; animation-delay: 0s; transform: scale(0.8); }
.cloud3 { top: 10px; left: 700px; animation-delay: 0s; transform: scale(1.1); }
.cloud4 { top: 60px; left: 900px; animation-delay: 0s; transform: scale(0.9); }
.cloud5 { top: 60px; left: 500px; animation-delay: 0s; transform: scale(1.2); }

@keyframes moveCloud {
  0%   { transform: translateX(0); }
  100% { transform: translateX(100vw); }
}



#splash-container {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 5;
}

.splash-particle {
  position: absolute;
  background-color: rgba(3, 112, 148, 0.685);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(6, 115, 151, 0.76);
  opacity: 1;
  transform: scale(1);
  animation: splash-fade 1s forwards;
}

@keyframes splash-fade {
  to {
    opacity: 0;
    transform: scale(1.5);
  }
}



#high-score {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 1000;
 font-family: 'Freckle Face', cursive;
}


#score {
  position: fixed;
  top: 20px;
  left: 30px;
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 1000;
 font-family: 'Freckle Face', cursive;
}


.leaderboard {
  position: absolute;
  top: 80px;
  right: 20px;
  background: rgba(0,0,0,0.6);
  padding: 12px;
  color: white;
  border-radius: 10px;
  font-family: 'Arial';
  max-width: 200px;
}
.leaderboard h2 {
  margin-top: 0;
  font-size: 18px;
}
#leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
}



.lightning-bolt {
  stroke: #d1b1eb;
  stroke-width: 3;
  fill: none;
  opacity: 0;
  animation: flash 0.4s ease-out forwards;
  filter: drop-shadow(0 0 10px rgb(202, 11, 186));
}

@keyframes flash {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}
