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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #4682B4 100%); /* 改为天蓝色渐变 */
    min-height: 100vh;
    color: #333;
}

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

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.logo i {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-selector select {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.location-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.location-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 搜索栏 */
.search-section {
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 16px;
}

.search-box button {
    padding: 15px 20px;
    background: #0984e3;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #74b9ff;
}

/* 当前天气 */
.current-weather {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.weather-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.location-info h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.location-info p {
    color: #666;
    font-size: 1rem;
}

.temperature {
    display: flex;
    align-items: center;
    gap: 20px;
}

#currentTemp {
    font-size: 4rem;
    font-weight: 300;
    color: #0984e3;
}

.weather-icon i {
    font-size: 3rem;
    color: #f39c12;
}

.weather-description {
    text-align: center;
}

.weather-description p {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* 详细信息 */
.weather-details {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 15px;
    text-align: center;
}

.detail-item i {
    font-size: 2rem;
    color: #0984e3;
    margin-bottom: 10px;
}

.detail-item span:nth-child(2) {
    font-weight: 600;
    margin-bottom: 5px;
}

.detail-item span:last-child {
    font-size: 1.2rem;
    color: #0984e3;
    font-weight: 700;
}

/* 预报部分 */
.hourly-forecast, .daily-forecast, .historical-weather, .life-index {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.hourly-forecast h3, .daily-forecast h3, .historical-weather h3, .life-index h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #333;
}

.hourly-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.hourly-item {
    min-width: 100px;
    text-align: center;
    padding: 15px;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 15px;
    flex-shrink: 0;
}

.hourly-item .time {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.hourly-item .icon {
    font-size: 1.5rem;
    margin: 10px 0;
    color: #f39c12;
}

.hourly-item .temp {
    font-weight: 600;
    color: #0984e3;
}

.hourly-item .precipitation {
    font-size: 0.8rem;
    color: #74b9ff;
    margin-top: 5px;
}

.daily-container, .historical-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.daily-item, .historical-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 15px;
}

.daily-item .date, .historical-item .date {
    font-weight: 600;
    min-width: 100px;
}

.daily-item .weather, .historical-item .weather {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.daily-item .temps, .historical-item .temps {
    display: flex;
    gap: 10px;
    min-width: 100px;
}

.high-temp {
    font-weight: 600;
    color: #e74c3c;
}

.low-temp {
    color: #74b9ff;
}

/* 生活指数 */
.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.index-item {
    text-align: center;
    padding: 25px;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 15px;
}

.index-item i {
    font-size: 2.5rem;
    color: #0984e3;
    margin-bottom: 15px;
}

.index-item h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.index-item p {
    color: #666;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .weather-main {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .daily-item, .historical-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .index-grid {
        grid-template-columns: 1fr;
    }
}

/* 滚动条样式 */
.hourly-container::-webkit-scrollbar {
    height: 6px;
}

.hourly-container::-webkit-scrollbar-track {
    background: rgba(116, 185, 255, 0.1);
    border-radius: 3px;
}

.hourly-container::-webkit-scrollbar-thumb {
    background: #74b9ff;
    border-radius: 3px;
}

.hourly-container::-webkit-scrollbar-thumb:hover {
    background: #0984e3;
}