:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --warning-color: #fbbc05;
    --danger-color: #ea4335;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
/* 字体图标 */
.icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
  }

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.weather-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Search section */
.search-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 50px 30px;
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 40px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.search-section h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.search-section p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    position: relative;
}

.search-box {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-radius: 50px;
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    font-size: 1.1rem;
    outline: none;
    background: rgba(255,255,255,0.95);
}

.search-btn {
    padding: 0 35px;
    background: linear-gradient(to right, #ff8a00, #da1b60);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: linear-gradient(to right, #e67300, #c2185b);
    transform: translateY(-2px);
}

/* City weather section */
.city-weather-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.city-weather-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
}

/* City header */
.city-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.city-name {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
    font-weight: 700;
    display: flex;
    align-items: center;
}

.city-name svg {
    margin-right: 10px;
    color: var(--primary-color);
}

.city-meta {
    color: var(--gray-color);
    line-height: 1.6;
}

.city-location {
    margin-top: 5px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

/* Primary weather info */
.weather-primary {
    display: flex;
    align-items: center;
    gap: 20px;
}

.weather-icon-temp {
    display: flex;
    align-items: center;
}

.weather-icon {
    font-size: 4rem;
    margin-right: 20px;
    color: var(--primary-color);
}

.temperature {
    font-size: 3.5rem;
    font-weight: 300;
    position: relative;
}

.temperature::after {
    content: "°c";
    position: absolute;
    top: 0;
    right: -15px;
    font-size: 2rem;
}

.weather-description {
    font-size: 1.3rem;
    color: var(--gray-color);
    font-weight: 500;
}

/* Weather indicators */
.weather-key-indicators {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.indicator-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    border-radius: 12px;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.indicator-item:hover {
    background: linear-gradient(to bottom, #ffffff, #e9ecef);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.indicator-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.indicator-value {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--dark-color);
}

.indicator-label {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* New layout structure */
.city-weather-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* 24-hour chart area */
.hourly-chart-container {
    grid-column: 1;
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

#hourly-chart {
    width: 100%;
    height: 300px;
}

/* 7-day forecast area */
.forecast-container {
    grid-column: 2;
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--dark-color);
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

/* 7-day forecast */
.forecast-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.forecast-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(to right, #ffffff, #f8f9fa);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.03);
}

.forecast-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.forecast-day {
    font-weight: 600;
    color: var(--dark-color);
}

.forecast-icon {
    text-align: center;
}

.forecast-icon svg {
    font-size: 2rem;
    color: var(--warning-color);
}

.forecast-temp {
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
}

.max-temp {
    color: var(--danger-color);
    font-weight: 700;
}

.min-temp {
    color: var(--primary-color);
    font-weight: 700;
}

/* Popular cities section */
.popular-cities {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 40px;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.city-link {
    display: block;
    padding: 20px;
    background-color: var(--light-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--dark-color);
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.city-link:hover {
    background-color: #e9ecef;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    color: var(--primary-color);
}

/* Accurate forecast section */
.accurate-forecast {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 40px;
}

.accurate-forecast h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--dark-color);
    font-weight: 700;
}

.accurate-forecast p {
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .search-section h1 {
        font-size: 2.4rem;
    }
    
    .temperature {
        font-size: 3rem;
    }
    
    .weather-icon {
        font-size: 3.5rem;
    }
    
    .city-header {
        grid-template-columns: 1fr;
    }
    
    .weather-key-indicators {
        grid-column: 1;
    }
    
    .city-weather-content {
        grid-template-columns: 1fr;
    }
    
    .hourly-chart-container,
    .forecast-container {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .search-section {
        padding: 40px 20px;
    }
    
    .search-section h1 {
        font-size: 2rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .search-input {
        border-radius: 0;
        padding: 15px 20px;
    }
    
    .search-btn {
        border-radius: 0;
        padding: 15px;
    }
    
    .weather-key-indicators {
        grid-template-columns: 1fr 1fr;
    }
    
    .cities-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .accurate-forecast h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    .search-section h1 {
        font-size: 1.8rem;
    }
    
    .temperature {
        font-size: 2.5rem;
    }
    
    .weather-icon {
        font-size: 3rem;
    }
    
    .weather-key-indicators {
        grid-template-columns: 1fr;
    }
    
    .forecast-item {
        grid-template-columns: 1fr 1fr;
    }
    
    .forecast-icon {
        display: none;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
    }
}