:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0d1b2c;
  --panel-soft: #112238;
  --line: rgba(255, 255, 255, .09);
  --text: #f3f7fb;
  --muted: #9aadc2;
  --cyan: #59e1da;
  --cyan-deep: #20b9b6;
  --amber: #ffc56e;
  --danger: #ff858f;
  --radius: 22px;
  --shadow: 0 30px 80px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(36, 189, 186, .15), transparent 34rem),
    radial-gradient(circle at 88% 12%, rgba(255, 197, 110, .1), transparent 29rem),
    var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.65;
}

a { color: inherit; }
button { font: inherit; }
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, .84);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #041313;
  background: linear-gradient(135deg, var(--cyan), #b8fff4);
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(89, 225, 218, .2);
}
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { font-size: 16px; letter-spacing: .04em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.header-links { display: flex; align-items: center; gap: 22px; }
.header-links a { color: var(--muted); font-size: 14px; text-decoration: none; }
.header-links a:hover { color: var(--text); }
.header-links .back-link {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
}

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero {
  min-height: 510px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: 70px;
  align-items: center;
  padding: 78px 0 70px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}
.service-notice { max-width: 660px; align-items: flex-start; line-height: 1.7; letter-spacing: .03em; text-transform: none; }
.service-notice i { flex: 0 0 auto; margin-top: .55em; }
.service-notice strong { color: #fff; letter-spacing: .04em; }
.hero h1 {
  max-width: 820px;
  margin: 22px 0 22px;
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.13;
  letter-spacing: -.045em;
}
.hero h1 em { color: var(--cyan); font-style: normal; }
.hero-copy > p { max-width: 710px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; }
.primary-action, .secondary-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.primary-action { color: #041313; background: var(--cyan); }
.secondary-action { border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.03); }
.primary-action:hover, .secondary-action:hover { transform: translateY(-1px); }
.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(89,225,218,.13), rgba(255,255,255,.025));
  box-shadow: var(--shadow);
}
.hero-card::before {
  position: absolute;
  width: 220px;
  height: 220px;
  top: -90px;
  right: -70px;
  border: 1px solid rgba(89,225,218,.25);
  border-radius: 50%;
  content: "";
}
.hero-card-number { color: var(--cyan); font-size: 78px; font-weight: 900; line-height: .9; }
.hero-card strong { margin-top: 16px; font-size: 19px; }
.hero-card > span { color: var(--muted); font-size: 13px; }
.signal { display: flex; align-items: flex-end; gap: 5px; height: 24px; margin-top: 24px; }
.signal b { width: 5px; border-radius: 9px; background: var(--cyan); }
.signal b:nth-child(1) { height: 7px; opacity: .4; }
.signal b:nth-child(2) { height: 12px; opacity: .6; }
.signal b:nth-child(3) { height: 18px; opacity: .8; }
.signal b:nth-child(4) { height: 24px; }

