/* 随译官网样式：明暗两套主题（html[data-theme]，见 index.html 开头的脚本和 main.js 的切换按钮）、
   极光背景、玻璃质感卡片。品牌色与软件一致，不引用任何外部资源。
   动效分三类：开场（html.pre / html.go）、滚动显现（html.fx，见 fx.js）、循环的装饰动效。
   系统设置了"减少动态效果"时全部停掉，直接显示最终画面。
   首屏的模拟桌面（.desk）和翻译框（.ta-*）的样式在后半部分，翻译框尽量照搬软件里的 src/frame/frame.css。 */

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ───────── 主题 ───────── */

:root {
  --brand-1: #3d7bff;
  --brand-2: #27c6ec;
  --violet: #7c5cff;
  --grad: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* 浅色 */
  --bg: #f5f7fb;
  --text: #0b1220;
  --text-2: #475167;
  --muted: #6b7488;
  --line: rgb(15 30 70 / 9%);
  --line-2: rgb(15 30 70 / 15%);
  --link: #2459d6;
  --link-hover: #163f9e;
  --pill: rgb(255 255 255 / 72%);
  --pill-shadow: 0 10px 40px rgb(20 40 90 / 10%), inset 0 1px 0 rgb(255 255 255 / 80%);
  --ghost: rgb(15 30 70 / 4%);
  --ghost-hover: rgb(15 30 70 / 8%);
  --card: linear-gradient(180deg, #fff, rgb(255 255 255 / 72%));
  --card-hi: inset 0 1px 0 #fff, 0 1px 2px rgb(20 40 90 / 4%), 0 12px 32px rgb(20 40 90 / 5%);
  --visual: radial-gradient(90% 120% at 50% 0%, rgb(61 123 255 / 12%), transparent 70%), #f8faff;
  --title: linear-gradient(180deg, #0b1220 35%, #2c56c9 120%);
  --h2: linear-gradient(180deg, #0b1220 40%, #3d4b6b);
  --num: linear-gradient(120deg, #0b1220 15%, #2f6bf5 70%, #18a9cc);
  --tx-src: #8a93a7;
  --a1: 0.28;
  --a2: 0.2;
  --a3: 0.16;
  --grid-line: rgb(15 30 70 / 6%);
  --glow: 0.3;
  --kbd: #fff;
  --shot-edge: rgb(15 30 70 / 13%);
  --shot-shadow: 0 30px 80px rgb(20 40 90 / 16%);
  --crop-shadow: -14px -6px 40px rgb(20 40 90 / 10%);
  --warn: #9a5b00;
  --warn-bg: rgb(242 161 15 / 12%);
  --warn-line: rgb(242 161 15 / 35%);
  --ok: #12925a;
  --pkg: #fff;
  --pkg-hover: #fafbff;
  --pkg-best: linear-gradient(100deg, rgb(61 123 255 / 10%), rgb(39 198 236 / 5%));
  --get: linear-gradient(180deg, rgb(61 123 255 / 10%), rgb(255 255 255 / 55%) 50%);
  --dl: rgb(255 255 255 / 90%);
  --shield: rgb(39 198 236 / 10%);

  /* 模拟桌面 */
  --wall: radial-gradient(70% 90% at 12% 0%, #c6d8ff, transparent 70%), radial-gradient(60% 80% at 100% 100%, #c4efff, transparent 70%), linear-gradient(135deg, #e4ebff, #f2edff);
  --win-bg: #fff;
  --win-bar: #f3f5f9;
  --win-line: rgb(15 30 70 / 12%);
  --win-shadow: 0 20px 50px rgb(20 40 90 / 18%);
  --n-side: #f6f7fa;
  --n-text: #1d2330;
  --n-muted: #848ea2;
  --n-line: #e8ebf1;
  --n-on: rgb(47 107 245 / 10%);
  --n-on-text: #2459d6;
  --taskbar: rgb(255 255 255 / 70%);

  /* 翻译框：与软件里的 frame.css 一致 */
  --f-accent: #2f8cff;
  --f-panel: rgb(255 255 255 / 96%);
  --f-text: #141a26;
  --f-text-2: #4a5468;
  --f-hover: rgb(30 58 120 / 7%);
  --f-press: rgb(30 58 120 / 12%);
  --f-line: rgb(30 58 120 / 17%);
  --f-accent-text: #2459d6;
  --f-accent-soft: rgb(61 123 255 / 12%);
  --f-bad: #b62532;
  --f-bad-soft: rgb(239 76 76 / 12%);
  /* 拖动模式的液态玻璃：无色透明，靠亮边、内缘光和顶部的柔光表现厚度 */
  --glass-tint: rgb(255 255 255 / 5%);
  --glass-sheen: rgb(255 255 255 / 24%);
  --glass-sheen-soft: rgb(255 255 255 / 10%);
  --glass-edge: rgb(255 255 255 / 90%);
  --glass-edge-2: rgb(255 255 255 / 55%);
  --glass-glow: rgb(255 255 255 / 45%);
  --glass-outline: rgb(20 30 60 / 10%);
  --glass-shade: rgb(20 30 60 / 8%);
  --glass-depth: rgb(0 0 0 / 18%);
  --glass-rim-hi: rgb(255 255 255 / 95%);
  --glass-rim-lo: rgb(255 255 255 / 22%);
  --frame-stroke: 2px;
  --frame-radius: 0px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #05070c;
  --text: #f3f6fc;
  --text-2: #a9b3c7;
  --muted: #6c768c;
  --line: rgb(255 255 255 / 8%);
  --line-2: rgb(255 255 255 / 15%);
  --link: #8fb4ff;
  --link-hover: #c3d8ff;
  --pill: rgb(10 14 22 / 62%);
  --pill-shadow: 0 10px 40px rgb(0 0 0 / 35%), inset 0 1px 0 rgb(255 255 255 / 6%);
  --ghost: rgb(255 255 255 / 6%);
  --ghost-hover: rgb(255 255 255 / 11%);
  --card: linear-gradient(180deg, rgb(255 255 255 / 6%), rgb(255 255 255 / 2%));
  --card-hi: inset 0 1px 0 rgb(255 255 255 / 7%);
  --visual: radial-gradient(90% 120% at 50% 0%, rgb(61 123 255 / 18%), transparent 70%);
  --title: linear-gradient(180deg, #fff 30%, #9fc2ff 105%);
  --h2: linear-gradient(180deg, #fff 40%, #a9bbd9);
  --num: linear-gradient(120deg, #fff 20%, #8fc0ff 60%, var(--brand-2));
  --tx-src: #8793ab;
  --a1: 0.5;
  --a2: 0.26;
  --a3: 0.26;
  --grid-line: rgb(255 255 255 / 5%);
  --glow: 0.55;
  --kbd: rgb(14 19 30 / 85%);
  --shot-edge: rgb(255 255 255 / 12%);
  --shot-shadow: 0 40px 120px rgb(0 0 0 / 60%);
  --crop-shadow: -18px -8px 60px rgb(0 0 0 / 40%);
  --warn: #f2b33d;
  --warn-bg: rgb(242 179 61 / 10%);
  --warn-line: rgb(242 179 61 / 30%);
  --ok: #3ccf8e;
  --pkg: rgb(8 11 18 / 55%);
  --pkg-hover: rgb(14 19 30 / 75%);
  --pkg-best: linear-gradient(100deg, rgb(61 123 255 / 16%), rgb(39 198 236 / 6%));
  --get: linear-gradient(180deg, rgb(61 123 255 / 13%), rgb(255 255 255 / 2%) 45%);
  --dl: rgb(12 16 26 / 82%);
  --shield: rgb(39 198 236 / 8%);

  --wall: radial-gradient(70% 90% at 12% 0%, #1c2e66, transparent 70%), radial-gradient(60% 80% at 100% 100%, #0e3a4c, transparent 70%), linear-gradient(135deg, #0a0f1e, #131a34);
  --win-bg: #1b1f27;
  --win-bar: #15181f;
  --win-line: rgb(255 255 255 / 9%);
  --win-shadow: 0 24px 60px rgb(0 0 0 / 55%);
  --n-side: #171a21;
  --n-text: #e7eaf1;
  --n-muted: #8c95a8;
  --n-line: #2a2f3a;
  --n-on: rgb(91 141 255 / 16%);
  --n-on-text: #8fb4ff;
  --taskbar: rgb(14 18 28 / 78%);

  --f-panel: rgb(26 30 38 / 96%);
  --f-text: #e8ebf2;
  --f-text-2: #a8b0c0;
  --f-hover: rgb(255 255 255 / 8%);
  --f-press: rgb(255 255 255 / 13%);
  --f-line: rgb(255 255 255 / 14%);
  --f-accent-text: #7ea6ff;
  --f-accent-soft: rgb(91 141 255 / 18%);
  --f-bad: #ff8c8c;
  --f-bad-soft: rgb(239 76 76 / 17%);
  --glass-tint: rgb(255 255 255 / 4%);
  --glass-sheen: rgb(255 255 255 / 16%);
  --glass-sheen-soft: rgb(255 255 255 / 7%);
  --glass-edge: rgb(255 255 255 / 75%);
  --glass-edge-2: rgb(255 255 255 / 40%);
  --glass-glow: rgb(255 255 255 / 14%);
  --glass-outline: rgb(255 255 255 / 12%);
  --glass-shade: rgb(0 0 0 / 35%);
  --glass-depth: rgb(0 0 0 / 32%);
  --glass-rim-hi: rgb(255 255 255 / 80%);
  --glass-rim-lo: rgb(255 255 255 / 16%);
  color-scheme: dark;
}

/* ───────── 基础 ───────── */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

/* 英文文案载入前先不显示正文 */
html.i18n-pending body {
  visibility: hidden;
}

body {
  position: relative;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font: 16px/1.65 "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
}

/* 版块背后的光会伸出页面两侧：在 main 上裁掉，免得手机上能横向滚动（clip 不会生成滚动容器，旧浏览器退回 hidden） */
main {
  overflow-x: hidden;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

::selection {
  background: rgb(61 123 255 / 35%);
}

.wrap {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
}

/* ───────── 背景 ───────── */

.bg {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 1700px;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  animation: drift 16s ease-in-out infinite alternate;
}

.a1 {
  top: -260px;
  left: calc(50% - 420px);
  width: 840px;
  height: 560px;
  background: var(--brand-1);
  opacity: var(--a1);
}

.a2 {
  top: 140px;
  right: -180px;
  width: 560px;
  height: 520px;
  background: var(--brand-2);
  opacity: var(--a2);
  animation-duration: 21s;
  animation-direction: alternate-reverse;
}

.a3 {
  top: 300px;
  left: -220px;
  width: 600px;
  height: 540px;
  background: var(--violet);
  opacity: var(--a3);
  animation-duration: 25s;
}

@keyframes drift {
  from {
    transform: translate3d(-40px, -20px, 0) scale(1);
  }

  to {
    transform: translate3d(50px, 40px, 0) scale(1.15);
  }
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 50% at 50% 20%, #000 15%, transparent 78%);
}

/* ───────── 顶栏：悬浮的玻璃胶囊 ───────── */

.top {
  position: sticky;
  top: 14px;
  z-index: 50;
  padding-inline: 16px;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, 100%);
  height: 56px;
  margin-inline: auto;
  padding: 0 10px 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--pill);
  box-shadow: var(--pill-shadow);
  backdrop-filter: blur(18px) saturate(1.5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand img {
  border-radius: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text b {
  font-size: 16px;
}

.brand-text small {
  color: var(--muted);
  font-size: 11.5px;
}

.brand-text small:empty {
  display: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14.5px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  background: var(--ghost-hover);
  color: var(--text);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--ghost);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, transform 0.4s var(--ease);
}

.icon-btn:hover {
  background: var(--ghost-hover);
}

.icon-btn:active {
  transform: rotate(-30deg) scale(0.92);
}

.icon-btn svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 浅色时显示月亮（点了变深色），深色时显示太阳 */
.i-sun,
[data-theme="dark"] .i-moon {
  display: none;
}

[data-theme="dark"] .i-sun {
  display: block;
}

.lang {
  margin-left: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--ghost);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.lang:hover {
  background: var(--ghost-hover);
}

/* 切换主题时让颜色平滑过渡（main.js 切换时临时加上，过渡完就去掉，平时不影响别的动效） */
html.theming,
html.theming *,
html.theming *::before,
html.theming *::after {
  transition: background-color 0.35s, color 0.35s, border-color 0.35s, fill 0.35s, stroke 0.35s, box-shadow 0.35s !important;
}

/* ───────── 首屏 ───────── */

.hero {
  padding-top: 88px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 16px 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--ghost);
  color: var(--text-2);
  font-size: 13.5px;
  backdrop-filter: blur(8px);
}

.badge:hover {
  color: var(--text);
}

.badge i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 10px var(--brand-2);
}

.badge i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand-2);
  animation: ping 2.2s ease-out infinite;
}

@keyframes ping {
  to {
    transform: scale(3.4);
    opacity: 0;
  }
}

/* 标题：两层文字叠在同一格，外文在下，译文由左到右扫出来 */
.tx {
  position: relative;
  display: grid;
  justify-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 28px auto 24px;
  font-size: clamp(38px, 7.6vw, 92px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

:lang(zh) .tx {
  letter-spacing: 0;
  word-break: keep-all;
}

:lang(en) .tx {
  font-size: clamp(36px, 6.4vw, 80px);
}

.tx > span {
  grid-area: 1 / 1;
}

/* 文案里的换行就是标题的换行 */
.tx-dst {
  padding-bottom: 0.08em;
  white-space: pre-line;
  background: var(--title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tx-src {
  align-self: center;
  color: var(--tx-src);
  font-size: 0.46em;
  font-weight: 600;
  letter-spacing: 0;
  visibility: hidden;
}

.tx-beam {
  position: absolute;
  top: -8%;
  bottom: -8%;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, transparent, var(--brand-2) 25%, #fff 50%, var(--brand-1) 75%, transparent);
  box-shadow: 0 0 22px 5px rgb(39 198 236 / 60%), 0 0 90px 26px rgb(61 123 255 / 40%);
  opacity: 0;
}

.lead {
  max-width: 660px;
  margin: 0 auto 34px;
  color: var(--text-2);
  font-size: clamp(16px, 1.6vw, 19.5px);
  text-wrap: balance;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--ghost);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  background: var(--ghost-hover);
  color: var(--text);
  transform: translateY(-2px);
}

.btn.primary {
  border-color: transparent;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 30px rgb(61 123 255 / 40%), inset 0 1px 0 rgb(255 255 255 / 35%);
}

.btn.primary:hover {
  box-shadow: 0 12px 44px rgb(61 123 255 / 60%), inset 0 1px 0 rgb(255 255 255 / 35%);
}

/* 主按钮上划过的高光 */
.btn.primary::after,
.dbtn.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 45%) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shine {
  0%, 60% {
    transform: translateX(-120%);
  }

  85%, 100% {
    transform: translateX(120%);
  }
}

.btn.big {
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 17px;
}

.btn svg,
.dbtn svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meta {
  min-height: 1.6em;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.note {
  width: fit-content;
  max-width: 100%;
  margin: 16px auto 0;
  padding: 9px 16px;
  border: 1px solid var(--warn-line);
  border-radius: 12px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 14px;
}

kbd {
  padding: 1px 7px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--kbd);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.keys {
  display: inline-flex;
  gap: 4px;
}

/* ───────── 图 01：模拟桌面外围 ───────── */

.try {
  position: relative;
  isolation: isolate;
  margin-top: 56px;
}

.try-glow {
  position: absolute;
  inset: 10% 6% auto;
  z-index: -1;
  height: 70%;
  background: radial-gradient(55% 60% at 50% 45%, rgb(61 123 255 / 80%), rgb(39 198 236 / 40%) 45%, transparent 75%);
  filter: blur(80px);
  opacity: var(--glow);
  pointer-events: none;
}

.desk-ctrl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.dbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 16px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--pill);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}

.dbtn:hover {
  background: var(--ghost-hover);
  transform: translateY(-1px);
}

.dbtn.primary {
  border-color: transparent;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 22px rgb(61 123 255 / 35%), inset 0 1px 0 rgb(255 255 255 / 35%);
}

.dbtn.primary kbd {
  border-color: rgb(255 255 255 / 40%);
  background: rgb(255 255 255 / 18%);
  color: #fff;
}

/* 正在框选时，按钮表示"取消" */
.dbtn.primary.on {
  box-shadow: 0 0 0 3px rgb(61 123 255 / 30%), 0 6px 22px rgb(61 123 255 / 35%);
}

.dbtn.ghost {
  background: transparent;
  color: var(--text-2);
  font-weight: 500;
}

.sw {
  position: relative;
  width: 34px;
  height: 20px;
  flex: none;
  border-radius: 999px;
  background: var(--line-2);
  transition: background 0.25s;
}

.sw::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
  transition: transform 0.25s var(--ease);
}

.switch[aria-checked="true"] .sw {
  background: var(--grad);
}

.switch[aria-checked="true"] .sw::after {
  transform: translateX(14px);
}

.desk-status {
  flex: 1;
  min-width: 220px;
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  text-align: left;
}

.desk-shell {
  position: relative;
  padding: 1px;
  border-radius: 18px;
  background: conic-gradient(from var(--angle), var(--shot-edge) 0 62%, var(--brand-2) 76%, var(--brand-1) 86%, var(--shot-edge) 100%);
  box-shadow: var(--shot-shadow);
  animation: spin 7s linear infinite;
}

.desk-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 17px;
  /* 高度由 desk.js 按缩放比例写入，先给个大致值免得载入时跳动 */
  aspect-ratio: 1120 / 640;
  touch-action: pan-y;
}

.caption {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

.caption b {
  color: var(--brand-1);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ───────── 几个数字 ───────── */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 72px;
  border-block: 1px solid var(--line);
}

.facts div {
  display: grid;
  gap: 2px;
  padding: 30px 12px;
  text-align: center;
}

.facts div + div {
  border-left: 1px solid var(--line);
}

.facts b {
  background: var(--num);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.facts span {
  color: var(--muted);
  font-size: 14px;
}

/* ───────── 版块与卡片 ───────── */

.block {
  position: relative;
  padding-block: 64px;
}

/* 每个版块背后一团很淡的光，左右交替 */
.block::before {
  content: "";
  position: absolute;
  top: 8%;
  left: max(-10vw, -220px);
  z-index: -1;
  width: min(620px, 90vw);
  height: 520px;
  border-radius: 50%;
  background: var(--violet);
  filter: blur(130px);
  opacity: calc(var(--a3) * 0.65);
  pointer-events: none;
}

.block:nth-of-type(even)::before {
  right: max(-10vw, -220px);
  left: auto;
  background: var(--brand-1);
  opacity: calc(var(--a1) * 0.4);
}

#download::before {
  display: none;
}

h2,
.page-title {
  width: fit-content;
  margin: 0 0 12px;
  background: var(--h2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

:lang(zh) h2,
:lang(zh) .page-title {
  letter-spacing: 0;
}

.sub {
  margin: 0 0 30px;
  color: var(--text-2);
  font-size: 17px;
}

h2 + .grid {
  margin-top: 34px;
}

h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.35;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  position: relative;
  isolation: isolate;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--card-hi);
  transition: border-color 0.3s;
}

.card:hover {
  border-color: rgb(80 140 255 / 35%);
}

/* 跟着鼠标走的光斑（--mx / --my 由 fx.js 写入） */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgb(61 123 255 / 16%), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s;
}

.card:hover::before {
  opacity: 1;
}

.card p {
  margin: 0;
  color: var(--text-2);
}

/* 卡片上半部分的画面：顶到卡片边缘，截图从左上角探出来 */
.visual {
  position: relative;
  height: 300px;
  margin: -26px -26px 24px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--visual);
}

.grid.three .visual {
  height: 230px;
}

/* 截图外框：1px 的边，上面有一段光沿着边框转 */
.shot {
  position: absolute;
  top: 34px;
  left: 34px;
  width: 118%;
  margin: 0;
  padding: 1px;
  overflow: hidden;
  border-radius: 12px 0 0;
  background: linear-gradient(135deg, var(--shot-edge), transparent 45%);
  box-shadow: var(--crop-shadow);
  transition: transform 0.6s var(--ease);
}

.grid.three .shot {
  width: 150%;
}

.card:hover .shot {
  transform: translate(-8px, -8px);
}

/* 裁掉截图左边的导航栏和顶部的标题栏、页面说明，只看页面内容 */
.shot img {
  width: 130.7%;
  max-width: none;
  margin: -8.6% 0 0 -30.7%;
  border-radius: 0;
}

@keyframes spin {
  to {
    --angle: 360deg;
  }
}

.visual .keys {
  position: absolute;
  right: 16px;
  bottom: 16px;
  backdrop-filter: blur(8px);
}

.visual kbd {
  padding: 4px 10px;
  border-bottom-width: 3px;
  border-radius: 8px;
  font-size: 13px;
}

.ticks {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
}

.ticks li {
  position: relative;
  padding-left: 28px;
}

.ticks li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 4px;
  width: 11px;
  height: 6px;
  border: solid var(--brand-2);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

/* ───────── 引擎名滚动条 ───────── */

.marquee {
  display: grid;
  gap: 14px;
  margin: 6px 0 40px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.track,
.group {
  display: flex;
  gap: 14px;
}

/* 脚本没跑起来（或关了动效）时不滚动，自动换行居中 */
.track {
  flex-wrap: wrap;
  justify-content: center;
  padding-inline: 20px;
}

.group {
  flex-wrap: wrap;
  justify-content: center;
}

.track.run {
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: max-content;
  padding-inline: 0;
  animation: slide 46s linear infinite;
}

.track.run .group {
  flex-wrap: nowrap;
}

.track.run.rev {
  animation-direction: reverse;
}

.marquee:hover .track {
  animation-play-state: paused;
}

@keyframes slide {
  to {
    transform: translateX(calc(-50% - 7px));
  }
}

.group span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--pkg);
  color: var(--text-2);
  font-size: 15px;
  white-space: nowrap;
}

.group span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 10px rgb(61 123 255 / 70%);
}

/* ───────── 隐私 ───────── */

.privacy {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
  padding: 44px 48px;
}

.shield {
  width: 120px;
  height: 120px;
  fill: var(--shield);
  stroke: var(--brand-2);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 22px rgb(39 198 236 / 45%));
}

.privacy h2 {
  font-size: clamp(24px, 3vw, 34px);
}

/* ───────── 下载 ───────── */

.get {
  position: relative;
  isolation: isolate;
  padding: 52px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 30px;
  background: var(--get);
  box-shadow: var(--card-hi);
}

.get-glow {
  position: absolute;
  top: -230px;
  left: calc(50% - 400px);
  z-index: -1;
  width: 800px;
  height: 400px;
  border-radius: 50%;
  background: var(--brand-1);
  filter: blur(110px);
  opacity: calc(var(--glow) * 0.8);
}

.packages {
  display: grid;
  gap: 12px;
}

.pkg {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--pkg);
  transition: border-color 0.25s, background 0.25s;
}

