/* 星际动画 · 知识点剧场
   左边一块屏（16:9 的 iframe），右边一列本册知识点清单。
   清单里绿点是"已经有动画"，灰点是"还在做"，按单元分组。 */

.anwrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 12px 16px 90px; }

/* 2026-11-07：播放器是页面主体 —— 标题压到 22px、只留一行副标题，
   那一大段介绍挪到播放器下面（.annote），页面顶部少占 70px，16:9 整块进第一屏。 */
.anhead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 4px 0 10px; }
.anhead h1 {
  font-size: 22px; letter-spacing: 1.5px; line-height: 1.3;
  background: linear-gradient(96deg, #fff 6%, #a9d8ff 46%, #ffc94d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.anhead .oneline { margin: 0; font-size: 13px; color: var(--ink-3, #8C7C66); line-height: 1.6; }
.anhead .oneline b { color: var(--gold); }
.anhead .oneline em {
  font-style: normal; color: #7ee8fa; border-bottom: 1px dashed rgba(126, 232, 250, .5);
}
/* 播放器下面那段「第 3 步」的说明：跟正文同字号、同字体，压在页尾 */
.annote { margin: 16px 2px 0; font-size: 12.5px; color: var(--ink-3, #8C7C66); line-height: 1.75; max-width: 820px; }
.annote b { color: #C25F2C; font-weight: 700; }

.anbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 9px 11px;
  background: rgba(20, 27, 61, .72); border: 1px solid #2c3a7a; border-radius: 14px;
}
.anbar select {
  background: #101736; color: var(--text); border: 1px solid #33407a;
  border-radius: 9px; padding: 7px 10px; font-size: 13px; max-width: 340px;
}
.anbar .grow { flex: 1; }
.anstat { font-size: 12px; color: var(--dim); }
.anstat b { color: var(--gold); font-size: 13px; }
.anstat .warn { color: #ffb26b; }

/* ---------- 主区 ---------- */
.angrid { display: grid; grid-template-columns: 1fr 372px; gap: 16px; align-items: start; }

.anplay {
  background: rgba(20, 27, 61, .72); border: 1px solid #2c3a7a; border-radius: 18px;
  overflow: hidden;
}
.anframe {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #05091a;
  border-bottom: 1px solid #26305e;
}
.anframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.anframe .empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px;
  background:
    radial-gradient(420px 260px at 50% 20%, #17204a 0%, transparent 68%),
    #070c1e;
}
.anframe .empty .ei { font-size: 40px; opacity: .85; }
.anframe .empty b { font-size: 16px; color: #eef2ff; }
.anframe .empty small { font-size: 12.5px; color: #9aa5d1; line-height: 1.7; max-width: 420px; }
.anframe .empty .btn { margin-top: 4px; padding: 9px 18px; font-size: 13.5px; }

/* 播放器下面这行：跟全站正文一套字体、一套字号（12.5px），和衍生阅读页同一版式 ——
   标题和副标题排成一行、不上下叠，行高紧凑，播放器能多高一截就多高一截（2026-11-07 用户提）。 */
.anmeta { padding: 10px 14px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
.anmeta .mt { flex: 1 1 240px; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.anmeta .mt b { font-size: 12.5px; font-weight: 700; line-height: 1.6; }
.anmeta .mt small { margin-top: 0; color: var(--dim); font-size: 12.5px; line-height: 1.6; }
.anmeta .mact { display: flex; gap: 10px; flex-wrap: wrap; }
.anmeta .mact .btn { padding: 7px 14px; font-size: 13px; }
.anmeta .mact a.btn { text-decoration: none; display: inline-block; }
.anmeta .mact .btn.ghost { border-color: rgba(255,217,138,.55); color: #FFD98A; }
.anmeta .mact .btn.ghost:hover { border-color: #FFD98A; background: rgba(255,217,138,.12); }

/* ---------- 右：知识点清单 ---------- */
.anlist {
  background: rgba(20, 27, 61, .72); border: 1px solid #2c3a7a; border-radius: 18px;
  padding: 8px 10px 12px; max-height: min(74vh, 760px); overflow: auto;
}
.anlist::-webkit-scrollbar { width: 8px; }
.anlist::-webkit-scrollbar-thumb { background: #33407a; border-radius: 4px; }

/* 一单元一段动画的册子（英语这类）：8 个单元平铺，不再套章节头 */
.anflat { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }

.anchap { margin-bottom: 6px; }
.anchap:last-child { margin-bottom: 0; }
/* 层次折叠：章节默认收起，点单元名展开 —— 默认只开正在播的那一单元，
   手机上几十行铺到两三屏的日子结束 */
.anchap:not(.on) .anrow { display: none; }
.anchname { cursor: pointer; }
.anchname .carr {
  flex: 0 0 auto; font-size: 9px; color: #7c88b8; transition: transform .15s;
}
.anchap.on .anchname .carr { transform: rotate(90deg); }
.anchname {
  display: flex; align-items: center; gap: 8px; padding: 10px 6px 7px;
  font-size: 12.5px; font-weight: 700; color: #cfd8ff; position: sticky; top: -8px;
  background: rgba(20, 27, 61, .96); backdrop-filter: blur(6px); z-index: 1;
  border-bottom: 1px solid #26305e; margin-bottom: 4px;
}
.anchname i { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 auto; }
.anchname span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anchname em { font-style: normal; color: #7c88b8; font-weight: 600; font-size: 11.5px; }

.anrow {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px 9px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
  transition: background .14s, border-color .14s;
}
.anrow:hover { background: rgba(61, 90, 254, .12); }
.anrow.on { background: rgba(255, 201, 77, .12); border-color: rgba(255, 201, 77, .45); }
.anrow .ridot {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; font-weight: 800;
  background: #2a3566; color: #8c98c8;
}
.anrow.has .ridot { background: linear-gradient(160deg, #37c98a, #17915e); color: #fff; }
.anrow .rtext { flex: 1; min-width: 0; }
/* 知识点名字长（"两、三位数除以整十数口算和笔算（商一位数）"22 个字），
   单行省略会看不出是哪一个，给两行 */
.anrow .rtext b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  font-size: 13px; font-weight: 600; line-height: 1.45;
  color: #e8eeff; overflow: hidden;
}
.anrow .rtext small { display: block; margin-top: 2px; font-size: 11px; color: #7885b4; }
.anrow.has .rtext small { color: #79c9a6; }
.anrow .rtag { flex: 0 0 auto; font-size: 11px; color: #7885b4; }
.anrow.has .rtag { color: #ffc94d; font-weight: 700; }

/* ---------- 底部：怎么做的 ---------- */
.anhow {
  margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.anhow .hcard {
  background: rgba(20, 27, 61, .6); border: 1px solid #2c3a7a; border-radius: 14px;
  padding: 15px 16px;
}
.anhow .hcard b { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 7px; }
.anhow .hcard b span {
  width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 201, 77, .18);
  color: var(--gold); display: grid; place-items: center; font-size: 12px;
}
.anhow .hcard small { color: var(--dim); font-size: 12.5px; line-height: 1.75; display: block; }

.anfootnav { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.anfootnav a {
  flex: 1 1 220px; text-decoration: none; color: inherit;
  background: rgba(20, 27, 61, .6); border: 1px solid #2c3a7a; border-radius: 12px;
  padding: 14px 16px; transition: transform .15s, border-color .15s;
}
.anfootnav a:hover { transform: translateY(-3px); border-color: #4a5a9e; }
.anfootnav b { display: block; font-size: 14px; margin-bottom: 4px; }
.anfootnav small { color: var(--dim); font-size: 12px; line-height: 1.6; }
/* 卡片得看得出来能点：右下角一句「点击进去 ▸」，悬停时往右挪一点 */
.anfootnav a .go {
  display: block; margin-top: 10px; font-size: 12px; font-style: normal;
  font-weight: 700; color: var(--gold); transition: transform .15s;
}
.anfootnav a:hover .go { transform: translateX(3px); }

/* ---------- 手机 ---------- */
@media (max-width: 940px) {
  .angrid { grid-template-columns: 1fr; }
  .anlist { max-height: none; order: 2; }
  .anhow { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .anhead h1 { font-size: 23px; letter-spacing: 1px; }
  .anhead .oneline { font-size: 13.5px; }
  .anbar select { flex: 1 1 100%; max-width: 100%; }
  .topnav { gap: 14px; font-size: 13px; }
  .anframe .empty .ei { font-size: 32px; }
  .anframe .empty b { font-size: 14.5px; }
  .anframe .empty small { font-size: 12px; }
  .anmeta { padding: 10px 12px; }
  .anmeta .mt b { font-size: 13px; }
}

/* 上传动画：跟动画上传台同源，只有本机端口开着时才连得上 */
.anup {
  display: inline-block; text-decoration: none; white-space: nowrap;
  font-size: 12.5px; padding: 7px 13px; border-radius: 9px;
  color: #ffd97a; border: 1px solid rgba(255, 201, 77, .45);
  background: rgba(255, 201, 77, .07); transition: .15s;
}
.anup:hover { background: rgba(255, 201, 77, .16); color: #fff; }
@media (max-width: 759px) { .anup { display: none; } }

/* 前台直接给一个「传动画」的入口：低调一点，金色描边 */
.anbar .anup {
  flex: 0 0 auto; text-decoration: none; white-space: nowrap;
  font-size: 12.5px; font-weight: 700; color: #8A5A12;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid #D9BC76; background: #FFF8E4;
  transition: .15s;
}
.anbar .anup:hover { background: #FFEFC8; border-color: #C08E22; color: #7A4A08; }
@media (max-width: 760px) { .anbar .anup { padding: 6px 11px; font-size: 12px; } }

/* 播放器下面那行（2026-11-02）：段数挪进副标题，右边只留「下一段」+「去看衍生绘本」 */
/* html.paper .btn.ghost 的权重比这里高，按钮会被刷成纸色 —— 必须带上 html.paper 前缀 */
.anmeta .mnav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
html.paper .anmeta .mnav .btn.ghost,
.anmeta .mnav .btn.ghost {
  padding: 8px 13px; font-size: 13px;
  background: rgba(255, 217, 138, .10);
  border: 1px solid rgba(255, 217, 138, .50);
  color: #FFD98A;
  box-shadow: none;
}
html.paper .anmeta .mnav .btn.ghost:hover,
.anmeta .mnav .btn.ghost:hover {
  background: rgba(255, 217, 138, .20); border-color: #FFD98A; color: #FFE9BE;
  box-shadow: none; transform: none;
}
html.paper .anmeta .mnav .btn.ghost[disabled],
.anmeta .mnav .btn.ghost[disabled] { opacity: .32; background: transparent; }
.anmeta .mnav .btn.gold { padding: 9px 16px; font-size: 13.5px; text-decoration: none; display: inline-block; }
@media (max-width: 780px) {
  .anmeta .mnav { width: 100%; order: 3; }
  .anmeta .mnav .btn { flex: 1 1 0; text-align: center; }
}

/* 播放器下面那行字是深色卡片上的，纸色主题的深棕字在深底上几乎看不见 —— 换成奶白 */
html.paper .anmeta .mt b { color: #FFF3DC; }
html.paper .anmeta .mt small { color: rgba(255, 233, 190, .70); }

/* 纸色主题原来给播放器套了一圈 6px 奶白"相框"，被卡片裁掉后只剩底边一条白带 —— 去掉 */
html.paper .anframe { box-shadow: none; }

/* 分流的视频是真 <video>，跟以前 iframe 一样铺满画框 */
.anframe video.anvid {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: #05091a; border: 0; outline: none;
}
/* 自定义细控制条：替掉原生 controls 的大黑渐变面板，米白、克制的高度。
   ★ 2026-11-25：不再贴底压在画面上 —— 字幕是烧进视频最下沿的，40px 正好盖掉整行
   （用户截图报「字幕看不清楚」，实为进度条挡住）。现在挂在 .anframe 外面、
   画面正下方（.anplay 里），画面 aspect-ratio 与尺寸一个像素不动。 */
.anvctrl {
  position: relative; height: 34px; margin-top: 6px; border-radius: 9px;
  display: flex; align-items: center; gap: 9px; padding: 0 12px;
  background: #F7EFDC;
  color: #4a4033; font: 12px/1 system-ui, -apple-system, sans-serif;
  border: 1px solid rgba(120,96,60,.12);
}
.anvctrl button {
  flex: 0 0 auto; border: 0; background: transparent; cursor: pointer;
  color: #4a4033; font-size: 15px; padding: 4px 2px; line-height: 1;
}
.anvctrl button:hover { color: #b5442c; }
.anvctrl .vc-play { font-size: 13px; min-width: 18px; }
.anvctrl .vc-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; opacity: .8; }
.anvctrl .vc-track {
  position: relative; flex: 1 1 auto; height: 4px; border-radius: 2px;
  background: rgba(120,96,60,.22); cursor: pointer;
}
.anvctrl .vc-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: #b5442c; border-radius: 2px;
}
.anvctrl .vc-dot {
  position: absolute; top: 50%; left: 0; width: 10px; height: 10px;
  margin: -5px 0 0 -5px; border-radius: 50%; background: #b5442c;
  box-shadow: 0 0 0 2px rgba(255,252,244,.9);
}

/* 纸色主题下这三张"怎么用"小卡还是深色底 + 深色字，看不见 —— 补成纸卡 */
html.paper .anhow .hcard {
  background: #FFFCF4; border: 1px solid var(--line); color: var(--ink-2);
  box-shadow: 0 1px 0 rgba(139, 116, 82, .08);
}
html.paper .anhow .hcard b { color: var(--ink); }
html.paper .anhow .hcard small { color: var(--ink-3); }
html.paper .anhow .hcard b span { background: #F7D989; color: #5A4413; }

/* ==========================================================================
   纸色主题：播放区改成和衍生阅读页（read.html）同一版式（2026-11-07 用户提）
   那边是「深色视频圆角卡 + 底下一行米白小字」，动画页原来是一整块深蓝卡片
   连着播放器一起包着，看着像另一个站。这里把深色外壳去掉，只留视频框，
   信息行直接落在纸面上；字号、颜色、按钮都跟 read.html 对齐。
   ========================================================================== */
html.paper .anplay {
  background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible;
}
html.paper .anplay .anframe {
  border-radius: 14px; overflow: hidden; border-bottom: 0;
  box-shadow: 0 10px 26px rgba(120, 96, 60, .14);
}
html.paper .anplay .anmeta { padding: 9px 3px 0; }
/* paper.css 里那两条奶白字必须在 .anplay 这一层压过去，否则深棕字又变回奶白 */
html.paper .anplay .anmeta .mt b { color: var(--ink); }
html.paper .anplay .anmeta .mt small { color: var(--ink-3); }
/* 「下一段」做成和阅读页「下一支」一模一样的金胶囊 ——
   原来那版在纸色主题下被刷成了几乎看不见的淡黄底 */
html.paper .anplay .anmeta .mnav .btn.ghost {
  background: linear-gradient(180deg, #FFE9AE, #F7D989);
  border: 1px solid #D8B45E; color: #5A4413; box-shadow: none;
}
html.paper .anplay .anmeta .mnav .btn.ghost:hover:not([disabled]) {
  background: linear-gradient(180deg, #FFE3A0, #F3D07C); border-color: #C08E22; color: #7A4A08;
  transform: none;
}
html.paper .anplay .anmeta .mnav .btn.ghost[disabled] { opacity: .38; background: transparent; color: #9C8B74; }
/* 副标题那串「单元 · 课时 · 秒数 · 第几段」两行时别让最后一个字单独掉到第三行 */
.anmeta .mt small { text-wrap: balance; }

@media (max-width: 780px) {
  html.paper .anplay .anmeta { padding: 9px 2px 0; }
  html.paper .anplay .anmeta .mnav { margin-top: 2px; }
  /* 手机上只有一个「下一段」，别拉成整行通条的按钮 */
  html.paper .anplay .anmeta .mnav { width: 100%; justify-content: flex-end; }
  html.paper .anplay .anmeta .mnav .btn { flex: 0 0 auto; }
}
