/* 极简文章页面样式（专为 VN11 加速） */
:root {
    --bg: #030712;
    --panel: rgba(13, 25, 48, 0.82);
    --stroke: rgba(255, 255, 255, 0.08);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-strong: #f97316;
}

body.minimal-layout {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, #0f172a 0%, #030712 55%, #01030a 100%);
    color: var(--text);
    font-family: 'Poppins', 'Noto Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 60px;
    box-sizing: border-box;
    padding-top: 24px;
}

.minimal-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 960px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(3, 7, 18, 0.95);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 18px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px);
    margin-bottom: 20px;
    margin-top: 10px; /* 与顶部保持距离 */
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-meta {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: var(--muted);
}

.brand-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
}

.action-buttons {
    display: flex;
    gap: 14px;
}

.glow-btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 140px;
    padding: 12px 26px;
    border-radius: 999px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.25s ease;
}

.glow-btn span {
    position: relative;
    z-index: 2;
}

.glow-btn::before,
.glow-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transition: opacity 0.35s ease;
}

.glow-btn::before {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
}

.glow-btn::after {
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 55%);
    opacity: 0;
    animation: pulseGlow 2.8s infinite;
}

.glow-btn:hover {
    transform: translateY(-2px) scale(1.01);
}

.glow-btn:hover::before {
    transform: translateX(0);
}

.glow-btn:hover::after {
    opacity: 1;
}

.btn-login {
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.btn-register {
    border-color: rgba(249, 115, 22, 0.7);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}

.article-shell {
    width: 100%;
    max-width: 840px;
    margin-top: 28px;
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: 22px;
    padding: 36px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(25px);
}

.article-headline {
    margin-bottom: 28px;
    border-bottom: 1px solid var(--stroke);
    padding-bottom: 18px;
}

.article-title {
    font-size: clamp(26px, 4vw, 38px);
    margin: 0 0 12px;
    color: var(--text);
    line-height: 1.25;
}

.article-time {
    font-size: 14px;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: rgba(248, 250, 252, 0.88);
}

.article-content h2,
.article-content h3 {
    color: var(--accent);
    margin: 32px 0 12px;
}

.article-content p {
    margin-bottom: 18px;
}

.article-content a {
    color: var(--accent);
    text-decoration: underline;
}

.minimal-nav {
    position: sticky;
    /* 桌面端：top值 = header的top(0) + header的margin-top(10px) + header高度(约70px) + 间距(10px) */
    top: calc(0px + 10px + 70px + 10px); /* 约90px，确保在header下方 */
    z-index: 999;
    width: 100%;
    max-width: 940px;
    margin: 10px 0 0; /* 减少margin-top，使用top定位 */
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.95);
    border: 1px solid var(--stroke);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.25), 0 10px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

.minimal-nav .nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
    display: inline-block; /* 桌面端显示 */
}

.minimal-nav .nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.minimal-nav .nav-link.active {
    color: var(--accent);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0.1));
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.3), inset 0 0 10px rgba(56, 189, 248, 0.1);
    font-weight: 600;
}

/* 桌面端：隐藏菜单图标按钮 */
.minimal-header .nav-menu-toggle,
.minimal-nav .nav-menu-toggle {
    display: none;
}

.related-section {
    margin-top: 36px;
    padding-top: 26px;
    border-top: 1px solid var(--stroke);
}

.related-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--accent);
}

.related-cards {
    display: grid;
    gap: 16px;
}

.related-cards > * {
    display: block;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.related-cards > *:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.08);
}

.article-content img {
    max-width: 100%;
    border-radius: 16px;
    margin: 24px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.article-content pre {
    background: rgba(2, 6, 23, 0.85);
    border-radius: 12px;
    padding: 18px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
}

.article-content table th,
.article-content table td {
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 14px;
}

.minimal-footer {
    width: 100%;
    max-width: 960px;
    margin-top: 32px;
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid var(--stroke);
    border-radius: 22px;
    padding: 30px 34px 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.footer-card h3 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 16px;
}

.footer-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--muted);
    font-size: 14px;
}

.footer-card li + li {
    margin-top: 6px;
}

.footer-card a {
    color: inherit;
    text-decoration: none;
}

.footer-card a:hover {
    color: var(--accent);
}