.pkg:hover {
  border-color: var(--line-2);
  background: var(--pkg-hover);
}

.pkg.best {
  border-color: rgb(80 140 255 / 55%);
  background: var(--pkg-best);
  box-shadow: 0 0 40px rgb(61 123 255 / 14%);
}

.pkg-info {
  flex: 1;
  min-width: 0;
}

.pkg-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-weight: 600;
}

.tag {
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.pkg-sub {
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.fine {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* 下载进度卡片 */
.dl {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: min(370px, 100% - 40px);
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--dl);
  box-shadow: var(--shot-shadow), 0 0 50px rgb(61 123 255 / 14%);
  font-size: 14px;
  backdrop-filter: blur(20px) saturate(1.4);
}

.dl-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dl-head strong {
  overflow-wrap: anywhere;
}

.dl-head button {
  margin: -6px -8px 0 0;
  padding: 2px 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dl-head button:hover {
  color: var(--text);
}

.dl-bar {
  height: 6px;
  margin: 12px 0 10px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}

.dl-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--grad);
  box-shadow: 0 0 12px var(--brand-2);
  transition: width 0.2s;
}

/* 测速、校验阶段没有进度：来回滑动 */
.dl.busy .dl-bar i {
  width: 35% !important;
  animation: dl-slide 1.1s ease-in-out infinite alternate;
}

@keyframes dl-slide {
  from {
    transform: translateX(-20%);
  }

  to {
    transform: translateX(205%);
  }
}

.dl p {
  margin: 0;
  color: var(--text-2);
}

.dl.ok p {
  color: var(--ok);
}

.dl a {
  display: inline-block;
  margin-top: 8px;
}

/* ───────── 页脚 ───────── */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-block: 30px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.foot-links {
  display: flex;
  gap: 20px;
}

/* ═════════════════ 更新日志页（changelog.html） ═════════════════ */

.narrow {
  width: min(860px, 100% - 40px);
  margin-inline: auto;
}

.log-page .block {
  padding-top: 72px;
}

.log {
  display: grid;
  gap: 22px;
}

.release {
  padding: 28px 30px;
  /* 地址带 #v1.2.3 跳过来时别被顶栏挡住 */
  scroll-margin-top: 96px;
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 14px;
}

.release-head h2 {
  margin: 0;
  background: none;
  color: var(--text);
  font-size: 24px;
  letter-spacing: 0;
}

.release-head time {
  color: var(--muted);
  font-size: 14px;
}

.release-body {
  color: var(--text-2);
  font-size: 15.5px;
}

.release-body h3 {
  margin: 22px 0 8px;
  color: var(--text);
  font-size: 16px;
}

.release-body > :first-child {
  margin-top: 0;
}

.release-body p {
  margin: 0 0 10px;
}

.release-body ul {
  margin: 0;
  padding-left: 20px;
}

.release-body li + li {
  margin-top: 6px;
}

.release-body strong {
  color: var(--text);
}

.release-body code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--line);
  font: 0.88em ui-monospace, Consolas, monospace;
}

