/* 天气动画背景 */
.weather-header {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: all 0.5s ease;
}

/* 头部天气样式 */
.app-header {
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.app-header.weather-sunny {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
}

.app-header.weather-cloudy {
    background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
}

.app-header.weather-rainy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.app-header.weather-thunderstorm {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
}

.app-header.weather-snowy {
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
}

.app-header.weather-foggy {
    background: linear-gradient(135deg, #d7d2cc 0%, #304352 100%);
}

.app-header.weather-sunrise {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ffecd2 100%);
}

.app-header.weather-sunset {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.app-header.weather-night {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

/* 头部天气图标 - 图片版 */
.app-header.weather-sunny::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: url('https://cdn-icons-png.flaticon.com/512/869/869869.png') center/contain no-repeat;
    filter: drop-shadow(0 0 15px rgba(255, 200, 0, 0.8));
    animation: pulse 3s ease-in-out infinite;
}

.app-header.weather-cloudy::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: url('https://cdn-icons-png.flaticon.com/512/414/414927.png') center/contain no-repeat;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

.app-header.weather-rainy::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: url('https://cdn-icons-png.flaticon.com/512/3351/3351979.png') center/contain no-repeat;
    filter: drop-shadow(0 3px 10px rgba(102, 126, 234, 0.6));
    animation: rainBounce 1.5s ease-in-out infinite;
}

.app-header.weather-thunderstorm::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: url('https://cdn-icons-png.flaticon.com/512/1146/1146860.png') center/contain no-repeat;
    filter: drop-shadow(0 0 20px rgba(255, 255, 0, 0.9));
    animation: thunderFlash 2s ease-in-out infinite;
}

.app-header.weather-snowy::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: url('https://cdn-icons-png.flaticon.com/512/642/642102.png') center/contain no-repeat;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9));
    animation: snowfall 3s ease-in-out infinite;
}

.app-header.weather-foggy::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: url('https://cdn-icons-png.flaticon.com/512/1146/1146869.png') center/contain no-repeat;
    filter: drop-shadow(0 2px 10px rgba(150, 150, 150, 0.5));
    animation: fogDrift 4s ease-in-out infinite;
}

.app-header.weather-sunrise::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: url('https://cdn-icons-png.flaticon.com/512/3222/3222800.png') center/contain no-repeat;
    filter: drop-shadow(0 0 18px rgba(255, 154, 158, 0.9));
    animation: sunriseGlow 4s ease-in-out infinite;
}

.app-header.weather-sunset::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: url('https://cdn-icons-png.flaticon.com/512/3222/3222796.png') center/contain no-repeat;
    filter: drop-shadow(0 0 18px rgba(250, 112, 154, 0.9));
    animation: sunsetGlow 4s ease-in-out infinite;
}

.app-header.weather-night::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: url('https://cdn-icons-png.flaticon.com/512/3222/3222807.png') center/contain no-repeat;
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.7));
    animation: moonGlow 3s ease-in-out infinite;
}

.app-header.weather-night .header-content::before {
    content: '';
    position: absolute;
    right: 90px;
    top: 25px;
    width: 25px;
    height: 25px;
    background: url('https://cdn-icons-png.flaticon.com/512/3222/3222691.png') center/contain no-repeat;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
    animation: starTwinkle 2s ease-in-out infinite;
}

/* 美化动画效果 */
@keyframes pulse {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
}

@keyframes float {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-55%) translateX(-5px); }
}

@keyframes rainBounce {
    0%, 100% { transform: translateY(-50%); }
    25% { transform: translateY(-48%); }
    75% { transform: translateY(-52%); }
}

@keyframes thunderFlash {
    0%, 85%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
    90% { opacity: 0.4; transform: translateY(-50%) scale(1.15); }
    95% { opacity: 1; transform: translateY(-50%) scale(1); }
}

@keyframes snowfall {
    0%, 100% { transform: translateY(-50%) rotate(-5deg); }
    50% { transform: translateY(-55%) rotate(5deg); }
}

