﻿/* 继承主站主题样式 */
@import url('../../css/style.css');
@import url('../../faq/css/fontawesome/css/all.min.css');

:root {
    --accent-server: var(--accent-primary);
    --nav-height: 64px;
}

:root[data-theme="light"] {
    --accent-server: var(--accent-primary);
}

/* 信息表格样式 */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.info-table th,
.info-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-table th {
    background: var(--accent-primary-15);
    color: var(--accent-server);
    font-weight: 600;
}

.info-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.info-table td {
    color: var(--text-muted);
}

.info-table code {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Light Theme Overrides for Table */
:root[data-theme="light"] .info-table th {
    background: #f1f5f9;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
}

:root[data-theme="light"] .info-table td {
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

:root[data-theme="light"] .info-table tr:hover {
    background: #f8fafc;
}

:root[data-theme="light"] .info-table code {
    background: #e0e7ff;
    color: #4f46e5;
}

@media (max-width: 768px) {
    .info-table {
        font-size: 12px;
    }

    .info-table th,
    .info-table td {
        padding: 8px 10px;
    }
}

body {
    background-color: var(--bg-deep);
    color: var(--text-high);
    font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 动态背景装饰 */
.bg-blob {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
    animation: blobFloat 25s infinite linear;
}

.blob-1 {
    background: var(--accent-server);
    top: -200px;
    left: -200px;
}

.blob-2 {
    background: var(--accent-secondary);
    bottom: -200px;
    right: -200px;
    animation-delay: -10s;
}

.blob-3 {
    background: var(--accent-tertiary);
    top: 50%;
    left: 50%;
    animation-duration: 35s;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    33% {
        transform: translate(30px, -50px) rotate(120deg) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg) scale(0.9);
    }

    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
    }
}

/* Light Theme: Subtle or No Blobs */
:root[data-theme="light"] .bg-blob {
    opacity: 0.05;
    filter: blur(100px);
}

:root[data-theme="light"] body {
    background-color: #f8fafc;
}

.faq-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 指南头部 */
.guide-header {
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
}

.guide-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.gradient-text {
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version-badge {
    font-size: 14px;
    padding: 4px 12px;
    background: var(--accent-server);
    color: #0f172a;
    border-radius: 20px;
    vertical-align: middle;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: #0f172a;
    display: inline-block;
}

.applicable-systems {
    margin-top: 20px;
}

.systems-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.system-item {
    background: var(--accent-primary-10);
    border: 1px solid var(--accent-primary-30);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--accent-server);
}

/* 分类区域 */
.category-section {
    margin-bottom: 50px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-header .faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--accent-server);
}

.category-header .faq-icon svg {
    width: 24px;
    height: 24px;
}

/* 通用图标样式 */
.faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-icon svg {
    width: 18px;
    height: 18px;
    color: currentColor;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-title {
    font-size: 22px;
    font-weight: 700;
}

/* 问题列表 */
.problem-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.problem-card {
    background: rgba(13, 17, 26, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* border: 1px solid rgba(255, 255, 255, 0.08); */
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.problem-card:hover {
    transform: translateY(-4px);
    /* border-color: var(--accent-primary-40); */
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.problem-number {
    width: 32px;
    height: 32px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-server);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.problem-card:hover .problem-number {
    background: var(--grad-main);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-primary-40);
    transform: rotate(-5deg) scale(1.05);
}

.problem-content {
    flex: 1;
}

.problem-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: white;
}

.problem-title .faq-icon svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.problem-desc {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 12px;
}

.problem-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--grad-main);
    color: #fff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px -3px var(--accent-primary-40);
    position: relative;
    overflow: hidden;
}

.problem-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.problem-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px var(--accent-primary-50);
}

.problem-link:hover::before {
    left: 100%;
}

.problem-link .faq-icon svg {
    width: 14px;
    height: 14px;
}

/* ==================== 征文列表样式（非卡片�?==================== */
.essay-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(13, 17, 26, 0.4);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.essay-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(13, 17, 26, 0.3);
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.essay-item:last-child {
    border-bottom: none;
}

.essay-item:hover {
    background: var(--accent-primary-10);
    padding-left: 28px;
}

