/* ==========================================================
   鲲鹏AI · 学习页专属样式（板块 / 锁定 / 有效期）
   ========================================================== */

/* ==========================================================
   播放区布局
   ==========================================================
   宣传位默认放在播放器下方横向铺开—— 这样任何屏幕宽度都能
   看到它，且不会挤压播放器与右侧目录。
   ≥1600px 的宽屏才改为竖排放在左侧。
   ========================================================== */
.play-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.play-main {
  flex: 1;
  min-width: 0;
  order: 1;              /* 播放器优先 */
}
.ai-promo { order: 2; }  /* 宣传位在播放器下方 */

/* ---------- AI 未来之路宣传位（横排） ---------- */
.ai-promo {
  border-radius: 10px;
  padding: 18px 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #1b2b6b 0%, #2b1f5e 55%, #3b1f7a 100%);
  display: flex;
  align-items: center;
  gap: 26px;
}
.ai-promo::before {
  content: ""; position: absolute; right: -40px; top: -60px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,.05);
}

.ai-promo__head { position: relative; z-index: 2; flex-shrink: 0; max-width: 220px; }
.ai-promo__badge {
  display: inline-block; font-size: 11px;
  background: rgba(255,255,255,.16); padding: 3px 9px;
  border-radius: 11px; margin-bottom: 8px;
}
.ai-promo__title { font-size: 17px; font-weight: 700; margin: 0 0 6px; line-height: 1.35; }
.ai-promo__desc { font-size: 12.5px; margin: 0; opacity: .8; line-height: 1.55; }

