body {
    font-family: 'Microsoft YaHei', sans-serif;
    /* 2026 流行动态渐变背景 */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #1f2937;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 液态玻璃拟态效果 (Liquid Glass) */
.glass-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
    background: rgba(255, 255, 255, 0.75);
}

/* 隐藏滚动条但保留功能 */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 装饰性浮动元素动画 */
.floating-element {
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* 加载动画 */
.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid #4f46e5;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 按钮点击效果 */
.btn-press:active {
    transform: scale(0.90);
}

/* 天气图标动画 */
.weather-icon-anim {
    animation: float 3s ease-in-out infinite;
}
h3 svg{
    width: 50px;
}
/* 确保 html 和 body 占满视口，防止居中基准出错 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}


/* ================= 弹窗核心样式 (视口级居中版) ================= */
/* ================= 模态框遮罩层 ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); /* 兼容 Safari */
    z-index: 1000;

    /* 使用 flex 实现完美居中 */
    display: flex !important;
    justify-content: center;
    align-items: center;

    /* 默认隐藏 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ================= 模态框内容区 (合并并优化) ================= */
.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh; /* 适配移动端高度 */

    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);

    /* 动画初始状态：缩小且透明 */
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;

    overflow: hidden;
    /* 🔴 移除了 margin: auto，因为父容器 flex 已经居中了，避免冲突 */
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* ================= 内部结构 ================= */
.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    position: relative;
    /* 优化移动端滚动体验 */
    -webkit-overflow-scrolling: touch;
}

/* ================= 关闭按钮 ================= */
.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0; /* 重置默认 padding */
}

.close-btn:hover {
    color: #1f2937;
    background-color: #e5e7eb;
    transform: rotate(90deg);
}

/* ================= 图表区域 ================= */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

.chart-loading, .chart-error {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.chart-loading { color: #6b7280; }
.chart-error {
    color: #ef4444;
    background: #fef2f2;
    border-radius: 8px;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* ================= 移动端适配优化 ================= */
@media (max-width: 480px) {
    .modal-content {
        width: 92%;
        max-height: 80vh;
        border-radius: 12px; /* 手机端圆角稍微小一点 */
    }
    .chart-container { height: 280px; }

    /* 🔴 增大关闭按钮点击区域 */
    .close-btn {
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }

    .modal-header {
        padding: 0.8rem 1rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .modal-content { max-height: 90vh; width: 85%; }
    .chart-container { height: 180px; }
}

/* ================= 原有 Header 样式 (建议加类名前缀以防冲突) ================= */

header.weather-header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 20px;
    position: relative;
    z-index: 10;
}

/* 如果必须保留全局 header 选择器，请确保没有冲突 */


.weather-card {
    background: rgba(255,255,255,0.6);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(255,255,255,0.5);
}
/* 标题容器样式 */
#caption {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
}
#caption a{
    color: #000;
}
#image button{
    position: absolute;
    top: 5%;
    right: 0;
    z-index: 10;
}
/* 图片容器样式 */
#image {
    width: 100%;
    border-radius: 12px;
}
@layer components {
    .breadcrumb-item:not(:first-child)::before {
        content: '/'; /* 如果使用图标，content 可以是 unicode 字符，如 '/' */
        padding-right: 5px;
        display: inline-block;
    }
    /* 或者使用背景图或更复杂的样式 */
}
nav .center{
    width: 100%;
    text-align: center;
}
.web-logo{
    text-align: center;
}
.web-logo img{
    width: 120px;
    margin: 0 auto;
}