/* ===== 基础样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    padding-top: 76px;
}

/* ===== 导航栏 - 完全统一风格 ===== */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 滚动时增强阴影 */
.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1.5rem;  /* 上下 16px，左右 24px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* Logo 区域 - 统一高度 */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
    font-size: 24px;      /* 统一字体大小 */
    letter-spacing: 0.02em;
    color: #00838f;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.85;
}

.nav-logo img {
    height: 48px;         /* 统一图片高度 */
    width: auto;
}

/* 导航菜单 - 统一间距和字体 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;            /* 统一菜单间距 */
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;      /* 统一字体大小 */
    padding: 8px 0;
    transition: all 0.2s ease;
    position: relative;
}

/* 悬停效果 */
.nav-menu a:hover {
    color: #00838f;
}

/* 激活/当前页面样式 */
.nav-menu a.active {
    color: #00838f;
    border-bottom: 2px solid #00838f;
}

/* 如果旧导航栏使用背景高亮方式，保留兼容 */
.nav-menu a.active-bg {
    background: rgba(0, 131, 143, 0.1);
    color: #006064;
    border-radius: 5px;
    padding: 8px 15px;
}

/* 为 body 添加顶部内边距，防止内容被固定导航栏遮挡 */
body {
    padding-top: 76px;    /* 导航栏高度约 76px */
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .nav-logo span {
        font-size: 18px;
    }
    
    .nav-logo img {
        height: 36px;
    }
    
    .nav-menu {
        gap: 16px;
    }
    
    .nav-menu a {
        font-size: 14px;
    }
    
    body {
        padding-top: 60px;
    }
}
/* ===== 下拉菜单样式 - 与导航栏风格统一 ===== */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle .fa-chevron-down {
    transition: transform 0.25s ease;
    font-size: 0.7em;
    margin-left: 6px;
}

.dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
}

/* 下拉菜单面板 - 使用与导航栏一致的配色 */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    transform-origin: top center;
    background: rgba(233, 250, 253, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 8px 0;
    min-width: 190px;
    box-shadow: 0 8px 25px rgba(0, 131, 143, 0.15);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(0, 131, 143, 0.15);
    z-index: 1000;
    pointer-events: none;
}

/* 下拉菜单三角箭头 - 使用导航栏配色 */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid rgba(194, 239, 246, 0.98);
    filter: drop-shadow(0 -1px 2px rgba(0, 131, 143, 0.05));
}

/* 悬停时展开 */
.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    height: auto;
    display: block;
    padding: 2px 8px;
}

/* 下拉菜单选项 - 与导航栏链接风格一致 */
.dropdown-menu a {
    color: #00838f;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.95rem;
    gap: 12px;
    white-space: nowrap;
    justify-content: flex-start;
    background: transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

/* 下拉菜单悬停效果 - 与导航栏一致 */
.dropdown-menu a:hover {
    background: rgba(0, 131, 143, 0.08);
    color: #006064;
}

/* 下拉菜单图标颜色 - 与导航栏保持一致 */
.dropdown-menu a i {
    width: 20px;
    text-align: center;
    color: #00838f;
    opacity: 0.8;
}

.dropdown-menu a:hover i {
    opacity: 1;
}

/* 移动端响应式 - 下拉保持可用 */
@media (max-width: 768px) {
    .navbar {
        height: auto;
        min-height: 80px;
    }

    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        gap: 5px;
        margin-top: 5px;
        width: 100%;
    }

    .nav-menu li {
        height: auto;
    }

    .dropdown-menu {
        left: 0;
        transform: translateX(0) translateY(-5px);
        top: 100%;
        min-width: 160px;
    }

    .dropdown:hover .dropdown-menu {
        transform: translateX(0) translateY(0);
    }
}


/* ===== 数据库使用指南专用样式 ===== */
.guide-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 30px;
    display: flex;
    gap: 32px;
    min-height: calc(100vh - 76px);
}

/* ===== 左侧目录 ===== */
.guide-toc {
    width: 280px;
    min-width: 280px;
    background: white;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    height: fit-content;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border: 1px solid #e9edf2;
}

.guide-toc::-webkit-scrollbar {
    width: 4px;
}

.guide-toc::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.guide-toc::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.guide-toc h2 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef2f6;
}

.guide-toc h2 i {
    color: #00838f;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.toc-list li a i {
    width: 20px;
    color: #94a3b8;
    font-size: 15px;
    transition: color 0.2s;
}

.toc-list li a:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-left-color: #00838f;
}

.toc-list li a:hover i {
    color: #00838f;
}

.toc-list li a.active {
    background: #eef2ff;
    color: #00838f;
    font-weight: 600;
    border-left-color: #00838f;
}

.toc-list li a.active i {
    color: #00838f;
}

.toc-list .sub-item {
    padding-left: 44px;
    font-size: 13px;
    font-weight: 400;
}

/* ===== 右侧内容 ===== */
.guide-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 32px 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9edf2;
    min-height: 500px;
}

.guide-section {
    scroll-margin-top: 90px;
    margin-bottom: 48px;
    border-bottom: 1px solid #f1f4f9;
    padding-bottom: 32px;
}

.guide-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.guide-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.guide-section h2 i {
    color: #00838f;
    font-size: 24px;
}

.guide-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 24px;
    margin-bottom: 12px;
}

.guide-section p {
    line-height: 1.8;
    color: #334155;
    margin-bottom: 14px;
    font-size: 15px;
}

.guide-section ul,
.guide-section ol {
    margin-left: 22px;
    margin-bottom: 16px;
    color: #334155;
    line-height: 1.8;
}

.guide-section ul li,
.guide-section ol li {
    margin-bottom: 6px;
}

.guide-section code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #0f172a;
    font-family: 'Manrope', monospace;
}

.guide-section .highlight-box {
    background: #f8fafc;
    border-left: 4px solid #00838f;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
}

.guide-section .highlight-box i {
    color: #00838f;
    margin-right: 8px;
}

.guide-section .image-placeholder {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    margin: 16px 0;
}

.guide-section .image-placeholder i {
    font-size: 32px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: block;
}

.guide-section .image-placeholder img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
}

.guide-section .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #00838f;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    margin-right: 10px;
    flex-shrink: 0;
}

.guide-section .step-item {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 12px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .guide-container {
        flex-direction: column;
        padding: 16px;
    }

    .guide-toc {
        width: 100%;
        min-width: unset;
        position: relative;
        top: 0;
        max-height: none;
    }

    .guide-content {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .guide-content {
        padding: 16px;
    }

    .guide-section h2 {
        font-size: 20px;
    }

    .guide-toc h2 {
        font-size: 14px;
    }

    .toc-list li a {
        font-size: 13px;
        padding: 8px 12px;
    }

    .guide-section {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }
}