/* ==========================================================
   鲲鹏AI · 在线课程详情页
   ========================================================== */
:root {
  --blue: #1f76f3;
  --blue-hover: #4b93f7;
  --gold: #ffd800;
  --top-bg: #1b2026;
  --panel-bg: #252a30;
  --text-main: #22262b;
  --text-sub: #8a9099;
  --line: #ededed;
  --header-h: 60px;
  --panel-w: 320px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text-main);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; max-width: 100%; }
.container { width: 1200px; margin: 0 auto; }

/* ---------- 顶部加载进度条 ---------- */
.c-progress-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #6ddcff);
  width: 10%;
  transition: width .4s ease;
}

/* ---------- 顶栏 ---------- */
.c-course-header {
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-header { height: 100%; padding: 0 25px; display: flex; align-items: center; gap: 20px; }
.course-header-logo { display: flex; align-items: center; gap: 10px; }
.course-header-logo .logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #1f76f3, #6a3ff0);
  color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
/* 页面主体已有 h1 时，顶栏品牌名用 span，保证唯一 h1 */
.course-header-logo .logo-name { font-size: 20px; font-weight: 700; color: #1f2329; }
.course-header-logo h1 { font-size: 20px; font-weight: 700; margin: 0; color: #1f2329; }
.app-header-actions-item { display: flex; align-items: center; gap: 12px; }

.btn {
  height: 32px; padding: 0 16px; border-radius: 16px;
  background: var(--blue); color: #fff; font-size: 14px;
  display: inline-flex; align-items: center; transition: background .2s;
}
.btn:hover { background: var(--blue-hover); }
.btn--ghost { background: #f2f4f7; color: #4e5969; }
.btn--ghost:hover { background: #e5e8ef; }

.el-dropdown { position: relative; }
.coin {
  display: flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 12px; border-radius: 16px;
  background: #f7f8fa; color: #4e5969; font-size: 13px; cursor: pointer;
}
.coin img { width: 16px; height: 16px; }
.el-dropdown-menu {
  position: absolute; right: 0; top: 40px; width: 132px;
  background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 6px 0; display: none; z-index: 30;
}
.el-dropdown-menu.show { display: block; }
.app-dropdown-item { display: block; padding: 9px 14px; font-size: 13px; color: #4e5969; cursor: pointer; }
.app-dropdown-item:hover { background: #f5f7fa; color: var(--blue); }
.app-header-user-name { cursor: pointer; color: var(--blue); font-size: 14px; }
.app-header-user-name:hover { opacity: .8; }

/* ---------- 主体播放区 ---------- */
.p-course-detail-top { background: var(--top-bg); position: relative; overflow: hidden; }
.c-course-view {
  position: relative; display: flex; align-items: stretch;
  transition: padding-right .3s ease-in-out;
}
.c-course-view.is-collapsed { padding-right: 32px; }

.course-view-left {
  flex: 1; min-width: 0; height: 100%;
  display: flex; flex-direction: column; padding: 0 0 20px 20px;
}
.course-view-breadcrumb {
  font-size: 12px; padding: 24px 0 12px; display: flex; gap: 8px;
  color: #9aa1aa; transition: opacity .3s;
}
.course-view-breadcrumb li a { color: #9aa1aa; }
.course-view-breadcrumb li a:hover { color: #fff; }
.course-view-breadcrumb li + li::before { content: "/"; margin-right: 8px; color: #5c636c; }

.course-view-play { padding-right: 20px; }
.c-video-player-box {
  position: relative; background: #000;
  border-radius: 6px; overflow: hidden;
  /* 宽高双约束：既保持 16:9，又不超过视口高度的 68%，
     避免宽屏下播放器过高把下方内容挤出视野 */
  aspect-ratio: 16 / 9;
  max-height: 68vh;
  max-width: 100%;
  margin: 0 auto;
}
.video-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #7c848e; font-size: 15px; text-align: center; padding: 20px;
  background: radial-gradient(circle at 30% 30%, #22282f 0%, #14181d 60%, #0d1013 100%);
  flex-direction: column; gap: 14px; cursor: pointer;
}
.video-stage__badge {
  width: 74px; height: 74px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.video-stage:hover .video-stage__badge { background: rgba(31,118,243,.35); }
.video-stage__badge::after {
  content: ""; width: 0; height: 0; margin-left: 6px;
  border-left: 22px solid #fff;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}
.video-stage__name { font-size: 16px; color: #c9cfd6; }
.video-stage__hint { font-size: 12px; color: #5d646d; }

.speed-tips {
  position: absolute; top: 12px; right: 14px; color: #fff; font-size: 13px;
  display: flex; gap: 2px; background: rgba(0,0,0,.5);
  padding: 4px 8px; border-radius: 4px;
}
.video-danmu { position: absolute; top: 20px; left: 20px; right: 20px; color: #fff; font-size: 14px; line-height: 1.7; pointer-events: none; }

.player-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  padding: 24px 14px 10px; display: none;
}
.c-video-player-box:hover .player-bar,
.c-video-player-box.is-playing .player-bar { display: block; }
.player-progress {
  height: 4px; background: rgba(255,255,255,.28); border-radius: 2px;
  cursor: pointer; position: relative; margin-bottom: 8px;
}
.player-progress__bar { height: 100%; width: 0; background: var(--blue); border-radius: 2px; }
.player-progress__dot {
  position: absolute; top: 50%; left: 0; width: 11px; height: 11px;
  background: #fff; border-radius: 50%; transform: translate(-50%, -50%);
}
.player-ctrl { display: flex; align-items: center; gap: 14px; color: #fff; font-size: 13px; }
.player-ctrl i { font-style: normal; cursor: pointer; opacity: .9; }
.player-ctrl i:hover { color: #7ab4ff; }
.player-ctrl .time { opacity: .85; margin-left: auto; }

.course-info-box { padding-right: 20px; }
.course-info-header { padding-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.course-info-name {
  flex: 1; margin: 0; padding-right: 30px; max-width: 730px;
  font-size: 26px; font-weight: 700; color: #fff;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.course-info-full-page {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: #c2c8d0; cursor: pointer; white-space: nowrap;
}
.course-info-full-page:hover { color: #fff; }
.course-info-action {
  margin-top: 18px; padding-bottom: 26px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 16px; color: #fff;
}
.time-name { opacity: .7; margin-right: 8px; }
.time-num { font-weight: 600; }

.c-cz-checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: #c2c8d0; }
.c-cz-checkbox__input {
  width: 15px; height: 15px; border-radius: 3px;
  border: 1px solid #6b727b; background: transparent; position: relative;
}
.c-cz-checkbox.is-checked .c-cz-checkbox__input { background: var(--blue); border-color: var(--blue); }
.c-cz-checkbox.is-checked .c-cz-checkbox__input::after {
  content: ""; position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- 右侧目录面板 ---------- */
.course-view-right { position: absolute; top: 0; right: 0; height: 100%; z-index: 2; }
.course-view-right-btn {
  position: absolute; left: -32px; top: 0; width: 32px; height: 100%;
  background: var(--panel-bg); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s;
}
.course-view-right-btn:hover { background: #2f353c; }
.course-view-right-btn i {
  font-style: normal; color: #cfd4da; font-size: 15px;
  transform: rotate(90deg); transition: transform .3s;
}
.is-collapsed .course-view-right-btn i { transform: rotate(-90deg); }

.view-right {
  width: var(--panel-w); height: 100%; background: #464646;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s ease-in-out;
}
.view-right.is-open { transform: translateX(0); }
.view-right-tab {
  width: 100%; height: 50px; flex-shrink: 0;
  background: linear-gradient(180deg, #383c42, #2b3036);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  font-size: 20px; font-weight: 700; color: #fff;
  position: relative; display: flex; align-items: center; justify-content: center;
}
.view-right-tab::after {
  content: ""; position: absolute; bottom: 0; left: 50%; margin-left: -22px;
  width: 44px; height: 2px; background: #1f95f3; border-radius: 2px;
}
.view-right-content { flex: 1; overflow-y: auto; padding-bottom: 20px; }
.view-right-content::-webkit-scrollbar { width: 6px; }
.view-right-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }

.play-catalog__progress {
  padding: 10px 16px 12px; color: #c3c8ce; font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.play-catalog__progress b { color: #fff; }

.chapter { border-bottom: 1px solid rgba(255,255,255,.1); }
.chapter-title {
  width: 100%; text-align: left; padding: 13px 16px;
  font-size: 14.5px; color: #ffffff; line-height: 1.5; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.chapter-title:hover { background: rgba(255,255,255,.08); }
.chapter-title .arrow { margin-left: auto; font-size: 11px; opacity: .8; transition: transform .2s; }
.chapter.is-open .chapter-title .arrow { transform: rotate(90deg); }
.chapter-title .cnt { font-size: 12px; opacity: .75; }

.period-list { display: none; padding-bottom: 6px; }
.chapter.is-open .period-list { display: block; }
.period-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px 11px 20px; font-size: 14px; color: #eef1f4;
  line-height: 1.5; cursor: pointer; position: relative;
}
.period-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.period-item.is-active { background: rgba(31,151,243,.22); color: #fff; }
.period-item.is-active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #1f95f3; }
.period-item__idx { opacity: .85; flex-shrink: 0; width: 26px; }
.period-item.is-done .period-item__idx { font-size: 0; opacity: 1; }
.period-item.is-done .period-item__idx::before { content: "✓"; color: #6ddc8b; font-size: 13px; }
.period-item__name { flex: 1; }
.period-item__free {
  flex-shrink: 0; font-size: 11px; color: #ffb020;
  border: 1px solid rgba(255,176,32,.5); border-radius: 3px; padding: 0 4px;
}

/* ---------- 下方内容区 ---------- */
.p-course-detail-body { background: #fff; }
.p-course-detail-tabs {
  display: flex; align-items: center; border-bottom: 1px solid var(--line);
  padding: 0 40px; gap: 68px;
}
.p-course-detail-tab { padding: 20px 0; font-size: 16px; cursor: pointer; color: #4e5969; }
.p-course-detail-tab:hover { color: var(--blue); }
.p-course-detail-tab-active { color: var(--blue); font-weight: 600; position: relative; }
.p-course-detail-tab-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 3px; background: var(--blue); border-radius: 3px;
}
.p-course-detail-content { padding: 30px 40px 50px; font-size: 15px; line-height: 1.9; color: #4e5969; }
.p-course-detail-description p { margin: 0 0 6px; white-space: pre-wrap; }
.sec-title { font-size: 17px; font-weight: 700; color: #1f2329; margin: 34px 0 14px; }
.sec-title:first-child { margin-top: 0; }

.empty-wrapper { text-align: center; color: #86909c; padding: 20px 0; }
.empty-wrapper img { margin: 0 auto 14px; width: 127px; }
.empty-wrapper p { margin: 0; }

.rec-list { display: flex; gap: 18px; flex-wrap: wrap; }
.rec-card {
  width: 268px; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; cursor: pointer; transition: box-shadow .2s, transform .2s;
}
.rec-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.09); transform: translateY(-2px); }
.rec-card__cover { aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 600; }
.rec-card__body { padding: 12px 14px 16px; }
.rec-card__name { font-size: 14px; font-weight: 600; color: #1f2329; margin-bottom: 6px; }
.rec-card__meta { font-size: 12px; color: var(--text-sub); }

/* ---------- 页脚 ---------- */
.app-footer { margin-top: 40px; }
.c-footer { width: 100%; border-top: 1px solid var(--line); }
.c-footer-main { background: #fff; position: relative; }
.c-footer-main-content { padding: 20px 0 15px; }
.c-top { display: flex; align-items: center; gap: 16px; padding: 20px 0 15px; }
.c-top .logo { width: 130px; flex-shrink: 0; }
.c-top p { margin: 0; font-size: 13px; color: #86909c; line-height: 1.9; }
.c-line { height: 1px; background: var(--line); }
.c-center { display: flex; justify-content: space-between; padding: 20px 0 30px; }
.c-center-left p { margin: 0 0 6px; font-size: 13px; color: #86909c; line-height: 1.9; }
.c-center-right { text-align: center; }
.c-center-right .qr { width: 110px; height: 110px; margin: 0 auto 8px; }
.c-center-right p { margin: 0; font-size: 12px; color: #86909c; }
.beian { text-align: center; padding: 14px 0; font-size: 12px; }
.beian .caseNumber { color: #86909c; display: inline-flex; align-items: center; gap: 6px; }
.beian .icon { width: 16px; }

/* ---------- 大屏模式 ---------- */
.fullscreen-mask {
  position: fixed; inset: 0; background: #000; z-index: 100;
  display: none; align-items: center; justify-content: center;
}
.fullscreen-mask.show { display: flex; }
.fs-inner {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; color: #7c848e; font-size: 18px;
  background: radial-gradient(circle at 50% 40%, #1c222a, #08090b);
}
.fs-close {
  position: absolute; top: 20px; right: 24px; color: #fff; font-size: 24px;
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.fs-close:hover { background: rgba(255,255,255,.22); }

/* ---------- 弹窗 ---------- */
.el-dialog__wrapper {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: none; align-items: flex-start; justify-content: center; z-index: 90;
}
.el-dialog__wrapper.show { display: flex; }
.el-dialog { margin-top: 15vh; width: 420px; background: #fff; border-radius: 10px; padding: 28px 28px 30px; position: relative; }
.el-dialog__title { font-size: 18px; font-weight: 600; }
.el-dialog__headerbtn { position: absolute; top: 14px; right: 16px; font-size: 18px; color: #86909c; }
.form-item { margin-top: 18px; }
.form-item input { width: 100%; height: 42px; border: 1px solid #dcdee0; border-radius: 6px; padding: 0 12px; font-size: 14px; outline: none; }
.form-item input:focus { border-color: var(--blue); }
.dialog-actions { margin-top: 24px; display: flex; gap: 12px; }
.dialog-actions button { flex: 1; height: 42px; border-radius: 6px; font-size: 15px; }
.dialog-actions .is-primary { background: var(--blue); color: #fff; }
.dialog-actions .is-line { border: 1px solid #dcdee0; color: #4e5969; background: #fff; }
.dialog-actions button:hover { opacity: .9; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: 80px; transform: translateX(-50%) translateY(-10px);
  background: rgba(0,0,0,.82); color: #fff; padding: 9px 16px; border-radius: 6px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .container { width: auto; padding: 0 20px; }
  .c-top, .c-center { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 900px) {
  .course-view-left { padding-left: 12px; }
  .course-view-play, .course-info-box { padding-right: 12px; }
  .course-info-name { font-size: 20px; }
  .view-right { width: 260px; }
  .p-course-detail-tabs { padding: 0 16px; gap: 32px; }
  .p-course-detail-content { padding: 20px 16px 36px; }
  .app-header { padding: 0 14px; gap: 10px; }
  .c-top { flex-direction: column; align-items: flex-start; }
  .c-center { flex-direction: column; gap: 18px; }
}