* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    animation: backgroundShift 30s ease-in-out infinite;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

@keyframes backgroundShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Gradient variations based on weather and time */
body.morning-sunny {
    animation: morningShift 30s ease-in-out infinite;
    background: linear-gradient(-45deg, #FF6B6B, #FFA500, #FFD700, #FF69B4);
    background-size: 400% 400%;
}

body.morning-cloudy {
    animation: morningShift 30s ease-in-out infinite;
    background: linear-gradient(-45deg, #7792aa, #5963cc, #85c5da, #9d60c9);
    background-size: 400% 400%;
}

body.afternoon-sunny {
    animation: afternoonSunnyShift 30s ease-in-out infinite;
    background: linear-gradient(-45deg, #87CEEB, #FFD700, #FF8C00, #4169E1);
    background-size: 400% 400%;
}

body.afternoon-cloudy {
    animation: afternoonCloudyShift 30s ease-in-out infinite;
    background: linear-gradient(-45deg, #B0C4DE, #778899, #A9A9A9, #87CEEB);
    background-size: 400% 400%;
}

body.evening {
    animation: eveningShift 30s ease-in-out infinite;
    background: linear-gradient(-45deg, #FF6347, #FF8C00, #9370DB, #6A5ACD);
    background-size: 400% 400%;
}

body.night-clear {
    animation: nightShift 30s ease-in-out infinite;
    background: linear-gradient(-45deg, #0F2027, #203A43, #2C5282, #1a3a52);
    background-size: 400% 400%;
}

body.night-cloudy {
    animation: nightShift 30s ease-in-out infinite;
    background: linear-gradient(-45deg, #0F2027, #1a1a2e, #16213e, #0f3460);
    background-size: 400% 400%;
}

body.rainy {
    animation: rainyShift 30s ease-in-out infinite;
    background: linear-gradient(-45deg, #34495e, #7f8c8d, #2c3e50, #5d6d7b);
    background-size: 400% 400%;
}

body.snowy {
    animation: snowyShift 30s ease-in-out infinite;
    background: linear-gradient(-45deg, #ecf0f1, #bdc3c7, #f0f8ff, #d3d3d3);
    background-size: 400% 400%;
}

@keyframes morningShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes afternoonSunnyShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes afternoonCloudyShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes eveningShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes nightShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes rainyShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes snowyShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
}

@supports (min-height: 100dvh) {
    .container {
        min-height: 100dvh;
    }
}

.weather-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    width: 100%;
    color: white;
    margin: auto;
    /* animation: cardFloat 4s ease-in-out infinite; */
}

/* @keyframes cardFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
} */

.location h1 {
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.time {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.weather-info {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 30px;
    flex-wrap: wrap;
}

.temperature {
    display: flex;
    align-items: flex-start;
}

.hourly-chart-wrap {
    flex: 1;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 10px 12px;
}

.hourly-chart-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 6px;
}

.hourly-chart {
    width: 100%;
    height: 90px;
    display: block;
}

.hourly-chart polyline {
    fill: none;
    stroke: rgba(255, 255, 255, 0.95);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hourly-chart-point {
    fill: rgba(255, 255, 255, 1);
    stroke: rgba(30, 45, 65, 0.45);
    stroke-width: 1;
}

.hourly-chart-point-label {
    fill: rgba(255, 255, 255, 0.95);
    font-size: 8px;
    font-weight: 700;
    text-anchor: middle;
    paint-order: stroke;
    stroke: rgba(30, 45, 65, 0.5);
    stroke-width: 1.5;
}

.hourly-chart-labels {
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    opacity: 0.75;
}

.temp-value {
    font-size: 72px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.temp-unit {
    font-size: 32px;
    margin-top: 10px;
    opacity: 0.8;
}

.weather-description p {
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.weather-description {
    width: 100%;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.detail .label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.detail .value {
    font-size: 16px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.forecast-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.forecast-section h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.forecast-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.forecast-day {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, background 0.3s ease;
}

.forecast-day:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.forecast-day-name {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.forecast-day-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.forecast-day-temp {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
}

.forecast-day-temp-max {
    font-weight: 600;
}

.forecast-day-temp-min {
    opacity: 0.7;
}

.forecast-day-description {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 6px;
    line-height: 1.3;
}

@media (max-width: 480px) {
    .weather-card {
        padding: 20px;
    }

    .location h1 {
        font-size: 24px;
    }

    .temp-value {
        font-size: 56px;
    }

    .temp-unit {
        font-size: 28px;
    }

    .weather-description p {
        font-size: 18px;
    }

    .weather-info {
        gap: 16px;
    }

    .hourly-chart-wrap {
        min-width: 100%;
    }

    .weather-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }

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

    .forecast-day {
        padding: 10px;
    }

    .forecast-day-name {
        font-size: 11px;
    }

    .forecast-day-icon {
        font-size: 20px;
    }

    .forecast-day-temp {
        font-size: 12px;
    }

    .forecast-day-description {
        font-size: 10px;
    }
}
