/* CSS变量定义 */
:root {
    --primary: #4285f4;
    --primary-light: #6ea5ff;
    --primary-dark: #2c5aa0;
    --secondary: #34a853;
    --accent: #ea4335;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --background: #ffffff;
    --background-alt: #f8f9fc;
    --nav-width: 240px;
    --nav-bg: #ffffff;
    --nav-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    
    /* 渐变和特效 */
    --gradient-blue: linear-gradient(135deg, #4285f4, #34a0e9);
    --gradient-tech: linear-gradient(to right, #24c6dc, #514a9d);
    --gradient-dark: linear-gradient(to right, #232526, #414345);
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --hover-transition: all 0.3s ease;
}

/* 动画关键帧定义 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes breathe {
    0% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(66, 133, 244, 0); }
    100% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0); }
}

/* 全局样式重置与基本样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: auto; /* 允许横向滚动 */
    width: 100%;
    height: 100vh;
}

/* 页面加载样式 */
.loading-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-container.visible {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0056b3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 页眉样式 */
header {
    background: linear-gradient(90deg, #0c519b, #00aaff);
    color: white;
    /* padding: 0.5rem 1rem;*/
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);*/
    position: sticky;
    top: 0;
    z-index: 100;
    /* width: 100%;*/
     height: 60px;   /* 增加高度 */
    display: flex;
    align-items: center;
}

.header-content {
    max-width: 100%;
    margin: 0 auto; /* 居中 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px; /* 添加两侧内边距 */
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    white-space: nowrap; /* 防止文字换行 */
}

header h1 img {
    margin-right: 0.5rem;
}

.header-nav {
    display: flex;
    gap: 1.5rem; /* 增加间距 */
    height: 100%;
}

.header-nav a {
    
    color: rgb(255, 255, 255);
    text-decoration: none;
    font-size: 1.12rem; /* 增大字体 */
    font-weight: bold; /* 字体加粗 */
    padding: 0.25rem 0.8rem; /* 增加内部填充 */
    border-radius: 4px;
    transition: background-color 0.3s;
    height: 28px;
    line-height: 28px;
    display: flex;
    align-items: center;
    min-width: 80px; /* 设置最小宽度 */
    justify-content: center; /* 内容居中 */
}

.header-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 主容器布局 */
.container {
    flex: 1;
    max-width: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    height: calc(100vh - 90px); /* 调整高度计算适应新的头部高度 */
    overflow: hidden;
}

.content {
    display: flex;
    gap: 0; /* 移除间隙 */
    background-color: white;
    border-radius: 0; /* 移除圆角 */
    box-shadow: none; /* 移除阴影 */
    overflow: hidden;
    height: 100%;
}

/* 导航栏样式 */
nav {
    min-width: 250px; /* 设置最小宽度 */
    max-width: 320px; /* 设置最大宽度 */
    width: 25%; /* 设置为内容区域的25% */
    background-color: #f8f9fa;
    padding-top: 0; /* 去除顶部内边距 */
    position: relative;
    overflow-y: auto;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

nav[data-collapsed="false"] {
    
    overflow-y: auto;
    padding-bottom: 90px; /* 进一步增加底部填充 */
}

nav[data-collapsed="true"] {
    max-height: 60px !important;
}

/* 搜索样式 */
.search-container {
    padding: 0.55rem 1rem; /* 调整内边距与菜单项一致 */
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    height: 35px; /* 固定高度 */
}

.search-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.search-button {
    padding: 0.5rem 1rem;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 35px; /* 固定高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.search-button:hover {
    background-color: #004494;
}

/* 切换导航按钮 */
.toggle-nav {
    display: none;
    width: 100%;
    padding: 0.5rem;
    background-color: #0056b3;
    color: white;
    border: none;
    cursor: pointer;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1001;
    text-align: center;
    font-weight: bold;
    height: 50px;
    font-size: 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

/* 导航菜单样式 */
#navigation {
    list-style: none;
    padding: 0 1rem;
}

#navigation li {
    margin-bottom: 0.5rem;
}

#navigation a {
    display: block;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: #495057;
    font-size: 0.9rem;
    border-radius: 0; /* 移除圆角 */
    transition: all 0.2s ease;
    border-left: 3px solid transparent; /* 添加左侧边框 */
}

#navigation a:hover {
    background-color: #e6f0ff;
    color: #0056b3;
    transform: translateX(0); /* 移除水平移动效果 */
    border-left: 3px solid #0056b3; /* 高亮左侧边框 */
}

#navigation a.clicked {
    background: linear-gradient(90deg, #0072b1, #00aaff);
    
    color: white;
}

/* 分类菜单样式 */
.menu {
    list-style: none;
    padding: 0;
}

.category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    background-color: #e9ecef;
    cursor: pointer;
    position: relative;
    padding: 0.7rem 1rem; /* 增加内边距 */
    margin-bottom: 0; /* 去掉底部间距 */
    border-bottom: 1px solid #dee2e6; /* 添加底部边框 */
}

/* 删除伪元素箭头，使用实际元素替代 */
.category::after {
    content: none;
}

/* 箭头图标样式 */
.arrow-icon {
    font-size: 0.7rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.category.expanded::after {
    transform: rotate(180deg);
}

.sub-menu {
    list-style: none;
    padding-left: 0; /* 减少左侧内边距 */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0; /* 移除顶部间距 */
    background-color: #ffffff; /* 添加白色背景 */
}

.sub-menu.expanded {
    max-height: 1000px; /* 增加展开时的最大高度 */
    margin-bottom: 0; /* 移除底部间距 */
}

.sub-menu li:first-child {
    margin-top: 0; /* 移除第一个子项的顶部边距 */
}

.sub-menu li {
    border-bottom: 1px solid #f0f0f0; /* 添加细线分隔 */
}

/* 子菜单项样式 */
.sub-menu a {
    padding: 0.7rem 1rem 0.7rem 1.5rem !important; /* 统一内边距 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative; /* 保留相对定位 */
}

/* 新标签样式 */
/* 向右边移动一些 */
.new-badge {
    display: inline-block;
    background-color: #ff4757;
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    margin-left: 1rem; /* 向右移动 */
}

/* 自定义提示框样式 */
#custom-tooltip {
    position: fixed;
    top: 100px;
    left: 350px;
    background-color: rgba(0, 0, 0, 0.9); /* 增加背景不透明度 */
    color: white;
    padding: 12px 15px; /* 增加内边距 */
    border-radius: 4px;
    font-size: 14px;
    z-index: 10000; /* 确保它在最上层 */
    width: 250px;
    white-space: normal;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* 增强阴影 */
    display: none;
    border-left: 3px solid #0056b3; /* 添加左边框 */
    max-width: 40vw; /* 限制最大宽度 */
    text-align: left; /* 确保文本左对齐 */
    line-height: 1.4; /* 增加行高 */
    opacity: 1; /* 确保不透明 */
    visibility: visible; /* 确保可见 */
}

/* 确保在移动设备上不显示提示 */
@media (max-width: 768px) {
    #custom-tooltip {
        display: none !important;
    }
}

