/* PC 课程播放页 */
.page-course-play .pc-main {
  padding: 24px 0 64px;
}

.cp-breadcrumb,
.page-course-play .cd-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.page-course-play .cd-breadcrumb a:hover {
  color: var(--accent);
}

.page-course-play .cd-breadcrumb__sep {
  opacity: 0.5;
}

.page-course-play .cd-breadcrumb__current {
  color: var(--text-secondary);
}

.cp-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.cp-player-wrap {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.cp-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.65);
}

.cp-screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.cp-screen__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.cp-screen__lock {
  font-size: 48px;
  color: rgba(255, 255, 255, 0.8);
}

.cp-screen__buy {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 8px;
  background: #fff;
  color: #6b2424;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  z-index: 2;
}

.cp-screen__buy:hover {
  color: #6b2424;
  opacity: 0.92;
}

.cp-screen__play {
  position: relative;
  z-index: 2;
  border: none;
  background: none;
  padding: 0;
  color: #fff;
  font-size: 64px;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
}

.cp-screen__play.is-playing {
  opacity: 0;
}

.cp-screen:hover .cp-screen__play.is-playing {
  opacity: 1;
}

.cp-screen__play:hover {
  transform: scale(1.06);
}

.cp-screen__tip {
  margin: 0;
  font-size: 14px;
}

.cp-screen__actions {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

.cp-screen__action {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.cp-screen__action:hover {
  background: rgba(0, 0, 0, 0.65);
}

.cp-screen__action--done {
  color: #4ADE80;
}

.cp-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 12px;
  background: #111;
}

.cp-progress__track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

.cp-progress__played {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0;
}

.cp-progress__time {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  font-variant-numeric: tabular-nums;
}

.cp-info {
  margin-top: 20px;
  padding: 20px 24px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.cp-info__course {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.cp-info__school {
  margin: 0 0 4px;
  font-size: 13px;
  color: #2563eb;
}

.cp-info__school a {
  color: inherit;
  text-decoration: none;
}

.cp-info__school a:hover {
  text-decoration: underline;
}

.cp-info__title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.cp-info__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cp-info__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}

.cp-info__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cp-info__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cp-info__btn--primary:hover {
  opacity: 0.92;
  color: #fff;
}

.cp-info__btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.cp-info__nav {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* 侧栏 */
.cp-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.cp-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.cp-tab {
  flex: 1;
  padding: 14px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
}

.cp-tab.active {
  color: var(--accent);
  font-weight: 600;
}

.cp-tab.active::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.cp-panel {
  display: none;
  max-height: calc(100vh - var(--header-h) - 120px);
  overflow-y: auto;
}

.cp-panel.active {
  display: block;
}

.cp-panel--chapters {
  padding: 8px 0;
}

.cp-chapter__title {
  padding: 10px 20px 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.cp-lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 20px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.cp-lesson:hover:not(:disabled) {
  background: var(--bg-subtle);
}

.cp-lesson:disabled {
  cursor: default;
  opacity: 0.55;
}

.cp-lesson--playing {
  background: var(--accent-soft);
}

.cp-lesson__icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cp-lesson--trial .cp-lesson__icon,
.cp-lesson--unlocked .cp-lesson__icon,
.cp-lesson--playing .cp-lesson__icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.cp-lesson--completed .cp-lesson__icon {
  color: #16A34A;
  background: rgba(22, 163, 74, 0.1);
}

.cp-lesson__body {
  flex: 1;
  min-width: 0;
}

.cp-lesson__name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 2px;
}

.cp-lesson--playing .cp-lesson__name {
  color: var(--accent);
}

.cp-lesson__meta {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.cp-lesson__badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

.cp-lesson__badge--playing {
  background: var(--accent);
  color: #fff;
}

.cp-panel--notes {
  padding: 20px;
}

.cp-note-head {
  margin-bottom: 12px;
}

.cp-note-head__label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cp-note-head__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.cp-note-input {
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  margin-bottom: 12px;
}

.cp-note-input:focus {
  outline: none;
  border-color: var(--accent);
}

.cp-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 8px;
  background: rgba(26, 35, 50, 0.92);
  color: #fff;
  font-size: 14px;
  z-index: 300;
  pointer-events: none;
}

.cp-toast[hidden] {
  display: none;
}

@media (max-width: 1024px) {
  .cp-layout {
    grid-template-columns: 1fr;
  }

  .cp-sidebar {
    position: static;
  }

  .cp-panel {
    max-height: 420px;
  }
}

@media (max-width: 640px) {
  .cp-info__nav {
    margin-left: 0;
    width: 100%;
  }

  .cp-info__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cp-info__nav .cp-info__btn {
    flex: 1;
  }
}
