        body {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
            background-size: cover;
            background-position: center 30%;
            background-repeat: no-repeat;
            background-attachment: fixed;
            min-height: 100vh;
            position: relative;
            font-weight: 400;
            line-height: 1.6;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* 仅针对移动设备和iOS设备的特殊处理 */
        @media only screen and (max-width: 768px), 
               only screen and (-webkit-min-device-pixel-ratio: 2) and (max-device-width: 1024px) {
            body {
                background-attachment: scroll !important;
                background-position: center 20% !important;
                background-size: cover !important;
                /* 保持cover以确保背景覆盖整个屏幕 */
            }
        }
        
        /* 超小屏幕（手机）优化 - 降低背景透明度遮罩 */
        @media only screen and (max-width: 480px) {
            body::before {
                background: rgba(0, 0, 0, 0.2) !important;
                /* 减少遮罩的透明度，让背景更清晰 */
            }
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.3);
            z-index: -1;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* 标题字体优化 */
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Inter', 'Noto Sans SC', sans-serif;
            font-weight: 600;
            line-height: 1.3;
            letter-spacing: -0.02em;
        }

        h1 { font-size: 2.5rem; font-weight: 700; }
        h2 { font-size: 2rem; font-weight: 600; }
        h3 { font-size: 1.5rem; font-weight: 600; }
        
        /* 段落优化 */
        p {
            font-weight: 400;
            line-height: 1.7;
            color: inherit;
        }

        /* 按钮通用样式优化 */
        button {
            font-family: inherit;
            font-weight: 500;
            letter-spacing: 0.01em;
        }

        header {
            background-color: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            padding: 1rem;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
        }

        @media (prefers-color-scheme: dark) {
            header {
                background-color: rgba(45, 45, 45, 0.9);
                box-shadow: 0 2px 5px rgba(0,0,0,0.3);
            }
        }

        .header-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            height: 50px;
            width: auto;
            min-width: 120px;
            background-image: url('logo-light.png');
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }

        /* 暗色模式下使用暗色logo */
        @media (prefers-color-scheme: dark) {
            .logo {
                background-image: url('logo-dark.png');
            }
        }

        nav ul {
            display: flex;
            list-style: none;
        }

        nav ul li {
            margin-left: 2rem;
        }

        nav ul li a {
            text-decoration: none;
            color: #333;
            font-weight: bold;
            transition: color 0.3s;
        }

        @media (prefers-color-scheme: dark) {
            nav ul li a {
                color: #fff;
            }
        }

        nav ul li a:hover {
            color: #000000;
        }

        @media (prefers-color-scheme: dark) {
            nav ul li a:hover {
                color: #ccc;
            }
        }

        /* 响应式导航 - 渐进式隐藏低优先级按钮 */
        
        /* 减小按钮间距以适应中等屏幕 */
        @media (max-width: 900px) {
            nav ul li {
                margin-left: 1.5rem;
            }
        }
        
        @media (max-width: 800px) {
            nav ul li {
                margin-left: 1.3rem;
            }
        }
        
        /* 平板竖屏：减小字体和间距 */
        @media (max-width: 700px) {
            nav ul li {
                margin-left: 1rem;
            }
            
            nav ul li a {
                font-size: 15px;
            }
        }
        
        /* 大手机横屏：隐藏切换城市（最低优先级） */
        @media (max-width: 580px) {
            nav ul li.priority-4 {
                display: none;
            }
            
            nav ul li {
                margin-left: 1.2rem;
            }
        }
        
        /* 手机横屏：隐藏首页 */
        @media (max-width: 480px) {
            nav ul li.priority-3 {
                display: none;
            }
            
            nav ul li {
                margin-left: 1rem;
            }
            
            nav ul li a {
                font-size: 14px;
            }
        }
        
        /* 手机竖屏：隐藏天气预警 */
        @media (max-width: 400px) {
            nav ul li.priority-2 {
                display: none;
            }
            
            nav ul li {
                margin-left: 0.8rem;
            }
        }
        
        /* 小手机：只保留关于我们，优化布局 */
        @media (max-width: 340px) {
            nav ul li {
                margin-left: 0.5rem;
            }
            
            nav ul li a {
                font-size: 13px;
                padding: 8px 10px;
            }
            
            header {
                padding: 0.8rem 0.6rem;
            }
            
            .logo {
                width: 38px;
                height: 38px;
            }
        }
        
        /* 极小屏幕：进一步压缩 */
        @media (max-width: 300px) {
            nav ul li.priority-1 a {
                font-size: 12px;
                padding: 6px 8px;
            }
            
            .logo {
                width: 32px;
                height: 32px;
            }
            
            header {
                padding: 0.5rem 0.5rem;
            }
        }

        main {
            margin-top: 90px;
            min-height: calc(100vh - 90px - 200px);
            position: relative;
            z-index: 1;
        }

        .weather-display {
            position: relative;
            min-height: 500px;
            color: #fff;
            text-align: center;
            padding: 2rem;
            margin-bottom: 3rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .weather-info {
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(10px);
            padding: 2rem;
            border-radius: 15px;
            display: inline-block;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            max-width: 480px;
            width: 100%;
        }

        .weather-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1.5rem;
        }

        .location-info h1 {
            margin: 0;
            font-size: 1.8rem;
            font-weight: 700;
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        }

        .date-info {
            margin: 0.2rem 0 0 0;
            font-size: 0.9rem;
            color: rgba(255,255,255,0.8);
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        }

        .main-weather {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            gap: 2rem;
        }

        .temperature-section {
            flex: 1;
        }

        .temperature {
            font-size: 3.5rem;
            font-weight: 300;
            margin: 0;
            color: #fff;
            text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
            line-height: 1;
        }

        .weather-condition {
            font-size: 1.2rem;
            margin: 0.5rem 0;
            color: rgba(255,255,255,0.9);
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            font-weight: 500;
        }

        .feels-like {
            font-size: 0.95rem;
            margin: 0.8rem 0 0 0;
            color: rgba(255,255,255,0.8);
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        }

        .feels-like span {
            font-weight: 600;
            color: #fff;
        }

        .sun-info {
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
            align-items: flex-end;
        }

        .sun-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: #fff;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            font-weight: 500;
        }

        .sun-icon {
            font-size: 1.2rem;
            filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
        }

        .weather-details {
            background: rgba(255,255,255,0.1);
            border-radius: 12px;
            padding: 1.5rem;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255,255,255,0.2);
        }

        .detail-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 1rem;
            gap: 1rem;
        }

        .detail-row:last-child {
            margin-bottom: 0;
        }

        .detail-item {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
            flex: 1;
            min-width: 0;
        }

        .detail-label {
            font-size: 0.85rem;
            color: rgba(255,255,255,0.7);
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            font-weight: 500;
        }

        .detail-value {
            font-size: 1rem;
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            font-weight: 600;
            word-break: break-word;
        }

        .forecast-section {
            max-width: 1200px;
            margin: 3rem auto;
            padding: 0 1rem;
            background: rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 3rem;
        }

        .forecast-section h2 {
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin-bottom: 1rem;
        }

        .forecast-container {
            position: relative;
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 15px;
            padding: 20px 10px;
        }
        
        /* 滑动提示指示器 */
        .swipe-indicator {
            position: absolute;
            bottom: 5px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 12px;
            color: rgba(255, 255, 255, 0.6);
            pointer-events: none;
            animation: fadeOut 3s forwards;
            z-index: 10;
        }
        
        @keyframes fadeOut {
            0%, 70% {
                opacity: 1;
            }
            100% {
                opacity: 0;
            }
        }

        .forecast-scroll {
            overflow: hidden;
            width: 100%;
            cursor: grab;
            user-select: none; /* 防止拖拽时选中文本 */
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            touch-action: pan-x; /* 只允许水平滑动 */
        }
        
        .forecast-scroll:active {
            cursor: grabbing;
        }

        .forecast-items {
            display: flex;
            gap: 20px;
            will-change: transform; /* 优化性能 */
        }

        .forecast-item {
            flex: 0 0 auto;
            width: 150px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            padding: 15px;
            text-align: center;
            backdrop-filter: blur(5px);
            box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        }

        .forecast-item .date {
            font-size: 14px;
            margin-bottom: 5px;
            color: #fff;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        }

        .forecast-item .temp {
            font-size: 16px;
            font-weight: bold;
            color: #fff;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        }

        .forecast-item .description {
            font-size: 14px;
            margin-top: 5px;
            color: #fff;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        }

        .scroll-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
            transition: background-color 0.3s;
            z-index: 2;
        }

        .scroll-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .scroll-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .change-city {
            background: rgba(255, 255, 255, 0.2);
            border: 2px solid rgba(255, 255, 255, 0.8);
            border-radius: 8px;
            color: #fff;
            padding: 10px 20px;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            backdrop-filter: blur(5px);
            transition: all 0.3s ease;
            margin-top: 15px;
            min-width: 120px;
        }

        .change-city:hover {
            background: rgba(255, 255, 255, 0.3);
            border-color: rgba(255, 255, 255, 1);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }

        .change-city:active {
            transform: translateY(0);
            box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        }

        /* 头部按钮组样式 */
        .header-buttons {
            display: flex;
            gap: 12px;
            align-items: center;
            margin-top: 15px;
        }

        /* 语言切换按钮样式 */
        .lang-switch {
            background: rgba(255, 255, 255, 0.2);
            border: 2px solid rgba(255, 255, 255, 0.8);
            border-radius: 8px;
            color: #fff;
            padding: 8px 16px;
            cursor: pointer;
            font-size: 13px;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            backdrop-filter: blur(5px);
            transition: all 0.3s ease;
            min-width: 70px;
            display: flex;
            align-items: center;
            gap: 6px;
            justify-content: center;
        }

        .lang-switch:hover {
            background: rgba(255, 255, 255, 0.3);
            border-color: rgba(255, 255, 255, 1);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }

        .lang-switch:active {
            transform: translateY(0);
            box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        }

        .lang-icon {
            font-size: 16px;
        }

        /* 调整change-city按钮，移除margin-top因为现在在flex容器中 */
        .change-city {
            margin-top: 0;
        }

        @media (prefers-color-scheme: dark) {
            .change-city, .lang-switch {
                background: rgba(255, 255, 255, 0.15);
                border-color: rgba(255, 255, 255, 0.6);
                color: #fff;
            }
            
            .change-city:hover, .lang-switch:hover {
                background: rgba(255, 255, 255, 0.25);
                border-color: rgba(255, 255, 255, 0.9);
            }

            /* 暗色模式下增强各模块的可读性 */
            .forecast-section,
            .life-index,
            .temperature-trend,
            .precipitation-trend,
            .wind-trend,
            .weather-map-section,
            .ad-section {
                background: rgba(0, 0, 0, 0.4) !important;
                border: 1px solid rgba(255, 255, 255, 0.15) !important;
                box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
            }

            .forecast-section:hover,
            .life-index:hover,
            .temperature-trend:hover,
            .precipitation-trend:hover,
            .wind-trend:hover,
            .weather-map-section:hover,
            .ad-section:hover {
                background: rgba(0, 0, 0, 0.45) !important;
                box-shadow: 0 6px 25px rgba(0,0,0,0.55) !important;
                transform: translateY(-5px) !important;
            }

            /* 增强文字可读性 */
            .forecast-section h2,
            .life-index h2,
            .temperature-trend h2,
            .precipitation-trend h2,
            .wind-trend h2,
            .weather-map-section h2,
            .ad-section h3 {
                text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
            }
        }

        .forecast-item img {
            width: 50px;
            height: 50px;
            margin: 10px 0;
        }

        .life-index {
            max-width: 1200px;
            margin: 3rem auto;
            padding: 0 1rem;
            background: rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 3rem;
        }

        .life-index h2 {
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin-bottom: 1rem;
        }

        .index-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1rem;
        }

        .index-item {
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(5px);
            padding: 1.5rem;
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            color: #fff;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 1rem;
            cursor: pointer;
            border: 1px solid rgba(255, 255, 255, 0.15);
        }

        .index-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.3);
            background: rgba(255, 255, 255, 0.25);
        }

        .index-icon {
            font-size: 2.5rem;
            flex-shrink: 0;
            filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
        }

        .index-content {
            flex: 1;
            min-width: 0;
        }

        .index-content h3 {
            margin: 0 0 0.5rem 0;
            font-size: 1.1rem;
            font-weight: 600;
            color: #fff;
        }

        .index-level {
            font-size: 1rem;
            font-weight: 700;
            margin-bottom: 0.3rem;
            padding: 0.2rem 0.8rem;
            border-radius: 20px;
            display: inline-block;
            text-shadow: none;
        }

        .index-level.excellent {
            background: linear-gradient(135deg, #00b894, #00cec9);
            color: #fff;
        }

        .index-level.good {
            background: linear-gradient(135deg, #00b894, #55efc4);
            color: #fff;
        }

        .index-level.moderate {
            background: linear-gradient(135deg, #fdcb6e, #e17055);
            color: #fff;
        }

        .index-level.poor {
            background: linear-gradient(135deg, #fd79a8, #e84393);
            color: #fff;
        }

        .index-level.bad {
            background: linear-gradient(135deg, #fd79a8, #d63031);
            color: #fff;
        }

        .index-desc {
            font-size: 0.9rem;
            opacity: 0.9;
            line-height: 1.4;
        }

        .temperature-trend {
            width: calc(100% - 2rem);
            max-width: 1200px;
            margin: 3rem auto;
            padding: 20px;
            background: rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 3rem;
            box-sizing: border-box; /* 确保padding计入总宽度 */
        }

        .temperature-trend h2 {
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin-bottom: 1rem;
        }

        .precipitation-trend {
            width: calc(100% - 2rem);
            max-width: 1200px;
            margin: 3rem auto;
            padding: 20px;
            background: rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 3rem;
            box-sizing: border-box; /* 确保padding计入总宽度 */
        }

        .precipitation-trend h2 {
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin-bottom: 1rem;
        }

        .wind-trend {
            width: calc(100% - 2rem);
            max-width: 1200px;
            margin: 3rem auto;
            padding: 20px;
            background: rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 3rem;
            box-sizing: border-box; /* 确保padding计入总宽度 */
        }

        .wind-trend h2 {
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin-bottom: 1rem;
        }

        .weather-map-section {
            max-width: 1200px;
            margin: 3rem auto;
            padding: 0 1rem;
            background: rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 3rem;
        }

        .weather-map-section h2 {
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin-bottom: 1rem;
        }

        /* 地图功能按钮容器 */
        .map-functions-container {
            background: #007bff;
            padding: 10px;
            margin: 10px 0;
            color: white;
            border-radius: 8px;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .map-functions-container strong {
            font-weight: bold;
            white-space: nowrap;
        }
        
        .map-function-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: nowrap; /* 按钮始终在同一行 */
        }
        
        .map-function-btn {
            padding: 8px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s ease;
            white-space: nowrap;
            flex-shrink: 0;
        }
        
        .map-function-btn.locate-btn {
            background: white;
            color: #007bff;
        }
        
        .map-function-btn.locate-btn:hover {
            background: #f0f0f0;
            transform: translateY(-1px);
        }
        
        .map-function-btn.reload-btn {
            background: #28a745;
            color: white;
        }
        
        .map-function-btn.reload-btn:hover {
            background: #218838;
            transform: translateY(-1px);
        }

        .map-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .map-controls select {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            padding: 0.5rem 1rem;
            color: #333;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .map-controls select:hover {
            background: rgba(255, 255, 255, 0.95);
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .map-controls select:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.95);
            border-color: rgba(67, 206, 162, 0.6);
            box-shadow: 0 0 0 2px rgba(67, 206, 162, 0.2);
        }

        /* 下拉选项样式 */
        .map-controls select option {
            background: rgba(255, 255, 255, 0.98);
            color: #333;
            padding: 0.5rem;
            font-weight: 500;
        }

        .map-controls select option:hover {
            background: rgba(67, 206, 162, 0.1);
            color: #2c3e50;
        }

        .map-controls select option:checked {
            background: rgba(67, 206, 162, 0.2);
            color: #2c3e50;
            font-weight: 600;
        }

        .map-info {
            background: rgba(255, 255, 255, 0.9);
            border-radius: 12px;
            padding: 0.8rem 1.2rem;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .air-quality-info {
            display: flex;
            gap: 1rem;
            align-items: center;
        }

        .air-quality-info span {
            font-weight: 600;
            color: #333;
            font-size: 0.9rem;
        }

        #currentAQI {
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            color: white;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
            transition: all 0.3s ease;
        }

        .aqi-excellent { background: linear-gradient(135deg, #00b894, #00cec9); }
        .aqi-good { background: linear-gradient(135deg, #00b894, #55efc4); }
        .aqi-moderate { background: linear-gradient(135deg, #fdcb6e, #e17055); }
        .aqi-poor { background: linear-gradient(135deg, #fd79a8, #e84393); }
        .aqi-very-poor { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
        .aqi-hazardous { background: linear-gradient(135deg, #fd79a8, #d63031); }

        .ad-section {
            max-width: 1200px;
            margin: 2rem auto;
            padding: 0 1rem;
            background: rgba(255, 255, 255, 0.25);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .ad-section h3 {
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin-bottom: 1rem;
        }

        footer {
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            color: #fff;
            padding: 2rem 0;
            position: relative;
            z-index: 1;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 1rem;
        }

        .footer-links a {
            color: #fff;
            text-decoration: none;
            display: inline-block;
            margin-right: 1rem;
            padding: 8px 15px;
            border-radius: 4px;
            transition: all 0.3s ease;
        }

        .footer-links a:hover {
            background-color: rgba(255, 255, 255, 0.2);
            transform: translateX(5px);
        }

        .copyright {
            color: #fff;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        }

        .ad-space {
            background: rgba(255,255,255,0.2);
            backdrop-filter: blur(5px);
            padding: 1rem;
            border-radius: 10px;
            text-align: center;
            color: #fff;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        }

        .ad-space h3 {
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            margin-bottom: 1rem;
        }

        .logo-link {
            display: block;
            text-decoration: none;
            cursor: pointer;
        }

        .logo-link:hover {
            opacity: 0.9; 
        }

        .header-container a {
            display: inline-block;
            text-decoration: none;
        }

        .header-container a:hover {
            opacity: 0.8;
            transition: opacity 0.3s ease;
        }

        @media (prefers-color-scheme: dark) {
            .header-container a:hover {
                opacity: 0.9;
            }
        }

        .chart-container {
            width: 100%;
            height: 320px;
            position: relative;
            margin: 10px auto 0;
            box-sizing: border-box;
        }

        #temperatureChart,
        #precipitationChart {
            width: 100% !important;
            height: 100% !important;
            display: block;
            max-width: 100%;
        }
        
        .temperature-trend canvas,
        .precipitation-trend canvas,
        .wind-trend canvas {
            max-width: 100% !important;
            max-height: 100% !important;
        }

        .map-container {
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            padding: 1rem;
            position: relative;
        }

        @media (prefers-color-scheme: dark) {
            .map-container {
                background: #2d2d2d;
                box-shadow: 0 2px 5px rgba(0,0,0,0.3);
            }
        }

        #map {
            width: 100%;
            height: 400px;
            border-radius: 8px;
            border: 1px solid rgba(0, 0, 0, 0.1);
            background-color: #f0f0f0;
            position: relative;
            z-index: 1;
        }

        @media (prefers-color-scheme: dark) {
            #map {
                border: 1px solid #555;
                background-color: #1a1a1a;
            }
        }

        .map-controls {
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 1000;
            background: white;
            padding: 5px;
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        @media (prefers-color-scheme: dark) {
            .map-controls {
                background: #333;
                color: white;
                box-shadow: 0 2px 4px rgba(0,0,0,0.3);
            }
        }

        .map-controls select {
            padding: 5px;
            border-radius: 4px;
            border: 1px solid #ddd;
        }

        @media (prefers-color-scheme: dark) {
            .map-controls select {
                background: rgba(45, 45, 45, 0.9);
                color: #e2e8f0;
                border: 1px solid rgba(255, 255, 255, 0.2);
                backdrop-filter: blur(10px);
            }

            .map-controls select:hover {
                background: rgba(55, 55, 55, 0.95);
                border-color: rgba(255, 255, 255, 0.3);
                box-shadow: 0 2px 8px rgba(0,0,0,0.4);
            }

            .map-controls select:focus {
                background: rgba(55, 55, 55, 0.95);
                border-color: rgba(67, 206, 162, 0.6);
                box-shadow: 0 0 0 2px rgba(67, 206, 162, 0.3);
            }

            .map-controls select option {
                background: rgba(45, 45, 45, 0.98);
                color: #e2e8f0;
            }

            .map-controls select option:hover {
                background: rgba(67, 206, 162, 0.2);
                color: #fff;
            }

            .map-controls select option:checked {
                background: rgba(67, 206, 162, 0.3);
                color: #fff;
                font-weight: 600;
            }
        }

        .map-legend {
            position: absolute;
            bottom: 80px;
            left: 30px;
            background: rgba(255, 255, 255, 0.98);
            padding: 15px;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            z-index: 999;
            font-family: Arial, sans-serif;
            pointer-events: none;
        }

        @media (prefers-color-scheme: dark) {
            .map-legend {
                background: rgba(45, 45, 45, 0.98);
                color: white;
                box-shadow: 0 4px 20px rgba(0,0,0,0.6);
            }
        }

        .header {
            z-index: 1000;
            position: relative;
        }

        .legend-title {
            font-weight: bold;
            margin-bottom: 12px;
            color: #222;
            font-size: 14px;
        }

        @media (prefers-color-scheme: dark) {
            .legend-title {
                color: #fff;
            }
        }

        .legend-scale {
            width: 260px;
        }

        .legend-labels {
            position: relative;
            height: 25px;
            margin-top: 5px;
        }

        .legend-labels span {
            position: absolute;
            transform: translateX(-50%);
            font-size: 12px;
            color: #222;
            font-weight: 600;
            text-shadow: 0 0 3px white;
        }

        @media (prefers-color-scheme: dark) {
            .legend-labels span {
                color: #fff;
                text-shadow: 0 0 3px black;
            }
        }

        .ol-scale-line {
            bottom: 30px;
            z-index: 999;
        }

        #map {
            z-index: 1;
            position: relative;
        }

        .layer-switcher {
            position: absolute;
            top: 80px;  /* 增加顶部距离，避开顶栏 */
            right: 10px;
            z-index: 1000;  /* 确保在适当的层级 */
            background: white;
            padding: 8px;
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .layer-switcher button {
            display: block;
            width: 100%;
            padding: 6px 12px;
            margin: 4px 0;
            border: none;
            background: #f0f0f0;
            cursor: pointer;
            border-radius: 3px;
            font-size: 14px;
            transition: background-color 0.2s;
        }

        .layer-switcher button:hover {
            background: #e0e0e0;
        }

        .layer-switcher button.active {
            background: #4CAF50;
            color: white;
        }

        #weather-gif {
            position: relative;
            z-index: 2;
        }

        .weather-gif-container {
            position: relative;
            width: 200px;
            height: 200px;
            margin: 20px auto;
            border-radius: 10px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            overflow: hidden;
        }

        .weather-gif-container::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            border-radius: 10px;
            z-index: 1;
        }

        .current-weather {
            position: relative;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .current-weather:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }

        .forecast-section {
            position: relative;
            background: rgba(255, 255, 255, 0.25);
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 3rem;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .forecast-section:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }

        .life-index {
            position: relative;
            background: rgba(255, 255, 255, 0.25);
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .life-index:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }

        .ad-section {
            position: relative;
            background: rgba(255, 255, 255, 0.25);
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .ad-section:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }

        .temperature-trend,
        .precipitation-trend,
        .wind-trend {
            position: relative;
            background: rgba(255, 255, 255, 0.25);
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 3rem;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .temperature-trend:hover,
        .precipitation-trend:hover,
        .wind-trend:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }

        .weather-map-section {
            position: relative;
            background: rgba(255, 255, 255, 0.25);
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .weather-map-section:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }

        .footer-container {
            position: relative;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .footer-container:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        }

        /* Cookie 同意弹窗样式 */
        .cookie-consent { 
            position: fixed; 
            left: 0; 
            right: 0; 
            bottom: 0; 
            z-index: 2000; 
        }
        
        .cookie-consent__content { 
            margin: 0 auto; 
            max-width: 1200px; 
            background: rgba(0,0,0,0.85); 
            color: #fff; 
            padding: 12px 16px; 
            display: flex; 
            gap: 12px; 
            align-items: center; 
            border-top-left-radius: 8px; 
            border-top-right-radius: 8px; 
        }
        
        .cookie-consent__text { 
            flex: 1; 
            font-size: 14px; 
        }
        
        .cookie-consent__actions button { 
            margin-left: 8px; 
            padding: 6px 12px; 
            border-radius: 4px; 
            border: 1px solid rgba(255,255,255,0.3); 
            background: rgba(255,255,255,0.15); 
            color: #fff; 
            cursor: pointer; 
            transition: background-color 0.3s ease;
        }
        
        .cookie-consent__actions button:hover {
            background: rgba(255,255,255,0.25);
        }
        
        .cookie-consent__actions button#cookie-accept { 
            background: #4CAF50; 
            border-color: #4CAF50; 
        }
        
        .cookie-consent__actions button#cookie-accept:hover {
            background: #45a049;
        }
        
        .cookie-consent__actions button#cookie-decline { 
            background: #9e9e9e; 
            border-color: #9e9e9e; 
        }
        
        .cookie-consent__actions button#cookie-decline:hover {
            background: #8e8e8e;
        }

        /* 加载屏幕样式 */
        .loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            opacity: 1;
            transition: opacity 0.5s ease-out;
        }
        
        .loading-screen.hidden {
            opacity: 0;
            pointer-events: none;
        }
        
        .loading-content {
            text-align: center;
            color: white;
            max-width: 400px;
            width: 90%;
        }
        
        .loading-logo {
            margin-bottom: 30px;
        }
        
        .loading-logo-img {
            width: 80px;
            height: 80px;
            margin: 0 auto 15px auto;
            animation: logoFloat 3s ease-in-out infinite;
        }
        
        .loading-title-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
        }
        
        .loading-title-zh {
            font-size: 2.5rem;
            font-weight: 700;
            margin: 0;
            text-shadow: 0 2px 10px rgba(0,0,0,0.3);
            animation: titleGlow 2s ease-in-out infinite alternate;
        }
        
        .loading-title-en {
            font-size: 1.8rem;
            font-weight: 400;
            margin: 0;
            opacity: 0.85;
            text-shadow: 0 1px 8px rgba(0,0,0,0.3);
            animation: titleGlow 2s ease-in-out infinite alternate;
            animation-delay: 0.3s;
            font-style: italic;
            letter-spacing: 0.5px;
        }
        
        .loading-progress {
            margin: 40px 0 30px 0;
        }
        
        .progress-bar {
            width: 100%;
            height: 8px;
            background: rgba(255,255,255,0.2);
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 15px;
            position: relative;
        }
        
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #fff, #a8edea);
            border-radius: 10px;
            width: 0%;
            transition: width 0.3s ease;
            position: relative;
            overflow: hidden;
        }
        
        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
            animation: shimmer 1.5s infinite;
        }
        
        .progress-text {
            font-size: 1.2rem;
            font-weight: 600;
            text-shadow: 0 1px 3px rgba(0,0,0,0.3);
        }
        
        .loading-status {
            margin: 20px 0;
            min-height: 50px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        
        .loading-status-zh {
            font-size: 1.1rem;
            opacity: 0.95;
            animation: statusPulse 2s ease-in-out infinite;
            font-weight: 500;
        }
        
        .loading-status-en {
            font-size: 0.9rem;
            opacity: 0.8;
            animation: statusPulse 2s ease-in-out infinite;
            animation-delay: 0.2s;
            font-style: italic;
            color: rgba(255,255,255,0.85);
        }
        
        .loading-animation {
            margin-top: 30px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }
        
        .weather-icon {
            font-size: 3rem;
            animation: iconSpin 4s linear infinite;
        }
        
        .loading-dots {
            display: flex;
            gap: 8px;
        }
        
        .loading-dots span {
            width: 12px;
            height: 12px;
            background: white;
            border-radius: 50%;
            animation: dotBounce 1.4s ease-in-out infinite both;
        }
        
        .loading-dots span:nth-child(1) { animation-delay: -0.32s; }
        .loading-dots span:nth-child(2) { animation-delay: -0.16s; }
        .loading-dots span:nth-child(3) { animation-delay: 0s; }
        
        /* 加载动画关键帧 */
        @keyframes logoFloat {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
        }
        
        @keyframes titleGlow {
            0% { text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
            100% { text-shadow: 0 2px 20px rgba(255,255,255,0.4), 0 2px 10px rgba(0,0,0,0.3); }
        }
        
        @keyframes shimmer {
            0% { left: -100%; }
            100% { left: 100%; }
        }
        
        @keyframes statusPulse {
            0%, 100% { opacity: 0.9; }
            50% { opacity: 1; }
        }
        
        @keyframes iconSpin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        @keyframes dotBounce {
            0%, 80%, 100% {
                transform: scale(0);
                opacity: 0.5;
            }
            40% {
                transform: scale(1);
                opacity: 1;
            }
        }

        /* 加载屏幕中的Cookie询问样式 */
        .loading-cookie-consent {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(15px);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            max-width: 500px;
            width: 90%;
            text-align: center;
            z-index: 10001;
            animation: cookieSlideIn 0.5s ease-out;
        }

        @keyframes cookieSlideIn {
            from {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.8);
            }
            to {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        .cookie-consent-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }

        .cookie-consent-icon {
            font-size: 3rem;
            animation: cookieBounce 2s infinite;
        }

        @keyframes cookieBounce {
            0%, 20%, 50%, 80%, 100% {
                transform: translateY(0);
            }
            40% {
                transform: translateY(-10px);
            }
            60% {
                transform: translateY(-5px);
            }
        }

        .cookie-consent-text h3 {
            margin: 0 0 15px 0;
            color: #333;
            font-size: 1.5rem;
            font-weight: 600;
        }

        .cookie-consent-text p {
            margin: 0 0 10px 0;
            color: #666;
            line-height: 1.6;
            font-size: 1rem;
        }

        .cookie-consent-text p:last-child {
            margin-bottom: 0;
        }

        .cookie-consent-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .cookie-consent-btn {
            padding: 12px 25px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 600;
            transition: all 0.3s ease;
            min-width: 100px;
        }

        .cookie-consent-accept {
            background: linear-gradient(135deg, #4CAF50, #45a049);
            color: white;
            box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
        }

        .cookie-consent-accept:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
            background: linear-gradient(135deg, #45a049, #3d8b40);
        }

        .cookie-consent-decline {
            background: rgba(108, 117, 125, 0.9);
            color: white;
            box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
        }

        .cookie-consent-decline:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
            background: rgba(95, 102, 109, 0.9);
        }

        @media (max-width: 480px) {
            .loading-cookie-consent {
                width: 95%;
                padding: 20px;
            }
            
            .cookie-consent-buttons {
                flex-direction: column;
                width: 100%;
            }
            
            .cookie-consent-btn {
                width: 100%;
            }
            
            .temperature-trend,
            .precipitation-trend,
            .wind-trend {
                padding: 10px; /* 超小屏幕进一步减少内边距 */
                width: calc(100% - 1rem);
            }
            
            .chart-container {
                height: 240px; /* 超小屏幕降低图表高度 */
                width: 100%;
                margin: 8px 0 0;
            }
            
            /* 超小屏幕进一步优化滑动体验 */
            .scroll-btn {
                width: 30px;
                height: 30px;
                font-size: 16px;
                opacity: 0.8;
            }
            
            .forecast-item {
                width: 130px; /* 减小卡片宽度 */
                padding: 12px;
            }
            
            /* 地图功能按钮 - 手机端优化 */
            .map-functions-container {
                padding: 8px;
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            
            .map-functions-container strong {
                width: 100%;
            }
            
            .map-function-buttons {
                width: 100%;
                justify-content: space-between;
            }
            
            .map-function-btn {
                flex: 1;
                padding: 10px 8px;
                font-size: 13px;
                min-width: 0;
            }
        }

        @media (max-width: 768px) {
            .loading-title-zh {
                font-size: 2rem;
            }
            
            .loading-title-en {
                font-size: 1.4rem;
            }
            
            .loading-status-zh {
                font-size: 1rem;
            }
            
            .loading-status-en {
                font-size: 0.85rem;
            }
            
            .weather-icon {
                font-size: 2.5rem;
            }
            
            /* 在平板端保留所有按钮 */
            nav ul li {
                margin-left: 1rem;
            }
            
            .cookie-consent__content {
                flex-direction: column;
                text-align: center;
            }
            
            .cookie-consent__actions {
                display: flex;
                gap: 8px;
                justify-content: center;
            }
            
            .cookie-consent__actions button {
                margin: 0;
                flex: 1;
                max-width: 150px;
            }

            .footer-content {
                flex-direction: column;
                gap: 1rem;
                text-align: center;
            }

            /* 移动端按钮组样式 */
            .header-buttons {
                flex-direction: column;
                gap: 8px;
                margin-top: 12px;
            }
            
            .change-city, .lang-switch {
                padding: 8px 14px;
                font-size: 13px;
                min-width: 80px;
            }

            .weather-display {
                min-height: 400px;
                padding: 1rem;
                margin-bottom: 2rem;
            }

            main {
                margin-top: 85px;
            }

            .weather-info {
                padding: 1.5rem;
                max-width: 90vw;
            }

            .weather-header {
                flex-direction: column;
                align-items: center;
                gap: 1rem;
                text-align: center;
            }

            .main-weather {
                flex-direction: column;
                gap: 1.5rem;
                text-align: center;
            }

            .temperature {
                font-size: 2.8rem;
            }

            .sun-info {
                flex-direction: row;
                justify-content: center;
                gap: 2rem;
            }

            .weather-details {
                padding: 1.2rem;
            }

            .detail-row {
                flex-direction: column;
                gap: 1rem;
            }

            .detail-item {
                text-align: center;
                padding: 0.8rem;
                background: rgba(255,255,255,0.1);
                border-radius: 8px;
            }

            .detail-label {
                font-size: 0.8rem;
            }

            .detail-value {
                font-size: 0.95rem;
            }

            .forecast-section,
            .life-index,
            .temperature-trend,
            .precipitation-trend,
            .wind-trend,
            .weather-map-section,
            .ad-section {
                margin: 2rem auto;
                padding: 15px;
                width: calc(100% - 1.5rem); /* 确保在移动端有足够的外边距 */
            }
            
            .chart-container {
                height: 260px; /* 移动端稍微降低高度 */
                width: 100%;
                margin: 10px 0 0;
            }
            
            /* 移动端优化滑动按钮 */
            .scroll-btn {
                width: 35px;
                height: 35px;
                font-size: 18px;
                background: rgba(255, 255, 255, 0.15);
            }
            
            .swipe-indicator {
                font-size: 11px;
            }
            
            /* 地图功能按钮 - 平板端优化 */
            .map-functions-container {
                padding: 8px;
            }
            
            .map-function-buttons {
                width: 100%; /* 按钮容器占满剩余空间 */
            }
            
            .map-function-btn {
                padding: 8px 12px;
                font-size: 14px;
            }

            .index-grid {
                grid-template-columns: 1fr;
                gap: 0.8rem;
            }

            .index-item {
                padding: 1rem;
                gap: 0.8rem;
            }

            .index-icon {
                font-size: 2rem;
            }

            .index-content h3 {
                font-size: 1rem;
            }

            .index-desc {
                font-size: 0.85rem;
            }

            .map-controls {
                flex-direction: column;
                gap: 0.5rem;
                align-items: stretch;
            }

            .map-controls select {
                width: 100%;
                padding: 0.6rem;
                font-size: 0.9rem;
            }

            .map-controls select:hover {
                background: rgba(255, 255, 255, 0.98);
            }

            @media (prefers-color-scheme: dark) {
                .map-controls select:hover {
                    background: rgba(60, 60, 60, 0.98);
                }
            }

            .map-info {
                padding: 0.6rem 1rem;
                width: 100%;
            }

            .air-quality-info {
                flex-direction: column;
                gap: 0.5rem;
                text-align: center;
            }

            .air-quality-info span {
                font-size: 0.85rem;
            }
        }

        /* 自定义城市选择对话框样式 */
        .city-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 10000;
            backdrop-filter: blur(5px);
        }

        .city-modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 30px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            min-width: 400px;
            max-width: 550px;
            width: auto;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.5);
        }

        .city-modal h3 {
            margin: 0 0 20px 0;
            color: #333;
            font-size: 18px;
            font-weight: bold;
            white-space: nowrap;
            overflow: visible;
        }

        .city-modal input {
            width: 100%;
            padding: 15px 18px;
            border: 2px solid rgba(255, 255, 255, 0.8);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.95);
            color: #333;
            font-size: 16px;
            font-family: inherit;
            margin-bottom: 20px;
            box-sizing: border-box;
            outline: none;
            transition: all 0.3s ease;
            text-align: left;
        }

        .city-modal input:focus {
            border-color: rgba(76, 175, 80, 0.8);
            box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
        }

        .city-modal-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .city-modal button {
            padding: 12px 30px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 100px;
            white-space: nowrap;
        }

        .city-modal .confirm-btn {
            background: linear-gradient(135deg, #4CAF50, #45a049);
            color: white;
        }

        .city-modal .confirm-btn:hover {
            background: linear-gradient(135deg, #45a049, #3d8b40);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
        }

        .city-modal .cancel-btn {
            background: rgba(255, 255, 255, 0.8);
            color: #666;
            border: 2px solid rgba(255, 255, 255, 0.8);
        }

        .city-modal .cancel-btn:hover {
            background: rgba(255, 255, 255, 0.9);
            color: #333;
            transform: translateY(-2px);
        }

        /* 暗色模式下的对话框样式 */
        @media (prefers-color-scheme: dark) {
            .city-modal-content {
                background: rgba(45, 45, 45, 0.95);
            }

            .city-modal h3 {
                color: #fff;
            }

            .city-modal input {
                background: rgba(60, 60, 60, 0.9);
                border-color: rgba(255, 255, 255, 0.3);
                color: #fff;
            }

            .city-modal input:focus {
                border-color: rgba(76, 175, 80, 0.8);
            }

            .city-modal input::placeholder {
                color: #bbb;
            }

            .city-modal .cancel-btn {
                background: rgba(60, 60, 60, 0.8);
                color: #fff;
                border-color: rgba(255, 255, 255, 0.3);
            }

            .city-modal .cancel-btn:hover {
                background: rgba(70, 70, 70, 0.9);
            }
        }

        /* 移动设备响应式优化 */
        @media only screen and (max-width: 768px) {
            .city-modal-content {
                margin: 20px;
                min-width: auto;
                max-width: none;
                width: calc(100% - 40px);
                padding: 30px 25px;
            }

            .city-modal h3 {
                font-size: 16px;
                margin-bottom: 15px;
            }

            .city-modal input {
                font-size: 16px; /* 防止iOS自动缩放 */
                padding: 15px;
                margin-bottom: 15px;
            }

            .city-modal-buttons {
                flex-direction: column;
                gap: 10px;
            }

            .city-modal button {
                width: 100%;
                padding: 15px;
                font-size: 16px;
            }
        }

        /* 超小屏幕优化 */
        @media only screen and (max-width: 480px) {
            .city-modal-content {
                margin: 15px;
                width: calc(100% - 30px);
                padding: 20px 15px;
            }
        }

        /* 预警指示器样式 */
        .alert-indicator {
            color: #ff4757;
            font-size: 12px;
            margin-left: 5px;
            animation: alertPulse 1.5s infinite;
            position: relative;
            top: -2px;
        }

        @keyframes alertPulse {
            0%, 50%, 100% {
                opacity: 1;
            }
            25%, 75% {
                opacity: 0.3;
            }
        }

        /* 通知动画 */
        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOutRight {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(100%);
                opacity: 0;
            }
        }

        /* 天气预警模态框样式 */
        .weather-alert-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 10000;
            backdrop-filter: blur(10px);
        }

        .alert-backdrop {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            background: radial-gradient(circle at center, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.95));
            animation: backdropFadeIn 0.5s ease-out;
        }

        .alert-content {
            max-width: 500px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            background: rgba(255, 255, 255, 0.98);
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
            animation: alertSlideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            z-index: 10001;
        }

        .alert-header {
            padding: 2rem 2rem 1rem;
            text-align: center;
            background: linear-gradient(135deg, #ff6b6b, #ffd93d);
            border-radius: 20px 20px 0 0;
            color: white;
            position: relative;
        }

        .alert-header.orange {
            background: linear-gradient(135deg, #ff9500, #ffb347);
        }

        .alert-header.red {
            background: linear-gradient(135deg, #dc3545, #ff495c);
        }

        .alert-header.purple {
            background: linear-gradient(135deg, #6f42c1, #8e5bec);
        }

        .alert-icon {
            font-size: 4rem;
            margin-bottom: 0.5rem;
            animation: iconBounce 2s infinite;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .alert-title {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
        }

        .alert-level {
            font-size: 1.2rem;
            font-weight: 600;
            background: rgba(255, 255, 255, 0.2);
            padding: 0.3rem 1rem;
            border-radius: 20px;
            display: inline-block;
            backdrop-filter: blur(10px);
        }

        .alert-body {
            padding: 2rem;
            color: #333;
        }

        .alert-type {
            font-size: 1.5rem;
            font-weight: 700;
            color: #ff6b6b;
            margin-bottom: 1rem;
            text-align: center;
        }

        .alert-description {
            font-size: 1.1rem;
            line-height: 1.6;
            margin-bottom: 1.5rem;
            background: rgba(255, 235, 59, 0.1);
            padding: 1rem;
            border-radius: 12px;
            border-left: 4px solid #ff6b6b;
        }

        .alert-time {
            font-size: 0.9rem;
            color: #666;
            margin-bottom: 1.5rem;
            text-align: center;
        }

        .alert-suggestions h4 {
            font-size: 1.2rem;
            margin-bottom: 1rem;
            color: #2c3e50;
        }

        .alert-suggestions ul {
            margin: 0;
            padding-left: 0;
            list-style: none;
        }

        .alert-suggestions li {
            background: rgba(76, 175, 80, 0.1);
            margin: 0.5rem 0;
            padding: 0.8rem 1rem;
            border-radius: 8px;
            border-left: 3px solid #4caf50;
            position: relative;
        }

        .alert-suggestions li::before {
            content: "✓";
            color: #4caf50;
            font-weight: bold;
            margin-right: 0.5rem;
        }

        .alert-actions {
            padding: 1rem 2rem 2rem;
            display: flex;
            gap: 1rem;
            justify-content: center;
        }

        .alert-btn {
            flex: 1;
            padding: 1rem 1.5rem;
            border: none;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .alert-btn.primary {
            background: linear-gradient(135deg, #ff6b6b, #ff5252);
            color: white;
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
        }

        .alert-btn.primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
            background: linear-gradient(135deg, #ff5252, #ff1744);
        }

        .alert-btn.secondary {
            background: rgba(255, 255, 255, 0.8);
            color: #666;
            border: 2px solid rgba(255, 255, 255, 0.5);
        }

        .alert-btn.secondary:hover {
            background: rgba(255, 255, 255, 0.95);
            color: #333;
            transform: translateY(-2px);
        }

        /* 背景动画效果 */
        .alert-animation {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            overflow: hidden;
        }

        .rain-drops {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.6)"/><circle cx="30" cy="40" r="1" fill="rgba(255,255,255,0.4)"/><circle cx="60" cy="20" r="1" fill="rgba(255,255,255,0.5)"/><circle cx="80" cy="70" r="1" fill="rgba(255,255,255,0.3)"/></svg>') repeat;
            animation: rainFall 2s linear infinite;
            opacity: 0.7;
        }

        .wind-lines {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: repeating-linear-gradient(
                45deg,
                transparent,
                transparent 10px,
                rgba(255,255,255,0.1) 10px,
                rgba(255,255,255,0.1) 11px
            );
            animation: windMove 3s linear infinite;
        }

        .lightning-flash {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 50% 50%, rgba(255,255,0,0.1), transparent);
            animation: lightningFlash 4s ease-in-out infinite;
        }

        /* 主界面预警指示器 */
        .alert-indicator {
            position: fixed;
            top: 100px;
            right: 20px;
            z-index: 1500;
            cursor: pointer;
            animation: indicatorPulse 2s ease-in-out infinite;
        }

        .alert-indicator-content {
            background: linear-gradient(135deg, #ff6b6b, #ff5252);
            color: white;
            padding: 0.8rem 1.5rem;
            border-radius: 25px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
            font-weight: 600;
            font-size: 0.9rem;
        }

        .alert-indicator-icon {
            font-size: 1.2rem;
            animation: iconWiggle 1s ease-in-out infinite;
        }

        .alert-indicator-count {
            background: rgba(255, 255, 255, 0.9);
            color: #ff6b6b;
            font-size: 0.8rem;
            font-weight: 700;
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
            min-width: 1.2rem;
            text-align: center;
        }

        /* 动画定义 */
        @keyframes backdropFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes alertSlideIn {
            from {
                opacity: 0;
                transform: scale(0.8) translateY(100px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        @keyframes iconBounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-10px); }
            60% { transform: translateY(-5px); }
        }

        @keyframes rainFall {
            0% { transform: translateY(-100px); }
            100% { transform: translateY(100vh); }
        }

        @keyframes windMove {
            0% { transform: translateX(-100px); }
            100% { transform: translateX(100px); }
        }

        @keyframes lightningFlash {
            0%, 90%, 100% { opacity: 0; }
            5%, 10% { opacity: 1; }
        }

        @keyframes indicatorPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        @keyframes iconWiggle {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(-5deg); }
            75% { transform: rotate(5deg); }
        }

        /* 错误提示动画 */
        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOutRight {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(100%);
                opacity: 0;
            }
        }

        /* 无障碍性支持 */
        .high-contrast {
            filter: contrast(150%);
        }

        .reduced-motion * {
            animation-duration: 0.01s !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01s !important;
        }

        /* 键盘导航支持 */
        .index-item:focus {
            outline: 2px solid rgba(255, 255, 255, 0.8);
            outline-offset: 2px;
        }

        button:focus, select:focus, input:focus {
            outline: 2px solid rgba(255, 255, 255, 0.8);
            outline-offset: 2px;
        }

        @media (prefers-color-scheme: dark) {
            .index-item:focus, button:focus, select:focus, input:focus {
                outline-color: rgba(255, 255, 255, 0.9);
            }
        }

        /* 暗色模式适配 */
        @media (prefers-color-scheme: dark) {
            .alert-content {
                background: rgba(45, 45, 45, 0.98);
            }

            .alert-body {
                color: #e2e8f0;
            }

            .alert-type {
                color: #ff8a80;
            }

            .alert-time {
                color: #a0aec0;
            }

            .alert-suggestions h4 {
                color: #f7fafc;
            }

            .alert-description {
                background: rgba(255, 193, 7, 0.1);
                color: #e2e8f0;
            }

            .alert-btn.secondary {
                background: rgba(60, 60, 60, 0.8);
                color: #e2e8f0;
                border-color: rgba(255, 255, 255, 0.2);
            }

            .alert-btn.secondary:hover {
                background: rgba(70, 70, 70, 0.9);
                color: #fff;
            }
        }

        /* 移动端适配 */
        @media (max-width: 768px) {
            .alert-backdrop {
                padding: 1rem;
            }

            .alert-content {
                max-width: 100%;
            }

            .alert-header {
                padding: 1.5rem;
            }

            .alert-icon {
                font-size: 3rem;
            }

            .alert-title {
                font-size: 1.5rem;
            }

            .alert-body {
                padding: 1.5rem;
            }

            .alert-actions {
                padding: 1rem 1.5rem;
                flex-direction: column;
            }

            .alert-btn {
                width: 100%;
                margin: 0.25rem 0;
            }

            .alert-indicator {
                top: 85px;
                right: 15px;
            }

            .alert-indicator-content {
                padding: 0.6rem 1rem;
                font-size: 0.8rem;
            }
        }

        /* 不同预警等级的指示器颜色 */
        .alert-indicator-content.yellow {
            background: linear-gradient(135deg, #ffd93d, #ffcd3c);
        }

        .alert-indicator-content.orange {
            background: linear-gradient(135deg, #ff9500, #ffb347);
        }

        .alert-indicator-content.red {
            background: linear-gradient(135deg, #dc3545, #ff495c);
        }

        .alert-indicator-content.purple {
            background: linear-gradient(135deg, #6f42c1, #8e5bec);
        }

        /* 最终的暗色模式样式覆盖 - 确保在所有其他样式之后应用 */
        @media (prefers-color-scheme: dark) {
            .forecast-section,
            .life-index,
            .temperature-trend,
            .precipitation-trend,
            .wind-trend,
            .weather-map-section,
            .ad-section {
                background: rgba(0, 0, 0, 0.4) !important;
                border: 1px solid rgba(255, 255, 255, 0.15) !important;
                box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
            }

            .forecast-section:hover,
            .life-index:hover,
            .temperature-trend:hover,
            .precipitation-trend:hover,
            .wind-trend:hover,
            .weather-map-section:hover,
            .ad-section:hover {
                background: rgba(0, 0, 0, 0.45) !important;
                box-shadow: 0 6px 25px rgba(0,0,0,0.55) !important;
                transform: translateY(-5px) !important;
            }
        }

        .cookie-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            z-index: 10000;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .cookie-modal-content {
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            animation: cookieModalSlideIn 0.3s ease-out;
        }

        @keyframes cookieModalSlideIn {
            from {
                opacity: 0;
                transform: translateY(-50px) scale(0.9);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .cookie-modal-header {
            padding: 20px 20px 10px 20px;
            border-bottom: 1px solid #eee;
        }

        .cookie-modal-header h3 {
            margin: 0;
            color: #333;
            font-size: 20px;
            font-weight: 600;
        }

        .cookie-modal-body {
            padding: 20px;
            color: #666;
            line-height: 1.6;
        }

        .cookie-modal-body p {
            margin: 0 0 15px 0;
        }

        .cookie-modal-body p:last-child {
            margin-bottom: 0;
        }

        .cookie-modal-footer {
            padding: 15px 20px 20px 20px;
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        .cookie-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s ease;
            min-width: 80px;
        }

        .cookie-btn-accept {
            background-color: #007bff;
            color: white;
        }

        .cookie-btn-accept:hover {
            background-color: #0056b3;
            transform: translateY(-1px);
        }

        .cookie-btn-decline {
            background-color: #6c757d;
            color: white;
        }

        .cookie-btn-decline:hover {
            background-color: #545b62;
            transform: translateY(-1px);
        }

        @media (max-width: 480px) {
            .cookie-modal-content {
                width: 95%;
                margin: 10px;
            }
            
            .cookie-modal-footer {
                flex-direction: column;
            }
            
            .cookie-btn {
                width: 100%;
            }
        }
