/*
 * TPOAD Review 共用样式。
 * 设计体系与 TPOAD Transfer（transfer.tpoad.com，tpoad-transfer/apps/web/app/globals.css）保持一家：
 * 暖白纸底、四角柔和彩色光斑、毛玻璃页头、光谱细描边卡片、墨黑/品牌红按钮、胶囊标签、rise 入场动效。
 * 只放三页共用的部件；页面专属样式留在各自 HTML 里。类名刻意避开 review.html 已有的 .hint/.chip/.badge/.row。
 */
:root {
  --ink: #11100e;
  --ink-2: #3d3b36;
  --muted: #6f6c65;
  --paper: #fbfaf7;
  --card: #ffffff;
  --line: rgba(17, 16, 14, 0.12);
  --line-strong: rgba(17, 16, 14, 0.22);
  --red: #ff362c;
  --red-deep: #d92a21;
  --amber: #ffb020;
  --teal: #16b7aa;
  --blue: #96a9ff;
  --violet: #b48cff;
  --ok: #1f9d55;
  --font-latin: "Helvetica Neue", "Segoe UI Variable Display", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-cn: "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius-card: 24px;
  --radius-pill: 999px;
  --stroke-spectrum: linear-gradient(90deg, rgba(22, 183, 170, .78) 0%, rgba(150, 169, 255, .85) 50%, rgba(255, 54, 44, .78) 100%);
  --glow-spectrum: 0 1px 2px rgba(17, 16, 14, .05), 0 20px 44px -18px rgba(17, 16, 14, .16);
}

* { box-sizing: border-box; }
/* 页面里有 display:grid/flex 的区块，hidden 属性必须压过它们，否则 JS 的 el.hidden=true 不生效 */
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-cn), var(--font-latin);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; background: rgba(17,16,14,.06); padding: 2px 6px; border-radius: 6px; }

/* ---------- 版式骨架 ---------- */
.shell { position: relative; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip; }
.container { position: relative; z-index: 1; width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--paper) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.brand { display: inline-flex; flex-direction: column; gap: 4px; flex: none; line-height: 1; }
.brand img { height: 24px; width: auto; display: block; }
.brand__tag { font-family: var(--font-latin); font-size: 8px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); padding-left: 34px; }
.nav { display: flex; align-items: center; gap: 8px; flex: none; }
.nav a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--radius-pill); font-size: 14px; color: var(--ink-2); transition: background 160ms var(--ease-out); white-space: nowrap; }
.nav a:hover { background: rgba(17,16,14,.06); }
.nav a.nav__cta { border: 1px solid var(--line); background: var(--card); font-weight: 500; }
.nav a.nav__cta:hover { border-color: var(--line-strong); background: var(--card); }

.site-footer { margin-top: auto; padding: 36px 0; color: var(--muted); font-size: 13px; position: relative; z-index: 1; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- 光斑背景（和 Transfer 同一组色：红 / 琥珀 / 青 / 蓝，另加一团紫） ----------
 * 2026-09-13 老板要"背景渐变色漂移起来"：原来 22–30s 单程、只挪 4–6vw、还用 ease-out（越到后面越慢），
 * 肉眼几乎看不出在动。改成多路点位的 ease-in-out 循环，16–22s 一轮，位移 10–16vw，并叠缩放。
 */
.aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i, .aurora::before { position: absolute; display: block; border-radius: 50%; filter: blur(64px); opacity: .6; will-change: transform; }
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -12vw; bottom: -18vw; background: radial-gradient(closest-side, var(--red), transparent 70%); animation: drift-a 17s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 40vw; height: 40vw; left: 28vw; bottom: -22vw; background: radial-gradient(closest-side, var(--amber), transparent 70%); animation: drift-b 20s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 44vw; height: 44vw; right: -8vw; bottom: -16vw; background: radial-gradient(closest-side, var(--teal), transparent 70%); animation: drift-c 18s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { width: 34vw; height: 34vw; right: 18vw; bottom: -20vw; background: radial-gradient(closest-side, var(--blue), transparent 70%); animation: drift-d 22s ease-in-out infinite alternate; }
.aurora::before { content: ""; width: 30vw; height: 30vw; left: 8vw; bottom: -12vw; background: radial-gradient(closest-side, var(--violet), transparent 70%); opacity: .45; animation: drift-e 19s ease-in-out infinite alternate; }
.aurora::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--paper) 0%, transparent 40%, transparent 100%); }
.aurora--quiet i { opacity: .42; }
.aurora--quiet::before { opacity: .3; }
@keyframes drift-a { 0% { transform: translate3d(0,0,0) scale(1); } 33% { transform: translate3d(11vw,-8vw,0) scale(1.16); } 66% { transform: translate3d(-3vw,-15vw,0) scale(.92); } 100% { transform: translate3d(7vw,-4vw,0) scale(1.08); } }
@keyframes drift-b { 0% { transform: translate3d(0,0,0) scale(1.05); } 40% { transform: translate3d(-10vw,-11vw,0) scale(.9); } 75% { transform: translate3d(7vw,-16vw,0) scale(1.18); } 100% { transform: translate3d(-4vw,-6vw,0) scale(1); } }
@keyframes drift-c { 0% { transform: translate3d(0,0,0) scale(1); } 30% { transform: translate3d(-11vw,-6vw,0) scale(1.14); } 70% { transform: translate3d(-2vw,-15vw,0) scale(.93); } 100% { transform: translate3d(-9vw,-3vw,0) scale(1.06); } }
@keyframes drift-d { 0% { transform: translate3d(0,0,0) scale(.95); } 50% { transform: translate3d(9vw,-13vw,0) scale(1.2); } 100% { transform: translate3d(-7vw,-5vw,0) scale(1); } }
@keyframes drift-e { 0% { transform: translate3d(0,0,0) scale(1); } 45% { transform: translate3d(16vw,-10vw,0) scale(1.22); } 100% { transform: translate3d(30vw,-3vw,0) scale(.95); } }

