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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

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

/* 侧边栏样式 - Claymorphism风格 */
.sidebar {
    width: 300px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-right: 3px solid #e2e8f0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow:
        4px 0 15px rgba(0, 0, 0, 0.05),
        inset -2px 0 8px rgba(255, 255, 255, 0.8);
    border-radius: 0 24px 24px 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    z-index: 100;
}

.sidebar.collapsed {
    transform: translateX(calc(-100% - 18px));
    opacity: 0;
    pointer-events: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px;
    background: linear-gradient(135deg, #f1ece3 0%, #ece5d8 100%);
    border-radius: 0 21px 0 0;
    box-shadow:
        0 4px 15px rgba(74, 70, 65, 0.08),
        inset 0 -2px 8px rgba(255, 255, 255, 0.4);
    min-height: 56px;
}

.sidebar-course-link {
    padding: 12px 14px 0;
}

.sidebar-course-link a {
    display: block;
    padding: 10px 14px;
    border-radius: 14px;
    background: #f5f3ef;
    color: #4a4641;
    text-decoration: none;
    font-size: 0.9rem;
}

.sidebar-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    transition: opacity 0.2s, visibility 0.2s;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-out;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.95);
}

.sidebar-toggle svg {
    color: #4a4641;
    transition: transform 0.3s ease-out;
}

.sidebar-nav {
    padding: 12px 12px 18px;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: #312e81;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all 0.2s ease-out;
    cursor: pointer;
    box-shadow:
        2px 2px 8px rgba(0, 0, 0, 0.05),
        inset -1px -1px 4px rgba(255, 255, 255, 0.8);
    gap: 10px;
}

.nav-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
}

.nav-link:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: #818CF8;
    transform: translateY(-1px);
    box-shadow:
        3px 3px 12px rgba(79, 70, 229, 0.15),
        inset -1px -1px 4px rgba(255, 255, 255, 0.8);
}

