/* AI 全栈工程少年营 - 教学手册统一样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    color: #1D2129;
    background: #F7F8FA;
}

.container { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }

/* 手册封面 */
.cover {
    color: white;
    padding: 80px 40px;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.cover.common { background: linear-gradient(135deg, #165DFF 0%, #4E5969 100%); }
.cover.stage-a-primary { background: linear-gradient(135deg, #FF7D00 0%, #FFC53D 100%); }
.cover.stage-a-secondary { background: linear-gradient(135deg, #FF5722 0%, #FF9800 100%); }
.cover.stage-b { background: linear-gradient(135deg, #165DFF 0%, #7B61FF 100%); }
.cover h1 { font-size: 42px; margin-bottom: 15px; font-weight: 800; }
.cover .subtitle { font-size: 22px; opacity: 0.95; margin-bottom: 25px; }
.cover .meta { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 30px; }
.cover .meta-item { background: rgba(255,255,255,0.2); padding: 10px 25px; border-radius: 50px; font-size: 16px; backdrop-filter: blur(10px); }

/* 目录 */
.toc {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.toc h2 { color: #165DFF; margin-bottom: 20px; font-size: 24px; padding-bottom: 10px; border-bottom: 2px solid #E8F3FF; }
.toc ul { list-style: none; }
.toc li { padding: 8px 0; border-bottom: 1px dashed #E5E6EB; }
.toc li:last-child { border-bottom: none; }
.toc a { color: #4E5969; text-decoration: none; display: flex; justify-content: space-between; }
.toc a:hover { color: #165DFF; }
.toc .chapter { font-weight: 600; }

/* 章节 */
.chapter {
    background: white;
    border-radius: 12px;
    padding: 35px 40px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.chapter h2 {
    font-size: 28px;
    color: #165DFF;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #E8F3FF;
    display: flex;
    align-items: center;
    gap: 12px;
}
.chapter h3 { font-size: 22px; color: #1D2129; margin: 25px 0 15px; padding-left: 12px; border-left: 4px solid #165DFF; }
.chapter h4 { font-size: 18px; color: #272E3B; margin: 18px 0 10px; }
.chapter p { margin-bottom: 12px; color: #4E5969; }
.chapter ul, .chapter ol { margin: 12px 0 12px 25px; color: #4E5969; }
.chapter li { padding: 4px 0; }

/* 表格 */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 20px 0; font-size: 15px; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #E5E6EB; }
th { background: #F2F3F5; color: #1D2129; font-weight: 600; }
tr:hover td { background: #F7F8FA; }

/* 课时卡片 */
.lesson {
    background: linear-gradient(135deg, #FFFFFF 0%, #F7F8FA 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border-left: 5px solid #165DFF;
}
.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}
.lesson-id {
    background: #165DFF;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}
.lesson-title { font-size: 20px; font-weight: 700; color: #1D2129; }
.lesson-meta { display: flex; gap: 15px; font-size: 13px; color: #86909C; flex-wrap: wrap; }
.lesson-meta span { background: #F2F3F5; padding: 4px 10px; border-radius: 4px; }

/* 教学环节 */
.phase {
    background: white;
    border-radius: 8px;
    padding: 15px 18px;
    margin: 12px 0;
    border-left: 3px solid #FF7D00;
}
.phase-title { font-weight: 600; color: #FF7D00; margin-bottom: 8px; display: flex; justify-content: space-between; }
.phase-time { background: #FFF7E8; color: #FF7D00; padding: 2px 10px; border-radius: 10px; font-size: 13px; }

/* 提示框 */
.box {
    border-radius: 8px;
    padding: 18px 22px;
    margin: 18px 0;
    border-left: 4px solid;
}
.box-objective { background: #E8F3FF; border-color: #165DFF; }
.box-objective::before { content: '🎯 教学目标'; display: block; font-weight: 700; color: #165DFF; margin-bottom: 8px; }
.box-points { background: #FFF7E8; border-color: #FF7D00; }
.box-points::before { content: '📚 知识点与重难点'; display: block; font-weight: 700; color: #FF7D00; margin-bottom: 8px; }
.box-eval { background: #F0F9EB; border-color: #00B42A; }
.box-eval::before { content: '📊 学生能力评估'; display: block; font-weight: 700; color: #00B42A; margin-bottom: 8px; }
.box-emergency { background: #FFEDED; border-color: #F53F3F; }
.box-emergency::before { content: '⚠️ 常见问题预案'; display: block; font-weight: 700; color: #F53F3F; margin-bottom: 8px; }
.box-materials { background: #F5F0FF; border-color: #7B61FF; }
.box-materials::before { content: '📦 所需材料与准备'; display: block; font-weight: 700; color: #7B61FF; margin-bottom: 8px; }
.box-homework { background: #E8FFFA; border-color: #00B5C9; }
.box-homework::before { content: '🏠 课后任务'; display: block; font-weight: 700; color: #00B5C9; margin-bottom: 8px; }
.box-role { background: #FFF0F6; border-color: #F5319D; }
.box-role::before { content: '👥 多角色提示'; display: block; font-weight: 700; color: #F5319D; margin-bottom: 8px; }
.box-tip { background: #F7F8FA; border-color: #86909C; }
.box-tip::before { content: '💡 教师提示'; display: block; font-weight: 700; color: #4E5969; margin-bottom: 8px; }

/* 标签 */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin: 2px;
}
.tag-key { background: #FFEDED; color: #F53F3F; }
.tag-hard { background: #FFF7E8; color: #FF7D00; }
.tag-easy { background: #E8FFFA; color: #00B5C9; }
.tag-lead { background: #E8F3FF; color: #165DFF; }
.tag-assist { background: #FFF0F6; color: #F5319D; }
.tag-research { background: #F5F0FF; color: #7B61FF; }

/* Day 分隔 */
.day-divider {
    background: linear-gradient(135deg, #165DFF, #7B61FF);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    margin: 30px 0 20px;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(22,93,255,0.3);
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #165DFF;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(22,93,255,0.4);
    font-size: 24px;
}

/* 打印 */
@media print {
    body { background: white; }
    .lesson, .chapter { box-shadow: none; border: 1px solid #E5E6EB; page-break-inside: avoid; }
    .back-to-top { display: none; }
    .day-divider { page-break-before: always; }
}

@media (max-width: 768px) {
    .cover h1 { font-size: 28px; }
    .cover .subtitle { font-size: 16px; }
    .chapter { padding: 20px; }
    .lesson { padding: 18px; }
}