@media (max-width: 640px) {
  .log-page .block {
    padding-top: 48px;
  }

  .release {
    padding: 22px 20px;
  }
}

/* ═════════════════ 模拟桌面 ═════════════════
   画布按设计尺寸排版（宽屏 1120×640，窄屏 480×920，与 desk.js 的 LAYOUTS 一致），整体按容器宽度缩放（--s 由 desk.js 写入）。
   画布里的坐标、尺寸都是设计尺寸下的像素。 */

.desk {
  --dw: 1120;
  --dh: 640;
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--dw) * 1px);
  height: calc(var(--dh) * 1px);
  overflow: hidden;
  background: var(--wall);
  color: var(--n-text);
  font: 14px/1.4 "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  text-align: left;
  transform: scale(var(--s, 1));
  transform-origin: 0 0;
  -webkit-user-select: none;
  user-select: none;
}

.desk[data-layout="compact"] {
  --dw: 480;
  --dh: 920;
}

/* 桌面不在视野里时停掉里面的循环动画 */
.desk.idle *,
.desk.idle *::before,
.desk.idle *::after {
  animation-play-state: paused !important;
}

.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: var(--win-bg);
  box-shadow: var(--win-shadow), 0 0 0 1px var(--win-line);
}

.w-notes {
  top: 24px;
  left: 28px;
  width: 612px;
  height: 530px;
}

