/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

/* 天气预报容器 */
.weather-container {
    width: 870px;
    height: 140px;
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: background 0.5s ease;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    z-index: 1;
}

/* 城市选择部分 */
.city-selection {
    width: 15%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 2;
}

.selection-boxes {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 6px;
}

#provinceSelect, #citySelect, #countySelect {
    padding: 4px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    outline: none;
}

/* 天气日期部分 */
.weather-day {
    width: 28.333%; /* 85% / 3 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.weather-day:last-child {
    border-right: none;
}

.date {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.weather-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
    font-size: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.temperature {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 3px;
}

.description {
    font-size: 14px;
    text-align: center;
}

/* 天气背景变化类 */
.bg-sunny {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    position: relative;
    overflow: hidden;
}

.bg-sunny::after {
    content: '☀️';
    position: absolute;
    font-size: 100px;
    top: -20px;
    right: -20px;
    animation: sunRotate 20s linear infinite;
    opacity: 0.7;
    z-index: -10;
}

.bg-sunny .sun-ray {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform-origin: center center;
    animation: sunRayPulse 3s ease-in-out infinite;
    z-index: -10;
}

.bg-cloudy {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    position: relative;
    overflow: hidden;
}

.bg-cloudy .cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    animation: cloudMove 20s linear infinite;
    z-index: -10;
}

.bg-rainy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.bg-rainy .raindrop {
    position: absolute;
    width: 2px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 0 5px 5px;
    animation: rainDrop 1s linear infinite;
    z-index: -10;
}

.bg-snowy {
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    position: relative;
    overflow: hidden;
}

.bg-snowy .snowflake {
    position: absolute;
    color: #ffffff;
    font-size: 16px;
    animation: snowFall 3s linear infinite;
    z-index: -10;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.bg-overcast {
    background: linear-gradient(135deg, #c9d6ff 0%, #e2e2e2 100%);
    position: relative;
    overflow: hidden;
}

.bg-foggy {
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    position: relative;
    overflow: hidden;
}

/* 背景动画 */
@keyframes sunRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes sunRayPulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes cloudMove {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(1000px);
    }
}

@keyframes rainDrop {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(160px);
        opacity: 0;
    }
}

@keyframes snowFall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(160px) rotate(360deg);
        opacity: 0;
    }
}