/* ================= 设计系统 ================= */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #0e1524;
  --ink-2: #3b4557;
  --muted: #6b7688;
  --line: #e8ebf0;
  --line-strong: #d8dde6;
  --brand: #2b5cff;
  --brand-deep: #1c44d6;
  --brand-soft: #edf1ff;
  --ok: #12a05c;
  --ok-soft: #e7f7ef;
  --warn: #c2760a;
  --warn-soft: #fdf3e2;
  --danger: #d92d20;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 21, 36, 0.05);
  --shadow: 0 2px 6px rgba(14, 21, 36, 0.05), 0 12px 32px -16px rgba(14, 21, 36, 0.22);
  --shadow-lg: 0 24px 64px -24px rgba(14, 21, 36, 0.28);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.28;
}
p {
  margin: 0;
}
::selection {
  background: rgba(43, 92, 255, 0.16);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================= 按钮 ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 550;
  white-space: nowrap;
  transition: border-color 0.16s, background 0.16s, transform 0.12s, box-shadow 0.16s, color 0.16s;
}
.btn:hover {
  border-color: #c3cbd8;
  background: #fbfcfe;
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(43, 92, 255, 0.28), 0 6px 16px -8px rgba(43, 92, 255, 0.6);
}
.btn--primary:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn--ghost:hover {
  background: rgba(14, 21, 36, 0.05);
  border-color: transparent;
}
.btn--sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
  border-radius: 8px;
}
.btn--block {
  width: 100%;
}
.btn--danger {
  color: var(--danger);
  border-color: #f3c9c5;
}
.btn--danger:hover {
  background: #fdf1f0;
  border-color: #eab3ae;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.link {
  color: var(--brand);
  font-weight: 550;
}
.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ================= 表单 ================= */
.field {
  display: block;
  margin-bottom: 16px;
}
.field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-2);
}
.input,
select.input,
textarea.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color 0.16s, box-shadow 0.16s;
}
textarea.input {
  height: auto;
  min-height: 110px;
  padding: 11px 14px;
  resize: vertical;
  line-height: 1.6;
}
.input:focus,
select.input:focus,
textarea.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(43, 92, 255, 0.14);
}
.input::placeholder {
  color: #a3acbb;
}
.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
}
.err {
  color: var(--danger);
  font-size: 13.5px;
  line-height: 1.5;
  min-height: 20px;
  margin-bottom: 4px;
}
.err:not(:empty) {
  background: #fef1f0;
  border: 1px solid #f5c6c2;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
}

/* ================= 品牌标识 ================= */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, #2b5cff, #7a4dff);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px -4px rgba(43, 92, 255, 0.7);
}
.logo-mark::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 7px solid #fff;
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
  margin-left: 2px;
}