.w-photo {
  top: 24px;
  left: 664px;
  width: 428px;
  height: 262px;
}

.w-video {
  top: 306px;
  left: 664px;
  width: 428px;
  height: 248px;
}

.desk[data-layout="compact"] .w-notes {
  top: 12px;
  left: 12px;
  width: 456px;
  height: 400px;
}

.desk[data-layout="compact"] .w-photo {
  top: 424px;
  left: 12px;
  width: 456px;
  height: 236px;
}

.desk[data-layout="compact"] .w-video {
  top: 672px;
  left: 12px;
  width: 456px;
  height: 190px;
}

.desk[data-layout="compact"] .n-main {
  padding: 22px 22px 18px;
}

.desk[data-layout="compact"] .n-side {
  display: none;
}

.wbar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding-left: 12px;
  border-bottom: 1px solid var(--win-line);
  background: var(--win-bar);
  color: var(--n-muted);
  font-size: 12.5px;
}

.wtitle {
  color: var(--n-text);
  font-weight: 600;
}

.wctl {
  display: flex;
  margin-left: auto;
}

/* 最小化、最大化、关闭三个图标都在格子正中 */
.wctl i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 36px;
}

.wctl i::before,
.wctl i::after {
  content: "";
  grid-area: 1 / 1;
  width: 10px;
  border-top: 1px solid var(--n-muted);
}