.nav-link.active {
    background: linear-gradient(135deg, #4F46E5 0%, #818CF8 100%);
    color: #fff;
    border-color: #4F46E5;
    box-shadow:
        0 4px 15px rgba(79, 70, 229, 0.3),
        inset 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.nav-text::after {
    content: '›';
    font-size: 1.2rem;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.nav-section.active .nav-text::after {
    transform: rotate(90deg);
}

.sub-nav {
    display: none;
    padding: 8px 0 8px 12px;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 12px;
    margin-top: 4px;
}

.nav-section.active .sub-nav {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-nav li a {
    display: block;
    padding: 10px 16px;
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease-out;
    cursor: pointer;
}

.tool-item {
    margin-bottom: 2px;
}

.tool-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease-out;
    cursor: pointer;
    gap: 8px;
}

.tool-link:hover {
    background: rgba(79, 70, 229, 0.08);
    color: #4F46E5;
}

.tool-link.active {
    background: rgba(79, 70, 229, 0.12);
    color: #4F46E5;
    font-weight: 600;
}

.tool-logo {
    font-size: 1rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.tool-logo-img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.tool-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-expand {
    font-size: 0.8rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.tool-item.active .tool-expand {
    transform: rotate(90deg);
    color: #4F46E5;
}

.section-nav {
    display: none;
    padding: 4px 0 4px 28px;
    background: rgba(241, 245, 249, 0.3);
    border-radius: 8px;
    margin-top: 2px;
    margin-bottom: 4px;
}

.tool-item.active .section-nav {
    display: block;
    animation: slideDown 0.15s ease-out;
}

.section-nav li {
    list-style: none;
}

.section-nav li a {
    display: block;
    padding: 5px 10px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 400;
    border-radius: 6px;
    transition: all 0.15s ease-out;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-nav li a:hover {
    background: rgba(79, 70, 229, 0.08);
    color: #4F46E5;
}

.section-nav li a.active {
    background: rgba(79, 70, 229, 0.12);
    color: #4F46E5;
    font-weight: 500;
}

.sub-nav li a:hover {
    background: rgba(79, 70, 229, 0.1);
    color: #4F46E5;
    transform: translateX(4px);
}

.sub-nav li a.active {
    background: rgba(79, 70, 229, 0.15);
    color: #4F46E5;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #4F46E5;
}

/* 主内容区样式 */
.content {
    flex: 1;
    margin-left: 300px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    min-height: 100vh;
    border-radius: 24px 0 0 24px;
    margin-top: 16px;
    margin-bottom: 16px;
    box-shadow:
        -4px 0 15px rgba(0, 0, 0, 0.03),
        inset 2px 0 8px rgba(255, 255, 255, 0.8);
    transition: margin-left 0.3s ease-out;
}

.sidebar.collapsed ~ .content {
    margin-left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 20px;
    padding-right: 20px;
}

.sidebar.collapsed ~ .content .content-header,
.sidebar.collapsed ~ .content .content-body,
.sidebar.collapsed ~ .content .welcome-message,
.sidebar.collapsed ~ .content .section-card {
    width: 100%;
    max-width: 900px;
}

.content-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 3px solid #e2e8f0;
}

.content-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    background: linear-gradient(135deg, #4F46E5 0%, #818CF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-body {
    max-width: 900px;
}

/* 欢迎信息样式 - Claymorphism */
.welcome-message {
    background: linear-gradient(135deg, #4F46E5 0%, #818CF8 100%);
    padding: 50px 40px;
    border-radius: 24px;
    text-align: center;
    margin-bottom: 32px;
    box-shadow:
        6px 6px 20px rgba(79, 70, 229, 0.2),
        inset -3px -3px 10px rgba(255, 255, 255, 0.1);
}

.welcome-message h2 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-message .subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

.beginner-guide-card,
.learning-prompt-card {
    background: linear-gradient(135deg, #ffffff 0%, #fbf9f5 100%);
    padding: 28px;
    border-radius: 24px;
    margin-bottom: 24px;
    border: 1px solid #f2eee7;
    box-shadow: 0 10px 30px rgba(74, 70, 65, 0.05);
}

.lesson-page {
    display: grid;
    gap: 24px;
}

.lesson-brand-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #f2eee7;
    box-shadow: 0 10px 30px rgba(74, 70, 65, 0.05);
}

.lesson-brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #f8f7f2;
    padding: 8px;
    object-fit: contain;
}

.lesson-brand-card h2 {
    font-size: 1.2rem;
    color: #1b1c1a;
    margin-bottom: 4px;
}

.lesson-brand-card p {
    color: #6b7280;
}

.lesson-hero-card {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fbf9f5 100%);
    padding: 32px;
    border-radius: 28px;
    border: 1px solid #f2eee7;
    box-shadow: 0 10px 30px rgba(74, 70, 65, 0.05);
}

.lesson-eyebrow {
    color: #7a8b7c;
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.lesson-hero-main h1 {
    font-size: 2rem;
    color: #1b1c1a;
    margin-bottom: 12px;
}

.lesson-subtitle {
    color: #4a4641;
    line-height: 1.8;
}

.lesson-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.lesson-summary-grid {
    display: grid;
    gap: 12px;
}

.lesson-summary-item {
    background: #fff;
    border: 1px solid #f2eee7;
    border-radius: 20px;
    padding: 16px;
}

.lesson-summary-item span {
    display: block;
    color: #6b7280;
    font-size: .85rem;
    margin-bottom: 6px;
}

.lesson-summary-item strong {
    color: #1b1c1a;
}

.lesson-content-card {
    background: #fff;
    border: 1px solid #f2eee7;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(74, 70, 65, 0.05);
}

.lesson-stage-grid {
    margin-top: 18px;
}

.beginner-guide-card h2,
.learning-prompt-card h2 {
    color: #1b1c1a;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.beginner-grid,
.stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.beginner-item,
.stage-card {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid #f2eee7;
}

.lesson-stage-card {
    background: #fff;
    border: 1px solid #f2eee7;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(74, 70, 65, 0.05);
    margin-top: 4px;
}

.lesson-stage-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #312e81;
    margin-top: 0;
    margin-bottom: 20px;
    padding-left: 16px;
    border-left: 4px solid #4F46E5;
    line-height: 1;
}

.lesson-stage-header p {
    color: #4a4641;
    margin: 0;
}

.beginner-item h3,
.stage-card h3 {
    color: #516355;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    margin-bottom: 8px;
}

.stage-index {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #5f7563;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.beginner-item p,
.learning-prompt-card p,
.stage-card p {
    color: #4a4641;
}

.markdown-content h1 {
    font-size: 1.8rem;
    margin-top: 0;
}

.markdown-content h2[data-no-number],
.markdown-content h3[data-no-number] {
    padding-left: 0;
}

.markdown-content h2::marker,
.markdown-content h3::marker {
    content: none;
}

.beginner-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f5f3ef;
    color: #4a4641;
}

/* 通用卡片样式 */
.section-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 32px;
    border-radius: 20px;
    margin-bottom: 24px;
    border: 3px solid #e2e8f0;
    box-shadow:
        4px 4px 15px rgba(0, 0, 0, 0.06),
        inset -2px -2px 8px rgba(255, 255, 255, 0.9);
}

.section-card h3 {
    color: #312e81;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.section-card p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 12px;
}

.section-card ul, .section-card ol {
    margin-left: 24px;
    margin-top: 12px;
    margin-bottom: 16px;
}

.section-card li {
    margin-bottom: 10px;
    color: #475569;
    line-height: 1.7;
}

.section-card li strong {
    color: #4F46E5;
}

/* 提示框样式 */
.tip-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 24px;
    border-radius: 16px;
    margin: 20px 0;
    border: 2px solid #86efac;
}

.tip-box h4 {
    color: #16a34a;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.tip-box ol {
    margin-left: 20px;
}

.tip-box li {
    color: #15803d;
    margin-bottom: 8px;
}

/* 示例框样式 */
.example-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 24px;
    border-radius: 16px;
    margin: 20px 0;
    border: 2px solid #93c5fd;
}

.example-box h4 {
    color: #2563eb;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.example-box li {
    color: #1d4ed8;
    margin-bottom: 6px;
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 24px;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease-out;
    cursor: default;
}

.category-item:hover {
    border-color: #818CF8;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.category-item h4 {
    color: #312e81;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.category-item p {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tool-tags span {
    background: rgba(79, 70, 229, 0.1);
    color: #4F46E5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.use-case {
    color: #64748b;
    font-size: 0.85rem;
    font-style: italic;
    margin: 0;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

/* 开始学习提示 */
.start-hint {
    text-align: center;
    font-size: 1.1rem;
    color: #4F46E5;
    font-weight: 600;
    margin-top: 20px;
    padding: 16px;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 12px;
}


.beginner-guide-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(129, 140, 248, 0.12));
    border: 2px solid rgba(129, 140, 248, 0.35);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 28px;
}

.beginner-guide-card h2 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    color: #312e81;
}

