/* 风次天气站 - 深色科技风 */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #7b2cff;
    --accent-color: #00ff88;
    --warning-color: #ffaa00;
    --danger-color: #ff4757;
    --bg-dark: #0a0e17;
    --bg-card: rgba(20, 30, 50, 0.7);
    --bg-card-hover: rgba(30, 50, 80, 0.9);
    --text-primary: #e0e6ed;
    --text-secondary: #8892b0;
    --border-glow: rgba(0, 212, 255, 0.3);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    margin-bottom: 10px;
}

.header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.search-btn, .location-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-btn:hover, .location-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* 热门城市 */
.hot-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.city-tag {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.city-tag:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* 主天气卡片 */
.weather-main {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.weather-main::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.weather-main-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.weather-left {
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.weather-icon {
    font-size: 6rem;
    margin-bottom: 10px;
}

.weather-temp {
    font-size: 5rem;
    font-weight: 300;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.weather-desc {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.weather-city {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-top: 5px;
}

.weather-right {
    flex: 1;
    min-width: 250px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-item {
    text-align: center;
    padding: 15px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* 卡片通用样式 */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* 小时预报 */
.hourly-forecast {
    margin-bottom: 30px;
}

.hourly-list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.hourly-list::-webkit-scrollbar {
    height: 6px;
}

.hourly-list::-webkit-scrollbar-track {
    background: transparent;
}

.hourly-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.hourly-item {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    padding: 15px 10px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
}

.hourly-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.hourly-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hourly-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.hourly-temp {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* 7天预报 */
.daily-forecast {
    margin-bottom: 30px;
}

.daily-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.daily-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 212, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.05);
    transition: all 0.3s ease;
}

.daily-item:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--primary-color);
}

.daily-date {
    width: 80px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.daily-icon {
    font-size: 1.8rem;
    width: 50px;
    text-align: center;
}

.daily-desc {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.daily-temp-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.temp-max {
    color: var(--danger-color);
    font-weight: 500;
}

.temp-min {
    color: var(--primary-color);
    font-weight: 500;
}

.temp-bar {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.temp-bar-fill {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--danger-color));
    border-radius: 3px;
}

/* 空气质量卡片 */
.air-quality {
    margin-bottom: 30px;
}

.aqi-main {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.aqi-value {
    font-size: 4rem;
    font-weight: 300;
    line-height: 1;
}

.aqi-level {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.aqi-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.aqi-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.aqi-item {
    text-align: center;
    padding: 15px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 12px;
}

.aqi-item-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.aqi-item-value {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* 生活指数 */
.life-index {
    margin-bottom: 30px;
}

.life-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.life-index-item {
    text-align: center;
    padding: 20px 15px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
}

.life-index-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.life-index-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.life-index-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.life-index-level {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 两列布局 */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 212, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
}

/* 错误提示 */
.error {
    text-align: center;
    padding: 50px;
    color: var(--danger-color);
}

/* 底部 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .weather-main {
        padding: 25px;
    }
    
    .weather-temp {
        font-size: 3.5rem;
    }
    
    .weather-icon {
        font-size: 4rem;
    }
    
    .weather-main-content {
        flex-direction: column;
        text-align: center;
    }
    
    .two-col {
        grid-template-columns: 1fr;
    }
    
    .aqi-main {
        flex-direction: column;
        text-align: center;
    }
    
    .daily-item {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .temp-bar {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .search-btn, .location-btn {
        width: 100%;
    }
}