.wctl i:not(:last-child)::after {
  display: none;
}

.wctl i:nth-child(2)::before {
  width: 9px;
  height: 9px;
  border: 1px solid var(--n-muted);
  border-radius: 1px;
}

.wctl i:last-child::before,
.wctl i:last-child::after {
  width: 12px;
  transform: rotate(45deg);
}

.wctl i:last-child::after {
  transform: rotate(-45deg);
}

/* 应用图标：彩色圆角方块 */
.wico {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 4px;
}

.wico::after {
  content: "";
  position: absolute;
  inset: 30% 26%;
  border-radius: 1px;
  background: rgb(255 255 255 / 85%);
}

.ico-notes {
  background: linear-gradient(135deg, #ffb547, #ff7a45);
}

.ico-notes::after {
  inset: 26% 30% 30%;
  box-shadow: 0 3px 0 -1px rgb(255 255 255 / 85%);
  background: none;
  border-top: 2px solid rgb(255 255 255 / 85%);
}

.ico-photo {
  background: linear-gradient(135deg, #34d399, #0ea5a4);
}

.ico-photo::after {
  inset: 34% 22% 24%;
  border-radius: 0;
  clip-path: polygon(0 100%, 35% 30%, 60% 70%, 75% 50%, 100% 100%);
}

.ico-video {
  background: linear-gradient(135deg, #f472b6, #8b5cf6);
}

.ico-video::after {
  inset: 28% 28% 28% 36%;
  border-radius: 0;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.taken {
  margin-left: 6px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 0 14px rgb(61 123 255 / 45%);
  animation: pop 0.45s var(--ease) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

/* ── 窗口一：笔记软件 ── */

.notes {
  display: flex;
  flex: 1;
  min-height: 0;
  color: var(--n-text);
  font-size: 13px;
}

.n-side {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 2px;
  width: 168px;
  padding: 14px 10px;
  border-right: 1px solid var(--n-line);
  background: var(--n-side);
}

.n-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 10px;
  border-radius: 7px;
}

.n-item.on {
  background: var(--n-on);
  color: var(--n-on-text);
  font-weight: 600;
}

.notes svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.n-count {
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--n-line);
  color: var(--n-muted);
  font-size: 11.5px;
  font-style: normal;
}

.n-gap {
  flex: 1;
}

.n-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 26px 30px 22px;
  background: var(--win-bg);
}

.n-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.n-h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.n-meta {
  margin: 4px 0 0;
  color: var(--n-muted);
  font-size: 12.5px;
}

.n-actions {
  display: flex;
  gap: 8px;
}

.n-btn {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--n-line);
  border-radius: 8px;
  background: var(--win-bg);
  font-size: 13px;
  font-weight: 600;
}

.n-btn.pri {
  border-color: transparent;
  background: #2f6bf5;
  color: #fff;
}

.n-tasks {
  display: grid;
  gap: 6px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.n-tasks li {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--n-line);
  border-radius: 10px;
  background: var(--win-bg);
}

.n-check {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  padding: 0;
  border: 1.8px solid var(--n-muted);
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.done .n-check {
  border-color: #2f6bf5;
  background: #2f6bf5;
}

.done .n-check::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 3.5px;
  width: 7px;
  height: 4px;
  border: solid #fff;
  border-width: 0 0 1.8px 1.8px;
  transform: rotate(-45deg);
}

.n-task {
  font-size: 14px;
}

.done .n-task {
  color: var(--n-muted);
  text-decoration: line-through;
}

.n-due {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--n-side);
  color: var(--n-muted);
  font-size: 12px;
  font-style: normal;
}