.essay-number {
    width: 28px;
    height: 28px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-server);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.essay-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.essay-author {
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.essay-item .faq-icon {
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.3s;
}

.essay-item:hover .faq-icon {
    opacity: 1;
    color: var(--accent-server);
}

/* 响应�?*/
@media (max-width: 768px) {
    .guide-header {
        padding: 40px 10px 20px;
    }

    .guide-title {
        font-size: 24px;
        line-height: 1.3;
    }

    .problem-list {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .problem-card {
        padding: 16px;
        gap: 12px;
    }

    .problem-title {
        font-size: 16px;
    }

    .essay-item {
        padding: 14px 16px;
        gap: 12px;
    }

    .essay-title {
        font-size: 14px;
    }

    .essay-author {
        display: none;
    }
}

/* ==================== 内容页面样式 ==================== */
.content-section {
    display: block !important;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    padding: 0 0 16px 0;
    margin-bottom: 16px;
}

.content-section h2 {
    color: var(--accent-server);
    font-size: 20px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-section h3 {
    color: var(--text-main);
    font-size: 16px;
    margin: 16px 0 10px;
}

.content-section p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.content-section code {
    background: var(--accent-primary-10);
    color: var(--accent-server);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
}

/* 步骤列表 */
.step-list {
    padding-left: 20px;
    color: var(--text-muted);
}

.step-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 步骤卡片优化 */
.step-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary-30);
    transform: translateY(-2px);
}

:root[data-theme="light"] .step-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

:root[data-theme="light"] .step-card:hover {
    background: transparent;
    border: none;
    box-shadow: none;
    transform: none;
}

.step-card .step-number {
    width: 32px;
    height: 32px;
    background: var(--accent-primary-10);
    color: var(--accent-server);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 14px;
}

:root[data-theme="light"] .step-card .step-number {
    background: #e0e7ff;
    color: #4f46e5;
}

.step-card .step-content {
    flex: 1;
}

.step-card .step-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-high);
}

:root[data-theme="light"] .step-card .step-content h3 {
    color: #1e293b;
}

.step-card .step-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.6;
}

:root[data-theme="light"] .step-card .step-content p {
    color: #475569;
}

/* 代码�?*/
.code-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    color: #4ade80;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 命令项目 */
.command-item {
    margin-bottom: 16px;
}

.command-item .command-desc {
    color: var(--text-main);
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
}

