:root {
  --bg: #06111f;
  --surface: rgba(10, 25, 41, 0.88);
  --surface-strong: #0b1b2d;
  --surface-soft: #0e2237;
  --line: rgba(124, 183, 224, 0.22);
  --line-strong: rgba(42, 210, 255, 0.52);
  --text: #f5f9fd;
  --muted: #9eb0c1;
  --faint: #6f8498;
  --cyan: #28d4ff;
  --lime: #c4ef4a;
  --gold: #f0cf45;
  --danger: #ff6b6b;
  --shadow: 0 24px 68px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(rgba(40, 212, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(40, 212, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
[hidden] { display: none !important; }

.learning-nav {
  position: sticky;
  inset: 0 0 auto;
  z-index: 30;
  min-height: 74px;
  padding: 0 clamp(22px, 3vw, 42px);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(320px, 1fr);
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 13, 24, 0.94);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
.brand span { display: grid; min-width: 0; }
.brand strong { font-size: 16px; white-space: nowrap; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .02em; }

.main-nav { height: 74px; display: flex; align-items: stretch; gap: 32px; }
.main-nav a { position: relative; display: inline-flex; align-items: center; color: #d9e5ef; font-size: 14px; font-weight: 650; white-space: nowrap; }
.main-nav a::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--cyan); opacity: 0; transform: scaleX(.4); transition: .18s ease; }
.main-nav a:hover, .main-nav a.active { color: var(--cyan); }
.main-nav a.active::after { opacity: 1; transform: scaleX(1); }

.nav-actions { justify-self: end; display: flex; align-items: center; gap: 10px; min-width: 0; }
.course-search { width: min(260px, 19vw); min-width: 170px; height: 40px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(13, 30, 49, .72); color: var(--muted); }
.course-search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(40, 212, 255, .1); }
.course-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.course-search input::placeholder { color: #71869a; }
.login-button, .vip-button { min-height: 40px; padding: 0 15px; border-radius: 8px; font-size: 13px; font-weight: 750; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; }
.login-button { border: 1px solid rgba(124, 183, 224, .28); background: transparent; }
.login-button:hover { border-color: var(--cyan); color: var(--cyan); }
.vip-button { border: 1px solid #25b8e7; background: #1bbde9; color: #04111e; }
.vip-button i { color: #fff35a; }

.learning-main { width: min(1440px, 100%); margin: 0 auto; padding: 18px clamp(22px, 3vw, 42px) 42px; }
.channel-tabs { min-height: 54px; display: flex; align-items: center; gap: 34px; overflow-x: auto; scrollbar-width: none; }
.channel-tabs::-webkit-scrollbar { display: none; }
.channel-tabs a, .channel-tabs button { position: relative; min-height: 54px; padding: 0; border: 0; background: transparent; color: #bdcbd8; display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.channel-tabs a::after, .channel-tabs button::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--cyan); transform: scaleX(0); transition: transform .18s ease; }
.channel-tabs a:hover, .channel-tabs button:hover, .channel-tabs .active { color: #fff; }
.channel-tabs .active i { color: var(--cyan); }
.channel-tabs .active::after { transform: scaleX(1); }

.course-feature { display: grid; grid-template-columns: minmax(0, 2.08fr) minmax(340px, .95fr); gap: 14px; }
.feature-player, .lesson-panel, .topic-card, .progress-list, .gateway { border: 1px solid var(--line); background: var(--surface); }
.feature-player { position: relative; min-height: 376px; overflow: hidden; border-radius: 12px; box-shadow: var(--shadow); }
.feature-player > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 14, 25, .97) 0%, rgba(4, 14, 25, .84) 36%, rgba(4,14,25,.18) 74%), linear-gradient(0deg, rgba(4,14,25,.76), transparent 54%); }
.feature-copy { position: relative; z-index: 2; width: min(470px, 58%); min-height: 376px; padding: 74px 0 62px clamp(28px, 4vw, 58px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.feature-label { margin-bottom: 13px; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.feature-copy h1 { margin: 0 0 8px; font-size: clamp(30px, 3vw, 40px); line-height: 1.2; letter-spacing: -.03em; }
.feature-copy p { margin: 0 0 16px; color: #cad7e2; font-size: 18px; }
.feature-meta { display: flex; gap: 9px; color: var(--muted); font-size: 13px; }
.feature-meta span + span::before { content: "·"; margin-right: 9px; color: var(--faint); }
.feature-meta .vip-text { color: var(--lime); }
.play-course { margin-top: 30px; min-height: 46px; padding: 0 20px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--cyan); border-radius: 8px; background: rgba(6, 28, 44, .78); color: #f6fbff; font-size: 14px; font-weight: 750; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.play-course:hover { transform: translateY(-2px); background: rgba(21, 150, 189, .28); }
.play-course i { color: var(--cyan); }
.slider-dots { position: absolute; z-index: 3; inset: auto 50% 15px auto; transform: translateX(50%); display: flex; gap: 7px; }
.slider-dots button { width: 18px; height: 3px; padding: 0; border: 0; border-radius: 4px; background: rgba(255,255,255,.38); cursor: pointer; }
.slider-dots button.active { background: var(--cyan); }

.lesson-panel { min-height: 376px; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.panel-heading { min-height: 58px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 18px; }
.panel-heading span { color: var(--muted); font-size: 12px; }
.catalog-tabs { align-self: stretch; display: flex; gap: 18px; }
.catalog-tabs button { position: relative; border: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 750; cursor: pointer; }
.catalog-tabs button.active { color: #fff; }
.catalog-tabs button.active::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--cyan); }
.lesson-list { flex: 1; padding: 8px 12px; display: grid; align-content: start; gap: 6px; overflow: auto; }
.course-case-list { flex: 1; padding: 10px 12px; display: grid; align-content: start; gap: 8px; overflow: auto; }
.course-case-row { width: 100%; min-height: 58px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(8,24,39,.68); display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; color: var(--text); text-align: left; cursor: pointer; }
.course-case-row:hover { border-color: var(--line-strong); background: rgba(28,75,99,.24); }
.course-case-row > i { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; background: rgba(40,212,255,.1); color: var(--cyan); }
.course-case-row strong,.course-case-row small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-case-row strong { font-size: 12px; }.course-case-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.case-download { display: inline-flex; align-items: center; gap: 5px; color: var(--cyan); font-size: 11px; white-space: nowrap; }
.lesson-row { width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid transparent; border-radius: 7px; background: transparent; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 15px; align-items: center; gap: 8px; color: #d5e0e9; text-align: left; cursor: pointer; }
.lesson-row:hover { background: rgba(38, 203, 246, .07); }
.lesson-row.active { border-color: rgba(40, 212, 255, .68); background: rgba(40, 212, 255, .09); }
.lesson-row .lesson-index { color: var(--muted); font-size: 12px; }
.lesson-row.active .lesson-index { color: var(--cyan); }
.lesson-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 570; }
.lesson-row time, .lesson-row > i { color: var(--muted); font-size: 11px; }
.lesson-row.active > i { color: var(--cyan); }
.view-all { min-height: 38px; border: 0; border-top: 1px solid var(--line); background: transparent; color: #cbd7e0; font-size: 12px; cursor: pointer; }
.view-all:hover { color: var(--cyan); }

.topic-section, .progress-section { margin-top: 18px; }
.section-heading { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-heading h2 { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 18px; }
.section-heading h2 > span { width: 3px; height: 17px; border-radius: 4px; background: var(--lime); }
.section-heading button, .section-heading > a { border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.section-heading button:hover, .section-heading > a:hover { color: var(--cyan); }
.topic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.topic-card { position: relative; min-width: 0; overflow: hidden; border-radius: 10px; cursor: pointer; transition: border-color .18s ease, transform .18s ease; }
.topic-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.topic-visual { position: relative; aspect-ratio: 16/7.5; overflow: hidden; background: var(--surface-strong); }
.topic-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.topic-card:hover img { transform: scale(1.025); }
.topic-duration { position: absolute; inset: auto 8px 7px auto; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.78); font-size: 11px; }
.topic-lock { position: absolute; inset: 10px 10px auto auto; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(5,14,24,.72); display: grid; place-items: center; font-size: 11px; }
.topic-copy { padding: 12px 13px 13px; }
.topic-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.topic-title-row h3 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.vip-chip { flex: 0 0 auto; padding: 1px 5px; border: 1px solid rgba(196, 239, 74, .55); border-radius: 4px; color: var(--lime); font-size: 10px; }
.topic-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.no-results { min-height: 130px; align-items: center; justify-content: center; gap: 9px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }
.no-results:not([hidden]) { display: flex; }

.progress-list { min-height: 82px; padding: 10px; border-radius: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.progress-item { min-width: 0; padding: 5px 8px; display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 11px; }
.progress-item img { width: 92px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.progress-copy { min-width: 0; }
.progress-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.progress-track { height: 4px; margin-top: 12px; border-radius: 4px; background: #1b3141; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--cyan); }
.progress-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.history-empty { grid-column: 1 / -1; min-height: 60px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }

.resource-gateways { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gateway { min-height: 84px; padding: 13px 18px; border-radius: 10px; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; transition: border-color .18s ease, transform .18s ease; }
.gateway:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.gateway-icon { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; font-size: 23px; }
.gateway-icon.pdf { background: #f1f6f9; color: #e53c44; }
.gateway-icon.software { background: #332f89; color: #a9b5ff; }
.gateway-copy { min-width: 0; display: grid; }
.gateway-copy strong { font-size: 15px; }
.gateway-copy small { color: var(--muted); font-size: 11px; }
.gateway-action { color: var(--cyan); font-size: 12px; white-space: nowrap; }
.platforms { display: flex; gap: 12px; padding-right: 14px; border-right: 1px solid var(--line); color: #67c9ff; font-size: 20px; }
.platforms .fa-android { color: #9cdb50; }

.account-menu { position: fixed; z-index: 80; inset: 70px 42px auto auto; width: 220px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #0b1b2d; box-shadow: var(--shadow); }
.account-menu strong, .account-menu span { display: block; }
.account-menu strong { font-size: 14px; }
.account-menu span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.account-menu a, .account-menu button { width: 100%; min-height: 37px; margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { border-color: var(--cyan); color: var(--cyan); }

.modal-layer { position: fixed; z-index: 100; inset: 0; padding: 22px; display: grid; place-items: center; background: rgba(1,7,13,.8); backdrop-filter: blur(12px); }
.modal-card, .video-dialog { position: relative; width: min(420px, 100%); padding: 28px; border: 1px solid var(--line-strong); border-radius: 14px; background: #0a1a2c; box-shadow: var(--shadow); }
.modal-close { position: absolute; inset: 12px 12px auto auto; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.modal-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(40,212,255,.1); color: var(--cyan); font-size: 20px; }
.modal-icon.vip { color: var(--gold); background: rgba(240,207,69,.09); }
.modal-card h2 { margin: 16px 0 6px; font-size: 22px; }
.modal-card > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.modal-card form { display: grid; gap: 12px; }
.modal-card label { display: grid; gap: 6px; color: #d6e1ea; font-size: 12px; }
.modal-card input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: #081523; color: var(--text); }
.modal-card input:focus { border-color: var(--cyan); }
.primary-action { min-height: 44px; border: 1px solid #24bde8; border-radius: 8px; background: #23bce8; color: #04111d; display: flex; align-items: center; justify-content: center; font-weight: 800; cursor: pointer; }
.primary-action:disabled { opacity: .58; cursor: wait; }
.member-link { display: block; margin-top: 14px; color: var(--cyan); text-align: center; font-size: 12px; }
.form-status { min-height: 18px; color: var(--muted); font-size: 11px; }
.form-status.error { color: #ff8d8d; }
.form-status.success { color: #8de7a9; }
.video-dialog { width: min(1160px, 100%); padding: 18px; }
.player-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 18px; }
.video-main { min-width: 0; }
.video-stage { position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: 10px; background: #030914; }
.video-stage video { width: 100%; height: 100%; display: block; object-fit: contain; background: #02060b; }
.video-loading { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; color: #dceafa; text-align: center; background: rgba(2,8,15,.72); }
.video-loading i { color: var(--cyan); font-size: 26px; }
.video-loading[hidden] { display: none; }
.video-info { padding: 16px 4px 2px; }
.video-info h2 { margin: 8px 0 2px; font-size: 20px; }
.video-info p { margin: 0; color: var(--muted); font-size: 12px; }
.video-info small { display: block; min-height: 16px; margin-top: 7px; color: var(--cyan); font-size: 11px; }
.vip-badge { padding: 2px 6px; border: 1px solid rgba(196,239,74,.5); border-radius: 4px; color: var(--lime); font-size: 10px; }
.vip-badge.open { border-color: rgba(40,212,255,.45); color: var(--cyan); }
.player-resources { min-width: 0; padding: 10px 4px 4px; }
.player-resources header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.player-resources h3 { margin: 0; font-size: 16px; }.player-resources header span { color: var(--muted); font-size: 10px; }
.player-resources > p { margin: 12px 0; color: var(--muted); font-size: 11px; }
.player-case-list { display: grid; gap: 8px; max-height: 390px; overflow-y: auto; }
.player-case-item { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(8,24,39,.6); }
.player-case-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.player-case-item small { display: block; margin: 4px 0 9px; color: var(--muted); font-size: 10px; }
.player-case-item button { width: 100%; min-height: 34px; border: 1px solid rgba(40,212,255,.4); border-radius: 7px; background: rgba(40,212,255,.08); color: var(--cyan); font-size: 11px; cursor: pointer; }
.toast { position: fixed; z-index: 120; inset: auto 22px 22px auto; max-width: min(360px, calc(100vw - 44px)); padding: 11px 15px; border: 1px solid var(--line-strong); border-radius: 8px; background: #0b1b2d; box-shadow: var(--shadow); font-size: 12px; }

@media (max-width: 1120px) {
  .learning-nav { grid-template-columns: auto 1fr auto; gap: 16px; }
  .brand span { display: none; }
  .main-nav { justify-content: center; gap: 20px; }
  .course-search { display: none; }
  .course-feature { grid-template-columns: minmax(0, 1.65fr) minmax(310px, .9fr); }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  body { font-size: 14px; background-size: 54px 54px; }
  .learning-nav { position: relative; min-height: 64px; padding: 0 14px; grid-template-columns: auto 1fr auto; gap: 10px; }
  .brand img { width: 40px; height: 40px; border-radius: 9px; }
  .main-nav { position: absolute; z-index: 2; inset: 64px 0 auto; height: 47px; padding: 0 14px; justify-content: flex-start; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--line); background: #071523; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { font-size: 13px; }
  .main-nav a::after { height: 2px; }
  .nav-actions { gap: 7px; }
  .login-button, .vip-button { min-height: 38px; padding: 0 11px; }
  .login-button span { display: none; }
  .learning-main { padding: 52px 14px 28px; }
  .channel-tabs { gap: 25px; min-height: 52px; }
  .channel-tabs a, .channel-tabs button { min-height: 52px; font-size: 14px; }
  .course-feature { grid-template-columns: minmax(0, 1fr); }
  .feature-player { min-height: 350px; }
  .feature-copy { width: 74%; min-height: 350px; padding: 70px 0 54px 24px; }
  .feature-copy h1 { font-size: 30px; }
  .feature-copy p { font-size: 15px; }
  .lesson-panel { min-height: 340px; }
  .player-layout { grid-template-columns: minmax(0,1fr); }
  .player-resources { padding-top: 0; }
  .player-case-list { max-height: 230px; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-gateways { grid-template-columns: minmax(0, 1fr); }
  .account-menu { inset: 58px 14px auto auto; }
}

@media (max-width: 560px) {
  .vip-button { font-size: 12px; }
  .vip-button i { display: none; }
  .feature-player { min-height: 328px; }
  .feature-shade { background: linear-gradient(90deg, rgba(4,14,25,.96), rgba(4,14,25,.58) 72%, rgba(4,14,25,.18)), linear-gradient(0deg, rgba(4,14,25,.88), transparent 60%); }
  .feature-copy { width: 90%; min-height: 328px; padding: 54px 20px 52px; }
  .feature-copy h1 { font-size: 26px; }
  .play-course { margin-top: 23px; min-height: 44px; }
  .topic-grid { grid-template-columns: minmax(0, 1fr); }
  .topic-visual { aspect-ratio: 16/8; }
  .progress-item { grid-template-columns: 84px minmax(0, 1fr); }
  .progress-item img { width: 84px; }
  .gateway { grid-template-columns: 46px minmax(0, 1fr) auto; padding: 12px; gap: 10px; }
  .gateway-icon { width: 42px; height: 42px; font-size: 20px; }
  .gateway-action { grid-column: 2 / -1; justify-self: start; }
  .platforms { display: none; }
  .modal-layer { padding: 14px; }
  .modal-card { padding: 24px 20px; }
  .video-dialog { padding: 12px; }
  .catalog-tabs { gap: 12px; }
  .catalog-tabs button { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
