/* ========================================
   WEATHER JOURNAL — STYLE.CSS
   ======================================== */

/* ----------------------------------------
   1. GLOBAL RESET
   ---------------------------------------- */

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 40px 20px;

  font-family: "Poppins", sans-serif;
  color: #1e293b;

  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(196, 181, 253, 0.65),
      transparent 28%
    ),
    radial-gradient(
      circle at 85% 12%,
      rgba(186, 230, 253, 0.75),
      transparent 30%
    ),
    radial-gradient(
      circle at 50% 88%,
      rgba(251, 207, 232, 0.48),
      transparent 34%
    ),
    linear-gradient(150deg, #eee9ff, #e5f3ff 55%, #fbf5ff);

  transition:
    background 0.3s ease,
    color 0.3s ease;
}

/* ----------------------------------------
     2. MAIN WEATHER APP CONTAINER
     ---------------------------------------- */

.weather-app {
  width: 100%;
  max-width: 760px;

  margin: 0 auto;
  padding: 30px;

  background: rgba(255, 255, 255, 0.93);

  border: 1px solid rgba(91, 33, 182, 0.16);
  border-radius: 32px;

  box-shadow: 0 24px 70px rgba(88, 62, 140, 0.18);

  backdrop-filter: blur(18px);
}

/* ----------------------------------------
     3. THEME BUTTON
     ---------------------------------------- */

.theme-button-container {
  display: flex;
  justify-content: flex-end;

  margin-bottom: 5px;
}