/* 返回按钮 */
.back-to-faq {
    position: fixed;
    top: 80px;
    left: max(20px, calc((100vw - 1200px) / 2 - 60px));
    width: 44px;
    height: 44px;
    background: rgba(13, 17, 26, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.back-to-faq:hover {
    background: var(--accent-server);
    color: #0f172a;
    transform: translateX(-3px);
    box-shadow: 0 8px 30px var(--accent-primary-40);
}

.back-to-faq svg {
    width: 22px;
    height: 22px;
}

/* 配置�?*/
.config-item {
    margin: 16px 0;
}

.config-item h3 {
    margin-bottom: 8px;
}

/* 提示文本 */
.tip {
    color: #fbbf24;
    font-size: 13px;
    margin-top: 8px;
}

/* FAQ项目 */
.faq-item {
    margin: 16px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.faq-item h3 {
    color: var(--accent-server);
    font-size: 14px;
    margin: 0 0 8px 0;
}

.faq-item p {
    margin: 0;
    font-size: 14px;
}

/* 征文元信�?*/
.essay-meta {
    color: var(--text-mid);
    font-size: 14px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .back-to-faq {
        top: 70px;
        left: 10px;
        width: 40px;
        height: 40px;
    }

    .content-section {
        padding: 12px;
    }

    .step-card {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }

    .step-card .step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* 页面图片样式 */
.page-image {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hero-image {
    margin-top: 0;
    margin-bottom: 30px;
}

/* ==================== 开发中提示横幅 ==================== */
.dev-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 16px;
    margin-bottom: 32px;
    animation: devNoticePulse 3s ease-in-out infinite;
}

@keyframes devNoticePulse {

    0%,
    100% {
        border-color: rgba(251, 191, 36, 0.3);
    }

    50% {
        border-color: rgba(251, 191, 36, 0.6);
    }
}

.dev-notice-icon {
    font-size: 28px;
    flex-shrink: 0;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.dev-notice-content {
    flex: 1;
}

.dev-notice-content strong {
    display: block;
    color: #fbbf24;
    font-size: 16px;
    margin-bottom: 6px;
}

.dev-notice-content p {
    margin: 0;
    color: var(--text-mid);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .dev-notice {
        padding: 16px;
        gap: 12px;
    }

    .dev-notice-icon {
        font-size: 24px;
    }

    .dev-notice-content strong {
        font-size: 15px;
    }

    .dev-notice-content p {
        font-size: 13px;
    }
}

/* ==================== 亮色主题适配 ==================== */
:root[data-theme="light"] .gradient-text {
    background: linear-gradient(135deg, #1a1a2e 0%, #4a5568 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

:root[data-theme="light"] .problem-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .problem-card:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--accent-server);
    box-shadow: 0 12px 40px var(--accent-primary-15);
}

.problem-card:hover .problem-number {
    background: var(--grad-main);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-primary-40);
    transform: rotate(-5deg) scale(1.05);
}

:root[data-theme="light"] .problem-title {
    color: #1a1a2e;
}

:root[data-theme="light"] .essay-list {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .essay-item {
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .essay-item:hover {
    background: var(--accent-primary-10);
}

:root[data-theme="light"] .content-section {
    background: transparent;
    border: none;
}

:root[data-theme="light"] .back-to-faq {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

:root[data-theme="light"] .category-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .code-block {
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--accent-server);
}

:root[data-theme="light"] .step-card {
    background: transparent;
    border: none;
    box-shadow: none;
}

:root[data-theme="light"] .faq-item {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .info-table th {
    background: var(--accent-primary-10);
}

:root[data-theme="light"] .info-table td {
    color: #4a5568;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .dev-notice {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
}

/* 亮色主题 - 背景粒子降低饱和�?*/
:root[data-theme="light"] .bg-blob {
    opacity: 0.06;
    filter: blur(180px);
}

/* 亮色主题 - 系统标签 */
:root[data-theme="light"] .system-item {
    background: var(--accent-primary-10);
    border: 1px solid var(--accent-primary-30);
    color: var(--accent-server);
}

/* 亮色主题 - 版本徽章 */
:root[data-theme="light"] .version-badge {
    background: var(--accent-server);
    color: #fff;
    -webkit-text-fill-color: #fff;
}

/* 亮色主题 - 问题编号 */
:root[data-theme="light"] .problem-number {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-server);
}

/* 亮色主题 - 征文编号 */
:root[data-theme="light"] .essay-number {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-server);
}

/* 亮色主题 - 分类图标 */
:root[data-theme="light"] .category-header .faq-icon {
    color: var(--accent-server);
}

/* 亮色主题 - 分类标题 */
:root[data-theme="light"] .category-title {
    color: #1a1a2e;
}

/* ==================== 页面布局与侧边栏目录 (同步桌面�? ==================== */
.page-layout {
    display: flex;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    transition: gap 0.3s ease;
}

.main-content-area {
    flex: 1;
    min-width: 0;
}

.toc-sidebar {
    width: 0;
    opacity: 0;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow-x: hidden;
}

.toc-sidebar.expanded {
    width: 240px;
    opacity: 1;
    pointer-events: all;
}

.toc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.toc-toggle {
    position: fixed;
    top: 80px;
    left: max(20px, calc((100vw - 1200px) / 2 - 60px));
    width: 44px;
    height: 44px;
    background: rgba(13, 17, 26, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-toggle:hover {
    background: var(--accent-server);
    color: #0f172a;
    transform: scale(1.05) translateX(3px);
    box-shadow: 0 8px 30px var(--accent-primary-40);
}

.toc-sidebar h3 {
    color: var(--accent-server);
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 4px;
}

.toc-list a {
    display: block;
    padding: 8px 12px;
    color: var(--text-mid) !important;
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toc-list a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white !important;
    border-left-color: var(--accent-server);
}

.toc-list a.active {
    background: rgba(var(--h-primary), 84%, 67%, 0.1);
    color: var(--accent-server) !important;
    border-left-color: var(--accent-server);
    font-weight: 600;
}

.toc-toggle.active {
    background: rgba(13, 17, 26, 0.95);
    color: var(--accent-server);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* 亮色主题适配 */
:root[data-theme="light"] .toc-toggle {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-high);
}

:root[data-theme="light"] .toc-toggle.active {
    background: #fff;
    color: var(--accent-server);
}

/* 移动端适配 */
@media (max-width: 1024px) {
    .toc-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 80px 20px 20px;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 1;
        pointer-events: all;
    }

    .toc-sidebar.expanded {
        transform: translateX(0);
    }

    .page-layout {
        display: block;
    }

    .toc-toggle {
        display: flex;
        left: 20px;
    }
}

/* 代码块增强样�?*/
.code-block-container {
    position: relative;
    margin: 16px 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(13, 17, 23, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-block,
pre[class*="language-"] {
    margin: 0 !important;
    padding: 40px 16px 16px !important;
    /* Increased top padding to clear copy button */
    font-family: 'Fira Code', 'Cascadia Code', Consolas, monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    overflow-x: auto;
}

.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-server);
    color: white;
    transform: translateY(-1px);
}

.copy-button.copied {
    background: rgba(var(--accent-server-rgb), 0.2);
    border-color: var(--accent-server);
    color: var(--accent-server);
}

/* 适配不同代码块类�?*/
.command-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.command-desc {
    color: var(--accent-server);
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.command-desc::before {
    content: '>';
    opacity: 0.5;
}

:root[data-theme="light"] code[class*="language-"] {
    text-shadow: none !important;
}

/* Light Theme Overrides for Code Copy Button */
:root[data-theme="light"] .code-block-container {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

:root[data-theme="light"] .copy-button {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

:root[data-theme="light"] .copy-button:hover {
    background: #cbd5e1;
    border-color: var(--accent-server);
    color: #1e293b;
}

:root[data-theme="light"] .copy-button.copied {
    background: var(--accent-primary-10);
    color: var(--accent-server);
}

/* Light Theme Overrides for Sidebar & TOC */
:root[data-theme="light"] .toc-list a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--accent-server) !important;
    border-left-color: var(--accent-server);
}

:root[data-theme="light"] .toc-list a.active {
    background: var(--accent-primary-10);
    color: var(--accent-server) !important;
    font-weight: 700;
}

@media (max-width: 1024px) {
    :root[data-theme="light"] .toc-sidebar {
        background: rgba(255, 255, 255, 0.98);
        border-right: 1px solid rgba(0, 0, 0, 0.08);
    }
}

/* ==================== 搜索模态框样式 ==================== */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-modal {
    width: 90%;
    max-width: 600px;
    background: rgba(13, 17, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.search-modal-overlay.active .search-modal {
    transform: translateY(0) scale(1);
}

.search-modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-modal-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-server);
    flex-shrink: 0;
}

.search-modal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    outline: none;
    padding: 4px 0;
}

.search-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

.search-modal-close:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4d4d;
}

.search-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* 热门搜索 */
.search-hot-keywords {
    margin-bottom: 20px;
}

.hot-keywords-title {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
}

.hot-keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hot-keyword {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
}

.hot-keyword:hover {
    background: var(--accent-primary-15);
    border-color: var(--accent-server);
    color: var(--accent-server);
    transform: translateY(-2px);
}

/* 搜索结果 */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-item {
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.search-result-title {
    color: white;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.search-result-desc {
    color: var(--text-muted);
    font-size: 13px;
    display: block;
}

.search-no-results {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
}

/* Light 主题适配 */
:root[data-theme="light"] .search-modal {
    background: rgba(255, 255, 255, 0.95);
    border-color: #e2e8f0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .search-modal-input {
    color: #1e293b;
}

:root[data-theme="light"] .hot-keyword {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

:root[data-theme="light"] .search-result-item {
    background: #f8fafc;
}

:root[data-theme="light"] .search-result-title {
    color: #1e293b;
}

/* 搜索关键词高亮 */
.search-result-title mark,
.search-result-desc mark {
    background: transparent;
    color: var(--accent-server);
    font-weight: bold;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    padding: 0 2px;
}

:root[data-theme="light"] .search-result-title mark,
:root[data-theme="light"] .search-result-desc mark {
    background: rgba(255, 255, 0, 0.3);
    color: #d97706;
}

@media (max-width: 768px) {
    .search-modal-overlay {
        padding-top: 40px;
    }

    .search-modal {
        width: 95%;
        border-radius: 16px;
    }

    .search-modal-header {
        padding: 16px;
    }

    .search-modal-body {
        padding: 16px;
    }
}

/* ==================== 搜索触发器样式 ==================== */
.search-trigger {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.search-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-server);
    color: white;
}

.search-trigger-icon {
    width: 16px;
    height: 16px;
}

:root[data-theme="light"] .search-trigger {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-mid);
}

:root[data-theme="light"] .search-trigger:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--accent-server);
    color: var(--accent-server);
}