/* 天气模态框简化样式 */
.weather-modal-content {
    max-width: 320px;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
    transition: transform 0.2s ease;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.weather-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weather-close-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4361ee;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .weather-modal-content {
        max-width: 280px;
        max-height: 380px;
    }
    
    .weather-details {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .weather-modal-content {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .weather-header {
        background: #363636;
        border-bottom-color: #404040;
    }
    
    .weather-current {
        border-bottom-color: #404040 !important;
    }
    
    .weather-city,
    .weather-update-time {
        color: #999 !important;
    }
    
    .weather-desc {
        color: #ddd !important;
    }
    
    .weather-detail {
        background: #363636 !important;
    }
    
    .detail-label {
        color: #999 !important;
    }
    
    .detail-value {
        color: #ddd !important;
    }
    
    .weather-warning {
        background: #3a2f0f !important;
        border-left-color: #ffc107 !important;
    }
    
    .warning-text,
    .warning-title {
        color: #ddd !important;
    }
    
    .warning-time {
        color: #999 !important;
    }
    
    .auto-refresh-info {
        border-top-color: #404040 !important;
    }
    
    .weather-close-btn {
        color: #999;
    }
    
    .weather-close-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ddd;
    }
}