.theme-button {
  width: 44px;
  height: 44px;

  padding: 0;

  font-size: 20px;

  color: #2f2447;
  background: #faf8ff;

  border: 1px solid #d8ccef;
  border-radius: 50%;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.theme-button:hover {
  transform: scale(1.08);
  background: #f3efff;
}

/* ----------------------------------------
     4. APP HEADER
     ---------------------------------------- */

header {
  margin-bottom: 28px;

  text-align: center;
}

.app-subtitle {
  margin: 0;

  color: #6d28d9;

  font-size: 13px;
  font-weight: 700;

  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 6px 0 0;

  color: #1e293b;

  font-size: 30px;
  font-weight: 700;
}

/* ----------------------------------------
     5. SEARCH FORM
     ---------------------------------------- */

.search-form {
  display: flex;
  gap: 12px;

  width: 100%;
  max-width: 570px;

  margin: 0 auto 35px;
}

.search-input {
  flex: 1;

  min-width: 0;
  padding: 14px 19px;

  color: #1e293b;
  background: #faf8ff;

  border: 1px solid #d8ccef;
  border-radius: 30px;
  outline: none;

  font-family: inherit;
  font-size: 16px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-input::placeholder {
  color: #7c718f;
}

.search-input:focus {
  border-color: #8b5cf6;

  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.search-button {
  padding: 14px 25px;

  color: white;
  background: linear-gradient(135deg, #8b5cf6, #38bdf8);

  border: none;
  border-radius: 30px;

  font-family: inherit;
  font-size: 15px;
  font-weight: 700;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.search-button:hover {
  transform: translateY(-2px);

  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.25);
}

/* ----------------------------------------
     6. CURRENT WEATHER SECTION
     ---------------------------------------- */

.current-weather {
  margin-bottom: 36px;

  text-align: center;
}

.current-weather-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.current-weather-icon {
  font-size: 64px;

  filter: drop-shadow(0 8px 14px rgba(124, 58, 237, 0.16));
}

.current-temperature {
  color: #4c1d95;

  font-size: 68px;
  font-weight: 700;
  line-height: 1;
}

.temperature-unit {
  margin-left: 2px;

  font-size: 26px;
  vertical-align: top;
}

.current-city {
  margin: 15px 0 3px;

  color: #172033;

  font-size: 34px;
  font-weight: 800;
}

.current-date {
  margin: 0;

  color: #475569;

  font-size: 15px;
  font-weight: 500;
}

/* ----------------------------------------
     7. HUMIDITY AND WIND DETAILS
     ---------------------------------------- */

.weather-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;

  margin-top: 21px;
}

.weather-detail {
  padding: 10px 16px;

  color: #334155;
  background: #faf8ff;

  border: 1px solid #d8ccef;
  border-radius: 30px;

  font-size: 14px;
  font-weight: 600;
}

.weather-detail strong {
  color: #172033;
}

/* ----------------------------------------
     8. WEATHER FORECAST
     ---------------------------------------- */

.weather-forecast {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.forecast-day {
  padding: 17px 10px;

  text-align: center;

  background: #faf8ff;

  border: 1px solid #d8ccef;
  border-radius: 24px;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.forecast-day:hover {
  transform: translateY(-5px);

  background: #ffffff;

  box-shadow: 0 12px 25px rgba(88, 62, 140, 0.12);
}

.forecast-date {
  color: #475569;

  font-size: 14px;
  font-weight: 700;
}

.forecast-icon {
  display: block;

  width: 50px;
  height: 50px;

  margin: 8px auto;

  object-fit: contain;
}

.forecast-temperatures {
  font-size: 14px;
}

.forecast-temperature-high {
  color: #172033;

  font-weight: 800;
}

.forecast-temperature-low {
  margin-left: 5px;

  color: #64748b;
}

/* ----------------------------------------
     9. FOOTER
     ---------------------------------------- */

footer {
  margin-top: 28px;

  color: #64748b;

  font-size: 14px;
  text-align: center;
}

footer a {
  color: #6d28d9;

  font-weight: 600;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ========================================
     10. MIDNIGHT MODE
     ======================================== */

body.dark {
  color: #f8fafc;

  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(34, 211, 238, 0.28),
      transparent 28%
    ),
    radial-gradient(
      circle at 85% 12%,
      rgba(139, 92, 246, 0.38),
      transparent 32%
    ),
    radial-gradient(
      circle at 50% 90%,
      rgba(59, 130, 246, 0.18),
      transparent 35%
    ),
    linear-gradient(150deg, #090f1f, #1e1b4b 55%, #111827);
}

body.dark .weather-app {
  background: rgba(255, 255, 255, 0.08);

  border-color: rgba(255, 255, 255, 0.2);

  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

body.dark .theme-button {
  color: white;
  background: rgba(255, 255, 255, 0.09);

  border-color: rgba(255, 255, 255, 0.18);
}

body.dark .theme-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

body.dark .app-subtitle {
  color: #a5f3fc;
}

body.dark h1,
body.dark .current-city,
body.dark .weather-detail strong,
body.dark .forecast-temperature-high {
  color: #ffffff;
}

body.dark .search-input {
  color: white;
  background: rgba(255, 255, 255, 0.09);

  border-color: rgba(255, 255, 255, 0.18);
}

body.dark .search-input::placeholder {
  color: #cbd5e1;
}

body.dark .current-temperature {
  color: #f8fafc;
}

body.dark .current-date,
body.dark .forecast-date,
body.dark footer {
  color: #dbeafe;
}

body.dark .weather-detail,
body.dark .forecast-day {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.09);

  border-color: rgba(255, 255, 255, 0.18);
}

body.dark .forecast-day:hover {
  background: rgba(255, 255, 255, 0.14);

  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}

body.dark .forecast-temperature-low {
  color: #bfdbfe;
}

body.dark footer a {
  color: #a5f3fc;
}

/* ========================================
     11. MOBILE RESPONSIVE DESIGN
     ======================================== */

@media (max-width: 650px) {
  body {
    padding: 20px 12px;
  }

  .weather-app {
    padding: 23px 18px;

    border-radius: 25px;
  }

  h1 {
    font-size: 26px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-button {
    width: 100%;
  }

  .current-weather-icon {
    font-size: 54px;
  }

  .current-temperature {
    font-size: 56px;
  }

  .current-city {
    font-size: 29px;
  }

  .weather-forecast {
    grid-template-columns: repeat(2, 1fr);
  }
}
