/* 🌟 Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
}

/* 🌤️ Body */
body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5c7f7, #d5def5);
  min-height: 100vh;
  transition: background 0.6s ease;
}

/* 🌙 Theme Variables */
:root {
  --bg-body: rgba(255, 255, 255, 0.25);
  --container: rgba(255, 255, 255, 0.2);
  --text: #5c2a9d;
  --search: #24527a;
  --shadow: rgba(0, 0, 0, 0.15);
  --accent: #ff6ea6;
}

.darktheme {
  --bg-body: rgba(30, 30, 46, 0.85);
  --container: rgba(255, 255, 255, 0.08);
  --text: #f3f4f6;
  --search: #acdcee;
  --shadow: rgba(255, 255, 255, 0.1);
  --accent: #acdcee;
  background: linear-gradient(135deg, #1f2937, #374151);
}

/* 🌈 Main Container */
.main-container {
  width: 520px;
  max-width: 90%;
  border-radius: 20px;
  padding: 20px;
  background: var(--bg-body);
  box-shadow: 0 8px 32px var(--shadow);
  backdrop-filter: blur(15px);
  margin: 50px 0;
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
}

/* 🎛️ Theme Toggle Button */
.theme-toggle-btn {
  position: absolute;
  top: 18px;
  right: 22px;
  background: linear-gradient(145deg, #ffb3c6, #f5c7f7);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
}

.theme-toggle-btn span {
  font-size: 25px;
  color: #6a0572;
  transition: transform 0.6s ease, color 0.4s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--accent);
}

.darktheme .theme-toggle-btn {
  background: linear-gradient(145deg, #222831, #2e3a59);
  box-shadow: 0 0 15px var(--accent);
}

.darktheme .theme-toggle-btn span {
  color: var(--accent);
  transform: rotate(360deg);
}

/* 🔍 Search Bar */
.input-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 60px;
}

.city-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 50px;
  border: none;
  outline: none;
  font-size: 16px;
  background: var(--container);
  color: var(--text);
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.1);
  transition: border 0.3s ease;
}

.city-input:focus {
  border: 2px solid var(--accent);
}

.search-button {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.search-button:hover {
  background: #ff4081;
  transform: scale(1.1);
}

/* 🌦 Weather Info */
.weather-info {
  margin-top: 40px;
  display: none;
  color: var(--text);
  transition: 0.3s ease;
}

.location-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weather-summary-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
}

.weather-summary-img {
  width: 110px;
  height: 110px;
}

.weather-summ-info {
  text-align: right;
}

.temp-text {
  font-size: 45px;
  font-weight: 700;
}

.condition-txt {
  font-size: 18px;
  opacity: 0.8;
  text-transform: capitalize;
}

/* 💨 Condition Section */
.weather-condition {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
}

.condition-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.condition-item span {
  font-size: 35px;
  color: var(--accent);
}

.condition-item .regular-txt {
  font-size: 16px;
  color: var(--text);
}

.humidity-value,
.wind-value {
  font-size: 16px;
  color: var(--text);
}

/* 🌤 Forecast Section */
.forcast-item-container {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 10px;
}

.forecast-item {
  min-width: 100px;
  background: var(--container);
  border-radius: 12px;
  text-align: center;
  padding: 10px;
  color: var(--text);
  transition: 0.3s ease;
}

.forecast-item:hover {
  transform: translateY(-5px);
  background: var(--accent);
  color: #fff;
}

.forecast-item-img {
  width: 70px;
  height: 70px;
}
/* 🌗 Theme Button Styling */
.theme {
  position: absolute;
  top: 20px;
  right: 25px;
  padding: 10px 20px;
  font-size: 17px;
  font-weight: 600;
  border: none;
  border-radius: 30px;
  background: linear-gradient(135deg, #ff91b3, #f5c7f7);
  color: #5c2a9d;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: all 0.4s ease;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* 🌈 Hover Effects */
.theme:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #ff6ea6, #ffb3c6);
  box-shadow: 0 0 20px rgba(255, 105, 180, 0.6);
}

/* 🌙 Active (Dark Theme Mode) */
.darktheme .theme {
  background: linear-gradient(135deg, #2e3a59, #1f2937);
  color: #acdcee;
  box-shadow: 0 0 15px rgba(172, 220, 238, 0.5);
}

/* 💫 Hover in Dark Mode */
.darktheme .theme:hover {
  background: linear-gradient(135deg, #374151, #111827);
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(172, 220, 238, 0.7);
}

/* 📱 Responsive Adjustments */
@media (max-width: 480px) {
  .theme {
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* ⚠️ Not Found / Message Section */
.section-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
  margin-top: 25%;
  color: var(--text);
}

.section-message img {
  width: 180px;
  height: 180px;
}

.not-found {
  display: none;
}

/* 📱 Responsive Design */
@media (max-width: 480px) {
  .main-container {
    padding: 15px;
    border-radius: 15px;
  }

  .theme-toggle-btn {
    width: 40px;
    height: 40px;
  }

  .theme-toggle-btn span {
    font-size: 20px;
  }

  .city-input {
    font-size: 14px;
    padding: 10px 14px;
  }

  .temp-text {
    font-size: 35px;
  }

  .condition-item span {
    font-size: 25px;
  }

  .forecast-item {
    min-width: 80px;
    padding: 8px;
  }

  .forecast-item-img {
    width: 55px;
    height: 55px;
  }

  .section-message img {
    width: 130px;
    height: 130px;
  }
}
