body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to right, #74ebd5, #ACB6E5);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  max-width: 600px;
  width: 100%;
}

h1 {
  margin-bottom: 1rem;
}

form {
  display: flex;
  margin-bottom: 1rem;
}

input[type="text"] {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px 0 0 5px;
  outline: none;
}
/* Стилі перемикача теми */
.switch {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 24px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider::before {
  transform: translateX(26px);
}

/* Темна тема */
body.dark {
  background-color: #121212;
  color: #fff;
}

body.dark .container {
  background-color: rgba(40, 40, 40, 0.95);
  color: #fff;
}

body.dark input[type="text"] {
  background-color: #333;
  color: #fff;
  border-color: #555;
}

body.dark button {
  background-color: #555;
}

body.dark button:hover {
  background-color: #777;
}

body.dark .forecast-day {
  background-color: rgba(50, 50, 50, 0.9);
}

button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #4CAF50;
  color: white;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

button:hover {
  background-color: #45a049;
}

.hidden {
  display: none;
}

.forecast-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.forecast-day {
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-align: center;
  width: 120px;
}

.forecast-day img {
  width: 60px;
  height: 60px;
}
/* --- Уже існуючі стилі залишаються без змін --- */

/* Адаптивність для мобільних пристроїв */
@media (max-width: 600px) {
  .container {
    max-width: 95%;
    padding: 1rem;
    box-shadow: none;
    border-radius: 0;
  }

  form {
    flex-direction: column;
  }

  input[type="text"] {
    border-radius: 5px 5px 0 0;
    margin-bottom: 0.5rem;
    width: 100%;
  }

  button {
    border-radius: 0 0 5px 5px;
    width: 100%;
  }

  .forecast-list {
    flex-direction: column;
    gap: 1rem;
  }

  .forecast-day {
    width: 100%;
    padding: 1rem;
  }

  /* Зменшити розмір заголовків */
  h1 {
    font-size: 1.5rem;
  }

  h2, h3 {
    font-size: 1.1rem;
  }

  /* Перемикач теми трохи менший і трохи зміщений */
  .switch {
    width: 40px;
    height: 20px;
    top: 15px;
    right: 15px;
  }

  .slider::before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
  }

  input:checked + .slider::before {
    transform: translateX(20px);
  }
}
