/* ===================== 顶部导航栏布局 ===================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to right, #1e5799, #207cca, #1e5799);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.logo {
    font-size: 22px;
    font-weight: bold;
    margin-right: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.search-box {
    display: flex;
    margin-right: auto;
}

.search-box input {
    padding: 8px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    width: 150px;
    font-size: 14px;
    outline: none;
}

.search-box button {
    background: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 8px 12px;
    cursor: pointer;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-buttons span {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
    font-size: 15px;
}

.nav-buttons span:hover {
    background: rgba(255,255,255,0.2);
}

/* ===================== 核心：地图容器布局 ===================== */
#map {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 25px !important;
    width: 100% !important;
    height: calc(100vh - 60px - 25px) !important;
    z-index: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===================== ICP备案栏布局 ===================== */
.icp-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.7);
}

/* ===================== 响应式布局（全局适配） ===================== */
@media (max-width: 768px) {
    /* 小屏导航栏 */
    .top-nav {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }
    /* 小屏搜索框 */
    .search-box input {
        width: 150px;
    }
    /* 小屏指标面板 */
    .side-panel {
        top: 80px;
        width: 60px;
    }
    /* 小屏弹窗 */
    .city-popup {
        width: 90%;
    }
    .popup-body {
        padding: 15px;
    }
    /* 小屏污染物卡片 */
    .pollutant-row {
        gap: 5px;
    }
    .pollutant-card {
        min-width: 45%;
    }
    /* 小屏时间轴 */
    .time-axis {
        left: 10px;
        min-width: 150px;
    }
    /* 小屏历史数据面板 */
    .history-panel {
        width: 90vw !important;
    }
}