body {
  margin: 0;
  font-family: 'Fredoka', sans-serif;
  background: linear-gradient(120deg, #a1c4fd, #c2e9fb);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  color: #434647;
  transition: background 100s;
}

body.dark {
  background: linear-gradient(to top, #f0f8ff, #002430);
  color: #333;
  transition: background 0.5s;
}

.container {
  max-width: 700px;
  margin: 2rem auto;
  padding: 1rem;
  text-align: center;
  position: relative;
}

/* Input field */
input {
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid #aaa;
  width: 60%;
  max-width: 300px;
  margin: 0.5rem;
}

/* Buttons */
button {
  background-color: #d7f2fa;
  border: 2px solid #5597c9;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: bold;
  margin: 0.5rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

button:hover {
  background-color: #c6eaff;
  transform: scale(1.05);
}

.toggle-btn {
  margin-top: 1rem;
  position: absolute;
  right: 0;
  top: 0;
  margin-top: 1rem;
  margin-right: 1rem;
}

/* Duck Animation */
#duck {
  font-size: 3rem;
  position: absolute;
  bottom: 60px; /* Below the input box */
  left: 50%;
  transform: translateX(-50%);
  display: none;
  transition: transform 0.5s ease-out;
}

.search {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

#weather {
  margin-top: 1rem;
}

/* Bubbles */
.bubbles {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.bubble {
  background: white;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.bubble-label {
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 4px;
}

.bubble-value {
  font-size: 1.2rem;
  font-weight: bold;
}

/* Bubble colors */
.temp { color: #ff7e67; }
.humidity { color: #4fc3f7; }
.uv { color: #ffd54f; }

/* Forecast */
#forecast {
  margin-top: 2rem;
}

/* Two-line forecast layout */
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.forecast-day:nth-child(n+4) {
  grid-column: span 1;
}

/* Mobile tweak */
@media (max-width: 600px) {
  .forecast-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Forecast day block styling */
.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.day-block {
  background: rgba(173, 216, 230, 0.3);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  width: 140px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
  transition: transform 0.3s ease;
}

.day-block:hover {
  transform: translateY(-4px);
}
.box {
  width: 350px;
  height: 50px;
  font-size: 25px;
  font-family: 'Fredoka', sans-serif;
  color: black;
  background-color: #83beeb;
  border: 2px solid #429dc7;
  border-radius: 10px;
  margin: -10px auto 0 auto;
  position: relative;
  z-index: 2; /* Higher than character */
  padding-top:20px;
}

.character {
  width: 100px;
  height: 82px;
  position: relative;
  margin: 0 auto;
  z-index: 1; /* Lower than box */
}
.head {
  background-color: #e6e265;
  width: 80px;
  height: 120px;
  border-radius: 42%;
  margin: 0 auto; 
  position: relative;
  z-index:1;
  
}

.eye {
  position: absolute;
  width: 10px;
  height: 10px;
  background: black;
  border-radius: 50%;
  top: 25px;
}

.eye.left {
    margin-top:10px;
    left: 10px; }
.eye.right {margin-top:10px; right: 10px; }

.beak {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 25px;
  height: 12px;
  background: #f5a640;
  border-radius: 50% / 40%;
}
.feather {
  position: absolute;
  top: -15px;
  left: 40%;
  width: 10px;
  height: 20px;
  background: #e6e265;
  border-radius: 50% 50% 0 0;
  transform: rotate(-20deg);
}

.feather.second {
  left: 50%;
  transform: rotate(20deg);
}

/* Wing styling now applies outside character */
.wing {
  width: 0;
  height: 0;
  position: absolute;
  top: -160px; /* Adjust depending on your layout */
  z-index: 3; /* Above box */
  margin-top:200px;
  border-radius:50%;
}

.left-wing {
  border-left: 50px solid transparent;
  border-right: 0 solid transparent;
  border-bottom: 30px solid #e6e265;
  left: calc(50% - 60px); /* Adjust placement */
  transform: rotate(-20deg);
  margin-left:-15px;
}

.right-wing {
  border-right: 50px solid transparent;
  border-left: 0 solid transparent;
  border-bottom: 30px solid #e6e265;
  right: calc(50% - 75px); /* Adjust placement */
  transform: rotate(20deg);
  margin-left:15px;
}