* { margin: 0; padding: 0; box-sizing: border-box; }
        body { 
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            line-height: 1.6; 
            color: #333; 
            background: #f8f9fa;
        }
        
        .container { 
            max-width: 1400px; 
            margin: 0 auto; 
            padding: 20px; 
            /* 确保容器本身不阻止sticky定位 */
            position: relative;
        }
        
        .content-wrapper {
            display: flex;
            gap: 30px;
            align-items: stretch; /* 让所有子元素等高 */
            /* 移除 position: relative 以避免影响sticky定位 */
            min-height: 100vh;
            /* 确保不会有隐藏的overflow属性 */
            overflow: visible;
        }
        
        /* 目录导航样式 */
        .left-sidebar {
            width: 260px;
            flex-shrink: 0;
            order: 1;
            /* 确保左侧边栏高度始终跟随内容区域 */
            min-height: 100vh;
            height: 100%;
            /* 避免隐藏的overflow属性影响sticky */
            overflow: visible;
            /* 确保sticky定位的容器定位正确 */
            position: relative;
            /* 让左侧边栏始终与主内容等高 */
            align-self: stretch;
        }
        
        .main-content {
            flex: 1;
            min-width: 0;
            order: 2;
            /* 确保主内容区域不影响sticky定位 */
            overflow: visible;
        }
        
        .right-sidebar {
            width: 320px;
            flex-shrink: 0;
            order: 3;
            /* 给右侧边栏足够的高度来支持sticky定位 */
            min-height: 100vh;
            height: 100%;
            /* 确保右侧边栏不影响sticky定位 */
            overflow: visible;
            /* 确保sticky定位的容器定位正确 */
            position: relative;
            /* 让右侧边栏始终与主内容等高 */
            align-self: stretch;
        }
        
        .header {
            background: white;
            padding: 20px 0;
            border-bottom: 1px solid #e9ecef;
            margin-bottom: 30px;
        }
        
        .breadcrumb {
            color: #6c757d;
            font-size: 14px;
            margin-bottom: 10px;
        }
        
        .breadcrumb a {
            color: #007bff;
            text-decoration: none;
        }
        
        .breadcrumb a:hover {
            text-decoration: underline;
        }
        
        .article {
            background: white;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            margin-bottom: 30px;
        }
        
        .article-title {
            font-size: 2em;
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 20px;
            line-height: 1.3;
        }
        
        .article-meta {
            color: #6c757d;
            font-size: 14px;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 1px solid #e9ecef;
        }
        
        .article-meta span {
            margin-right: 15px;
        }
        
        .article-content {
            font-size: 16px;
            line-height: 1.8;
            color: #2c3e50;
        }
        
        .article-content p {
            margin-bottom: 20px;
            text-indent: 2em;
        }
        
        .article-content h1, .article-content h2, .article-content h3 {
            margin: 30px 0 15px 0;
            color: #2c3e50;
            text-indent: 0;
        }
        
        .article-content h1 { 
            font-size: 1.8em; 
            font-weight: 700;
            border-bottom: 3px solid #4299e1;
            padding-bottom: 8px;
        }
        
        .article-content h2 { 
            font-size: 1.5em; 
            font-weight: 600;
            color: #2d3748;
            position: relative;
            padding-left: 20px;
        }
        
        .article-content h2::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 20px;
            background: linear-gradient(135deg, #4299e1, #63b3ed);
            border-radius: 2px;
        }
        
        .article-content h3 { 
            font-size: 1.3em; 
            font-weight: 500;
            color: #4a5568;
            padding-left: 16px;
            position: relative;
        }
        
        .article-content h3::before {
            content: '▶';
            position: absolute;
            left: 0;
            color: #4299e1;
            font-size: 0.8em;
            top: 50%;
            transform: translateY(-50%);
        }
        
        .article-content ul, .article-content ol {
            margin: 15px 0;
            padding-left: 30px;
        }
        
        .article-content li {
            margin-bottom: 8px;
        }
        
        .related-articles {
            background: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .related-articles h3 {
            font-size: 1.3em;
            color: #2c3e50;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #007bff;
        }
        
        .related-item {
            padding: 15px 0;
            border-bottom: 1px solid #e9ecef;
        }
        
        .related-item:last-child {
            border-bottom: none;
        }
        
        .related-item a {
            color: #007bff;
            text-decoration: none;
            font-weight: 500;
        }
        
        .related-item a:hover {
            text-decoration: underline;
        }
        
        .related-item .summary {
            color: #6c757d;
            font-size: 14px;
            margin-top: 5px;
        }
        
        .footer {
            text-align: center;
            padding: 40px 20px;
            color: #6c757d;
            font-size: 14px;
        }
        
        .footer a {
            color: #007bff;
            text-decoration: none;
        }
        
        /* 响应式布局媒体查询 */
        @media (max-width: 768px) {
            .container { padding: 10px; }
            .content-wrapper { 
                flex-direction: column; 
                gap: 20px;
                overflow: visible;
            }
            .left-sidebar { 
                display: none; /* 移动端隐藏目录 */
            }
            .main-content {
                order: 1;
            }
            .right-sidebar { 
                width: 100%; 
                order: 2;
            }
            .article { padding: 20px; }
            .article-title { font-size: 1.5em; }
            .related-articles { padding: 20px; }
            .sidebar-section { padding: 15px; }
        }

        @media (max-width: 1024px) and (min-width: 769px) {
            .left-sidebar {
                width: 220px;
                overflow: visible;
            }
            .right-sidebar {
                width: 280px;
            }
            .content-wrapper {
                gap: 20px;
                overflow: visible;
            }
        }

        @media (max-width: 1200px) and (min-width: 1025px) {
            .container { max-width: 1200px; }
            .left-sidebar {
                width: 240px;
                overflow: visible;
            }
            .right-sidebar {
                width: 300px;
            }
        }

        /* 右侧边栏样式 */
        .right-sidebar .sidebar-section {
            background: white;
            border-radius: 12px;
            padding: 24px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            margin-bottom: 24px;
            border: 1px solid #f1f3f4;
            transition: box-shadow 0.3s ease;
            /* 添加粘性定位 */
            position: sticky;
            position: -webkit-sticky; /* Safari兼容性 */
            top: 20px;
            max-height: calc(100vh - 40px);
            overflow-y: auto;
            z-index: 10;
            /* 确保sticky定位生效的关键样式 */
            align-self: flex-start;
        }

        .right-sidebar .sidebar-section:hover {
            box-shadow: 0 6px 12px rgba(0,0,0,0.08);
        }

        .right-sidebar .sidebar-title {
            font-size: 1.2em;
            font-weight: 600;
            color: #1a202c;
            margin-bottom: 18px;
            padding-bottom: 12px;
            border-bottom: 3px solid #4299e1;
            position: relative;
        }

        .right-sidebar .sidebar-title::after {
            content: '';
            position: absolute;
            bottom: -3px;
            left: 0;
            width: 30px;
            height: 3px;
            background: linear-gradient(90deg, #4299e1, #63b3ed);
            border-radius: 2px;
        }

        /* 猜你喜欢样式 */
        .recommend-item {
            padding: 18px 0;
            border-bottom: 1px solid #f7fafc;
            transition: background-color 0.2s ease;
        }

        .recommend-item:hover {
            background-color: #f8fafc;
            border-radius: 8px;
            margin: 0 -8px;
            padding: 18px 8px;
        }

        .recommend-item:last-child {
            border-bottom: none;
        }

        .recommend-title {
            display: block;
            color: #2d3748;
            text-decoration: none;
            font-size: 15px;
            font-weight: 500;
            line-height: 1.4;
            margin-bottom: 8px;
            transition: color 0.2s ease;
        }

        .recommend-title:hover {
            color: #4299e1;
        }

        .recommend-summary {
            font-size: 13px;
            color: #718096;
            line-height: 1.4;
        }

        /* 标签云样式 */
        .tag-cloud {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .tag-item {
            display: inline-block;
            padding: 8px 16px;
            background: linear-gradient(135deg, #f7fafc, #edf2f7);
            color: #4a5568;
            text-decoration: none;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.3s ease;
            border: 1px solid #e2e8f0;
            position: relative;
            overflow: hidden;
        }

        .tag-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
            transition: left 0.5s ease;
        }

        .tag-item:hover::before {
            left: 100%;
        }

        .tag-item:hover {
            background: linear-gradient(135deg, #4299e1, #63b3ed);
            color: white;
            border-color: #4299e1;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
        }

        /* 左侧目录导航样式 */
        .left-sidebar .toc-section {
            position: sticky;
            position: -webkit-sticky; /* Safari兼容性 */
            top: 20px;
            max-height: calc(100vh - 40px);
            overflow-y: auto;
            z-index: 10;
            background: white;
            width: 100%;
            /* 确保sticky定位生效的关键样式 */
            align-self: flex-start;
        }

        .left-sidebar .sidebar-section {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            margin-bottom: 20px;
            border: 1px solid #f1f3f4;
            transition: box-shadow 0.3s ease;
        }

        .left-sidebar .sidebar-section:hover {
            box-shadow: 0 6px 12px rgba(0,0,0,0.08);
        }

        .left-sidebar .sidebar-title {
            font-size: 1.1em;
            font-weight: 600;
            color: #1a202c;
            margin-bottom: 16px;
            padding-bottom: 10px;
            border-bottom: 2px solid #4299e1;
            position: relative;
        }

        .left-sidebar .sidebar-title::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 30px;
            height: 2px;
            background: linear-gradient(90deg, #4299e1, #63b3ed);
            border-radius: 1px;
        }

        .table-of-contents {
            max-height: 60vh;
            overflow-y: auto;
        }

        .toc-item {
            margin-bottom: 6px;
        }

        .toc-level-2 {
            padding-left: 0;
        }

        .toc-level-3 {
            padding-left: 16px;
        }

        .toc-link {
            display: block;
            color: #4a5568;
            text-decoration: none;
            font-size: 13px;
            padding: 6px 10px;
            border-radius: 6px;
            transition: all 0.3s ease;
            border-left: 3px solid transparent;
            line-height: 1.4;
        }

        .toc-link:hover {
            background-color: #f7fafc;
            color: #4299e1;
            border-left-color: #4299e1;
            transform: translateX(3px);
        }

        .toc-link.active {
            background-color: #ebf8ff;
            color: #2b6cb0;
            border-left-color: #4299e1;
            font-weight: 500;
        }

        /* 滚动条样式 */
        .table-of-contents::-webkit-scrollbar {
            width: 4px;
        }

        .table-of-contents::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 2px;
        }

        .table-of-contents::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 2px;
        }

        .table-of-contents::-webkit-scrollbar-thumb:hover {
            background: #a1a1a1;
        }