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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    transition: background-color 0.5s ease, background-image 0.5s ease;
}

/* 天气背景样式 */
body.weather-sunny {
    background-color: #e3f2fd;
    background-image: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

body.weather-cloudy {
    background-color: #f5f5f5;
    background-image: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

body.weather-rainy {
    background-color: #e0e0e0;
    background-image: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
}

body.weather-snowy {
    background-color: #fafafa;
    background-image: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

body.weather-night {
    background-color: #1a237e;
    background-image: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: #fff;
}

body.weather-night .header,
body.weather-night .today-weather,
body.weather-night .hourly-forecast,
body.weather-night .weekly-forecast,
body.weather-night .hot-cities,
body.weather-night .life-index {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
}

body.weather-night .temp,
body.weather-night .weather-text,
body.weather-night .hourly-temp,
body.weather-night .weekly-temp,
body.weather-night .city-temp,
body.weather-night .index-value {
    color: #fff;
}

body.weather-night .temp-range,
body.weather-night .location p,
body.weather-night .weather-other p,
body.weather-night .hour,
body.weather-night .date,
body.weather-night .city-desc,
body.weather-night .index-name,
body.weather-night .index-desc {
    color: rgba(255, 255, 255, 0.8);
}

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

/* 顶部导航栏 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px 0;
}

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

.logo h1 {
    color: #1e88e5;
    font-size: 24px;
    font-weight: bold;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-input {
    width: 300px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-btn {
    width: 80px;
    height: 40px;
    background-color: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    cursor: pointer;
}

.search-btn:hover {
    background-color: #1976d2;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav li {
    margin-right: 30px;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.nav a:hover {
    color: #1e88e5;
}

/* 主要内容区域 */
.main {
    padding: 20px 0;
}

/* 天气预警信息 */
.warning-section {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    padding: 15px 0;
    margin-bottom: 20px;
}

.warning-content {
    display: flex;
    align-items: center;
}

.warning-icon {
    font-size: 18px;
    margin-right: 10px;
}

.warning-text {
    color: #856404;
    font-size: 14px;
}

/* 今日天气 */
.today-weather {
    background-color: #fff;
    border-radius: 4px;
    padding: 30px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.location h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.location p {
    font-size: 14px;
    color: #666;
}

.weather-details {
    display: flex;
    align-items: center;
}

.temperature {
    margin-right: 30px;
}

.temp {
    font-size: 66px;
    font-weight: bold;
    color: #333;
}

.temp-range {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

.weather-desc {
    margin-right: 30px;
    text-align: center;
}

.weather-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.weather-text {
    font-size: 16px;
    color: #333;
    position: relative;
    top: -20px;
}

.weather-other p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.voice-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 10px;
    vertical-align: middle;
}

.voice-btn:hover {
    background-color: #1976d2;
}

.voice-btn span:first-child {
    font-size: 14px;
}

/* 24小时天气预报 */
.hourly-forecast {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.hourly-forecast h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.hourly-list {
    display: flex;
    justify-content: space-between;
}

.hourly-item {
    text-align: center;
    width: 12.5%;
}

.hour {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.hourly-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
}

.hourly-temp {
    display: block;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 7天天气预报 */
.weekly-forecast {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.weekly-forecast h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.weekly-list {
    display: flex;
    justify-content: space-between;
}

.weekly-item {
    text-align: center;
    width: 14.28%;
}

.day {
    display: block;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-bottom: 5px;
}

.date {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.weekly-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
}

.weekly-temp {
    display: block;
    font-size: 14px;
    color: #333;
}

/* 热门城市天气 */
.hot-cities {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.hot-cities h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.cities-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.xilinhaote-main-container {
    display: flex;
    gap: 30px;
    align-items: stretch;
    width: 100%;
    padding: 20px;
    border-radius: 8px;
    background-color: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.city-item {
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 300px;
    padding: 20px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.city-weather-details {
    margin-top: auto;
    padding-top: 15px;
}

.city-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.city-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    flex: 0 0 auto;
}

.city-temp {
    font-size: 28px;
    font-weight: bold;
    color: #1e88e5;
    flex: 0 0 auto;
}

.city-desc {
    font-size: 16px;
    color: #666;
    flex: 1;
}

.city-weather-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.city-humidity,
.city-wind,
.city-pressure {
    display: inline-block;
    font-size: 14px;
    color: #666;
    background-color: #f9f9f9;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.city-humidity:hover,
.city-wind:hover,
.city-pressure:hover {
    background-color: #e3f2fd;
    border-color: #bbdefb;
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.1);
}

/* 锡林浩特市七天预报样式 */
.xilinhaote-weekly {
    flex: 1;
    min-width: 500px;
    padding: 20px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.xilinhaote-weekly-list {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.xilinhaote-weekly-item {
    text-align: center;
    min-width: 100px;
    padding: 15px;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.xilinhaote-weekly-item:hover {
    background-color: #e3f2fd;
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.1);
}

.xilinhaote-weekly-day {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.xilinhaote-weekly-date {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.xilinhaote-weekly-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 10px;
}

.xilinhaote-weekly-temp {
    display: block;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 响应式设计调整 */
@media (max-width: 1200px) {
    .xilinhaote-main-container {
        gap: 20px;
        padding: 15px;
    }
    
    .city-item {
        min-width: 250px;
        padding: 15px;
    }
    
    .xilinhaote-weekly {
        min-width: 400px;
        padding: 15px;
    }
}

@media (max-width: 992px) {
    .xilinhaote-main-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .city-item {
        min-width: auto;
    }
    
    .xilinhaote-weekly {
        min-width: auto;
        margin-top: 20px;
    }
    
    .weather-details {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .temperature {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .weather-desc {
        margin-right: 0;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .logo {
        text-align: center;
    }
    
    .search-box {
        width: 100%;
        display: flex;
        flex-direction: row;
    }
    
    .search-input {
        flex: 1;
        width: auto;
        min-width: 0;
    }
    
    .nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .nav li {
        flex: 1 1 calc(33.333% - 10px);
        text-align: center;
    }
    
    .hourly-list {
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .hourly-item {
        flex: 0 0 auto;
        width: 80px;
    }
    
    .weekly-list {
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .weekly-item {
        flex: 0 0 auto;
        width: 100px;
    }
    
    .index-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .xilinhaote-weekly-list {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .xilinhaote-weekly-item {
        flex: 1 1 calc(50% - 10px);
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 10px 0;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .search-box {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        width: 100%;
        height: 48px;
        font-size: 16px;
    }
    
    .search-btn {
        width: 100%;
        height: 48px;
        font-size: 16px;
    }
    
    .nav li {
        flex: 1 1 50%;
    }
    
    .warning-text {
        font-size: 14px;
    }
    
    .temp {
        font-size: 36px;
    }
    
    .temp-range {
        font-size: 14px;
    }
    
    .weather-icon {
        font-size: 36px;
    }
    
    .weather-text {
        font-size: 14px;
    }
    
    .index-grid {
        grid-template-columns: 1fr;
    }
    
    .city-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .city-name {
        font-size: 18px;
    }
    
    .city-temp {
        font-size: 24px;
    }
    
    .city-desc {
        font-size: 14px;
    }
    
    .city-weather-details {
        flex-direction: column;
        gap: 10px;
    }
    
    .city-humidity,
    .city-wind,
    .city-pressure {
        width: 100%;
        text-align: center;
    }
    
    .location > div {
        flex-direction: row;
        align-items: flex-start;
        gap: 5px;
    }
    
    .voice-btn {
        margin-top: 0px;
    }
}

/* 生活指数 */
.life-index {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.life-index h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.index-item {
    text-align: center;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

.index-name {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.index-value {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #1e88e5;
    margin-bottom: 10px;
}

.index-desc {
    display: block;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.footer-content p {
    font-size: 14px;
    margin-bottom: 10px;
}

iframe {
    height: 500px;
}
#radarLink{color: #333; text-decoration: none;}
/* 默认显示 PC 链接，隐藏手机链接 */
.pc-link, .mobile-link {color: #333; text-decoration: none;}
.pc-link { display: inline; }
.mobile-link { display: none; }

/* 小屏幕时切换 */
@media screen and (max-width: 768px) {
    .pc-link { display: none; }
    .mobile-link { display: inline; }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        margin-bottom: 20px;
        display: none;
    }

    .search-input {
        width: 250px;
    }

    .nav ul {
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .nav li {
        margin-right: 20px;
    }

    .weather-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .weather-details {
        margin-top: 20px;
        width: 100%;
        justify-content: space-between;
    }

    .hourly-list {
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .hourly-item {
        min-width: 80px;
        margin-right: 20px;
    }

    .weekly-list {
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .weekly-item {
        min-width: 100px;
        margin-right: 20px;
    }

    .cities-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

@media (max-width: 480px) {
    .search-input {
        width: 100%;
        padding: 12px 16px;
    }

    .weather-details {
        flex-direction: column;
        align-items: flex-start;
    }

    .temperature,
    .weather-desc {
        margin-right: 0;
        margin-bottom: 20px;
    }

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

    .index-grid {
        grid-template-columns: 1fr;
    }
}