.n-note {
  max-width: 440px;
  margin: 22px 0 0;
  color: var(--n-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.n-add {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--n-on-text);
  font-size: 13.5px;
  font-weight: 600;
}

/* 沉浸模式换字：新文字从左往右显现 */
.swap {
  animation: swap 0.6s var(--ease) both;
}

@keyframes swap {
  from {
    -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 60%);
    mask-image: linear-gradient(90deg, #000 40%, transparent 60%);
    -webkit-mask-size: 260% 100%;
    mask-size: 260% 100%;
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
    text-shadow: 0 0 12px rgb(61 123 255 / 90%);
  }

  to {
    -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 60%);
    mask-image: linear-gradient(90deg, #000 40%, transparent 60%);
    -webkit-mask-size: 260% 100%;
    mask-size: 260% 100%;
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
    text-shadow: none;
  }
}

/* ── 窗口二：图片（黑板菜单） ── */

.photo {
  display: grid;
  flex: 1;
  place-items: center;
  background: radial-gradient(120% 90% at 30% 20%, #5b4330, #2a1d13);
}

.board {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: calc(100% - 44px);
  height: calc(100% - 30px);
  padding: 10px 24px;
  border: 7px solid #8a6038;
  border-radius: 6px;
  background: radial-gradient(70% 60% at 30% 30%, rgb(255 255 255 / 7%), transparent 70%), #22402f;
  box-shadow: inset 0 0 30px rgb(0 0 0 / 35%), 0 8px 18px rgb(0 0 0 / 40%);
  color: #f4efe1;
  font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, "Hiragino Sans", "Microsoft YaHei UI", sans-serif;
}

.board p {
  margin: 0;
}

.b-title {
  margin-bottom: 4px !important;
  color: #fff6dd;
  font-size: 23px;
  font-weight: 800;
  text-align: center;
}

.b-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 16px;
}

.b-row i {
  flex: 1;
  border-bottom: 2px dotted rgb(244 239 225 / 35%);
}

.b-price {
  color: #ffd27a;
  font-weight: 700;
}

.b-foot {
  margin-top: 4px !important;
  color: #ffd27a;
  font-size: 13px;
  text-align: center;
}

.desk[data-layout="compact"] .b-title {
  font-size: 25px;
}

.desk[data-layout="compact"] .b-row {
  font-size: 17px;
}

/* ── 窗口三：视频 ── */

.video {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #120d18;
}

.scene {
  position: absolute;
  inset: 0;
  background: linear-gradient(#ffc27a 0%, #f78c6b 38%, #a4507a 70%, #3b2346 100%);
}

.sun {
  position: absolute;
  top: 26%;
  left: 58%;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff4d6 30%, #ffd08a 60%, transparent 72%);
}

.hill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
}

.hill.h1 {
  height: 52%;
  background: #6d3a63;
  clip-path: polygon(0 55%, 18% 30%, 34% 48%, 52% 18%, 70% 42%, 86% 26%, 100% 40%, 100% 100%, 0 100%);
}

.hill.h2 {
  height: 38%;
  background: #4a2a4c;
  clip-path: polygon(0 40%, 22% 62%, 44% 34%, 63% 58%, 82% 36%, 100% 55%, 100% 100%, 0 100%);
}

.hill.h3 {
  height: 24%;
  background: #2a1830;
}

/* 远处开过的火车 */
.train {
  position: absolute;
  bottom: 24%;
  left: 0;
  width: 150px;
  height: 13px;
  border-radius: 6px 10px 3px 3px;
  background: repeating-linear-gradient(90deg, #2a1830 0 4px, #ffe3a8 4px 11px, #2a1830 11px 15px), #2a1830;
  background-clip: content-box, border-box;
  padding: 3px 4px 5px;
  animation: train 11s linear infinite;
}

@keyframes train {
  from {
    transform: translateX(-170px);
  }

  to {
    transform: translateX(560px);
  }
}

.v-sub {
  position: absolute;
  right: 0;
  bottom: 46px;
  left: 0;
  margin: 0;
  text-align: center;
}

.v-sub span {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 5px;
  background: rgb(14 9 18 / 82%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.vctl {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  background: linear-gradient(transparent, rgb(0 0 0 / 60%));
  color: #e9e3f0;
  font-size: 11.5px;
}

.vplay {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 18%);
  cursor: pointer;
}

/* 播放中显示暂停图标，暂停时显示三角 */
.vplay i {
  width: 8px;
  height: 9px;
  border-inline: 2.5px solid #fff;
}

.w-video.paused .vplay i {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-block: 5px solid transparent;
  border-inline: 8px solid #fff;
  border-right: 0;
}

.vbar {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(255 255 255 / 22%);
}

.vbar i {
  display: block;
  width: 44%;
  height: 100%;
  background: #ff6b8b;
  transform-origin: 0 0;
  animation: vprog 40s linear infinite;
}

@keyframes vprog {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(2.2);
  }
}

.w-video.paused :is(.train, .vbar i) {
  animation-play-state: paused;
}

/* ── 任务栏 ── */

.taskbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border-top: 1px solid var(--win-line);
  background: var(--taskbar);
  backdrop-filter: blur(14px);
}

.tb-apps {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tb-apps .wico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.tb-start {
  width: 20px;
  height: 20px;
  background: conic-gradient(from 90deg, #3d7bff 0 25%, #27c6ec 0 50%, #3d7bff 0 75%, #27c6ec 0) 0 0 / 100% 100%;
  clip-path: polygon(0 0, 46% 0, 46% 46%, 0 46%, 0 54%, 46% 54%, 46% 100%, 0 100%, 0 0, 54% 0, 100% 0, 100% 46%, 54% 46%, 54% 54%, 100% 54%, 100% 100%, 54% 100%, 54% 0);
}

.tb-tray {
  position: absolute;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--n-text);
  font-size: 12px;
}

.tb-tray img {
  border-radius: 4px;
}

.tb-wifi {
  width: 14px;
  height: 10px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 14px 14px 0 0;
}

/* ═════════════════ 翻译框与框选 ═════════════════ */

.ta-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.ta-frame {
  --edge: 7px;
  --tw: 152px;
  --th: 32px;
  position: absolute;
  pointer-events: none;
}

.desk[data-layout="compact"] .ta-frame {
  --edge: 14px;
  --tw: 210px;
  --th: 44px;
}

.ta-vis {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

/* 框内拖动：按住框里任意位置移动 */
.ta-frame.drag .ta-vis {
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
}

.ta-frame.drag .ta-vis:active {
  cursor: grabbing;
}

/* 液态玻璃：框内拖动时显示，样式与软件里的 src/frame/frame.css 的 #lens 一致 */
.ta-lens {
  position: absolute;
  --lens-inset: calc(var(--frame-stroke) + 1px);
  inset: var(--lens-inset);
  z-index: 1;
  overflow: hidden;
  border-radius: max(0px, var(--frame-radius) - var(--lens-inset));
  background:
    radial-gradient(120% 70% at 30% -25%, var(--glass-sheen), transparent 60%),
    radial-gradient(90% 60% at 80% 125%, var(--glass-sheen-soft), transparent 60%),
    var(--glass-tint);
  box-shadow:
    inset 1.5px 1.5px 0 -0.5px var(--glass-edge),
    inset -1.5px -1.5px 0 -0.5px var(--glass-edge-2),
    inset 0 0 0 1px var(--glass-outline),
    inset 0 0 18px 2px var(--glass-glow),
    inset 0 0 6px 1px var(--glass-shade),
    inset 0 -12px 20px -14px var(--glass-depth);
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

/* 一圈细亮边：左上角和右下角最亮，像光打在玻璃边缘 */
.ta-lens::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--glass-rim-hi), var(--glass-rim-lo) 28%, transparent 50%, var(--glass-rim-lo) 72%, var(--glass-rim-hi));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

/* 切到拖动模式时，一道柔和的反光从玻璃上滑过 */
.ta-lens::before {
  content: "";
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: 0;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgb(255 255 255 / 28%) 50%, transparent);
  opacity: 0;
}

@keyframes glass-sweep {
  from {
    transform: translateX(-120%) skewX(-12deg);
    opacity: 1;
  }

  to {
    transform: translateX(300%) skewX(-12deg);
    opacity: 1;
  }
}

.ta-frame.drag .ta-lens {
  opacity: 1;
}

.ta-frame.drag .ta-lens::before {
  animation: glass-sweep 1100ms var(--ease) 120ms;
}

.ta-blocks {
  position: absolute;
  inset: 0;
}

/* 移动、缩放时不显示译文，停下 0.2 秒后再识别、淡入（与软件一致） */
.ta-frame.moving .ta-blocks {
  visibility: hidden;
}

.ta-frame.orig .ta-blocks {
  visibility: hidden;
}

/* 译文块：色块盖住原文，译文按原位置排版 */
.ta-blk {
  position: absolute;
  display: flex;
  align-items: center;
  overflow: hidden;
  line-height: 1.25;
  white-space: nowrap;
  animation: blk-in 280ms ease-out both;
}

.ta-blk.multi {
  align-items: flex-start;
  white-space: normal;
  overflow-wrap: anywhere;
}

@keyframes blk-in {
  from {
    opacity: 0;
  }
}

/* 等待块：只画小圈，保留底下的原文 */
.ta-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: dot-spin 0.8s linear infinite;
}