.beginner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.beginner-item {
    background: rgba(255,255,255,0.85);
    border-radius: 14px;
    padding: 16px;
}

.beginner-item h3 {
    font-size: 1rem;
    margin: 0 0 8px;
    color: #4F46E5;
}

.beginner-item p {
    margin: 0;
    color: #475569;
}

.beginner-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.9);
    color: #334155;
    font-size: 0.92rem;
}

/* Markdown内容样式 */
.markdown-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid #e2e8f0;
}

.markdown-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #312e81;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-left: 16px;
    border-left: 4px solid #4F46E5;
    line-height: 1;
}

.markdown-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #475569;
    margin-top: 32px;
    margin-bottom: 14px;
}

.markdown-content p {
    margin-bottom: 18px;
    line-height: 1.9;
    color: #334155;
}

.markdown-content ul, .markdown-content ol {
    margin-left: 24px;
    margin-bottom: 20px;
}

.markdown-content li {
    margin-bottom: 10px;
    line-height: 1.8;
    color: #475569;
}

.markdown-content strong {
    color: #4F46E5;
    font-weight: 600;
}

.markdown-content code {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.88em;
    color: #4F46E5;
    border: 1px solid #e2e8f0;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* 代码块包装器 */
.code-block-wrapper {
    position: relative;
    margin: 24px 0;
    border-radius: 16px;
    border: 3px solid #475569;
    box-shadow:
        6px 6px 20px rgba(0, 0, 0, 0.15),
        inset -2px -2px 8px rgba(0, 0, 0, 0.1),
        inset 2px 2px 8px rgba(255, 255, 255, 0.05);
}

.markdown-content pre {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 20px 24px;
    border-radius: 13px;
    overflow-x: auto;
    margin: 0;
    border: none;
    box-shadow: none;
}

/* 复制按钮样式 - 固定在右上角 */
.copy-button {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-out;
    font-family: inherit;
    backdrop-filter: blur(4px);
    z-index: 100;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.copy-button:active {
    transform: translateY(0);
}

.copy-button.copied {
    background: rgba(34, 197, 94, 0.8);
    border-color: rgba(134, 239, 172, 0.5);
    color: #fff;
}

.copy-button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.markdown-content pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.7;
    box-shadow: none;
}

.markdown-content blockquote {
    border-left: 4px solid #818CF8;
    padding: 16px 20px;
    margin: 24px 0;
    background: rgba(129, 140, 248, 0.1);
    border-radius: 0 12px 12px 0;
    color: #475569;
    font-style: italic;
    box-shadow: inset 2px 0 8px rgba(129, 140, 248, 0.1);
}

.markdown-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.markdown-content th {
    background: linear-gradient(135deg, #4F46E5 0%, #818CF8 100%);
    color: #fff;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
}

.markdown-content td {
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.8);
}

.markdown-content tr:last-child td {
    border-bottom: none;
}

.markdown-content tr:hover td {
    background: rgba(79, 70, 229, 0.05);
}

/* 高亮样式 */
.highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.important {
    background: rgba(239, 68, 68, 0.1);
    padding: 20px;
    border-radius: 16px;
    border: 3px solid #fca5a5;
    margin: 20px 0;
    box-shadow:
        4px 4px 15px rgba(239, 68, 68, 0.1),
        inset -2px -2px 8px rgba(255, 255, 255, 0.8);
}

.important::before {
    content: '⚠️ 注意';
    display: block;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 8px;
}

.tip {
    background: rgba(34, 197, 94, 0.1);
    padding: 20px;
    border-radius: 16px;
    border: 3px solid #86efac;
    margin: 20px 0;
    box-shadow:
        4px 4px 15px rgba(34, 197, 94, 0.1),
        inset -2px -2px 8px rgba(255, 255, 255, 0.8);
}

.tip::before {
    content: '💡 提示';
    display: block;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 8px;
}

/* 截图占位符样式 */
.screenshot-placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 3px dashed #94a3b8;
    border-radius: 16px;
    padding: 50px;
    text-align: center;
    margin: 24px 0;
    color: #64748b;
    box-shadow:
        4px 4px 15px rgba(0, 0, 0, 0.05),
        inset -2px -2px 8px rgba(255, 255, 255, 0.8);
}

