@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

/*Theme modes*/
:root {
  --backgroundColor: rgba(20, 20, 20, 0.46);
  --borderStyle: 1px solid rgba(255, 255, 255, 0.08);
  --textColor: white;
  --iconShadow: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
  --searchBG: rgba(255, 255, 255, 0.08);
  --searchPH: #cbcbcb;
  --searchBGFocus: rgba(255, 255, 255, 0.1);
  --seachBorderFocus: inset 0 0 0 1px rgba(255, 255, 255, 0.455);
  --buttonBG: none;
  --buttonText: #3b82f6;
}

[data-theme="light"] {
  --backgroundColor: rgba(255, 255, 255, 0.4);
  --borderStyle: 1px solid rgba(255, 255, 255, 0.289);
  --textColor: black;
  --iconShadow: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
  --searchBG: rgba(0, 0, 0, 0.08);
  --searchPH: #2c2c2c;
  --searchBGFocus: rgba(0, 0, 0, 0.1);
  --seachBorderFocus: inset 0 0 0 1px rgba(0, 0, 0, 0.455);
  --buttonBG: #2b60b5;
  --buttonText: white;
}

/*Main Container*/
body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: 40px;
}

.container {
  width: 90%;
  max-width: 600px;
  margin-top: 20px;
  padding: 25px;
  background: var(--backgroundColor);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(25px);
  border: var(--borderStyle);
  color: var(--textColor);
  transition: all 0.2s ease-in-out;
}

h1,
h2 {
  text-align: center;
  color: var(--textColor);
}

/*Theme Toggle*/
.theme-toggle {
  color: var(--textColor);
  background: none;
  border: 1px solid var(--textColor);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

/*Search bar and buttons*/
.search-section {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-section input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: var(--searchBG);
  color: var(--textColor);
  outline: none;
  font-size: 15px;
  transition: all 0.2s ease;
}

.search-section input:hover {
  box-shadow: var(--seachBorderFocus);
}

.search-section input::placeholder {
  color: var(--searchPH);
}

.search-section input:focus {
  background: var(--searchBGFocus);
  box-shadow: var(--seachBorderFocus);
}

.search-section button {
  padding: 12px 18px;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  background: #3b82f6;
  color: white;
  transition: all 0.2s ease;
}

.search-section button:hover {
  background: var(--buttonBG);
  color: var(--buttonText);
  box-shadow: inset 0 0 0 1px #3b82f6;
}

/*Weather data*/
.weather-box {
  text-align: center;
  margin-top: 20px;
}

.weather-box img {
  width: 90px;
  filter: var(--iconShadow);
}

.forecast {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
}

.forecast-day {
  padding: 12px;
  width: 30%;
  text-align: center;
}

.forecast-day img {
  width: 45px;
  filter: var(--iconShadow);
}

/*Backgrounds*/
.morning {
  background-image: url("../img/Sunrise.png");
}

.afternoon {
  background-image: url("../img/Noon.png");
}

.evening {
  background-image: url("../img/Sunset.png");
}

.night {
  background-image: url("../img/Night.png");
}

/*Mobile Optimization*/
@media (max-width: 768px) {
  .container {
    max-width: 400px;
  }
}