/* 实训中心课程下钻 — 设计稿 114:2154 */

.root[data-name="实训中心-二级"] {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.root[data-name="实训中心-二级"] .main.pcourse-main {
  overflow: auto;
}

.pcourse-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 24px;
  padding-bottom: 24px;
}

.pcourse {
  width: 100%;
  max-width: var(--content-max, 75rem);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

/* —— 面包屑 —— */
.pcourse-crumb {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: var(--practice-crumb-back-size);
}

.pcourse-crumb__back {
  flex: 0 0 auto;
  width: var(--practice-crumb-back-size);
  height: var(--practice-crumb-back-size);
  border-radius: var(--practice-crumb-back-radius);
  border: 1px solid rgba(21, 247, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(21, 247, 255, 0.16) 0%, rgba(21, 247, 255, 0.06) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  padding: var(--practice-crumb-back-padding);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 3px 10px rgba(0, 0, 0, 0.14);
  transition:
    background 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.pcourse-crumb__back:hover {
  background:
    linear-gradient(145deg, rgba(21, 247, 255, 0.24) 0%, rgba(21, 247, 255, 0.1) 100%);
  border-color: rgba(21, 247, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 6px 16px rgba(21, 247, 255, 0.14);
  transform: translateX(-1px);
}

.pcourse-crumb__back-icon {
  width: var(--practice-crumb-back-icon-box);
  height: var(--practice-crumb-back-icon-box);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pcourse-crumb__back-icon svg {
  width: var(--practice-crumb-back-arrow-w);
  height: var(--practice-crumb-back-arrow-h);
  display: block;
}

.pcourse-breadcrumb {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  min-width: 0;
  font-size: 14px;
  line-height: 22px;
}

.pcourse-breadcrumb__link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

.pcourse-breadcrumb__link:hover {
  color: #15f7ff;
}

.pcourse-breadcrumb__sep {
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.35);
}

.pcourse-breadcrumb__current {
  color: #15f7ff;
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(21, 247, 255, 0.25);
}

.pcourse-breadcrumb__text {
  color: #ffffff;
  white-space: nowrap;
}

/* —— 课程信息 Hero —— */
.pcourse-hero {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 123px;
  padding: 26px 28px;
  border-radius: 18px;
  border: 1px solid rgba(21, 247, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
    linear-gradient(105deg, #165c78 0%, #1b2a9a 48%, #1906ac 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 16px 40px rgba(8, 12, 40, 0.28);
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
}

.pcourse-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 80% at 92% 20%, rgba(21, 247, 255, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 40% 70% at 8% 90%, rgba(167, 139, 250, 0.16) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.pcourse-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(21, 247, 255, 0.55) 20%,
    rgba(185, 138, 255, 0.5) 50%,
    rgba(21, 247, 255, 0.55) 80%,
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

.pcourse-hero__icon {
  position: relative;
  z-index: 1;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(120, 255, 210, 0.38) 0%, rgba(83, 255, 201, 0.14) 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  box-shadow:
    0 8px 22px rgba(21, 247, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.pcourse-hero__icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.pcourse-hero__info {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pcourse-hero__title {
  margin: 0;
  font-size: 22px;
  line-height: 30px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.pcourse-hero__majors {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: 22px;
  color: rgba(255, 255, 255, 0.9);
}

.pcourse-hero__majors > span {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pcourse-hero__sep {
  display: none;
}

/* —— 任务列表容器 —— */
.pcourse-tasks {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px;
  box-sizing: border-box;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(165deg, rgba(40, 150, 160, 0.2) 0%, rgba(18, 50, 78, 0.28) 100%);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  overflow: auto;
}

.pcourse-tasks::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(165deg, rgba(0, 0, 0, 0.55) 0%, transparent 72%);
  opacity: 0.85;
}

.pcourse-tasks::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(21, 247, 255, 0.45) 22%,
    rgba(185, 138, 255, 0.4) 50%,
    rgba(21, 247, 255, 0.45) 78%,
    transparent
  );
}

/* —— 任务卡片 —— */
.pcourse-task {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  min-height: 0;
  border-radius: 16px;
  border: 1px solid rgba(21, 247, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 36%),
    linear-gradient(115deg, #111a52 6%, #165c78 100%);
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.2);
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.pcourse-task:hover {
  transform: translateY(-2px);
  border-color: rgba(21, 247, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 16px 40px rgba(0, 0, 0, 0.26),
    0 0 28px rgba(21, 247, 255, 0.08);
}

.pcourse-task__cover {
  --pcourse-cover-ratio: 16 / 9;
  flex: 0 0 auto;
  width: clamp(10.25rem, 17vw, 12.25rem);
  aspect-ratio: var(--pcourse-cover-ratio);
  align-self: center;
  margin: 14px 0 14px 14px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pcourse-task__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(145deg, transparent 55%, rgba(17, 26, 82, 0.35) 100%),
    linear-gradient(180deg, transparent 62%, rgba(8, 12, 40, 0.22) 100%);
  z-index: 1;
}

.pcourse-hero__status {
  margin: 0.375rem 0 0;
  font-size: var(--practice-font-12, 12px);
  line-height: var(--practice-lh-12, 20px);
  font-weight: 600;
}

.pcourse-status {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  margin: 0;
  min-height: 1.25rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 600;
  background: rgba(8, 14, 36, 0.72);
}

.pcourse-status--doing,
.pcourse-hero__status.pcourse-status--doing {
  color: var(--practice-cyan, #15f7ff);
}

.pcourse-status--done,
.pcourse-hero__status.pcourse-status--done {
  color: var(--practice-green, #34d399);
}

.pcourse-status--todo,
.pcourse-hero__status.pcourse-status--todo {
  color: var(--practice-text-muted, rgba(255, 255, 255, 0.55));
}

.pcourse-task__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease;
  filter: saturate(1.06) contrast(1.03);
}

.pcourse-task:hover .pcourse-task__cover img {
  transform: scale(1.06);
}

.pcourse-task__body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 16px 20px 16px 18px;
}

.pcourse-task__body::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.14) 30%,
    rgba(21, 247, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.14) 70%,
    transparent
  );
  pointer-events: none;
}

.pcourse-task__title {
  margin: 0;
  padding: 2px 0 14px;
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pcourse-task__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 0 0;
  margin: 0;
}

/* —— 操作按钮 —— */
.pcourse-action {
  --pa-accent: #15f7ff;
  --pa-glow: rgba(21, 247, 255, 0.28);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.02) 42%, transparent 100%),
    linear-gradient(135deg, rgba(21, 247, 255, 0.14) 0%, rgba(89, 48, 232, 0.1) 100%),
    rgba(6, 18, 42, 0.62);
  color: rgba(255, 255, 255, 0.94);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 4px 14px rgba(0, 0, 0, 0.2);
  transition:
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms ease,
    box-shadow 200ms ease,
    background 200ms ease,
    color 200ms ease;
}

.pcourse-action::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(90% 120% at 8% 0%, var(--pa-glow), transparent 58%);
  opacity: 0.75;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.pcourse-action::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(21, 247, 255, 0.12);
  opacity: 0.85;
}

a.pcourse-action {
  box-sizing: border-box;
}

.pcourse-action__text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pcourse-action__ai {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #031018;
  background: linear-gradient(118deg, #15f7ff 0%, #6ef7c8 52%, #b794f6 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 2px 8px rgba(21, 247, 255, 0.35);
}

.pcourse-action__name {
  white-space: nowrap;
  font-weight: 500;
}

.pcourse-action__arrow {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pa-accent);
  opacity: 0.88;
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
}

.pcourse-action__arrow svg {
  width: 18px;
  height: 18px;
  display: block;
}

.pcourse-action:hover {
  transform: translateY(-1px);
  border-color: rgba(21, 247, 255, 0.45);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 8px 22px rgba(0, 0, 0, 0.26),
    0 0 20px rgba(21, 247, 255, 0.14);
}

.pcourse-action:hover::before {
  opacity: 1;
}

.pcourse-action:active {
  transform: translateY(0);
}

.pcourse-action:hover .pcourse-action__arrow {
  transform: translateX(3px);
  opacity: 1;
}

.pcourse-action:focus-visible {
  outline: 2px solid #15f7ff;
  outline-offset: 2px;
}

.pcourse-action--graph {
  --pa-accent: #22d3ee;
  --pa-glow: rgba(34, 211, 238, 0.32);
}

.pcourse-action--graph::after {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.16);
}

.pcourse-action--sim {
  --pa-accent: #c4b5fd;
  --pa-glow: rgba(196, 181, 253, 0.28);
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 42%, transparent 100%),
    linear-gradient(135deg, rgba(167, 139, 250, 0.16) 0%, rgba(21, 247, 255, 0.06) 100%),
    rgba(10, 14, 40, 0.62);
}

.pcourse-action--sim::after {
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.18);
}

.pcourse-action--sim .pcourse-action__ai {
  background: linear-gradient(118deg, #ddd6fe 0%, #5eead4 48%, #15f7ff 100%);
}

.pcourse-action--sim:hover {
  border-color: rgba(196, 181, 253, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 8px 22px rgba(0, 0, 0, 0.26),
    0 0 20px rgba(167, 139, 250, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  .pcourse-action,
  .pcourse-action__arrow,
  .pcourse-task,
  .pcourse-task__cover img,
  .pcourse-crumb__back {
    transition: none;
  }

  .pcourse-action:hover,
  .pcourse-task:hover,
  .pcourse-crumb__back:hover {
    transform: none;
  }

  .pcourse-action:hover .pcourse-action__arrow {
    transform: none;
  }

  .pcourse-task:hover .pcourse-task__cover img {
    transform: none;
  }
}

@media (max-width: 1440px) {
  .pcourse {
    gap: 20px;
  }

  .pcourse-hero {
    gap: 14px;
    padding: 20px 18px;
    min-height: 0;
  }

  .pcourse-hero__title {
    font-size: 18px;
    line-height: 26px;
  }

  .pcourse-tasks {
    padding: 16px;
    gap: 14px;
  }

  .pcourse-task__cover {
    width: clamp(9rem, 20vw, 11rem);
    margin: 12px 0 12px 12px;
  }

  .pcourse-task__body {
    padding: 12px 16px 12px 14px;
  }

  .pcourse-task__title {
    font-size: 16px;
    line-height: 24px;
    padding-bottom: 12px;
  }

  .pcourse-task__actions {
    padding-top: 12px;
    gap: 8px;
  }

  .pcourse-action {
    min-width: 0;
    padding: 0 14px;
    height: 44px;
    font-size: 16px;
    line-height: 24px;
    gap: 8px;
  }
}

@media (max-width: 960px) {
  .pcourse-hero {
    align-items: flex-start;
  }

  .pcourse-task {
    flex-direction: column;
    align-items: stretch;
  }

  .pcourse-task__cover {
    width: auto;
    margin: 12px 12px 0;
    max-height: 12.5rem;
  }

  .pcourse-task__cover::after {
    background: linear-gradient(180deg, transparent 45%, rgba(17, 26, 82, 0.5) 100%);
  }

  .pcourse-task__body::before {
    display: none;
  }

  .pcourse-task__body {
    padding: 14px 16px 16px;
  }

  .pcourse-task__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .pcourse-action {
    flex: 1 1 auto;
  }
}

@media (max-width: 560px) {
  .pcourse-task__actions {
    grid-template-columns: 1fr;
  }

  .pcourse-action {
    flex: 1 1 auto;
  }
}