@keyframes dot-spin {
  to {
    transform: rotate(360deg);
  }
}

.ta-border {
  position: absolute;
  z-index: 2;
  inset: 0;
  border: 2px solid var(--f-accent);
  pointer-events: none;
}

.ta-frame.paused .ta-border {
  border-style: dashed;
  border-color: #999;
}

.ta-frame.born .ta-border {
  animation: born 0.6s var(--ease);
}

@keyframes born {
  from {
    box-shadow: 0 0 0 10px rgb(47 140 255 / 35%);
  }

  to {
    box-shadow: 0 0 0 0 rgb(47 140 255 / 0%);
  }
}

/* 工具条：右上角，鼠标进入翻译框时显示 */
.ta-tools {
  position: absolute;
  top: var(--edge);
  right: var(--edge);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 2px;
  width: min(100% - 2 * var(--edge), var(--tw));
  height: min(100% - 2 * var(--edge), var(--th));
  padding: 4px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--f-panel);
  box-shadow: inset 0 0 0 1px var(--f-line), 0 4px 14px rgb(0 0 0 / 12%);
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.15s var(--ease);
}

.ta-frame:is(.hover, .fresh, .drag:hover) .ta-tools,
.ta-tools:is(:hover, :focus-within) {
  opacity: 1;
}

.ta-tools button {
  display: grid;
  flex: 0 1 24px;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--f-text-2);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.desk[data-layout="compact"] .ta-tools button {
  flex-basis: 34px;
}

.ta-tools button:hover {
  background: var(--f-hover);
  color: var(--f-text);
}

.ta-tools button:active {
  background: var(--f-press);
}

.ta-tools button:focus-visible {
  outline: 2px solid var(--f-accent);
  outline-offset: -2px;
}

.ta-tools button.on {
  background: var(--f-accent-soft);
  color: var(--f-accent-text);
}

.ta-tools [data-act="close"]:hover {
  background: var(--f-bad-soft);
  color: var(--f-bad);
}

.ta-tools [data-act="move"] {
  cursor: grab;
  touch-action: none;
}