.tutorial-shell {
  margin-bottom: 80px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 22, 38, .88);
  box-shadow: var(--shadow);
  scroll-margin-top: 92px;
}
.tabs {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
  cursor: pointer;
}
.tab.is-active { color: var(--text); background: var(--panel-soft); }
.tab-icon { color: var(--cyan); font-size: 12px; }
.tab-panel { animation: fade-in .25s ease both; }
@keyframes fade-in { from { opacity: .3; transform: translateY(4px); } }
.video-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: 660px; }
.playlist { border-right: 1px solid var(--line); padding: 20px; }
.playlist-heading { display: flex; align-items: center; justify-content: space-between; padding: 3px 5px 16px; }
.playlist-heading span { font-weight: 800; }
.playlist-heading small { color: var(--muted); }
.playlist-items { display: grid; gap: 8px; }
.lesson-button {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.lesson-button:hover { background: rgba(255,255,255,.035); }
.lesson-button.is-active { border-color: rgba(89,225,218,.25); color: var(--text); background: rgba(89,225,218,.09); }
.lesson-button-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255,255,255,.055);
  font-size: 12px;
  font-weight: 800;
}
.lesson-button.is-active .lesson-button-number { color: #041313; background: var(--cyan); }
.lesson-button strong { display: block; color: inherit; font-size: 14px; line-height: 1.4; }
.lesson-button small { display: block; margin-top: 3px; color: #70859c; font-size: 11px; }
.player-column { min-width: 0; padding: 28px; }
.player-frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 16px; background: #02060b; }
.player-frame video { width: 100%; height: 100%; display: block; object-fit: contain; }
.player-status { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--danger); background: rgba(2,6,11,.9); text-align: center; }
.player-status[hidden] { display: none; }
.player-info { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 24px; }
.lesson-number { color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.player-info h2 { margin: 5px 0 0; font-size: clamp(22px, 3vw, 31px); line-height: 1.3; }
.duration { flex: 0 0 auto; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.lesson-description { margin: 13px 0 0; color: var(--muted); }
.player-note { display: grid; grid-template-columns: auto 1fr; gap: 15px; margin-top: 22px; padding: 16px; border-radius: 13px; background: rgba(255,197,110,.075); }
.player-note strong { color: var(--amber); font-size: 13px; }
.player-note span { color: var(--muted); font-size: 13px; }

.text-guide { max-width: 920px; margin: 0 auto; padding: 50px 44px 70px; }
.text-intro { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.text-intro h2 { margin: 12px 0 8px; font-size: 36px; }
.text-intro p { color: var(--muted); }
.guide-section { display: grid; grid-template-columns: 54px 1fr; gap: 26px; padding: 42px 0; border-bottom: 1px solid var(--line); }
.guide-section > * { min-width: 0; }
.guide-section:last-child { border-bottom: 0; }
.section-index { color: var(--cyan); font-family: ui-monospace, monospace; font-size: 14px; font-weight: 800; }
.guide-section h3 { margin: -7px 0 18px; font-size: 24px; }
.guide-section h4 { margin: 24px 0 8px; color: var(--muted); }
.guide-section li { margin: 8px 0; }
.guide-section a { color: var(--cyan); }
code { padding: 2px 6px; border-radius: 6px; color: #bcfff8; background: rgba(89,225,218,.09); font-family: "SFMono-Regular", Consolas, monospace; }
pre { max-width: 100%; overflow-x: auto; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #050c16; }
pre code { padding: 0; color: #dce8f3; background: transparent; }
.endpoint-grid { display: grid; gap: 10px; }
.endpoint-grid div { display: grid; grid-template-columns: 190px 1fr; gap: 20px; align-items: center; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.03); }
.endpoint-grid span { color: var(--muted); font-size: 13px; }
.tip { margin-top: 18px; padding: 15px 17px; border-left: 3px solid var(--amber); color: var(--muted); background: rgba(255,197,110,.06); }
.error-list { display: grid; gap: 10px; }
.error-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.error-list span { color: var(--muted); }

footer {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
footer a { color: var(--cyan); text-decoration: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 30px; min-height: auto; padding-top: 58px; }
  .hero-card { min-height: 200px; }
  .video-layout { grid-template-columns: 1fr; }
  .playlist { border-right: 0; border-bottom: 1px solid var(--line); }
  .playlist-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .site-header { height: 64px; padding: 0 16px; }
  .header-links a:not(.back-link) { display: none; }
  .header-links .back-link { padding: 6px 10px; font-size: 12px; }
  main { width: min(100% - 24px, 1180px); }
  .hero { padding: 46px 4px 44px; }
  .hero h1 { font-size: 38px; }
  .hero-copy > p { font-size: 15px; }
  .hero-card { display: none; }
  .tabs { position: sticky; z-index: 10; top: 64px; background: rgba(9,22,38,.96); }
  .tab { flex: 1; justify-content: center; padding-inline: 10px; }
  .playlist { padding: 15px; }
  .playlist-items { grid-template-columns: 1fr; }
  .player-column { padding: 15px; }
  .player-frame { border-radius: 11px; }
  .player-info { display: block; }
  .duration { display: inline-block; margin-top: 12px; }
  .player-note { grid-template-columns: 1fr; gap: 5px; }
  .text-guide { padding: 34px 20px 50px; }
  .text-intro h2 { font-size: 28px; }
  .guide-section { grid-template-columns: 1fr; gap: 10px; padding: 32px 0; }
  .guide-section h3 { margin-top: 0; }
  .endpoint-grid div { grid-template-columns: 1fr; gap: 4px; }
  .endpoint-grid code { overflow-wrap: anywhere; }
  .error-list > div { grid-template-columns: 1fr; gap: 6px; }
  footer { width: calc(100% - 28px); display: grid; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