@keyframes fogDrift {
    0%, 100% { transform: translateY(-50%) translateX(0); opacity: 0.7; }
    50% { transform: translateY(-50%) translateX(5px); opacity: 0.9; }
}

@keyframes sunriseGlow {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 0.9; }
    50% { transform: translateY(-50%) scale(1.08); opacity: 1; }
}

@keyframes sunsetGlow {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 1; }
    50% { transform: translateY(-50%) scale(1.05); opacity: 0.85; }
}

@keyframes moonGlow {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 0.95; }
    50% { transform: translateY(-50%) scale(1.06); opacity: 1; }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* 天气按钮图标样式 */
.weather-icon {
    display: block !important;
    width: 60px;
    height: 60px;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: none;
    margin: 0;
}

.weather-icon.weather-sunny {
    background-image: url('https://cdn-icons-png.flaticon.com/512/869/869869.png');
    filter: drop-shadow(0 0 8px rgba(255, 200, 0, 0.6));
    animation: pulse 3s ease-in-out infinite;
}

.weather-icon.weather-cloudy {
    background-image: url('https://cdn-icons-png.flaticon.com/512/414/414927.png');
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

.weather-icon.weather-rainy {
    background-image: url('https://cdn-icons-png.flaticon.com/512/3351/3351979.png');
    filter: drop-shadow(0 2px 6px rgba(102, 126, 234, 0.5));
    animation: rainBounce 1.5s ease-in-out infinite;
}

.weather-icon.weather-thunderstorm {
    background-image: url('https://cdn-icons-png.flaticon.com/512/1146/1146860.png');
    filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.7));
    animation: thunderFlash 2s ease-in-out infinite;
}

.weather-icon.weather-snowy {
    background-image: url('https://cdn-icons-png.flaticon.com/512/642/642102.png');
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7));
    animation: snowfall 3s ease-in-out infinite;
}

.weather-icon.weather-foggy {
    background-image: url('https://cdn-icons-png.flaticon.com/512/1146/1146869.png');
    filter: drop-shadow(0 2px 6px rgba(150, 150, 150, 0.4));
    animation: fogDrift 4s ease-in-out infinite;
}

.weather-icon.weather-sunrise {
    background-image: url('https://cdn-icons-png.flaticon.com/512/3222/3222800.png');
    filter: drop-shadow(0 0 10px rgba(255, 154, 158, 0.7));
    animation: sunriseGlow 4s ease-in-out infinite;
}

.weather-icon.weather-sunset {
    background-image: url('https://cdn-icons-png.flaticon.com/512/3222/3222796.png');
    filter: drop-shadow(0 0 10px rgba(250, 112, 154, 0.7));
    animation: sunsetGlow 4s ease-in-out infinite;
}

.weather-icon.weather-night {
    background-image: url('https://cdn-icons-png.flaticon.com/512/3222/3222807.png');
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
    animation: moonGlow 3s ease-in-out infinite;
}

/* 天气卡片背景动画 */
.weather-card {
    position: relative;
    overflow: hidden;
}

.weather-card.weather-sunny {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
}

.weather-card.weather-cloudy {
    background: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%);
}

.weather-card.weather-rainy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.weather-card.weather-thunderstorm {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
}

.weather-card.weather-snowy {
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
}

.weather-card.weather-foggy {
    background: linear-gradient(135deg, #d7d2cc 0%, #304352 100%);
}

.weather-card.weather-sunrise {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ffecd2 100%);
}

.weather-card.weather-sunset {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.weather-card.weather-night {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.weather-card h3 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.weather-card p {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.weather-card-header {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

.weather-card .weather-icon {
    width: 60px;
    height: 60px;
    display: block !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .app-header::after {
        width: 45px !important;
        height: 45px !important;
        right: 15px !important;
    }
    
    .app-header.weather-night .header-content::before {
        width: 20px !important;
        height: 20px !important;
        right: 70px;
    }
    
    .weather-icon {
        width: 50px;
        height: 50px;
    }
}