.footer-copy {
    margin: 26px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

@keyframes pulseGlow {
    0% { opacity: 0.25; }
    50% { opacity: 0.8; }
    100% { opacity: 0.25; }
}

@media (max-width: 768px) {
    .minimal-header {
        flex-direction: column; /* 纵向布局 */
        align-items: stretch;
        gap: 10px;
        position: sticky; /* 保持sticky以便内容滑动时悬浮 */
        top: 10px; /* 与顶部保持距离 */
        margin-top: 10px; /* 与顶部保持距离 */
        margin-bottom: 0; /* 移除margin-bottom，让菜单紧贴 */
        padding: 12px 16px; /* 减少padding */
        z-index: 1000; /* 确保在菜单之上 */
    }
    
    /* 第一行：brand（logo + brand-name）+ 语言选择器 */
    .minimal-header > .brand {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
        position: relative; /* 为语言选择器绝对定位提供参考 */
        padding-right: 60px; /* 为语言选择器留出空间 */
    }
    
    /* 移动端logo变小 */
    .brand img.logo {
        width: 100px !important;
        height: 30px !important;
        max-width: 100px;
        flex-shrink: 0;
    }
    
    /* 移动端brand-name变小 */
    .brand-name {
        font-size: 12px !important;
    }
    
    .brand-meta {
        font-size: 10px;
        flex: 1;
        min-width: 0; /* 允许收缩 */
    }
    
    /* 语言选择器从action-buttons移到第一行（brand右侧） */
    .minimal-header .action-buttons .language-switcher {
        position: absolute;
        right: 0;
        top: -40px; /* 精确移动到brand行位置（考虑gap和padding） */
        z-index: 10;
    }
    
    /* 第二行：菜单图标 + 登录和注册按钮 */
    .minimal-header .action-buttons {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin-top: 0;
        position: relative; /* 为语言选择器定位提供参考 */
        z-index: 1001; /* 确保按钮可以点击 */
    }
    
    /* 移动端：在action-buttons中显示菜单图标（在登录和注册按钮的左边） */
    .minimal-header .action-buttons .nav-menu-toggle {
        /* 显示和布局 */
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: relative !important;
        
        /* 尺寸和间距 */
        padding: 8px 14px;
        margin: 0;
        min-width: 44px; /* 确保足够的点击区域 */
        min-height: 44px; /* 确保足够的点击区域 */
        
        /* 外观 */
        background: rgba(56, 189, 248, 0.2);
        border: 1px solid rgba(56, 189, 248, 0.4);
        border-radius: 999px;
        color: var(--accent);
        font-size: 18px;
        line-height: 1;
        font-family: Arial, sans-serif !important;
        text-align: center !important;
        white-space: nowrap !important;
        box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
        
        /* 交互 */
        cursor: pointer !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(56, 189, 248, 0.3);
        -webkit-user-select: none;
        user-select: none;
        
        /* 层级 */
        z-index: 10000 !important; /* 超高 z-index 确保在最上层 */
        order: 0;
        
        /* 过渡 */
        transition: all 0.3s ease;
        outline: none;
        flex-shrink: 0;
    }
    
    .minimal-header .action-buttons .nav-menu-toggle:hover,
    .minimal-header .action-buttons .nav-menu-toggle:active {
        background: rgba(56, 189, 248, 0.3);
        box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
        transform: scale(1.05);
    }
    
    .minimal-header .glow-btn {
        flex: 1;
        min-width: 0;
        font-size: 10px; /* 移动端按钮文字更小 */
        padding: 8px 12px; /* 减少padding避免挤压 */
        order: 1; /* 在菜单图标之后 */
    }
    
    .minimal-header .glow-btn span {
        font-size: 10px; /* 确保span内的文字也变小 */
        white-space: nowrap; /* 防止文字换行 */
    }
    
    .article-shell {
        padding: 26px 20px;
    }

    /* 移动端：菜单容器默认隐藏 */
    .minimal-nav {
        border-radius: 18px;
        /* 移动端：菜单跟随header，top值 = header的top(10px) + header的margin-top(10px) + header高度(约60px) + 间距(10px) */
        top: calc(10px + 10px + 60px + 10px); /* 约90px，确保在header下方 */
        margin-top: 0; /* 移除margin-top，使用top定位 */
        transition: all 0.3s ease; /* 添加过渡动画 */
        position: sticky !important; /* 确保sticky定位 */
        z-index: 999 !important; /* 确保在最上层 */
        
        /* 默认隐藏整个菜单容器 */
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* 移动端默认隐藏所有菜单项（只在移动端生效） */
    /* .minimal-nav .nav-link {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: none !important;
    } */
    
    /* 菜单展开状态（点击图标后）- 显示整个菜单容器 */
    .minimal-nav.expanded {
        /* 显示菜单容器 */
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        
        /* 布局样式 - 像桌面端一样横向排列 */
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 18px !important;
        gap: 12px !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
        min-height: 50px !important;
        overflow: visible !important;
    }
    
    /* 菜单项继承桌面端样式，不需要额外的隐藏/显示逻辑 */
    
    /* 展开时菜单图标仍然显示在action-buttons中，不需要隐藏 */

    .footer-columns {
        grid-template-columns: 1fr;
    }
}



