/* tutorial/detail.php 页面样式 —— 由内联 <style> 提取为静态文件 */
body { opacity: 0; transition: opacity 0.3s ease; }
body.loaded { opacity: 1; }

/* ===== Header / Topbar responsive overrides ===== */
/* 桌面端：菜单+面包屑(左) | 搜索(中) | 通知+头像(右) 三段式 */
.cg-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
}
.cg-topbar-right {
    flex-shrink: 0;
}
.cg-topbar-actions {
    flex-shrink: 0;
}
.cg-search {
    position: relative;
    flex: 1 1 400px;
    max-width: 420px;
    margin: 0 var(--spacing-md);
}
.cg-search-input {
    width: 100%;
    min-width: 0;
}
/* 头像/通知固定尺寸，移动端不被挤压变形 */
.cg-user-avatar,
.cg-icon-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
}

@media (max-width: 767.98px) {
    /* 顶部栏换行：第一行=面包屑+头像，第二行=搜索框 */
    .cg-topbar-content {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem 0.5rem;
    }
    .cg-topbar-left {
        flex: 0 1 auto;   /* 不贪婪占满，与右侧头像同行 */
        min-width: 0;
        order: 0;
    }
    .cg-topbar-right {
        flex: 0 0 auto;
        order: 1;
    }
    /* 搜索框独占第二行，不再挤压面包屑/头像 */
    .cg-search {
        flex: 0 0 100%;
        width: 100%;
        max-width: none;
        margin: 0.35rem 0 0;
        order: 2;
    }
    .cg-search-input {
        font-size: 16px; /* 防止 iOS 聚焦缩放 */
    }
    /* 面包屑标题超长截断 */
    .breadcrumb-item.active {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 575.98px) {
    .breadcrumb-item.active {
        max-width: 90px;
    }
}

/* ===== Hero ===== */
.tutorial-hero {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    border-radius: 1.5rem;
    overflow: hidden;
    background: #1e1b4b;
    color: #fff;
    margin-bottom: 2.5rem;
}
.tutorial-hero-left {
    position: relative;
    /* 与封面图 720×406 等比，整图完整显示（图片层 contain 兜底不裁切） */
    aspect-ratio: 720 / 406;
    min-height: 370px;
    background: linear-gradient(135deg, #312e81, #4338ca, #06b6d4);
    padding: 2.5rem;
    overflow: hidden;
}
.tutorial-hero-left::before {
    content: '';
    position: absolute;
    right: -3rem;
    top: -2rem;
    width: 16rem;
    height: 16rem;
    border-radius: 50%;
    border: 28px solid rgba(255,255,255,0.1);
    pointer-events: none;
}
.tutorial-hero-left::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 33%;
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.15);
    filter: blur(2rem);
    pointer-events: none;
}
.tutorial-hero-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.tutorial-hero-title {
    position: relative;
    margin-top: 2rem;
    max-width: 32rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
}
.tutorial-hero-desc {
    position: relative;
    margin-top: 1rem;
    max-width: 32rem;
    line-height: 1.75;
    color: #c7d2fe;
}
/* 隐藏 h1：hero 不再展示文字，仅保留给搜索引擎/读屏 */
.tutorial-hero-title-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.tutorial-hero-author {
    position: relative;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.tutorial-hero-author-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.9rem;
}
.tutorial-hero-author-name { font-weight: 600; }
.tutorial-hero-author-bio { font-size: 0.75rem; color: #c7d2fe; }
.tutorial-hero-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    color: #1e293b;
    padding: 2rem;
}
.tutorial-hero-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tutorial-hero-badge-vip {
    background: #fef3c7;
    color: #92400e;
    padding: 0.2rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}
.tutorial-hero-badge-free {
    background: #d1fae5;
    color: #065f46;
    padding: 0.2rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}
