/* 教程页面专用样式 - 白色布局 */

.tutorial-container {
    display: flex;
    min-height: calc(100vh - 72px);
    margin-top: 72px;
}

/* 左侧边栏 - 白色主题 */
.tutorial-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    position: fixed;
    left: 0;
    top: 72px;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
    font-weight: 600;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #4b5563;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    color: #10b981;
    background: #f0fdf4;
}

.nav-link.active {
    color: #10b981;
    background: #f0fdf4;
    border-left-color: #10b981;
    font-weight: 600;
}

.nav-sub {
    margin-left: 1rem;
}

.nav-link-sub {
    display: block;
    padding: 0.5rem 1.5rem;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.nav-link-sub:hover {
    color: #10b981;
    background: #f9fafb;
}

.nav-link-sub.active {
    color: #10b981;
    border-left-color: #10b981;
}

/* 右侧内容区 */
.tutorial-content {
    flex: 1;
    margin-left: 280px;
    padding: 3rem;
    max-width: 900px;
}

.content-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.content-section h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.content-section h2 {
    font-size: 2rem;
    color: #1f2937;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.content-section h3 {
    font-size: 1.5rem;
    color: #374151;
    margin: 1.5rem 0 1rem 0;
}

.content-section h4 {
    font-size: 1.25rem;
    color: #10b981;
    margin: 1.25rem 0 0.75rem 0;
}

.content-section h5 {
    font-size: 1.125rem;
    color: #10b981;
    margin: 1rem 0 0.5rem 0;
}

.content-section p {
    line-height: 1.9;
    color: #4b5563;
    margin: 1rem 0;
    font-size: 1rem;
}

.content-section ul,
.content-section ol {
    line-height: 1.8;
    color: #4b5563;
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-section li {
    margin: 0.5rem 0;
}

/* 图片容器 */
.image-container {
    margin: 2rem 0;
    text-align: center;
}

.image-container img {
    max-width: 80%;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-section img {
    max-width: 80%;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 1.5rem auto;
}

.image-caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

/* 提示框 */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.alert-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.alert-warning {
    background: #fff7ed;
    border-left-color: #f97316;
    color: #9a3412;
}

.alert strong {
    display: block;
    margin-bottom: 0.5rem;
}

.alert p {
    margin: 0.5rem 0;
    color: inherit;
}

/* 代码块 */
.code-block {
    background: #1f2937;
    color: #10b981;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    margin: 1rem 0;
    overflow-x: auto;
}

/* 配置项 */
.config-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.config-item h5 {
    color: #10b981;
    margin-top: 0;
}

.config-item p {
    margin: 0.75rem 0;
}

.config-item ul {
    margin: 0.75rem 0;
}

/* 提示词模板 */
.prompt-template {
    background: #f9fafb;
    border: 2px solid #10b981;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.prompt-template pre {
    background: #1f2937;
    color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0;
    line-height: 1.6;
}

.prompt-template code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #e5e7eb;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .tutorial-content {
        padding: 2rem;
        max-width: 100%;
    }
    
    .image-container img,
    .content-section img {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .tutorial-sidebar {
        transform: translateX(-100%);
    }

    .tutorial-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .tutorial-content {
        margin-left: 0;
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .image-container img,
    .content-section img {
        max-width: 100%;
    }

    .content-section h1 {
        font-size: 2rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .content-section h3 {
        font-size: 1.25rem;
    }

    /* 移动端显示侧边栏按钮 */
    .mobile-sidebar-btn {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        width: 56px;
        height: 56px;
        background: #10b981;
        color: #ffffff;
        border: none;
        border-radius: 50%;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        cursor: pointer;
        z-index: 99;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }
}

/* 滚动条样式 */
.tutorial-sidebar::-webkit-scrollbar {
    width: 6px;
}

.tutorial-sidebar::-webkit-scrollbar-track {
    background: #f9fafb;
}

.tutorial-sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.tutorial-sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}