/* 主内容区样式 */
#main-content {
    flex: 1;
    background-color: white;
    overflow: hidden;
    position: relative;
    height: 100%;
}

#contentFrame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 搜索结果面板样式 */
.search-results-panel {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    z-index: 1500;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-results-panel.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.search-results-list {
    max-height: calc(80vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.search-results-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #0056b3;
}

.close-search-results {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.search-results-list li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.search-results-list a {
    display: block;
    text-decoration: none;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    transition: color 0.3s;
}

.search-results-list a:hover, 
.search-results-list a.active {
    color: #0056b3;
}

.result-category {
    font-size: 0.8rem;
    color: #6c757d;
}

.result-title {
    font-weight: bold;
}

.result-details {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.results-count {
    font-size: 0.8rem;
    color: #6c757d;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* 搜索切换按钮 */
.toggle-search-view {
    position: fixed;
    bottom: 4.5rem; /* 移到更高的位置，避开备案信息 */
    right: 2.5rem;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    z-index: 949; /* 确保在备案信息下方 */
    border-radius: 50%;
    background-color: #0056b3;
    color: white;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
}

.toggle-search-view:hover {
    background-color: #004494;
    transform: scale(1.1);
}

.pulse-once {
    animation: pulse 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 提示框样式 */
#tooltip-container {
    position: fixed;
    z-index: 9999;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    padding: 1rem;
    max-width: 350px;
    min-width: 240px;
    min-height: 50px;
    font-size: 0.9rem;
    pointer-events: all;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
    border-left: 4px solid #0056b3;
    transform: translateY(0);
}

#tooltip-container.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#tooltip-content {
    color: #495057;
    line-height: 1.5;
}

/* 让提示框可以交互，且在悬停时更加明显 */
#tooltip-container:hover {
    opacity: 1 !important;
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    border-left-width: 6px;
}

/* 搜索结果高亮和动画 */
.highlight {
    background-color: #ffeb3b;
    padding: 0 2px;
    border-radius: 2px;
}

.pulse-highlight {
    animation: pulseHighlight 1.5s ease;
}

@keyframes pulseHighlight {
    0% { background-color: transparent; }
    20% { background-color: #ffeb3b; }
    80% { background-color: #ffeb3b; }
    100% { background-color: transparent; }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 页脚样式 */
footer {
    background-color: #343a40;
    color: #f8f9fa;
    text-align: center;
    /* padding: 0.75rem;  减小内边距 */
    font-size: 0.9rem;
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 导航菜单样式 */
    nav {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        width: 100vw !important; /* 使用视口宽度单位 */
        max-width: 100vw !important; /* 确保最大宽度也是100% */
        min-width: 100vw !important; /* 确保最小宽度也是100% */
        height: 0 !important;
        max-height: 0 !important;
        background: #fff;
        transition: all 0.3s ease;
        overflow: hidden !important;
        z-index: 1000;
        margin: 0;
        padding: 0;
        border: none;
        opacity: 0;
        visibility: hidden;
    }

    nav[data-collapsed="false"] {
        height: calc(100vh - 125px) !important;
        max-height: calc(100vh - 125px) !important;
        overflow-y: auto !important;
        opacity: 1;
        visibility: visible;
    }

    /* 搜索结果面板样式 */
    .search-results-panel {
        width: 90%;
        max-width: 400px;
        max-height: 80vh; /* 移动端增加最大高度 */
        top: 10vh;
        right: -100%;
        left: auto;
        transform: none;
    }

    .search-results-panel.active {
        right: 5%;
    }

    .search-results-list {
        max-height: calc(80vh - 100px);
    }

    /* 修复导航菜单内容区域 */
    #navigation {
        width: 100vw !important;
        margin: 0 !important;
        padding: 10px 1rem 80px 1rem !important;
        height: auto;
        overflow-y: auto;
    }

    /* 确保内容区域撑满宽度 */
    .content {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 移除所有可能的空白容器 */
    .search-container,
    .home-container,
    div[class*="container"]:not(.container):not(.search-container):not(.beian-content) {
        display: none !important;
    }

    /* 搜索结果标题 */
    .search-results-header {
        display: none !important;
    }

    /* 基础布局 */
    .container {
        height: calc(100vh - 50px);
        overflow: hidden;
        padding: 0;
        margin: 0;
    }

    .content {
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* 备案信息样式 */
    #beian-info {
        position: fixed;
        bottom: 40px;
        left: 0;
        width: 100%;
        height: 35px;
        background-color: rgba(248, 249, 250, 0.95);
        z-index: 950;
        display: none;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    nav[data-collapsed="false"] ~ #beian-info {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* 底部导航按钮 */
    .toggle-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40px;
        background-color: #0056b3;
        color: white;
        border: none;
        z-index: 1010;
        display: block;
        font-weight: bold;
        font-size: 16px;
    }
}

/* 小屏幕设备额外优化 */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }
    
    .search-container {
        padding: 0.4rem;
    }
    
    .toggle-nav {
        font-size: 0.85rem;
        height: 40px !important; /* 确保按钮高度固定 */
    }
    
    nav[data-collapsed="false"] {
        max-height: 60vh;
    }
    
    .category {
        font-size: 0.9rem;
        padding: 0.7rem 0.8rem;
    }
    
    .sub-menu a {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
    
    /* 搜索结果面板调整 */
    .search-results-header h3 {
        font-size: 0.9rem;
    }
    
    .search-results-list a {
        font-size: 0.85rem;
    }
    
    /* 修复搜索按钮样式和位置 */
    .search-button {
        line-height: 1.5; /* 调整行高为内容高度 */
        opacity: 1; /* 确保不透明 */
        position: relative;
        z-index: 200;
    }

    /* 备案信息更强制的样式 */
    #beian-info.visible {
        bottom: 40px !important;
        font-size: 0.8rem !important;
    }
}

/* 动画和过渡效果 */
@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 搜索弹出面板样式 */
.search-popup {
    position: fixed;
    bottom: 10rem; /* 调高位置 */
    right: 2.5rem;
    width: 400px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    padding: 15px;
    display: none;
    transform-origin: bottom right;
    transform: scale(0.95);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.search-popup.active {
    display: block;
    transform: scale(1);
    opacity: 1;
}

.search-popup .search-form {
    display: flex;
    gap: 0.5rem;
}

.search-popup .search-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    height: 45px;
}

.search-popup .search-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.search-popup .search-button {
    padding: 0.5rem 0.8rem;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.search-popup .search-button:hover {
    background-color: #004494;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    .search-popup {
        width: 280px;
        bottom: 5.5rem;
        right: 1.5rem;
    }
    
    /* 修改导航样式，移除搜索框空间 */
    nav {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .search-popup {
        width: 250px;
        bottom: 9rem;
        right: 1rem;
    }
}

/* 备案信息基本样式 */
#beian-info {
    position: fixed;
    bottom: 40px;
    width: 100%;
    height: 35px;
    background-color: rgba(248, 249, 250, 0.95);
    z-index: 950;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#beian-info .beian-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    
    color: #666;
}

#beian-info a {
    color: #666;
    text-decoration: none;
}

@media (max-width: 768px) {
    nav {
        height: calc(100vh - 125px) !important;
        max-height: calc(100vh - 125px) !important;
    }

    nav[data-collapsed="false"] {
        height: calc(100vh - 125px) !important;
        max-height: calc(100vh - 125px) !important;
        overflow-y: auto;
    }

    #navigation {
        height: 100%;
        overflow-y: auto;
        padding-bottom: 80px !important;
    }

    #beian-info {
        bottom: 40px !important;
        height: 35px !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
    }

    #beian-info.visible {
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
    }

    /* 移除可能导致空白的样式 */
    .home-container,
    div[class*="container"]:not(.container):not(.search-container):not(.beian-content) {
        display: none !important;
    }
}

