* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  transition: background 0.8s, color 0.8s;
}

body {
  background: linear-gradient(to top, #a3d9ff, #e0f7ff);
  color: #333;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

h1 {
  font-size: 2rem;
  color: #1a237e;
}

#darkModeToggle {
  background: #fff;
  border: 2px solid #1a237e;
  border-radius: 30px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

#darkModeToggle:hover {
  background: #1a237e;
  color: white;
}

.sky {
  position: relative;
  height: 80vh;
  overflow: hidden;
}

/* ☁️ Clouds */
.cloud {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.9;
  animation: floatClouds 60s linear infinite;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud {
  width: 120px;
  height: 60px;
  top: 50px;
  left: -150px;
}
.cloud::before {
  width: 80px;
  height: 80px;
  top: -20px;
  left: 30px;
}
.cloud::after {
  width: 60px;
  height: 60px;
  top: 10px;
  left: 90px;
}

.cloud.small { top: 100px; animation-duration: 80s; }
.cloud.medium { top: 150px; animation-duration: 100s; }

@keyframes floatClouds {
  0% { left: -200px; }
  100% { left: 100vw; }
}

/* 🎈 Balloons */
.balloon {
  position: absolute;
  width: 140px;
  height: 180px;
  border-radius: 50%;
  text-align: center;
  line-height: 180px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  animation: float 6s ease-in-out infinite;
  box-shadow: inset -5px -10px rgba(0, 0, 0, 0.1);
}

.balloon::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 50%;
  width: 2px;
  height: 40px;
  background: rgba(0, 0, 0, 0.3);
  transform: translateX(-50%);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}

.red { background: #ff5252; top: 50%; left: 20%; }
.blue { background: #42a5f5; top: 55%; left: 45%; }
.yellow { background: #fdd835; top: 50%; left: 70%; }

footer {
  text-align: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* 🌙 Dark Mode Styles */
body.dark {
  background: linear-gradient(to top, #001f3f, #011826);
  color: #f1f1f1;
}

body.dark h1 {
  color: #fdd835;
}

body.dark footer {
  background: rgba(255, 255, 255, 0.1);
  color: #aaa;
}

body.dark #darkModeToggle {
  background: #222;
  color: #fff;
  border-color: #fdd835;
}

/* ☀️ Sun (visible in light mode only) */
.sun {
  position: absolute;
  top: 80px;
  right: 100px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff59d, #ffeb3b);
  box-shadow: 0 0 40px 20px rgba(255, 235, 59, 0.6);
  animation: rotateSun 30s linear infinite;
  transition: opacity 1s, transform 1s;
}

@keyframes rotateSun {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 🌕 Moon */
.moon {
  position: absolute;
  top: 80px;
  right: 100px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff9c4, #fdd835);
  box-shadow: 0 0 40px 20px rgba(253, 216, 53, 0.4);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 1s, transform 1s;
}

/* ✨ Stars */
.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: transparent;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease;
}

.stars::before,
.stars::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  box-shadow:
    50px 50px white,
    150px 200px white,
    300px 100px white,
    400px 250px white,
    550px 150px white,
    700px 50px white,
    850px 300px white,
    900px 180px white,
    1050px 100px white,
    1200px 220px white;
  animation: twinkle 3s infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.3; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

/* 🌗 Transitions Between Modes */
body.dark .moon {
  opacity: 1;
  transform: scale(1);
}

body.dark .stars {
  opacity: 1;
}

body.dark .sun {
  opacity: 0;
  transform: scale(0.6);
}