.tutorial-hero-fav-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
}
.tutorial-hero-fav-btn.liked { color: #f43f5e; }
.tutorial-hero-price-label { margin-top: 1.75rem; font-size: 0.875rem; color: #64748b; }
.tutorial-hero-price { margin-top: 0.25rem; font-size: 1.875rem; font-weight: 700; }
.tutorial-hero-price-vip-note { font-size: 0.875rem; font-weight: 400; color: #94a3b8; }
/* 划线原价 + 活动徽标（original_price > price 时显示） */
.tutorial-hero-price-original { margin-left: 0.625rem; font-size: 0.9375rem; font-weight: 400; color: #94a3b8; text-decoration: line-through; }
.tutorial-hero-price-badge { display: inline-block; margin-left: 0.5rem; padding: 2px 10px; border-radius: 999px; background: #fff1f0; color: #e02020; font-size: 0.75rem; font-weight: 700; vertical-align: middle; }
/* 售价为空且仅会员可看：「仅XX免费学」作为价格主信息单独展示，沿用主价格字号字重 */
.tutorial-hero-price .tutorial-hero-price-vip-only { font-size: inherit; font-weight: inherit; color: inherit; }
.tutorial-hero-meta {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: #64748b;
}
.tutorial-hero-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}
.tutorial-hero-actions { margin-top: 2rem; display: flex; gap: 0.75rem; }
.tutorial-hero-btn-start {
    flex: 1;
    border-radius: 0.75rem;
    background: #4f46e5;
    color: #fff;
    padding: 0.9rem 1.25rem;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.tutorial-hero-btn-start:hover { background: #4338ca; color: #fff; }
.tutorial-hero-btn-buy {
    flex: 1;
    border-radius: 0.75rem;
    background: #fff;
    color: #4f46e5;
    border: 2px solid #4f46e5;
    padding: 0.9rem 1.25rem;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}
.tutorial-hero-btn-buy:hover { background: #eef2ff; color: #4338ca; }
.tutorial-hero-btn-share {
    width: 3rem; height: 3rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}
.tutorial-hero-btn-share i {
    font-size: 1.25rem;
    line-height: 1;
    color: #94a3b8;
}
.tutorial-hero-btn-share:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
}
.tutorial-hero-btn-share:hover i {
    color: #64748b;
}

/* ===== Tabs ===== */
.tutorial-tabs {
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 1.75rem;
}
.tutorial-tab-btn {
    padding: 0 0.25rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.tutorial-tab-btn.active { color: #4f46e5; border-bottom-color: #4f46e5; }
.tutorial-tab-content { display: none; }
.tutorial-tab-content.active { display: block; }

/* ===== 课程介绍 ===== */
.tutorial-intro { padding: 1.75rem 0; }
.tutorial-intro h2 { font-size: 1.25rem; font-weight: 700; }
.tutorial-intro p { margin-top: 1rem; line-height: 2; color: #475569; }
.tutorial-feature-grid {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.tutorial-feature-card {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 1.25rem;
}
.tutorial-feature-card .bi { color: #4f46e5; font-size: 1.25rem; }
.tutorial-feature-card h3 { margin-top: 0.75rem; font-weight: 700; font-size: 0.95rem; }
.tutorial-feature-card p { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.5; color: #64748b; }
/* 普通特性卡片：icon 与标题水平并排（与高亮卡片一致），标题紧随 icon 之后 */
.tutorial-feature-card .highlight-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.tutorial-feature-card .highlight-header h3 { margin: 0; line-height: 1; }
.tutorial-feature-card .highlight-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.6rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .22);
}
.tutorial-feature-card .highlight-icon .bi { color: #fff; }
.tutorial-feature-card-highlight {
    grid-column: span 2;
    border-radius: 1rem;
    border: 1px solid #e0e7ff;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 16px rgba(79, 70, 229, .06);
}
.tutorial-feature-card-highlight .highlight-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}
.tutorial-feature-card-highlight .highlight-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.6rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .22);
}
.tutorial-feature-card-highlight h3 {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
}
.tutorial-feature-card-highlight .highlight-sub {
    margin-left: auto;
    font-size: .72rem;
    color: #4f46e5;
    background: rgba(79,70,229,.08);
    padding: .2rem .55rem;
    border-radius: 999px;
    font-weight: 500;
}
.tutorial-feature-card-highlight .highlight-body {
    color: #334155;
    font-size: .92rem;
    line-height: 1.75;
}

/* ===== 课程详情：前置知识 + 富文本正文 ===== */
.tutorial-extra-block > h3 { color: #0f172a; }
.tutorial-rich-content {
    padding: 0.25rem 0 0.5rem;
}
.tutorial-rich-content > *:first-child { margin-top: 0 !important; }
.tutorial-rich-content > *:last-child  { margin-bottom: 0 !important; }
.tutorial-rich-content h1,
.tutorial-rich-content h2,
.tutorial-rich-content h3,
.tutorial-rich-content h4 {
    margin: 1.6em 0 0.7em;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}
.tutorial-rich-content h1 { font-size: 1.35rem; }
.tutorial-rich-content h2 { font-size: 1.2rem; border-left: 4px solid #4B3FE3; padding-left: 0.75rem; }
.tutorial-rich-content h3 { font-size: 1.05rem; }
.tutorial-rich-content h4 { font-size: 1rem; }
.tutorial-rich-content p {
    margin: 0.9em 0;
    line-height: 1.9;
    color: #334155;
}
.tutorial-rich-content ul,
.tutorial-rich-content ol {
    padding-left: 1.6em;
    margin: 0.9em 0;
    color: #334155;
    line-height: 1.85;
}
.tutorial-rich-content li { margin: 0.25em 0; }
.tutorial-rich-content blockquote {
    margin: 1.1em 0;
    padding: 0.85em 1.1em;
    border-left: 4px solid #0EA5E9;
    background: rgba(14,165,233,.06);
    color: #0c4a6e;
    border-radius: 0 8px 8px 0;
    line-height: 1.8;
}
.tutorial-rich-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: #f1f5f9;
    color: #db2777;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.9em;
}
.tutorial-rich-content pre {
    background: #0b1020;
    color: #e2e8f0;
    padding: 1rem 1.15rem;
    border-radius: 10px;
    overflow-x: auto;
    line-height: 1.65;
    margin: 1.1em 0;
    font-size: 0.88rem;
}
.tutorial-rich-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}
.tutorial-rich-content img,
.tutorial-rich-content video,
.tutorial-rich-content svg {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 0.9em auto;
    display: block;
    box-shadow: 0 2px 14px rgba(15,23,42,.06);
}
.tutorial-rich-content iframe {
    max-width: 100%;
    border: 0;
    border-radius: 10px;
    aspect-ratio: 16 / 9;
    width: 100%;
    margin: 0.9em 0;
}

/* ===== 详情页富文本视频统一播放器（对齐课时页 learning/lesson.php） ===== */
.tut-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.2em 0;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #312e81 55%, #0f172a 100%);
    box-shadow: 0 12px 32px rgba(15,23,42,.18);
}
.tut-video-player video,
.tut-video-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: block;
    background: #000;
    object-fit: contain;
}
.tut-video-player .tv-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    color: #fff;
    cursor: pointer;
    background:
        radial-gradient(circle at 75% 30%, rgba(34,211,238,.18) 0, transparent 22%),
        radial-gradient(circle at 28% 75%, rgba(99,102,241,.22) 0, transparent 26%);
    transition: opacity .25s ease;
}
.tut-video-player.playing .tv-overlay { opacity: 0; pointer-events: none; }
.tut-video-player .tv-play-btn {
    width: auto; height: auto;
    display: grid; place-items: center;
    color: #fff;
    font-size: 4.2rem;
    text-shadow: 0 4px 18px rgba(0,0,0,.55);
    transition: transform .15s ease;
}
.tut-video-player .tv-play-btn:hover { transform: scale(1.06); }
.tut-video-player .tv-hint { font-size: .8rem; color: rgba(255,255,255,.85); }
.tut-video-player .tv-controls {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 15;
    display: none;
    align-items: center;
    gap: .7rem;
    padding: .8rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
    color: #fff;
    font-size: .8rem;
}
.tut-video-player.playing .tv-controls { display: flex; }
.tut-video-player .tv-btn {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,.15);
    cursor: pointer;
    transition: background .15s ease;
    font-size: 1rem;
}
.tut-video-player .tv-btn:hover { background: rgba(255,255,255,.28); }
.tut-video-player .tv-progress {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.2);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    accent-color: #6366f1;
}
.tut-video-player .tv-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 999px;
    background: #6366f1;
    cursor: pointer;
}
.tut-video-player .tv-time { white-space: nowrap; }
.tut-video-player .tv-watermark {
    position: absolute;
    right: 12px;
    top: 10px;
    z-index: 18;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(0,0,0,.32);
    color: rgba(255,255,255,.78);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .3px;
    pointer-events: none;
    user-select: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.tutorial-rich-content a {
    color: #4B3FE3;
    text-decoration: none;
    border-bottom: 1px dashed rgba(75,63,227,.35);
}
.tutorial-rich-content a:hover { color: #3C2ECA; border-bottom-style: solid; }
.tutorial-rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.1em 0;
    font-size: 0.92rem;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.tutorial-rich-content th { background: #f8fafc; color: #0f172a; font-weight: 600; }
.tutorial-rich-content th,
.tutorial-rich-content td {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    line-height: 1.55;
}
.tutorial-rich-content tr:last-child td { border-bottom: 0; }
.tutorial-rich-content hr {
    border: 0;
    border-top: 1px dashed #cbd5e1;
    margin: 1.6em 0;
}

/* ===== 课程目录 ===== */
.tutorial-catalog { padding: 1rem 0; }
.tutorial-catalog-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 0.75rem;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    cursor: pointer;
}
.tutorial-catalog-item:hover { background: #f1f5f9; }
.tutorial-catalog-num {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background: #e0e7ff;
    color: #4338ca;
    display: grid;
    place-items: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}
.tutorial-catalog-num.free { background: #d1fae5; color: #065f46; }
.tutorial-catalog-info { flex: 1; min-width: 0; }
.tutorial-catalog-title { font-weight: 500; }
.tutorial-catalog-meta { margin-top: 0.25rem; font-size: 0.75rem; color: #94a3b8; }
.tutorial-catalog-lock { color: #94a3b8; font-size: 1rem; flex-shrink: 0; }

/* 章节下的课时子项按钮（贴合本站 indigo 主题） */
.tutorial-catalog-lesson {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: inherit;
    text-align: left;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.tutorial-catalog-lesson:hover {
    background: #f8fafc;
    border-color: #a5b4fc;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.08);
}
.tutorial-catalog-lesson:active { background: #f1f5f9; }
.tutorial-catalog-lesson-num {
    font-size: 0.75rem;
    color: #94a3b8;
    min-width: 1.4rem;
    flex-shrink: 0;
}
.tutorial-catalog-lesson-title { flex: 1; text-align: left; }
.tutorial-catalog-lesson-tag {
    font-size: 0.7rem;
    color: #94a3b8;
    flex-shrink: 0;
}
.tutorial-catalog-lesson-tag .free { color: #059669; }

/* ===== 布局 ===== */
.tutorial-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 2.5rem;
    margin-top: 2.5rem;
}
.tutorial-detail-body { min-width: 0; }

/* ===== 推荐课程 ===== */
.tutorial-recommend-card {
    display: block;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
    margin-bottom: 1rem;
}
.tutorial-recommend-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); color: inherit; }
.tutorial-recommend-banner {
    /* 按封面图 720×406 等比收起（原固定 6rem 高会裁切图片），整图完整显示 */
    aspect-ratio: 720 / 406;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
/* 遮罩已移除，白字直接压在封面上：徽标用深色实底、标题加投影保证可读性 */
.tutorial-recommend-badge {
    align-self: flex-start;
    padding: 0.15rem 0.5rem;
    border-radius: 0.375rem;
    background: rgba(15,23,42,0.72);
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}
.tutorial-recommend-title-banner {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.55);
}
.tutorial-recommend-body {
    padding: 1rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
.tutorial-recommend-name { font-size: 0.875rem; font-weight: 600; }
.tutorial-recommend-count { margin-top: 0.25rem; font-size: 0.75rem; color: #94a3b8; }
.tutorial-recommend-price { font-size: 0.875rem; font-weight: 700; }
.tutorial-recommend-price.free { color: #059669; }

/* ===== 视频播放增强 ===== */
.tutorial-content .tutorial-video { max-width: 720px; width: 100%; margin: 0 0 1.5rem 0; }
.tutorial-content .video-container { position: relative; width: min(100%, 720px); height: 0; padding-top: 56.25%; overflow: hidden; margin: 0 0 1.5rem 0; border-radius: var(--radius-md); background: #000; box-shadow: var(--shadow-md); }
.tutorial-content .video-container video, .tutorial-content .video-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.tutorial-content .tutorial-video__frame { position: relative; width: 100%; height: 0; padding-top: 56.25%; background: #000; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); }
@supports (aspect-ratio: 16 / 9) { .tutorial-content .tutorial-video__frame { height: auto; padding-top: 0; aspect-ratio: 16 / 9; } }
.tutorial-content .tutorial-video video { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; display: block; object-fit: contain !important; background: #000; }
.tutorial-content .tutorial-video__overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border: none; background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.6)); color: #fff; cursor: pointer; transition: opacity 0.2s ease; padding: 0; }
.tutorial-content .tutorial-video__overlay.is-hidden { opacity: 0; pointer-events: none; }
.tutorial-content .tutorial-video__play { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.45); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,0.35); backdrop-filter: blur(2px); }
.tutorial-content .tutorial-video__play::before { content: ""; width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 18px solid #fff; margin-left: 4px; }
@media (max-width: 768px) { .tutorial-content .tutorial-video { max-width: 100%; } }

/* ===== 响应式 ===== */
@media (max-width: 1199px) {
    .tutorial-hero { grid-template-columns: 1fr; }
    /* hero 左侧已无文字内容，收起高度由基础规则的 720:406 等比控制 */
    .tutorial-hero-left { min-height: auto; }
    .tutorial-hero-title { font-size: 1.5rem; }
    .tutorial-detail-layout { grid-template-columns: 1fr; }
    .tutorial-feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .tutorial-hero-left { padding: 1.5rem; }
    .tutorial-hero-right { padding: 1.5rem; }
    .tutorial-hero-title { font-size: 1.25rem; }
    .tutorial-hero-actions { flex-wrap: wrap; }
    .tutorial-feature-grid { grid-template-columns: 1fr; }
    .tutorial-feature-card-highlight { grid-column: span 1; }
}
/* ===== 移动端 H5 专项：自定义视频播放器 + 目标卡片 ===== */
@media (max-width: 576px) {
    /* 播放按钮缩小，避免在小屏上占满画面 */
    .tut-video-player { border-radius: 10px; box-shadow: 0 8px 20px rgba(15,23,42,.15); }
    .tut-video-player .tv-play-btn { font-size: 3rem; }
    /* 控制栏：放大触摸热区到 >=40px，进度条拇指 18px，适配手指操作 */
    .tut-video-player .tv-controls {
        gap: .5rem;
        padding: .6rem .7rem calc(.7rem + env(safe-area-inset-bottom));
        font-size: .72rem;
    }
    .tut-video-player .tv-btn {
        width: 40px; height: 40px;
        font-size: 1.15rem;
    }
    .tut-video-player .tv-progress { height: 8px; }
    .tut-video-player .tv-progress::-webkit-slider-thumb { width: 18px; height: 18px; }
    .tut-video-player .tv-progress::-moz-range-thumb { width: 18px; height: 18px; }
    /* 水印：小屏更小更靠边，避免遮挡操作 */
    .tut-video-player .tv-watermark {
        top: 8px; right: 8px;
        font-size: .68rem;
        padding: .18rem .45rem;
    }
    /* 目标卡片头部允许换行，标题较长时「课程目标」标签落到第二行 */
    .tutorial-feature-card-highlight .highlight-header { flex-wrap: wrap; gap: .4rem; }
    .tutorial-feature-card-highlight .highlight-sub { margin-left: 0; }
    /* 富文本正文在窄屏放宽字号，长单词/链接可断行 */
    .tutorial-rich-content { font-size: .9rem; overflow-wrap: anywhere; }
}
.tutorial-hero-btn-start.completed { background: #10b981; }