/* 发展阶段：横排四列 */
.ai-promo__list {
  list-style: none; margin: 0; padding: 0;
  position: relative; z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.ai-promo__item {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 0 12px 0 0;
  border-right: 1px solid rgba(255,255,255,.1);
}
.ai-promo__item:last-child { border-right: 0; }
.ai-promo__num {
  width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #ffd800;
}
.ai-promo__text { font-size: 12px; line-height: 1.5; opacity: .9; min-width: 0; }
.ai-promo__text b { display: block; font-size: 13px; margin-bottom: 2px; }

.ai-promo__foot {
  display: flex; gap: 16px; flex-shrink: 0;
  position: relative; z-index: 2;
  padding-left: 20px;
  border-left: 1px solid rgba(255,255,255,.14);
}
.ai-promo__stat { text-align: center; }
.ai-promo__stat b { display: block; font-size: 18px; font-weight: 700; line-height: 1.2; }
.ai-promo__stat b small { font-size: 10px; font-weight: 400; opacity: .8; }
.ai-promo__stat span { font-size: 11px; opacity: .7; white-space: nowrap; }

/* ---------- 宽屏：宣传位改为左侧竖排 ---------- */
@media (min-width: 1600px) {
  .play-row { flex-direction: row; align-items: stretch; }
  .ai-promo {
    order: 0;                /* 宽屏时宣传位回到左侧 */
    width: 280px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 20px 18px 16px;
  }
  .ai-promo__head { max-width: none; }
  .ai-promo__list { grid-template-columns: 1fr; gap: 0; }
  .ai-promo__item {
    padding: 8px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .ai-promo__item:last-child { border-bottom: 0; }
  .ai-promo__foot {
    padding-left: 0; padding-top: 12px;
    border-left: 0; border-top: 1px solid rgba(255,255,255,.12);
  }
}

/* ---------- 窄屏：阶段列表转两列 ---------- */
@media (max-width: 1100px) {
  .ai-promo { flex-wrap: wrap; gap: 14px; }
  .ai-promo__list { grid-template-columns: repeat(2, 1fr); width: 100%; flex-basis: 100%; }
  .ai-promo__foot { padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
  .ai-promo { padding: 16px 14px; gap: 12px; }
  .ai-promo__title { font-size: 15px; }
  .ai-promo__list { grid-template-columns: 1fr; }
  .ai-promo__item { padding: 6px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .ai-promo__foot { justify-content: space-around; width: 100%; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); }
}

/* ---------- 顶部身份与有效期条 ---------- */
.learn-bar {
  background: #171c22;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 10px 0;
  font-size: 13px;
  color: #c2c8d0;
}
.learn-bar__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.learn-bar__left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.learn-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 13px;
  background: rgba(255,255,255,.08); font-size: 12px;
}
.learn-chip b { color: #fff; font-weight: 600; }
.learn-chip.is-warn { background: rgba(255,152,0,.16); color: #ffc069; }
.learn-chip.is-danger { background: rgba(255,77,79,.16); color: #ff7875; }
.learn-chip.is-ok { background: rgba(109,220,139,.14); color: #6ddc8b; }
.learn-bar__acts { display: flex; gap: 10px; align-items: center; }
.learn-btn {
  height: 30px; padding: 0 15px; border-radius: 15px;
  background: var(--blue); color: #fff; font-size: 13px;
  transition: background .2s;
}
.learn-btn:hover { background: var(--blue-hover); }
.learn-btn.is-ghost { background: rgba(255,255,255,.1); color: #c2c8d0; }
.learn-btn.is-ghost:hover { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- 目录中的板块标签 ---------- */
.chapter-plan-tag {
  display: inline-flex; flex-direction: column; gap: 1px;
  margin-left: auto; margin-right: 8px;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(255,255,255,.08); line-height: 1.35;
  text-align: right; flex-shrink: 0;
}
.chapter-plan-tag b { font-size: 11px; color: #e8eaed; font-weight: 600; }
.chapter-plan-tag span { font-size: 10px; color: #ffb020; }
.chapter-plan-tag.is-unlocked { background: rgba(109,220,139,.16); }
.chapter-plan-tag.is-unlocked b { color: #6ddc8b; }
.chapter-plan-tag.is-unlocked span { color: rgba(109,220,139,.75); }
.chapter-plan-tag.is-expired { background: rgba(255,77,79,.14); }
.chapter-plan-tag.is-expired b { color: #ff7875; }
.chapter-plan-tag.is-expired span { color: rgba(255,120,117,.8); }

/* 让板块标签与箭头不重叠 */
.chapter-title .arrow { margin-left: 0; flex-shrink: 0; }

/* ---------- 小节锁定态 ----------
   设计原则：锁定的小节「依然完全可点」，只是点击后走解锁流程。
   因此文字亮度与已解锁项基本一致，仅靠右侧锁图标区分，
   避免整个目录看起来像被禁用、点不动。 */
.period-item.is-locked { color: #dfe3e8; cursor: pointer; }
.period-item.is-locked:hover { background: rgba(255,152,0,.14); color: #fff; }
.period-item.is-locked .period-item__name { opacity: 1; }
.period-item.is-locked .period-item__idx { opacity: .85; }

/* 锁图标：低调挂在右侧，hover 时高亮提示「可点开看解锁方式」 */
.period-item__lock {
  flex-shrink: 0;
  width: 13px; height: 13px;
  opacity: .6;
  transition: opacity .2s;
}
.period-item.is-locked:hover .period-item__lock { opacity: 1; color: #ffb020; }

/* 已解锁的板块：整行可点，hover 用蓝色调提示 */
.period-item.is-unlocked-item { cursor: pointer; }
.period-item.is-unlocked-item:hover { background: rgba(31,151,243,.14); }

.period-item__free-label {
  flex-shrink: 0; font-size: 11px; color: #6ddc8b;
  border: 1px solid rgba(109,220,139,.45); border-radius: 3px; padding: 0 4px;
}
.period-item.is-unlocked-item .period-item__idx { opacity: .65; }

/* ---------- 解锁弹层 ---------- */
.unlock-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: none; align-items: center; justify-content: center; z-index: 120;
}
.unlock-mask.show { display: flex; }
.unlock-dialog {
  width: 460px; background: #fff; border-radius: 12px;
  padding: 28px 28px 26px; position: relative;
}
.unlock-dialog__close {
  position: absolute; top: 14px; right: 16px; font-size: 18px; color: #86909c;
}
.unlock-dialog__tag {
  display: inline-block; font-size: 12px; color: var(--blue);
  background: #f0f6ff; padding: 3px 9px; border-radius: 4px; margin-bottom: 12px;
}
.unlock-dialog h3 { font-size: 21px; margin: 0 0 8px; color: #1f2329; }
.unlock-dialog__desc { font-size: 14px; color: #4e5969; margin: 0 0 20px; line-height: 1.75; }

.unlock-price-box {
  background: linear-gradient(135deg, #1f76f3, #6a3ff0);
  border-radius: 10px; padding: 18px 20px; color: #fff; margin-bottom: 20px;
}
.unlock-price-box__row { display: flex; align-items: flex-end; justify-content: space-between; }
.unlock-price-box__label { font-size: 13px; opacity: .85; }
.unlock-price-box__price { font-size: 32px; font-weight: 700; line-height: 1; }
.unlock-price-box__meta { font-size: 12px; opacity: .8; margin-top: 8px; }

.unlock-expired-tip {
  background: rgba(255,77,79,.1); border: 1px solid rgba(255,77,79,.25);
  color: #d92d20; font-size: 13px; padding: 10px 14px;
  border-radius: 8px; margin-bottom: 18px;
}

.unlock-flow {
  font-size: 13px; color: #4e5969; line-height: 2;
  background: #f7f8fa; border-radius: 8px; padding: 14px 16px;
  margin-bottom: 20px; white-space: pre-line;
}
.unlock-form-label { font-size: 13px; color: #1f2329; margin-bottom: 8px; font-weight: 600; }
.unlock-input {
  width: 100%; height: 42px; border: 1px solid #dcdee0; border-radius: 8px;
  padding: 0 14px; font-size: 14px; outline: none; margin-bottom: 16px;
}
.unlock-input:focus { border-color: var(--blue); }
.unlock-actions { display: flex; gap: 10px; }
.unlock-actions button { flex: 1; height: 44px; border-radius: 8px; font-size: 15px; }
.unlock-actions .is-primary { background: var(--blue); color: #fff; }
.unlock-actions .is-line { border: 1px solid #dcdee0; color: #4e5969; }
.unlock-actions button:hover { opacity: .92; }

.unlock-demo-tip {
  font-size: 12px; color: #b0b6bf; margin-top: 14px; text-align: center;
}

/* ---------- 注册弹层 ---------- */
.unlock-btn-code {
  height: 42px; border-radius: 8px; font-size: 14px;
  background: #f0f6ff; color: var(--blue); font-weight: 600;
  border: 1px solid rgba(31,118,243,.3);
  transition: background .2s;
}
.unlock-btn-code:hover:not(:disabled) { background: #e3efff; }
.unlock-btn-code:disabled {
  background: #f5f6f8; color: #a5abb4; border-color: #e5e8ec; cursor: not-allowed;
}
.unlock-btn-code.is-sent { background: #f0fbf2; color: #00b42a; border-color: rgba(0,180,42,.3); }

/* ---------- 移动端：注册弹层 ---------- */
@media (max-width: 900px) {
  .unlock-btn-code { width: 104px !important; font-size: 13px; }
  .unlock-dialog h3 { font-size: 17px; }
  .unlock-dialog__desc { font-size: 12.5px; }
}
/* ---------- 播放区遮罩（锁定时） ---------- */
.player-lock-mask {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(8,10,13,.86);
  display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  color: #cfd4da; text-align: center; padding: 24px;
}
.c-video-player-box.is-locked .player-lock-mask { display: flex; }
.player-lock-mask__ico {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.player-lock-mask__title { font-size: 17px; color: #fff; font-weight: 600; }
.player-lock-mask__desc { font-size: 13px; color: #8b929b; max-width: 340px; line-height: 1.7; }
.player-lock-mask__btn {
  margin-top: 6px; height: 38px; padding: 0 24px; border-radius: 19px;
  background: var(--blue); color: #fff; font-size: 14px;
}
.player-lock-mask__btn:hover { background: var(--blue-hover); }

/* ---------- 我的板块（课程介绍内） ---------- */
.myplan-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.myplan-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px;
  display: flex; align-items: center; gap: 16px;
}
.myplan-item.is-unlocked { border-color: rgba(109,220,139,.4); background: rgba(109,220,139,.04); }
.myplan-item__body { flex: 1; min-width: 0; }
.myplan-item__name { font-size: 15px; font-weight: 600; color: #1f2329; margin: 0 0 5px; }
.myplan-item__desc { font-size: 13px; color: var(--text-sub); margin: 0; line-height: 1.6; }
.myplan-item__right { text-align: right; flex-shrink: 0; }
.myplan-item__price { font-size: 20px; font-weight: 700; color: var(--blue); }
.myplan-item__state { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.myplan-item__state.is-ok { color: #00b42a; }
.myplan-item__state.is-warn { color: #ff8f1f; }

@media (max-width: 900px) {
  .learn-bar__in { flex-direction: column; align-items: flex-start; gap: 10px; }
  .unlock-dialog { width: auto; margin: 0 16px; }
  /* 手机端：板块标签压缩为横向紧凑样式，保留信息不隐藏 */
  .chapter-plan-tag {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    margin-right: 6px;
    padding: 2px 7px;
    border-radius: 4px;
    max-width: 46%;
  }
  .chapter-plan-tag b { font-size: 10px; }
  .chapter-plan-tag span { font-size: 10px; }
}