.course-layout{display: grid; grid-template-columns: 240px 1fr; gap: 24px;}
.course-thumb-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #f3f4f6; color: #9ca3af; }
.state-tip { text-align: center; color: #6b7280; padding: 40px 0; font-size: 14px; }
.list-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.list-toolbar .toolbar-label { font-size: 14px; color: #6b7280; }
.sidebar-cur { display: block; text-align:center;padding: 15px 0; font-size: 14px; color: #065f46; border-bottom: 1px solid #e5e7eb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-back { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 12px 16px; border: 1px dashed #d1d5db; border-radius: 8px; font-size: 14px; color: #4b5563; text-decoration: none; transition: all 0.2s; }
.sidebar-back:hover { border-color: #0f766e; color: #0f766e; background: #f0fdf4; }
.course-detail-sidebar { background: #fff; border-radius: 5px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); height: fit-content; position: sticky; top: 20px; }
.course-price-box { padding-bottom: 20px; border-bottom: 1px solid #e5e7eb; margin-bottom: 20px; }
.course-price-box .box-title { font-size: 14px; color: #6b7280; margin: 0 0 12px 0; }
.price-option { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s; background: #fff; }
.price-option:hover { border-color: #0f766e; }
.price-option.selected { border-color: #0f766e; background: #f0fdf4; box-shadow: 0 0 0 1px #0f766e inset; }
.price-option .po-amount { font-size: 20px; font-weight: 700; color: #ef4444; }
.price-option .po-days { font-size: 12px; color: #6b7280; margin-top: 2px; }
.price-free { text-align: center; padding: 8px 0 16px; font-size: 18px; font-weight: 700; color: #059669; }
.course-buy-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%); color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s; margin-bottom: 12px; }
.course-buy-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3); }
.course-buy-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.course-opened-btn { display: block; width: 100%; padding: 14px; background: #059669; color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; margin-bottom: 12px; text-align: center; text-decoration: none; box-sizing: border-box; }
.buy-tip { font-size: 13px; color: #92400e; background: #fef3c7; border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; display: none; }
.buy-tip.show { display: block; }
.course-meta-list { display: flex; flex-direction: column; gap: 12px; }
.course-meta-item { display: flex; justify-content: space-between; font-size: 14px; color: #4b5563; }
.course-meta-item .label { color: #6b7280; }
.course-meta-item .value { color: #1f2937; font-weight: 500; }
.course-detail-main { background: #fff; border-radius: 5px; padding: 32px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.course-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; margin-bottom: 24px; }
.course-detail-title { font-size: 26px; font-weight: 700; color: #065f46; margin-bottom: 16px; line-height: 1.3; }
.course-detail-desc { font-size: 15px; color: #4b5563; line-height: 1.8; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #e5e7eb; white-space: pre-line; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; padding: 20px; background: #f9fafb; border-radius: 8px; }
.stat-item { text-align: center; }
.stat-value { font-size: 24px; font-weight: 700; color: #0f766e; }
.stat-label { font-size: 13px; color: #6b7280; margin-top: 4px; }
.chapter-title { font-size: 14px; font-weight: 600; color: #065f46; margin-bottom: 16px; padding-bottom: 10px; padding-left: 10px; border-bottom: 1px solid #0f766e; }
.chapter-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #f9fafb; border-radius: 8px; }
.chapter-header .name { font-size: 15px; font-weight: 600; color: #1f2937; }
.chapter-header .lessons-count { font-size: 13px; color: #6b7280; }
.lesson-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f3f4f6; }
.lesson-item:last-child { border-bottom: none; }
.lesson-item .lesson-name { font-size: 14px; color: #374151; flex: 1; }
.lesson-item .lesson-type { font-size: 12px; color: #9ca3af; margin-left: 12px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.related-card { background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid #e5e7eb; transition: all 0.2s; }
.related-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.related-card .rc-thumb { width: 100%; height: 140px; object-fit: cover; display: block; background: #f3f4f6; }
.related-card .rc-empty { width: 100%; height: 140px; display: flex; align-items: center; justify-content: center; background: #f3f4f6; color: #9ca3af; }
.related-card .rc-body { padding: 16px; }
.related-card h4 { font-size: 15px; color: #1f2937; margin-bottom: 8px; line-height: 1.4; }
.related-card h4 a { color: inherit; text-decoration: none; }
.related-card h4 a:hover { color: #0f766e; }
.related-card .rc-price { font-size: 18px; font-weight: 700; color: #ef4444; }
.state-tip { text-align: center; color: #6b7280; padding: 80px 0; font-size: 15px; }

.course-player { border-radius: 12px; overflow: hidden; }
.player-placeholder { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%); color: #fff; cursor: pointer; }
.play-icon { width: 80px; height: 80px; background: rgba(15, 118, 110, 0.9); border-radius: 50%; margin-bottom: 16px; }
.player-info { background: #fff; padding: 20px; border-radius: 0 0 12px 12px; border-top:1px solid #F5F5F5; }
.player-info h1 { font-size: 20px; color: #065f46; margin-bottom: 8px; }
.player-meta { display: flex; gap: 16px; font-size: 13px; color: #6b7280; margin-bottom: 12px; }
.player-actions { display: flex; gap: 12px; }
.player-btn { padding: 8px 16px; border: 1px solid #e5e7eb; background: #fff; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.player-btn:hover { border-color: #0f766e; color: #0f766e; }
.player-btn.active { background: #0f766e; color: #fff; border-color: #0f766e; }

.course-sidebar { width: auto; height: fit-content; position: sticky; top: 20px; display: flex; flex-direction: column; max-height: 700px;margin-top: 0; }
.sidebar-header { padding: 16px 20px; background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%); color: #fff; }
.sidebar-header h3 { font-size: 16px; margin: 0 0 8px 0; }
.progress-bar { height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; margin-top: 8px; }
.progress-fill { height: 100%; background: #fff; border-radius: 2px; width: 35%; }
.chapter-list { flex: 1; overflow-y: auto; padding: 12px; }
.chapter-item { margin-bottom: 8px; }
.chapter-header { display: flex; justify-content: space-between; padding: 12px; background: #f9fafb; border-radius: 8px; cursor: pointer; }
.chapter-header:hover { background: #f0fdf4; }
.chapter-title { font-size: 14px; font-weight: 600; color: #1f2937; }
.chapter-count { font-size: 12px; color: #6b7280; }
.lesson-list { padding: 4px 0 4px 16px; }
.lesson-item { display: flex; align-items: center; padding: 10px 12px; border-radius: 6px; cursor: pointer; gap: 10px; }
.lesson-item:hover { background: #f0fdf4; }
.lesson-item.playing { background: #0f766e; color: #fff; }
.lesson-name { flex: 1; font-size: 13px; }
.lesson-duration { font-size: 11px; color: #9ca3af; }

.course-info-panel { background: #fff; border-radius: 12px; padding: 24px; margin-top: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.info-tab { padding: 12px 24px; cursor: pointer; border-bottom: 2px solid transparent; }
.info-tab.active { color: #0f766e; border-bottom-color: #0f766e; font-weight: 600; }
.course-desc { font-size: 14px; color: #4b5563; line-height: 1.8; }
.instructor-card { display: flex; align-items: center; gap: 16px; padding: 16px; background: #f9fafb; border-radius: 8px; margin-top: 16px; }
.instructor-avatar { width: 60px; height: 60px; border-radius: 50%; }
.review-item { padding: 16px; background: #f9fafb; border-radius: 8px; margin-top: 12px; }

/* ========== 套餐选择（pe-radio-group + pe-radio 组件化） ========== */
/* pe-radio-group 内部为纵向 flex 且 align-items:flex-start，
   需显式给 pe-radio 设 width:100%，卡片才能撑满侧栏 */
.course-price-box pe-radio-group { width: 100%; }
.course-price-box pe-radio {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}
.course-price-box pe-radio:hover { border-color: #0f766e; }
/* checked 为 reflect 属性，选中态直接复用原 .price-option.selected 配色 */
.course-price-box pe-radio[checked] {
    border-color: #0f766e;
    background: #f0fdf4;
    box-shadow: 0 0 0 1px #0f766e inset;
}
.course-price-box .po-amount { font-size: 20px; font-weight: 700; color: #ef4444; }
.course-price-box .po-days { font-size: 12px; color: #6b7280; margin-top: 2px; }
.course-price-box .po-empty { font-size: 13px; color: #9ca3af; padding: 8px 0; }

/* 侧栏操作按钮：pe-button 用 Shadow DOM，通过 CSS 变量穿透套用课程主题渐变 */
.course-detail-sidebar pe-button { display: block; }
.course-detail-sidebar pe-button[type="primary"] {
    --pe-color-primary: #0f766e;
    --pe-color-primary-hover: #134e4a;
    --pe-button-bg: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
    --pe-button-bg-hover: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
    --pe-border-radius: 8px;
    --pe-font-size: 16px;
    --pe-font-weight: 600;
    --pe-spacing-sm: 14px;
    --pe-spacing-lg: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    transition: all 0.2s;
}
.course-detail-sidebar pe-button[type="primary"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}
.course-detail-sidebar .sidebar-link { display: block; text-decoration: none; }