.screenshot-placeholder::before {
    content: "📷 截图占位符";
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #475569;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px;
    color: #64748b;
    font-size: 1.1rem;
}

.loading::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #e2e8f0;
    border-top-color: #4F46E5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误信息 */
.error-message {
    text-align: center;
    padding: 40px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 16px;
    border: 3px solid #fca5a5;
}

.error-message h3 {
    color: #dc2626;
    margin-bottom: 12px;
}

.error-message p {
    color: #64748b;
    margin-bottom: 8px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        width: 260px;
    }

    .content {
        margin-left: 260px;
        padding: 30px;
    }

    .lesson-hero-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        border-radius: 0;
        border-right: none;
        border-bottom: 3px solid #e2e8f0;
    }

    .sidebar.collapsed {
        width: 100%;
    }

    .sidebar.collapsed .sidebar-header {
        justify-content: space-between;
        padding: 20px 16px;
    }

    .sidebar.collapsed .sidebar-header h1 {
        opacity: 1;
        visibility: visible;
        width: auto;
        margin: 0;
        padding: 0;
    }

    .sidebar.collapsed .sidebar-nav {
        opacity: 1;
        visibility: visible;
    }

    .sidebar-header {
        border-radius: 0;
    }

    .content {
        margin-left: 0;
        border-radius: 0;
        margin-top: 0;
        margin-bottom: 0;
    }

    .sidebar.collapsed ~ .content {
        margin-left: 0;
        max-width: 100%;
    }

    .sub-nav {
        display: block;
    }

    .nav-link::after {
        content: '+';
    }

    .nav-section.active .nav-link::after {
        transform: rotate(45deg);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #c8d4ca 0%, #9fb0a3 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #b9c7bc 0%, #8ea394 100%);
}

/* 选中文本样式 */
::selection {
    background: rgba(81, 99, 85, 0.18);
    color: #1e293b;
}

/* 工具详情页侧边栏样式 */
.tool-sidebar {
    background: linear-gradient(180deg, #f7f3ec 0%, #efe9df 100%);
    border-right: 1px solid #ece6dc;
    box-shadow: 4px 0 18px rgba(74, 70, 65, 0.06);
}

.tool-sidebar .back-home {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3f4e43;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.sidebar-tool-name {
    padding: 10px 16px 4px;
    font-size: 1rem;
    font-weight: 700;
    color: #2f3d35;
}

.tool-sidebar .back-home:hover {
    opacity: 0.75;
}

.tool-info {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(74, 70, 65, 0.08);
}

.tool-logo-large {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 12px;
    background: white;
    padding: 8px;
}

.tool-info h2 {
    color: #1b1c1a;
    font-size: 1.2rem;
    margin: 0 0 4px 0;
}

.tool-company {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0;
}

.section-item {
    list-style: none;
}

.section-link {
    display: block;
    padding: 8px 12px;
    color: #4a4641;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.section-link[data-level="3"] {
    padding-left: 28px;
    opacity: 0.92;
}

.section-link:hover {
    background: #ffffff;
    color: #1b1c1a;
}

.section-link.active {
    background: rgba(81, 99, 85, 0.12);
    color: #516355;
    font-weight: 500;
}

.sidebar.collapsed .back-home {
    writing-mode: horizontal-tb;
    font-size: 0;
    gap: 0;
    justify-content: center;
}

.sidebar-float-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 76px;
    border: none;
    border-radius: 0 18px 18px 0;
    background: rgba(255, 255, 255, 0.96);
    color: #4a4641;
    box-shadow: 0 10px 24px rgba(74, 70, 65, 0.12);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 120;
    cursor: pointer;
}

.sidebar-float-toggle.visible {
    display: flex;
}

.sidebar-float-toggle:hover {
    background: #ffffff;
}

.back-link {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 20px;
    background: #516355;
    color: white;
    text-decoration: none;
    border-radius: 9999px;
    transition: background 0.2s;
}

.back-link:hover {
    background: #3f4e43;
}

.back-link:hover {
    background: #4338CA;
}