/* ---------- 图标微动效 ----------
 * 循环位移用 ease-in-out；缩放不从 0 起跳；悬停反馈 ≤ 250ms（见长期记忆"程序化动效丝滑配方"）。
 */
.dot { animation: dot-pulse 2.4s ease-out infinite; }
@keyframes dot-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,54,44,.45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255,54,44,0); } }

.pill svg, .pill svg * { transform-box: fill-box; transform-origin: center; }
/* 首页胶囊：手机上下浮 / 扫描框中心呼吸 / 刷新转一圈停一下 */
.pills .pill:nth-child(1) svg { animation: ico-bob 2.4s ease-in-out infinite alternate; }
.pills .pill:nth-child(2) svg circle { animation: ico-pulse 2s ease-in-out infinite; }
.pills .pill:nth-child(3) svg { animation: ico-spin-pause 3.2s cubic-bezier(.77,0,.175,1) infinite; }
/* 后台胶囊：打勾一笔画出 / 盾牌呼吸 / 下载箭头往下沉 */
.login__pills .pill:nth-child(1) svg path { stroke-dasharray: 14; animation: ico-draw 3s ease-in-out infinite; }
.login__pills .pill:nth-child(2) svg { animation: ico-breathe 2.6s ease-in-out infinite; }
.login__pills .pill:nth-child(3) svg { animation: ico-drop 1.8s ease-in-out infinite; }

@keyframes ico-bob { from { transform: translateY(1.5px); } to { transform: translateY(-1.5px); } }
@keyframes ico-pulse { 0%, 100% { transform: scale(.78); opacity: .7; } 50% { transform: scale(1.22); opacity: 1; } }
@keyframes ico-spin-pause { 0% { transform: rotate(0deg); } 55%, 100% { transform: rotate(360deg); } }
@keyframes ico-draw { 0% { stroke-dashoffset: 14; } 40%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 14; } }
@keyframes ico-breathe { 0%, 100% { transform: scale(.92); } 50% { transform: scale(1.08); } }
@keyframes ico-drop { 0%, 100% { transform: translateY(-1.5px); } 50% { transform: translateY(1.5px); } }
@keyframes ico-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }

/* ---------- 全站图标动效 ----------
 * 老板 2026-09-13：「但凡有图标我都要动态图标」（长期记忆「所有界面图标一律动态」，所有项目通用）。
 * 用法：给 svg 或其中的形状加 class；幅度小、2–4 秒一轮、ease-in-out；同屏用 style="--ai-d:.4s" 错开相位。
 * ai-trace 描边动画要给形状加 pathLength="100"。
 */
