/* PC 课程详情 */
.page-course-detail .pc-main {
  padding: 24px 0 64px;
}

.cd-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.cd-breadcrumb a:hover {
  color: var(--accent);
}

.cd-breadcrumb__sep {
  opacity: 0.5;
}

.cd-breadcrumb__current {
  color: var(--text-secondary);
}

.cd-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.cd-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 视频区 */
.cd-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--primary);
  aspect-ratio: 16 / 9;
}

.cd-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cd-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 50%);
}

.cd-hero__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 28px;
  border: none;
  border-radius: 16px;
  background: rgba(255,255,255,0.95);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-md);
}

.cd-hero__play i {
  font-size: 36px;
  color: var(--accent);
}

.cd-hero__play:hover {
  transform: translate(-50%, -50%) scale(1.04);
}

a.cd-hero__play {
  text-decoration: none;
}

.cd-title-block {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.cd-title {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
}

.cd-school {
  margin: 0 0 8px;
  font-size: 13px;
  color: #2563eb;
  line-height: 1.4;
}

.cd-school a {
  color: inherit;
  text-decoration: none;
}

.cd-school a:hover {
  text-decoration: underline;
}

.cd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.cd-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cd-meta i {
  color: var(--text-muted);
}

.cd-meta .fa-star {
  color: #F59E0B;
}

/* 讲师 */
.cd-teacher {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.cd-teacher__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cd-teacher__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.cd-teacher__head a {
  font-size: 13px;
  color: var(--text-muted);
}

.cd-teacher__head a:hover {
  color: var(--accent);
}

.cd-teacher-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cd-teacher-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.cd-teacher-card__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 28px;
}

.cd-teacher-card__body {
  flex: 1;
  min-width: 0;
}

.cd-teacher-card__name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

.cd-teacher-card__title {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.cd-teacher-card__bio {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Tabs */
.cd-tabs-wrap {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.cd-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
}

.cd-tab {
  padding: 16px 20px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
}

.cd-tab.active {
  color: var(--accent);
  font-weight: 600;
}

.cd-tab.active::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.cd-panel {
  display: none;
  padding: 28px;
}

.cd-panel.active {
  display: block;
}

.cd-intro h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.cd-intro h3:not(:first-child) {
  margin-top: 24px;
}

.cd-intro p {
  margin: 0 0 1em;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.cd-intro p:last-child {
  margin-bottom: 0;
}

.cd-intro img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.cd-intro ul,
.cd-intro ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.cd-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cd-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cd-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* 章节 */
.cd-chapter {
  border-bottom: 1px solid var(--border);
}

.cd-chapter:last-child {
  border-bottom: none;
}

.cd-chapter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.cd-chapter__head:hover {
  color: var(--accent);
}

.cd-chapter__name {
  flex: 1;
  min-width: 0;
}

.cd-chapter__aside,
.cd-chapter__aside span {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

.cd-chapter__aside {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

.cd-chapter__arrow {
  font-size: 12px;
  transition: transform var(--transition);
}

.cd-chapter.is-open .cd-chapter__arrow {
  transform: rotate(180deg);
}

.cd-chapter__body[hidden] {
  display: none;
}

.cd-lesson {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 12px 8px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

a.cd-lesson {
  text-decoration: none;
  color: inherit;
}

a.cd-lesson:hover {
  color: var(--accent);
}

.cd-lesson__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cd-lesson--trial .cd-lesson__icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.cd-lesson--done .cd-lesson__icon {
  background: #dcfce7;
  color: #16a34a;
}

.cd-lesson--doing .cd-lesson__icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.cd-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  flex-shrink: 0;
}

.cd-status--done {
  background: #dcfce7;
  color: #16a34a;
}

.cd-status--doing {
  background: var(--accent-soft);
  color: var(--accent);
}

.cd-status--todo {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.cd-lesson__title {
  flex: 1;
  min-width: 0;
}

.cd-lesson__dur {
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cd-lesson__tag {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

/* 评价 */
.cd-review-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.cd-review-summary__score {
  text-align: center;
}

.cd-review-summary__score strong {
  display: block;
  font-size: 40px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.cd-review-summary__stars {
  color: #F59E0B;
  font-size: 14px;
  margin: 8px 0 4px;
}

.cd-review-summary__count {
  font-size: 13px;
  color: var(--text-muted);
}

.cd-review {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.cd-review:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cd-review__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.cd-review__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.cd-review__name {
  font-size: 14px;
  font-weight: 600;
}

.cd-review__date {
  font-size: 12px;
  color: var(--text-muted);
}

.cd-review__stars {
  color: #F59E0B;
  font-size: 12px;
  margin-left: auto;
}

.cd-review__text {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 右侧购买栏 */
.cd-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.cd-purchase {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}

.cd-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.cd-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
}

.cd-price del {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}

.cd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.cd-tag {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

.cd-tag--commission {
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
}

.cd-tag--commission:hover {
  opacity: 0.85;
}

.cd-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.cd-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
}

.cd-btn--primary {
  background: var(--accent);
  color: #fff;
}

.cd-btn--primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.cd-btn--outline {
  background: var(--bg);
  color: var(--primary);
  border: 1px solid var(--border);
}

.cd-btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cd-btn.is-collected {
  color: #e11d48;
  border-color: #fda4af;
  background: #fff1f2;
}

.cd-sub-actions {
  display: flex;
  gap: 8px;
}

.cd-sub-actions .cd-btn {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 500;
}

.cd-progress {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.cd-progress__head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.cd-progress__head strong {
  color: var(--accent);
}

.cd-progress__bar {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.cd-progress__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

.cd-progress__tip {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.cd-side-list {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.cd-side-list__title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
}

.cd-side-course {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.cd-side-course:first-of-type {
  border-top: none;
  padding-top: 0;
}

.cd-side-course__cover {
  width: 80px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.cd-side-course__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cd-side-course__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cd-side-course__price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* 试看弹窗 */
.cd-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cd-modal[hidden] {
  display: none;
}

.cd-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 35, 50, 0.6);
}

.cd-modal__panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.cd-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.cd-modal__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.cd-modal__close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-subtle);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
}

.cd-modal__body {
  padding: 20px;
}

.cd-trial-screen {
  aspect-ratio: 16 / 9;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 16px;
}

.cd-trial-screen i {
  font-size: 48px;
  color: #fff;
}

.cd-empty-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  padding: 24px 0;
}

.cd-page-empty {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cd-page-empty i {
  font-size: 48px;
  color: var(--text-muted);
  opacity: 0.4;
  margin-bottom: 16px;
}

.cd-page-empty p {
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.cd-page-empty a {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.cd-page-empty a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 1024px) {
  .cd-layout {
    grid-template-columns: 1fr;
  }

  .cd-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .cd-title {
    font-size: 22px;
  }

  .cd-teacher-card {
    flex-direction: column;
    text-align: center;
  }
}
