:root {
  --bg-color: #6dd5fa;
  --bg-secondary: #2980b9;
  --text-color: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.2);
}

body.light {
  --bg-color: #f2f2f2;
  --bg-secondary: #ffffff;
  --text-color: #222;
  --card-bg: rgba(255, 255, 255, 0.8);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(to right, var(--bg-color), var(--bg-secondary));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: all 0.3s ease;
  position: relative;
}

.container {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.search input {
  padding: 10px;
  width: 65%;
  border: none;
  border-radius: 8px;
  margin-right: 10px;
}

.search button {
  padding: 10px 15px;
  background: #fff;
  color: #2980b9;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.weather-box {
  margin-top: 20px;
}

.animation {
  width: 200px;
  height: 200px;
  margin: auto;
}

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
}

.slider:before {
  content: "";
  height: 20px;
  width: 20px;
  background-color: white;
  position: absolute;
  left: 4px;
  bottom: 3px;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #2196F5;
}

input:checked + .slider:before {
  transform: translateX(24px);
}