.ai, .ai * { transform-box: fill-box; transform-origin: center; }
.ai-bob { animation: ico-bob 2.6s ease-in-out var(--ai-d, 0s) infinite alternate; }
.ai-breathe { animation: ico-breathe 2.8s ease-in-out var(--ai-d, 0s) infinite; }
.ai-pulse { animation: ico-pulse 2.4s ease-in-out var(--ai-d, 0s) infinite; }
.ai-nudge { animation: ico-nudge 2.2s ease-in-out var(--ai-d, 0s) infinite; }
.ai-nudge-l { animation: ico-nudge-l 2.2s ease-in-out var(--ai-d, 0s) infinite; }
.ai-spin { animation: ico-spin-pause 4s cubic-bezier(.77,0,.175,1) var(--ai-d, 0s) infinite; }
.ai-tilt { animation: ico-tilt 3.2s ease-in-out var(--ai-d, 0s) infinite; }
.ai-fly { animation: ico-fly 2.8s ease-in-out var(--ai-d, 0s) infinite; }
.ai-turn { animation: ico-turn 3.6s cubic-bezier(.77,0,.175,1) var(--ai-d, 0s) infinite; }
.ai-trace { stroke-dasharray: 100; animation: ico-trace 3.6s ease-in-out var(--ai-d, 0s) infinite; }
@keyframes ico-nudge-l { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-3px); } }
@keyframes ico-tilt { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes ico-fly { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2px, -2px); } }
@keyframes ico-turn { 0%, 55%, 100% { transform: rotate(0deg); } 25% { transform: rotate(90deg); } }
/* 从四成开始描、描完停住：任何时刻图标都看得见（从 0 描起时截图里对勾只剩一个点） */
@keyframes ico-trace { 0% { stroke-dashoffset: 60; } 35%, 100% { stroke-dashoffset: 0; } }
/* 语言切换的地球：隔几秒转一圈 */
.lang__ico { transform-origin: center; animation: ico-spin-pause 6s cubic-bezier(.77,0,.175,1) 1.5s infinite; }
.lang__chev { animation: ico-drop 2.6s ease-in-out .8s infinite; }
@media (prefers-reduced-motion: reduce) {
  .ai, .ai *, .lang__ico, .dot, .pill svg, .pill svg *, .drop__icon svg { animation: none !important; }
}

/* 悬停反馈：按钮箭头往前顶、刷新图标转半圈、语言地球转半圈 */
.btn svg { transition: transform 220ms var(--ease-out); }
.btn:hover svg:last-child { transform: translateX(3px); }
#btnRefresh:hover svg { transform: rotate(180deg); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 14px; border: 0; font-weight: 600; font-size: 15px;
  background: var(--ink); color: #fff; white-space: nowrap;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background 160ms;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(17,16,14,.18); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: not-allowed; transform: none; box-shadow: none; background: rgba(17,16,14,.07); color: var(--muted); }
.btn--red { background: var(--red); }
.btn--red:hover { background: var(--red-deep); }
.btn--ghost { background: var(--card); border: 1px solid var(--line-strong); color: var(--ink); }
.btn--ghost:hover { background: rgba(17,16,14,.04); box-shadow: none; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn--sm svg { width: 15px; height: 15px; }

/* ---------- 输入 ---------- */
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid #dcd8d3; background: #fcfbfa; outline: none; font-size: 15px;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background 160ms;
}
.input:focus { border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(255,54,44,.08); }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6c65' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }

/* ---------- 光谱细描边卡片（Transfer 的 codecard / panel--glow） ---------- */
.glow { position: relative; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--glow-spectrum); }
.glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--stroke-spectrum);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.card { background: var(--card); border: 1px solid rgba(17,16,14,.07); border-radius: var(--radius-card); box-shadow: 0 24px 60px rgba(17,16,14,.08), 0 2px 6px rgba(17,16,14,.04); }

/* ---------- 胶囊与小标 ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px 0 11px;
  border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--card); font-size: 13.5px; font-weight: 500; color: var(--ink);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.pill svg { width: 17px; height: 17px; flex: none; }
.pill:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(17,16,14,.08); }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--red); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; flex: none; }

/* ---------- 动效 ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.rise { animation: rise 800ms var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

@media (max-width: 760px) {
  .container { width: calc(100% - 32px); }
}
@media (max-width: 480px) {
  .brand img { height: 20px; }
  .brand__tag { display: none; }
  .nav a { padding: 0 10px; font-size: 13px; }
}

/* ---------- 语言切换（与 Transfer 同款） ---------- */
html.i18n-pending body { visibility: hidden; }
.lang { position: relative; flex: none; }
.lang .lang__btn {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  height: 36px; padding: 0 11px 0 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 500;
  transition: border-color 160ms var(--ease-out);
}
.lang .lang__btn:hover { border-color: var(--line-strong); }
.lang .lang__btn svg { width: 16px; height: 16px; flex: none; }
.lang .lang__btn .lang__chev { width: 14px; height: 14px; color: var(--muted); }
.lang .lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(17,16,14,.12); padding: 6px;
  animation: pop 180ms var(--ease-out) both;
}
.lang .lang__item {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 9px; border: 0; background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 400; text-align: left; box-shadow: none; white-space: nowrap;
}
.lang .lang__item:hover { background: rgba(17,16,14,.06); }
.lang .lang__item[aria-current="true"] { font-weight: 600; }
.lang .lang__item[aria-current="true"]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
@media (max-width: 480px) {
  .lang .lang__btn { padding: 0 8px; gap: 5px; font-size: 12px; }
  .lang .lang__btn .lang__ico { display: none; }
}

/* 语言切换：悬停时地球转半圈 */
.lang .lang__btn .lang__ico { transition: transform 600ms var(--ease-out); }
.lang .lang__btn:hover .lang__ico { transform: rotate(180deg); }