/* ================= 顶栏 ================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.topbar__nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.topbar__nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
  font-weight: 500;
}
.topbar__nav a:hover {
  background: rgba(14, 21, 36, 0.05);
  color: var(--ink);
}
.topbar__nav a.is-active {
  color: var(--brand);
  background: var(--brand-soft);
}
.topbar__spacer {
  flex: 1;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 650;
  font-size: 13px;
  border: 1px solid rgba(43, 92, 255, 0.16);
}
.usermenu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13.5px;
  color: var(--ink-2);
}
.usermenu:hover {
  border-color: var(--line-strong);
}
/* 登录态右上：头像 + 修改密码 + 退出登录 横排，窄屏自动换行 */
#navAuth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ================= 首页 Hero ================= */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 40% 30% -20%;
  background: radial-gradient(closest-side, rgba(43, 92, 255, 0.12), transparent);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 76px 0 84px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: 46px;
  line-height: 1.16;
  margin: 20px 0 18px;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #2b5cff, #7a4dff 60%, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 480px;
}
.hero__cta {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.hero__meta {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero__meta div b {
  display: block;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.hero__meta div span {
  font-size: 12.5px;
  color: var(--muted);
}

/* Hero 预览卡片 */
.preview {
  position: relative;
  border-radius: 20px;
  background: #0d1424;
  padding: 14px;
  box-shadow: var(--shadow-lg);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}
.preview__screen {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: linear-gradient(150deg, #1b2a4a, #0e1524 70%);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.preview__screen::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(43, 92, 255, 0.7), transparent);
  filter: blur(6px);
}
.play-btn {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
}
.play-btn::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 16px solid #0e1524;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 5px;
}
.preview__bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  z-index: 1;
}
.preview__bar i {
  display: block;
  height: 100%;
  width: 42%;
  border-radius: 4px;
  background: #fff;
}
.preview__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 6px 4px;
  color: #cfd7e6;
  font-size: 13px;
}
.preview__foot b {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.badge-float {
  position: absolute;
  right: -18px;
  bottom: 44px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 15px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  transform: rotate(2deg);
}
.badge-float b {
  font-size: 15px;
}
.dot-ok {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

/* ================= 通用区块 ================= */
.section {
  padding: 72px 0;
}
.section--tight {
  padding: 48px 0;
}
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section__head h2 {
  font-size: 26px;
}
.section__head p {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 6px;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 18px;
}
.feature h3 {
  font-size: 16px;
  margin-bottom: 6px;
}
.feature p {
  color: var(--muted);
  font-size: 14px;
}

/* ================= 课程卡片 ================= */
.grid-courses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 20px;
}
.ccard {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.ccard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #dfe5ef;
}
.ccard__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: #fff;
  overflow: hidden;
}
.ccard__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ccard__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 20, 0.05) 30%, rgba(6, 10, 20, 0.62));
}
.ccard__cover .t {
  position: relative;
  z-index: 1;
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ccard__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.02em;
}
.ccard__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.ccard__desc {
  color: var(--muted);
  font-size: 13.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.ccard__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.ccard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.price {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.price--free {
  color: var(--ok);
}

/* 进度条 */
.bar {
  height: 6px;
  border-radius: 99px;
  background: #eceff4;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2b5cff, #6a8bff);
  transition: width 0.4s ease;
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 64px 20px;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty b {
  display: block;
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 6px;
}

/* ================= 页面标题条 ================= */
.pagehead {
  padding: 34px 0 26px;
}
.pagehead h1 {
  font-size: 27px;
}
.pagehead p {
  color: var(--muted);
  margin-top: 6px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 34px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat span {
  font-size: 12.5px;
  color: var(--muted);
}
.stat b {
  display: block;
  font-size: 25px;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.stat b small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 3px;
}

/* ================= 登录页 ================= */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.auth__aside {
  position: relative;
  background: #0b1120;
  color: #fff;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth__aside::before,
.auth__aside::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.auth__aside::before {
  width: 460px;
  height: 460px;
  right: -140px;
  top: -120px;
  background: radial-gradient(closest-side, rgba(43, 92, 255, 0.55), transparent);
}
.auth__aside::after {
  width: 380px;
  height: 380px;
  left: -120px;
  bottom: -140px;
  background: radial-gradient(closest-side, rgba(122, 77, 255, 0.45), transparent);
}
.auth__aside > * {
  position: relative;
  z-index: 1;
}
.auth__aside h2 {
  font-size: 34px;
  line-height: 1.3;
  max-width: 400px;
  letter-spacing: -0.025em;
}
.auth__aside .quote {
  color: #a8b3c7;
  font-size: 14.5px;
  max-width: 380px;
  margin-top: 16px;
}
.auth__points {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}
.auth__points div {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 14px;
  color: #cdd6e6;
}
.auth__points i {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-style: normal;
  margin-top: 2px;
}
.auth__main {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: #fff;
}
.auth__box {
  width: 100%;
  max-width: 372px;
}
.auth__box h1 {
  font-size: 25px;
  margin-bottom: 8px;
}
.auth__box > p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f2f4f8;
  border-radius: 11px;
  margin-bottom: 24px;
}
.tabs button {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 550;
}
.tabs button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ================= 播放页 ================= */
.player-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  gap: 0;
  min-height: calc(100vh - 64px);
}
.player-main {
  padding: 22px 28px 40px;
  min-width: 0;
}
.video-frame {
  position: relative;
  background: #0a0f1a;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}
.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #0a0f1a;
  object-fit: contain;
}
/* 播放水印：账号尾号 + 时间，半透明缓慢漂移，防录屏外传 */
.video-wm {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  animation: wm-drift 42s ease-in-out infinite alternate;
}
.video-wm span {
  position: absolute;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.6px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.13);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.55);
  transform: rotate(-20deg);
}
@keyframes wm-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-26px, 22px, 0); }
}
@media (max-width: 640px) {
  .video-wm span { font-size: 10px; letter-spacing: 0.4px; }
}
@media (prefers-reduced-motion: reduce) {
  .video-wm { animation: none; }
}
.video-frame:fullscreen,
.video-frame:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
}
.video-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 22, 0.88);
  color: #cfd7e6;
  text-align: center;
  padding: 32px;
  backdrop-filter: blur(4px);
}
.video-veil h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 8px;
}
.video-veil p {
  font-size: 13.5px;
  max-width: 380px;
  margin: 0 auto 16px;
}
.video-info {
  margin-top: 22px;
}
.video-info h1 {
  font-size: 21px;
}
.video-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
}
.video-crumb a:hover {
  color: var(--brand);
}
.video-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.video-note {
  margin-top: 22px;
  padding: 15px 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.video-note b {
  color: var(--ink-2);
}

.outline {
  background: #fff;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
}
.outline__head {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
}
.outline__head h3 {
  font-size: 15.5px;
  line-height: 1.4;
}
.outline__head .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.outline__list {
  overflow-y: auto;
  padding: 8px 10px 24px;
  flex: 1;
}
.chapter {
  padding: 14px 10px 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 13.8px;
  transition: background 0.14s;
}
.lesson:hover {
  background: #f6f8fb;
}
.lesson.is-active {
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 550;
}
.lesson.is-locked {
  color: #9aa4b3;
  cursor: not-allowed;
}
.lesson.is-locked:hover {
  background: transparent;
}
.lesson__idx {
  flex: none;
  width: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.lesson.is-active .lesson__idx {
  color: var(--brand);
}
.lesson__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lesson__dur {
  flex: none;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.lesson__done {
  flex: none;
  color: var(--ok);
  font-size: 12px;
}

/* ================= 后台 ================= */
.admin {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.side {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side__brand {
  padding: 4px 10px 18px;
}
.side a.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}
.side a.nav-item:hover {
  background: #f5f7fa;
}
.side a.nav-item.is-active {
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 600;
}
.side__foot {
  margin-top: auto;
  padding: 12px 10px 4px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.main {
  padding: 26px 30px 60px;
  min-width: 0;
}
.main__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.main__head h1 {
  font-size: 22px;
}
.main__head p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card__head h3 {
  font-size: 15px;
}
.card__body {
  padding: 20px;
}
.card__body--flush {
  padding: 0;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px 18px;
}
.kpi span {
  font-size: 12.5px;
  color: var(--muted);
}
.kpi b {
  display: block;
  font-size: 23px;
  letter-spacing: -0.02em;
  margin-top: 2px;
}

table.tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.tb th {
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--muted);
  padding: 11px 16px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tb td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f2f6;
  vertical-align: middle;
}
table.tb tr:last-child td {
  border-bottom: 0;
}
table.tb tr:hover td {
  background: #fbfcfe;
}
.tb__actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: #f1f3f7;
  color: var(--ink-2);
  white-space: nowrap;
}
.chip--ok {
  background: var(--ok-soft);
  color: #0b7a45;
}
.chip--warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.chip--brand {
  background: var(--brand-soft);
  color: var(--brand-deep);
}
.chip--muted {
  background: #f1f3f7;
  color: var(--muted);
}

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 28, 0.45);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  z-index: 90;
  padding: 24px;
  animation: fade 0.16s ease;
}
.modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.modal--wide {
  max-width: 760px;
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 0;
}
.modal__head h3 {
  font-size: 17px;
}
.modal__body {
  padding: 18px 22px;
}
.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 22px 20px;
}
.x-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.x-btn:hover {
  background: #f2f4f8;
  color: var(--ink);
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

/* Toast */
.toast-box {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  align-items: center;
}
.toast {
  padding: 11px 18px;
  border-radius: 10px;
  background: #101828;
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s, transform 0.24s;
  max-width: 90vw;
}
.toast.is-in {
  opacity: 1;
  transform: translateY(0);
}
.toast--error {
  background: #b42318;
}
.toast--ok {
  background: #0b7a45;
}

/* 404 */
.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px;
}
.center-page h1 {
  font-size: 64px;
  letter-spacing: -0.04em;
  color: var(--brand);
}
.center-page p {
  color: var(--muted);
  margin: 10px 0 24px;
}

/* 页脚 */
.foot {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 34px 0;
  color: var(--muted);
  font-size: 13px;
}
.foot__inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

/* ================= 响应式 ================= */
@media (max-width: 1080px) {
  .player-shell {
    grid-template-columns: 1fr;
  }
  .outline {
    position: static;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    padding: 48px 0 56px;
    gap: 36px;
  }
  .hero h1 {
    font-size: 34px;
  }
  .preview {
    transform: none;
  }
  .badge-float {
    right: 8px;
    bottom: -12px;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth__aside {
    display: none;
  }
  .admin {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
  }
  .side__brand,
  .side__foot {
    display: none;
  }
  .side a.nav-item {
    white-space: nowrap;
  }
  .main {
    padding: 18px 16px 48px;
  }
  .topbar__nav {
    display: none;
  }
  .hero__meta {
    gap: 20px;
  }
}
@media (max-width: 620px) {
  .player-main {
    padding: 14px 14px 28px;
  }
  .container {
    padding: 0 16px;
  }
  .section {
    padding: 48px 0;
  }
}
