* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2d3436;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo span {
    background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.unit-toggle, .location-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 15px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.unit-toggle:hover, .location-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.2) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.location-btn {
    padding: 10px;
}

/* Search Section */
.search-section {
    margin-bottom: 30px;
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 15px 60px 15px 20px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(20px);
    font-size: 1rem;
    font-weight: 500;
    color: #2d3436;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.search-input::placeholder {
    color: #636e72;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 10px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Loading and Error States */
.loading, .error-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: #ff6b6b;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.error-message svg {
    color: #ff6b6b;
    filter: drop-shadow(0 2px 4px rgba(255, 107, 107, 0.3));
}

/* Current Weather */
.current-weather {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.current-weather:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.current-weather-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.weather-icon-large img {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.current-temp {
    text-align: right;
}

.current-temp span {
    font-size: 4.5rem;
    font-weight: 300;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.current-location {
    margin-top: 10px;
}

.current-location span:first-child {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 5px;
}

.current-location span:last-child {
    font-size: 0.95rem;
    color: #636e72;
    font-weight: 500;
}

.current-weather-details {
    border-top: 1px solid #e9ecef;
    padding-top: 25px;
}

.weather-description {
    text-align: center;
    margin-bottom: 20px;
}

.weather-description span {
    font-size: 1.2rem;
    font-weight: 500;
    color: #2d3436;
    text-transform: capitalize;
}

.weather-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.2) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #636e72;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat span:last-child {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3436;
}

/* Forecast */
.forecast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.forecast:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.forecast-title, .highlights-title {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    text-align: center;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.forecast-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.forecast-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.forecast-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.forecast-item:hover::before {
    left: 100%;
}

.forecast-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: #636e72;
    margin-bottom: 10px;
}

.forecast-icon img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.forecast-temps {
    margin-bottom: 10px;
}

.forecast-high {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3436;
    margin-right: 8px;
}

.forecast-low {
    font-size: 1rem;
    color: #636e72;
    font-weight: 500;
}

.forecast-desc {
    font-size: 0.85rem;
    color: #636e72;
    text-transform: capitalize;
    font-weight: 500;
}

/* Highlights */
.highlights {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.highlights:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.highlight-card {
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.highlight-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.highlight-card:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.highlight-card:hover::after {
    transform: scaleX(1);
}

.highlight-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #636e72;
    margin-bottom: 15px;
}

.highlight-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.highlight-description {
    font-size: 0.9rem;
    color: #636e72;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .current-weather-main {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .current-temp {
        text-align: center;
    }
    
    .current-temp span {
        font-size: 3.5rem;
    }
    
    .weather-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .forecast-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .highlights-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-input {
        padding: 12px 50px 12px 15px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .current-weather, .forecast, .highlights {
        padding: 20px;
        border-radius: 20px;
    }
    
    .weather-stats {
        grid-template-columns: 1fr;
    }
    
    .forecast-container {
        grid-template-columns: 1fr;
    }
    
    .current-temp span {
        font-size: 3rem;
    }
    
    .weather-icon-large img {
        width: 100px;
        height: 100px;
    }
}

/* Weather condition backgrounds */
.sunny {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

.sunny::before {
    background: radial-gradient(circle at 30% 70%, rgba(255, 206, 84, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255, 154, 158, 0.3) 0%, transparent 50%);
}

.cloudy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cloudy::before {
    background: radial-gradient(circle at 25% 75%, rgba(168, 237, 234, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 75% 25%, rgba(254, 214, 227, 0.3) 0%, transparent 50%);
}

.rainy {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.rainy::before {
    background: radial-gradient(circle at 20% 80%, rgba(79, 172, 254, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0, 242, 254, 0.3) 0%, transparent 50%);
}

.snowy {
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
}

.snowy::before {
    background: radial-gradient(circle at 40% 60%, rgba(224, 234, 252, 0.5) 0%, transparent 50%),
                radial-gradient(circle at 60% 40%, rgba(207, 222, 243, 0.4) 0%, transparent 50%);
}

.night {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6741 100%);
}

.night::before {
    background: radial-gradient(circle at 30% 70%, rgba(74, 103, 65, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(44, 62, 80, 0.4) 0%, transparent 50%);
}

/* Animation for weather updates */
.weather-update {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer {
  text-align: center;
  padding: 15px;
  background: #222;
  color: #fff;
  font-size: 14px;
}

.footer p {
  margin: 5px 0;
}