.ta-tools svg {
  grid-area: 1 / 1;
  width: min(17px, 100%);
  height: min(17px, 100%);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.desk[data-layout="compact"] .ta-tools svg {
  width: 24px;
  height: 24px;
}

.ta-tools .fill {
  fill: currentColor;
  stroke: none;
}

/* 鼠标穿透时显示指针图标，框内拖动时显示手形 */
.ta-tools .i-hand,
.ta-frame.drag .ta-tools .i-pointer,
.ta-tools .i-play,
.ta-frame.paused .ta-tools .i-pause {
  display: none;
}

.ta-frame.drag .ta-tools .i-hand,
.ta-frame.paused .ta-tools .i-play {
  display: block;
}

/* 边缘缩放热区 */
.ta-edge {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
}

.ta-edge[data-dir="n"] { top: 0; right: var(--edge); left: var(--edge); height: var(--edge); cursor: ns-resize; }
.ta-edge[data-dir="s"] { right: var(--edge); bottom: 0; left: var(--edge); height: var(--edge); cursor: ns-resize; }
.ta-edge[data-dir="w"] { top: var(--edge); bottom: var(--edge); left: 0; width: var(--edge); cursor: ew-resize; }
.ta-edge[data-dir="e"] { top: var(--edge); right: 0; bottom: var(--edge); width: var(--edge); cursor: ew-resize; }
.ta-edge[data-dir="nw"] { top: 0; left: 0; width: var(--edge); height: var(--edge); cursor: nwse-resize; }
.ta-edge[data-dir="se"] { right: 0; bottom: 0; width: var(--edge); height: var(--edge); cursor: nwse-resize; }
.ta-edge[data-dir="ne"] { top: 0; right: 0; width: var(--edge); height: var(--edge); cursor: nesw-resize; }
.ta-edge[data-dir="sw"] { bottom: 0; left: 0; width: var(--edge); height: var(--edge); cursor: nesw-resize; }

/* 框选：与软件一样不置灰屏幕，只画选框 */
.ta-select {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgb(0 0 0 / 0.4%);
  cursor: crosshair;
  touch-action: none;
}

.ta-hint {
  position: absolute;
  top: 18px;
  left: 50%;
  margin: 0;
  padding: 6px 14px;
  border-radius: 6px;
  background: rgb(0 0 0 / 62%);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  animation: pop 0.3s var(--ease) both;
}

.desk[data-layout="compact"] .ta-hint {
  font-size: 18px;
}

.ta-rect {
  position: absolute;
  border: 2px solid var(--f-accent);
  pointer-events: none;
}

.ta-size {
  position: absolute;
  top: -24px;
  left: -2px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgb(47 140 255 / 90%);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.ta-rect.low .ta-size {
  top: 4px;
  left: 4px;
}

/* 自动演示用的鼠标指针 */
.ta-ghost {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 40;
  width: 26px;
  height: 26px;
  fill: #fff;
  stroke: #111;
  stroke-width: 1.3;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / 45%));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.ta-ghost.on {
  opacity: 1;
}

/* ───────── 开场动效 ───────── */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes tx-out {
  from {
    clip-path: inset(-20% 0 -20% 0);
  }

  to {
    clip-path: inset(-20% 0 -20% 100%);
  }
}

@keyframes tx-in {
  from {
    clip-path: inset(-20% 100% -20% 0);
  }

  to {
    clip-path: inset(-20% 0 -20% 0);
  }
}

@keyframes tx-beam {
  0% {
    left: 0;
    opacity: 0;
  }

  10%, 90% {
    opacity: 1;
  }

  100% {
    left: 100%;
    opacity: 0;
  }
}

/* 起始画面：等脚本就绪 */
.pre .intro,
.pre .tx-src {
  opacity: 0;
}

.pre .tx-src {
  visibility: visible;
}

.pre .tx-dst {
  clip-path: inset(-20% 100% -20% 0);
}

/* 开始播放：外文先浮现，接着一道光扫过换成译文，其余内容依次升起。
   模拟桌面升起时不用 filter，免得它里面的翻译框跟着模糊 */
.pre.go .intro {
  animation: rise 0.9s var(--ease) both;
}

.pre.go .badge {
  animation-delay: 0.05s;
}

.pre.go .lead {
  animation-delay: 0.3s;
}

.pre.go .cta {
  animation-delay: 0.42s;
}

.pre.go .meta {
  animation-delay: 0.52s;
}

.pre.go .try {
  animation-duration: 1.2s;
  animation-delay: 0.6s;
}

.pre.go .tx-src {
  animation: fade 0.5s 0.1s both, tx-out 1.2s var(--ease) 1s both;
}

.pre.go .tx-dst {
  animation: tx-in 1.2s var(--ease) 1s both;
}

.pre.go .tx-beam {
  animation: tx-beam 1.2s var(--ease) 1s both;
}

/* ───────── 滚动显现 ───────── */

.fx .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), border-color 0.3s;
  transition-delay: calc(var(--i, 0) * 110ms), calc(var(--i, 0) * 110ms), 0s;
}

.fx .reveal.in {
  opacity: 1;
  transform: none;
}

/* ───────── 减少动态效果 ───────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ───────── 触屏 ───────── */

@media (pointer: coarse) {
  .desk-ctrl .keys {
    display: none;
  }
}

/* ───────── 窄屏 ───────── */

@media (max-width: 900px) {
  .hero {
    padding-top: 60px;
  }

  .try {
    margin-top: 44px;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .grid.three .visual {
    height: 260px;
  }

  .grid.three .shot {
    width: 118%;
  }

  .facts {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 52px;
  }

  .facts div:nth-child(3) {
    border-left: 0;
  }

  .facts div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .block {
    padding-block: 44px;
  }

  .privacy {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 30px 26px;
  }

  .shield {
    width: 84px;
    height: 84px;
  }

  .get {
    padding: 32px 22px;
    border-radius: 24px;
  }
}

@media (max-width: 640px) {
  .nav-link {
    padding: 7px 8px;
    font-size: 14px;
  }

  .brand-text small {
    display: none;
  }

  .desk-ctrl {
    gap: 8px;
  }

  .desk-ctrl .keys {
    display: none;
  }

  .dbtn {
    flex: 1;
    justify-content: center;
    padding: 0 12px;
  }

  .btn.ghost,
.dbtn.ghost {
    flex: none;
  }

  .desk-status {
    order: 5;
    flex-basis: 100%;
    min-width: 0;
  }

  .visual {
    height: 250px;
  }

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

@media (max-width: 440px) {
  .nav-link[href^="https"] {
    display: none;
  }
}
