/*
Theme Name: DaNiu-AI 文档主题
Description: 科技炫酷风三栏布局文档主题
Version: 1.0.0
*/

:root {
    --neon-cyan: #00e5ff;
    --neon-purple: #7c4dff;
    --bg-dark: #0a0c15;
    --bg-card: rgba(18, 20, 31, 0.6);
    --text-primary: #e8edf5;
    --text-secondary: #8a8aa8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(ellipse at 20% 30%, #0a0c15, #03050b);
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
}

.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航栏 */
.site-header {
    background: rgba(10, 12, 21, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    padding: 12px 30px;
    position: static;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00e5ff, #7c4dff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon i {
    font-size: 20px;
    color: #0a0c15;
}

.logo-text a {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #00e5ff, #7c4dff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: #b0b0d0;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.nav-menu li a:hover {
    color: #00e5ff;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-btn {
    color: #00e5ff;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid rgba(0,229,255,0.3);
    padding: 6px 14px;
    border-radius: 30px;
    transition: 0.2s;
}

.header-btn:hover {
    background: rgba(0,229,255,0.1);
}

.wechat-badge {
    color: #8a8aa8;
    font-size: 13px;
}

/* 主内容区：侧边栏在左，内容在右 */
.site-main {
    display: flex;
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding: 30px 20px;
    gap: 30px;
}

.site-content-wrapper {
    flex: 1;
    min-width: 0;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: rgba(26, 28, 42, 0.5);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00e5ff, #7c4dff);
    border-radius: 4px;
}

/* 页脚 */
.site-footer {
    background: rgba(10, 12, 21, 0.8);
    border-top: 1px solid rgba(0, 229, 255, 0.1);
    padding: 30px 20px;
    margin-top: 50px;
    text-align: center;
}

.footer-inner p {
    color: #6a6a8a;
    font-size: 12px;
    margin: 5px 0;
}

.footer-links a, .footer-links span {
    color: #8a8aa8;
    text-decoration: none;
    font-size: 12px;
}

.footer-links a:hover {
    color: #00e5ff;
}

@media (max-width: 900px) {
    .site-main { flex-direction: column; }
    .header-inner { flex-direction: column; }
    .nav-menu { flex-wrap: wrap; justify-content: center; gap: 16px; }
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    /* 顶部菜单不固定 */
    .site-header {
        position: static !important;
    }
    
    /* 导航菜单换行 */
    .nav-menu {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
    }
    
    /* 左栏菜单隐藏 */
    .site-sidebar {
        display: none !important;
    }
    
    /* 返回顶部按钮隐藏 */
    .go-top {
        display: none !important;
    }
    
    /* 文章内容全宽 */
    .tech-content-main {
        width: 100% !important;
    }
    
    /* 右侧目录移到下方 */
    .tech-sidebar-right {
        width: 100% !important;
        margin-top: 20px;
    }
}

/* 移动端修复滑动问题 */
@media (max-width: 768px) {
    .toc-card {
        position: static !important;
    }
    .tech-sidebar-right {
        display: none !important;
    }
}

/* ========== 全局移动端修复 ========== */
@media (max-width: 768px) {
    /* 所有页面顶部菜单不固定 */
    .site-header {
        position: static !important;
    }
    
    /* 修复快速滑动问题 */
    html, body {
        scroll-behavior: auto !important;
        overscroll-behavior: none !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* 禁用所有平滑滚动 */
    * {
        scroll-behavior: auto !important;
    }
}

/* 强制微信浏览器顶部菜单不固定 */
.site-header {
    position: static !important;
    position: sticky \0/;
    *position: static;
}

/* 覆盖所有可能的位置属性 */
@media (max-width: 768px) {
    .site-header {
        position: static !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
    }
}
