* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    padding: 20px;
    transition: background 0.5s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.search-container {
    display: flex;
    gap: 10px;
    max-width: 600px;
    width: 100%;
    flex-wrap: wrap;
}

#search-input {
    flex: 2;
    min-width: 200px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

#search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

#location-btn, #search-btn {
    padding: 12px 15px;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    white-space: nowrap;
}

#search-btn {
    background-color: #3498db;
}
#search-btn:hover {
    background-color: #2980b9;
}

#location-btn {
    background-color: #2ecc71;
}
#location-btn:hover {
    background-color: #27ae60;
}

.unit-toggle {
    display: flex;
    gap: 5px;
    background-color: white;
    border-radius: 30px;
    padding: 5px;
}

.unit-toggle button {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.unit-toggle button.active {
    background-color: #3498db;
    color: white;
}

.main-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

#weather-info {
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    color: white;
    flex: 1;
    min-width: 300px;
    margin-right: 12px;
    text-align: left;
    display: none;
}

.error {
    color: #e74c3c !important;
    font-weight: bold;
}

.right-panel {
    flex: 2;
    display: none;
    flex-direction: column;
    gap: 12px;
    min-width: 400px;
}

.forecast-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
}

.forecast-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.forecast-items {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.forecast-item {
    min-width: 120px;
    text-align: center;
    padding: 10px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
}

.forecast-day {
    font-weight: 600;
    margin-bottom: 5px;
}

.temp-high {
    color: #e74c3c;
}

.temp-low {
    color: #3498db;
}

#map-container {
    height: 300px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    overflow: hidden;
}

#map {
    height: 100%;
    width: 100%;
}

.weather-tip {
    margin-top: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    #weather-info {
        margin-right: 0;
        margin-bottom: 20px;
    }
}
/* === WEATHER ANIMATIONS WITH DEPTH === */
#weather-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* --- Sunny --- */
.sunny {
  background: linear-gradient(to top, #87cefa, #f0e68c);
}
.sunny::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 50%;
  width: 150px;
  height: 150px;
  margin-left: -75px;
  background: radial-gradient(circle, #FFD700, #FFA500);
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
  animation: sunSpin 20s linear infinite;
}
@keyframes sunSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.05); }
  100% { transform: rotate(360deg) scale(1); }
}

/* --- Cloudy --- */
.cloudy {
  background: linear-gradient(to top, #b0c4de, #d3d3d3);
}
.cloudy::before,
.cloudy::after {
  content: '';
  position: absolute;
  width: 250px;
  height: 100px;
  background: #fff;
  border-radius: 50%;
  filter: blur(2px);
}
.cloudy::before {
  top: 25%;
  left: -250px;
  animation: cloudMove 40s linear infinite;
}
.cloudy::after {
  top: 50%;
  left: -300px;
  opacity: 0.8;
  animation: cloudMove 60s linear infinite;
}
@keyframes cloudMove {
  from { transform: translateX(0); }
  to { transform: translateX(150vw); }
}

/* --- Rainy --- */
.rainy {
  background: linear-gradient(to top, #2c3e50, #3498db);
}
.rainy::before,
.rainy::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.4) 0px,
    rgba(255, 255, 255, 0.4) 2px,
    transparent 2px,
    transparent 8px
  );
}
.rainy::before {
  animation: rainFall 0.5s linear infinite;
}
.rainy::after {
  opacity: 0.5;
  animation: rainFallSlant 0.7s linear infinite;
}
@keyframes rainFall {
  0% { background-position: 0 0; }
  100% { background-position: 0 20px; }
}
@keyframes rainFallSlant {
  0% { background-position: 0 0; }
  100% { background-position: 5px 20px; }
}

/* --- Snowy --- */
.snowy {
  background: linear-gradient(to top, #a1c4fd, #c2e9fb);
}
.snowy::before,
.snowy::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(white 1px, transparent 1px);
}
.snowy::before {
  background-size: 20px 20px;
  animation: snowFall 5s linear infinite;
}
.snowy::after {
  background-size: 10px 10px;
  opacity: 0.6;
  animation: snowFall 8s linear infinite;
}
@keyframes snowFall {
  from { background-position: 0 0; }
  to { background-position: 0 20px; }
}

/* --- Hazy --- */
.hazy {
  background: linear-gradient(to top, #dcdcdc, #f5f5f5);
}
.hazy::before,
.hazy::after {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 10%, transparent 80%);
}
.hazy::before {
  top: -20%;
  left: -20%;
  animation: hazeDrift 30s linear infinite;
}
.hazy::after {
  top: -10%;
  left: -10%;
  opacity: 0.5;
  animation: hazeDrift 60s linear infinite;
}
@keyframes hazeDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(50px); }
}
