body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #2d3748;
    background: #ffffff;
}

.manual-container {
    display: flex;
    min-height: 100vh;
}

.manual-sidebar {
    width: 312px;
    background: #f7f7f8;
    border-right: 1px solid #e5e7eb;
    padding: 20px 0;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.manual-logo {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    transition: opacity 0.2s;
}

.manual-logo:hover {
    opacity: 0.8;
}

.manual-logo img {
    max-width: 200px;
    height: auto;
}

.manual-nav {
    padding: 12px 0;
}

.section {
    margin-bottom: 8px;
}

.section-title, .subsection {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-btn {
    min-width: 20px;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.section-number, .subsection-number {
    color: #2d3748;
    min-width: 24px;
    font-family: monospace;
    font-size: 16px;
    font-weight: 500;
}

.section-title:hover, .subsection:hover {
    background-color: #f3f4f6;
}

.section-title.active, .subsection.active {
    background-color: #e5e7eb;
}

.section-title.expanded {
    background-color: #f7f8fa;
}

.section-title a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.section-link, .subsection-title {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.subsections {
    padding-left: 30px;
}

.subsection-item {
    margin: 4px 0;
}

.subsection {
    padding-left: 52px;
    display: block;
    padding: 8px 20px;
    color: #4a5568;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s;
}

.subsection.active {
    background-color: #e5e7eb;
    color: #1a202c;
}

.subsection:hover {
    color: #4299e1;
    background-color: #edf2f7;
}

.section-link:hover,
.subsection:hover {
    color: #4299e1;
    background-color: #edf2f7;
}

.section-title.active,
.subsection.active {
    background-color: #edf2f7;
    color: #4299e1;
}

.manual-content {
    flex: 1;
    padding: 40px;
    margin-left: 312px;
    max-width: none;
    display: flex;
    justify-content: center;
}

.manual-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.manual-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f7f7f8;
    color: #1a202c;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.back-to-home:hover {
    background: #e5e7eb;
}

.manual-body {
    line-height: 1.6;
    color: #2d3748;
    width: 100%;
    max-width: calc(100vw - 312px - 272px - 80px);
    margin: 0 auto;
    padding: 0 40px;
    margin-right: 272px;
    padding-left: 10%;
}

.manual-body.highlight {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 标题样式 */
.manual-body h1 {
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;    /* 添加相对定位 */
    left: -10%;           /* 向左偏移 */
    width: 110%;          /* 补偿左偏移，确保边框线完整显示 */
}

.manual-body h2,
.manual-body h3 {
    text-align: left;
    margin: 1.5em 0 1em;
}

.manual-body p {
    text-align: left;
    margin: 1em 0;
}

/* 图片容器样式 */
.manual-body p:has(img) {
    text-align: center;
    margin: 30px 0;
    max-width: 100%;
    position: relative;
    left: -10%;
}

/* 图片样式 */
.manual-body img {
    min-width: 40%;
    max-width: 50%;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.manual-body ul, .manual-body ol {
    text-align: left;
    padding-left: 2em;
    margin: 1em 0;
}

/* 视频容器样式 */
.manual-body p:has(video) {
    text-align: center;
    margin: 40px 0;
    max-width: 100%;
    position: relative;
    left: -10%;
}

.manual-body video {
    width: 90%;
    max-width: calc(100vw - 312px - 272px - 80px);
    height: auto;
    margin: 40px auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #000;
    display: block;
}

.manual-body code {
    background: #f7f7f8;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
    color: #1a202c;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.manual-body pre {
    background: #f7f7f8;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.manual-body pre code {
    background: none;
    padding: 0;
    color: #1a202c;
}

.manual-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.manual-body th, .manual-body td {
    padding: 12px;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.manual-body th {
    background: #f7f7f8;
    font-weight: 600;
}

.manual-body blockquote {
    margin: 16px 0;
    padding: 0 16px;
    border-left: 4px solid #e5e7eb;
    color: #4a5568;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .manual-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .manual-content {
        margin-left: 0;
        padding: 20px;
    }
}

.subheadings {
    margin-left: 20px;
}

.subheading {
    display: block;
    padding: 6px 20px 6px 68px;
    color: #718096;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s;
}

.subheading:hover {
    background-color: #e5e7eb;
    color: #1a202c;
    transform: translateX(5px);
}

.subheading.active {
    background-color: #e5e7eb;
    color: #1a202c;
}

.subsection:hover::after,
.subheading:hover::after {
    content: attr(title);
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
}

.copy-disabled-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-disabled-tooltip.show {
    opacity: 1;
}

/* 添加内容高亮效果 */
@keyframes highlight-content {
    0% { background-color: transparent; }
    30% { background-color: rgba(59, 130, 246, 0.1); }
    100% { background-color: transparent; }
}

.highlight {
    animation: highlight-content 2s ease-out;
}

/* 当前选中的导航项样式 */
.manual-nav a.active {
    background-color: #e5e7eb;
    color: #1a202c;
    font-weight: 500;
}

.subsection-title {
    font-size: 15px;
    font-weight: normal;
}

/* 原始图片样式 */
.manual-image {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 50%;  /* 将原始图片默认显示为50%宽度 */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 16px 0;
    display: block;
}

.manual-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* 模态框样式 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    transition: opacity 0.3s ease;
}

/* 放大后的图片样式 */
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;  /* 放大后固定占据70%的视口宽度 */
    height: 70vh;  /* 放大后固定占据70%的视口高度 */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: zoomIn 0.3s ease;
    object-fit: contain;  /* 保持图片比例 */
}

/* 放大动画 */
@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 35px;
    top: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 1001;
}

.close-modal:hover {
    color: #fff;
}

/* 适配移动设备 */
@media only screen and (max-width: 700px) {
    .manual-image {
        max-width: 90%;  /* 移动设备上原始图片显示更大一些 */
    }
    
    .modal-content {
        width: 90%;  /* 移动设备上放大后占据90%宽度 */
        height: 90vh;
    }
    
    .close-modal {
        right: 15px;
        top: 15px;
        font-size: 30px;
    }
}

/* 右侧目录样式 */
.content-toc {
    width: 272px;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    padding: 40px 20px;
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    overflow-y: auto;
}

.toc-title {
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid #e5e7eb;
    color: #1a202c;
}

.toc-content {
    padding: 10px 0;
}

/* 目录项样式 */
.toc-item {
    padding: 6px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: block;
    text-decoration: none;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.5;
}

.toc-item:hover {
    background-color: #f7fafc;
    color: #2b6cb0;
}

.toc-item.active {
    background-color: #ebf4ff;
    color: #2b6cb0;
}

/* 目录层级样式 */
.toc-h1 { padding-left: 20px; font-weight: 500; }
.toc-h2 { padding-left: 40px; }
.toc-h3 { padding-left: 60px; font-size: 13px; }

/* 视频容器样式 */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.video-container video {
    width: 100%;
    display: block;
}

/* 下载资源样式 */
.resource-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.resource-card:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.resource-icon {
    width: 40px;
    height: 40px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border-radius: 8px;
    color: #475569;
}

.resource-info {
    flex: 1;
}

.resource-title {
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 4px;
}

.resource-meta {
    font-size: 12px;
    color: #64748b;
}

.download-btn {
    padding: 8px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 14px;
}

.download-btn:hover {
    background: #2563eb;
}

/* 视频控制器样式 */
.manual-body video::-webkit-media-controls {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.manual-body video::-webkit-media-controls-panel {
    background: none;
}

.manual-body video::-webkit-media-controls-play-button {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    margin: 0 5px;
}

/* 只在控制器区域悬停时显示完整控制器 */
.manual-body video::-webkit-media-controls:hover {
    opacity: 0.9;
}

/* 视频加载提示 */
.video-loading {
    width: 100%;
    max-width: 800px;
    height: 400px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    margin: 20px auto;  /* 居中显示 */
    text-align: center;
} 