/* 移除空白组件 */
div.home-container {
    display: none !important;
}

@media (max-width: 768px) {
    /* 确保导航菜单和内容区域正确显示 */
    .container {
        height: calc(100vh - 50px);
        overflow: hidden;
    }

    .content {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    nav {
        flex: none;
    }

    #main-content {
        flex: 1;
        height: auto;
    }

    /* 确保备案信息显示 */
    #beian-info {
        position: fixed !important;
        bottom: 40px !important;
        height: 35px !important;
        width: 100% !important;
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 950 !important;
        background-color: rgba(248, 249, 250, 0.95) !important;
    }
}

@media screen and (max-width: 768px) {
    .container {
        height: calc(100vh - 50px);
        overflow: hidden;
        position: relative;
    }

    nav {
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        height: 0 !important;
        max-height: 0 !important;
        background: #fff;
        transition: all 0.3s ease;
        overflow: hidden !important;
        z-index: 1000;
        margin: 0;
        padding: 0;
        border: none;
        opacity: 0;
        visibility: hidden;
    }

    nav[data-collapsed="false"] {
        height: calc(100vh - 125px) !important;
        max-height: calc(100vh - 125px) !important;
        overflow-y: auto !important;
        opacity: 1;
        visibility: visible;
    }

    #navigation {
        padding: 10px;
        height: auto;
        min-height: calc(100vh - 175px);
    }

    /* 备案信息默认隐藏 */
    #beian-info {
        position: fixed;
        bottom: 40px;
        left: 0;
        width: 100%;
        height: 35px;
        background-color: rgba(248, 249, 250, 0.95);
        z-index: 950;
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    /* 只有在菜单展开时显示备案信息 */
    nav[data-collapsed="false"] ~ #beian-info {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* 隐藏不需要的容器 */
    .home-container,
    .search-container,
    .search-backdrop {
        display: none !important;
    }

    /* 底部按钮样式 */
    .toggle-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40px;
        background: #fff;
        border: none;
        border-top: 1px solid #eee;
        color: #333;
        font-size: 14px;
        cursor: pointer;
        z-index: 1002;
        display: block;
    }
}