/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #003478; /* 太极蓝 - 韩国国旗色 */
    --secondary-color: #C60C30; /* 太极红 */
    --gold: #FFD700; /* 金色 */
    --black: #000000; /* 黑色 */
    --text-primary: #333333;
    --text-secondary: #666666;
    --bg-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Dotum', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
}

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

/* ========== 头部样式 ========== */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-color);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weather-icon {
    font-size: 36px;
}

.logo-text h1 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: bold;
}

.subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.search-box {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 52, 120, 0.1);
}

.search-box button {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ========== 主要内容 ========== */
.main-content {
    padding: 30px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 24px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.region-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.region-tab {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.region-tab:hover,
.region-tab.active {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

/* ========== 地图区域 ========== */
.map-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.map-container {
    width: 100%;
    height: 600px;
    border-radius: 8px;
}

/* ========== 当前天气卡片 ========== */
.current-weather {
    margin-bottom: 30px;
}

.weather-card {
    background: linear-gradient(135deg, #003478 0%, #0056b3 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.weather-card::before {
    content: '🇰🇷';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 200px;
    opacity: 0.1;
}

.weather-header {
    margin-bottom: 30px;
}

.weather-header h3 {
    font-size: 36px;
    margin-bottom: 8px;
}

.weather-date {
    font-size: 16px;
    opacity: 0.9;
}

.weather-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.temperature {
    display: flex;
    align-items: flex-start;
}

.temp-value {
    font-size: 96px;
    font-weight: 700;
    line-height: 1;
}

.temp-unit {
    font-size: 36px;
    margin-top: 10px;
}

.weather-info {
    flex: 1;
    min-width: 300px;
}

.weather-condition {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.weather-icon-large {
    font-size: 64px;
}

.weather-condition span:last-child {
    font-size: 28px;
    font-weight: 600;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.detail-label {
    font-size: 14px;
    opacity: 0.9;
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
}

/* ========== 韩国特色功能卡片 ========== */
.special-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.feature-card h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.season-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.season-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-radius: 8px;
}

.season-name {
    font-weight: bold;
    color: var(--primary-color);
}

.dust-info {
    padding: 12px;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-radius: 8px;
}

.dust-status {
    margin: 8px 0;
    font-size: 14px;
}

.last-update {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* ========== 7天预报 ========== */
.forecast-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.forecast-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.forecast-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.forecast-date {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.forecast-icon {
    font-size: 36px;
    margin: 10px 0;
}

.forecast-condition {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.forecast-temp {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.forecast-temp .high {
    color: var(--secondary-color);
}

.forecast-temp .low {
    color: var(--primary-color);
}

/* ========== 主要城市网格 ========== */
.cities-grid {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.cities-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.city-card {
    background: linear-gradient(135deg, #003478 0%, #C60C30 100%);
    border-radius: 8px;
    padding: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.city-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.city-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.city-weather {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-icon {
    font-size: 28px;
}

.city-temp {
    font-size: 22px;
    font-weight: 700;
}

.city-info {
    margin-top: 15px;
    font-size: 12px;
    opacity: 0.9;
}

/* ========== 页脚 ========== */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 0;
    margin-top: 40px;
}

.footer .container {
    text-align: center;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .weather-main {
        flex-direction: column;
    }

    .temp-value {
        font-size: 72px;
    }

    .weather-details {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .region-tabs {
        width: 100%;
    }

    .region-tab {
        font-size: 11px;
        padding: 6px 12px;
    }

    .map-container {
        height: 400px;
    }

    .forecast-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .cities-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 18px;
    }

    .temp-value {
        font-size: 56px;
    }

    .forecast-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .cities-container {
        grid-template-columns: 1fr;
    }
}

/* ========== 动画效果 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weather-card,
.forecast-card,
.city-card,
.feature-card {
    animation: fadeIn 0.5s ease-out;
}

/* 太极图案装饰（可选） */
.taichi-pattern {
    position: fixed;
    font-size: 100px;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}
