/**
 * 天气显示样式 — 简洁内联风格
 */

/* 天气显示容器 - 内联在日期行中，无装饰 */
.weather-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* 天气图标 — 隐藏 */
.weather-icon {
    display: none;
}

/* 温度显示 */
.weather-temp {
    font-size: 2vw;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

/* 天气描述 */
.weather-desc {
    font-size: 1.6vw;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

/* 天气信息容器 — 改为横向排列 */
.weather-info {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
}

/* 天气效果容器 */
.weather-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

/* 雨滴效果 */
.rain-effect {
    opacity: 0.6;
}

.raindrop {
    position: absolute;
    top: -10%;
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0) 0%,
        rgba(174, 194, 224, 0.8) 50%,
        rgba(174, 194, 224, 0) 100%
    );
    animation: rainFall linear infinite;
}

@keyframes rainFall {
    to {
        transform: translateY(110vh);
    }
}

/* 雪花效果 */
.snow-effect {
    opacity: 0.8;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: snowFall linear infinite;
}

@keyframes snowFall {
    to {
        transform: translateY(110vh) rotate(360deg);
    }
}

/* 阴天背景效果 */
body.weather-cloudy {
    filter: brightness(0.92);
}

/* 响应式设计 - 平板 */
@media (max-width: 768px) {
    .weather-temp {
        font-size: 3vw;
    }
    
    .weather-desc {
        font-size: 2.4vw;
    }
}

/* 响应式设计 - 手机竖屏 */
@media (max-width: 480px) {
    .weather-temp {
        font-size: 3.5vw;
    }
    
    .weather-desc {
        font-size: 2.8vw;
    }
}

/* 响应式设计 - 手机横屏 */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .weather-temp {
        font-size: 1.6vw;
    }
    
    .weather-desc {
        font-size: 1.3vw;
    }
    
    /* 减少雨滴和雪花数量以提高性能 */
    .raindrop:nth-child(n+30),
    .snowflake:nth-child(n+20) {
        display: none;
    }
}

/* 更小的横屏设备 */
@media (max-width: 700px) and (max-height: 400px) and (orientation: landscape) {
    .weather-temp {
        font-size: 1.3vw;
    }
    
    .weather-desc {
        font-size: 1vw;
    }
}

/* 天气刷新动画 */
@keyframes weatherRefresh {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.weather-display.refreshing {
    animation: weatherRefresh 1s ease-in-out;
}
