
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f8ff;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 1s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* 顶部区域样式 */
.header {
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav li {
    margin-left: 20px;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.nav a:hover {
    color: #007bff;
}

.search-container {
    display: flex;
    gap: 10px;
}

#city-input {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    width: 250px;
}

#search-btn {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#search-btn:hover {
    background-color: #0056b3;
}

/* 主体内容区域样式 */
.main-content {
    display: flex;
    padding: 30px;
    gap: 30px;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* 左侧分栏 - 实时天气 */
.current-weather {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: all 0.5s ease;
    border-left: 5px solid transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.weather-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.weather-info h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.weather-info img {
    width: 120px;
    height: 120px;
    margin: 20px 0;
}

.weather-info p {
    font-size: 18px;
    margin: 8px 0;
    color: #555;
}

.weather-info .update-time {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}

.weather-info .temperature {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    margin: 15px 0 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.weather-info .weather-desc {
    font-size: 20px;
    font-weight: 500;
    color: #444;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.weather-details {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 25px;
    padding: 15px;
    background-color: rgba(248, 249, 250, 0.5);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-label {
    font-size: 14px;
    color: #777;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* 右侧分栏 - 天气预报 */
.forecast {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 30px;
    transition: all 0.5s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.forecast h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.forecast-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.forecast-day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    background-color: rgba(248, 249, 250, 0.5);
    transition: all 0.3s ease;
    margin-bottom: 10px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-left: 4px solid transparent;
}

.forecast-day:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

.forecast-date {
    font-weight: bold;
    color: #333;
    width: 60px;
}

.forecast-icon {
    width: 50px;
    height: 50px;
}

.forecast-desc {
    flex: 1;
    text-align: center;
    color: #555;
    font-size: 16px;
}

.forecast-temp {
    display: flex;
    gap: 10px;
    width: 80px;
    justify-content: flex-end;
}

.forecast-high {
    color: #e74c3c;
    font-weight: bold;
}

.forecast-low {
    color: #3498db;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-container {
        width: 100%;
    }
    
    #city-input {
        width: 100%;
    }
}