/* 转录组分析教程样式 */

/* 流程图样式 */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 8px;
    border: 1px solid #d0d7de;
}

.flow-step {
    background: white;
    border: 2px solid #0d9488;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #0d9488;
    min-width: 80px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.flow-arrow {
    font-size: 20px;
    color: #6b7280;
    font-weight: bold;
}

/* 提示框样式 */
.tip-box {
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.tip-box.important {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.tip-box strong {
    color: #0369a1;
    display: block;
    margin-bottom: 8px;
}

.tip-box.important strong {
    color: #b45309;
}

.tip-box ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.tip-box li {
    margin: 4px 0;
}

/* 引导文字样式 */
.lead {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #0d9488;
}

/* 表格样式增强 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 13px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th {
    background: #f3f4f6;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

tr:hover {
    background: #f9fafb;
}

/* 图片占位符 */
.figure-placeholder {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin: 20px 0;
    color: #6b7280;
}

.figure-placeholder p {
    margin: 0;
    font-size: 14px;
}

/* 代码块增强 */
pre {
    position: relative;
    background: #f8fafc !important;
    border-radius: 8px !important;
    padding: 16px !important;
    overflow-x: auto;
    border: 1px solid #e2e8f0 !important;
}

pre code {
    background: transparent !important;
    color: #334155 !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}

/* 代码语言标签 */
pre::before {
    content: attr(data-language);
    position: absolute;
    top: 0;
    right: 0;
    background: #e2e8f0;
    color: #64748b;
    padding: 4px 12px;
    font-size: 11px;
    border-radius: 0 8px 0 8px;
    text-transform: uppercase;
}

/* 目录样式增强 */
.toc__title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    padding: 12px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.book-nav .lv1 {
    font-weight: 600;
    color: #111827;
    padding: 10px 18px;
    border-left: 3px solid transparent;
}

.book-nav .lv1:hover {
    border-left-color: #0d9488;
    background: #f3f4f6;
}

.lv2 a {
    padding-left: 32px !important;
    font-size: 12px !important;
    color: #6b7280 !important;
}

.lv2 a:hover {
    color: #0d9488 !important;
}

.lv2 .n {
    display: inline-block;
    width: 28px;
    color: #9ca3af;
    font-size: 11px;
}

/* 标题样式增强 */
h2 {
    color: #111827;
    border-bottom: 2px solid #0d9488;
    padding-bottom: 8px;
    margin-top: 40px !important;
}

h3 {
    color: #1f2937;
    margin-top: 28px !important;
}

h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-top: 20px;
    margin-bottom: 12px;
}

/* 列表样式 */
ul, ol {
    margin: 12px 0;
    padding-left: 24px;
}

li {
    margin: 6px 0;
    color: #4b5563;
}

li code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #dc2626;
}

/* 响应式调整 */
@media (max-width: 980px) {
    .flow-diagram {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 12px;
    }
}

/* 打印样式 */
@media print {
    .book-sidebar {
        display: none;
    }
    
    .book-shell {
        grid-template-columns: 1fr;
    }
    
    .book-main {
        padding: 20px;
    }
}
