/* ============================================================
   译界 DualTrack — 鸿蒙 6.0 光影设计语言
   毛玻璃 / 高斯模糊 / 光影过渡 / 渐变光影进度条 / 打字机动效
   ============================================================ */
:root {
  --glass-bg: rgba(255, 255, 255, 0.09);
  --glass-bg-strong: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.32);
  --text-main: #f5f7fa;
  --text-sub: rgba(245, 247, 250, 0.72);
  --text-muted: rgba(245, 247, 250, 0.45);
  --blue: #3d7eff;
  --violet: #8b5cf6;
  --green: #34d399;
  --gold: #fbbf24;
  --red: #f87171;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.5, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "HarmonyOS Sans SC", "HarmonyOS Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  background: #0c1020;
  overflow-x: hidden;
}

/* ---------- 背景：必应壁纸 + 蒙版 ---------- */
#bg-wallpaper {
  position: fixed; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  transform: translateZ(0) scale(1.02);   /* GPU 合成层，避免滚动重绘撕裂 */
  will-change: transform;
  transition: background-image 1.2s ease, opacity 1.2s ease;
  opacity: 0;
  backface-visibility: hidden;
}
#bg-wallpaper.loaded { opacity: 1; }
#bg-mask {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(61, 126, 255, 0.16), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(139, 92, 246, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(10, 13, 28, 0.5), rgba(10, 13, 28, 0.62) 55%, rgba(10, 13, 28, 0.78));
  transform: translateZ(0);
  pointer-events: none;
}

/* ---------- 毛玻璃基类 ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.glass::before { /* 顶部高光 */
  content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
  pointer-events: none;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 12px; z-index: 50;
  margin: 12px auto 0; max-width: 1180px;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 22px;
  transition: box-shadow .4s var(--ease-smooth), background .4s;
}
.nav.scrolled { background: var(--glass-bg-strong); box-shadow: 0 12px 48px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.14); }
.nav-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.brand-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--blue), var(--violet), var(--green), var(--blue));
  box-shadow: 0 0 14px rgba(61, 126, 255, .8);
  animation: dotSpin 6s linear infinite;
}
@keyframes dotSpin { to { filter: hue-rotate(360deg); } }
.brand-text { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.brand-text em { font-style: normal; font-size: 12px; color: var(--text-sub); font-weight: 400; margin-left: 4px; }
.nav-links { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-sub); text-decoration: none; font-size: 14px;
  padding: 8px 14px; border-radius: 999px;
  transition: all .35s var(--ease-spring);
}
.nav-links a:hover { color: var(--text-main); background: rgba(255,255,255,.08); transform: translateY(-1px); }
.nav-links a.active {
  color: #fff; background: linear-gradient(135deg, rgba(61,126,255,.35), rgba(139,92,246,.3));
  box-shadow: 0 2px 14px rgba(61,126,255,.35), inset 0 1px 0 rgba(255,255,255,.2);
}
.nav-user { display: flex; align-items: center; gap: 8px; }
.user-chip { font-size: 13px; color: var(--text-sub); padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); }

/* ---------- 布局 ---------- */
/* 快速滚动时临时关闭毛玻璃实时模糊（避免 GPU 重绘撕裂/闪烁），停止滚动即恢复 */
body.scrolling .card, body.scrolling .nav, body.scrolling .footer, body.scrolling .stat-tile, body.scrolling .engine-item {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(16, 20, 38, 0.86);
}
#app { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }
.page { display: none; animation: pageIn .55s var(--ease-spring); }
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(22px) scale(.99); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.hero { text-align: center; margin: 26px 0 26px; }
.hero h1 {
  font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(120deg, #fff 20%, #bcd0ff 55%, #d9c8ff 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 8px 40px rgba(61,126,255,.25);
  animation: heroGlow 5s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  from { filter: drop-shadow(0 4px 18px rgba(61,126,255,.18)); }
  to { filter: drop-shadow(0 4px 30px rgba(139,92,246,.32)); }
}
.hero-sub { margin-top: 10px; color: var(--text-sub); font-size: 14px; }
.hero-chips { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.hero-chip {
  font-size: 12px; color: var(--text-sub);
  padding: 5px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

/* ---------- 卡片 ---------- */
.card { padding: 22px; margin-bottom: 22px; transition: transform .45s var(--ease-spring), box-shadow .45s, background .25s ease; transform: translateZ(0); }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 56px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.16); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; flex-wrap: wrap; }
.card-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-blue { background: var(--blue); box-shadow: 0 0 10px var(--blue); }
.dot-violet { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.dot-green { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot-gold { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.tag { font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 500; }
.tag-local { background: rgba(139,92,246,.22); color: #d8c8ff; border: 1px solid rgba(139,92,246,.4); }
.tag-online { background: rgba(52,211,153,.16); color: #b5f0d8; border: 1px solid rgba(52,211,153,.35); }
.tag-best { background: linear-gradient(135deg, rgba(251,191,36,.28), rgba(248,113,113,.22)); color: #ffe8b0; border: 1px solid rgba(251,191,36,.5); animation: bestGlow 2.4s ease-in-out infinite; }
@keyframes bestGlow { 0%,100% { box-shadow: 0 0 6px rgba(251,191,36,.25);} 50% { box-shadow: 0 0 16px rgba(251,191,36,.55);} }

/* ---------- 输入区 ---------- */
textarea, input[type=text], input[type=email], input[type=password] {
  width: 100%; resize: vertical;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 15px; line-height: 1.7;
  padding: 14px 16px;
  font-family: inherit;
  transition: border-color .3s, box-shadow .3s, background .3s;
  outline: none;
}
textarea:focus, input:focus {
  border-color: rgba(61,126,255,.65);
  box-shadow: 0 0 0 3px rgba(61,126,255,.18), 0 4px 22px rgba(61,126,255,.15);
  background: rgba(0,0,0,.3);
}
textarea::placeholder, input::placeholder { color: var(--text-muted); }
.input-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; flex-wrap: wrap; gap: 10px; }
.input-actions { display: flex; gap: 10px; align-items: center; }
.char-count { font-size: 12px; color: var(--text-muted); }

/* ---------- 按钮 ---------- */
.btn {
  border: none; cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 600;
  padding: 11px 28px; border-radius: 999px;
  transition: all .35s var(--ease-spring);
  position: relative; overflow: hidden;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2f6bff, #7a4dff);
  box-shadow: 0 6px 22px rgba(61, 126, 255, .4), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-primary::after { /* 光影扫过 */
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  transition: left .7s var(--ease-smooth);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 30px rgba(61,126,255,.55), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-primary:hover::after { left: 130%; }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost {
  color: var(--text-main); background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
}
.btn-ghost:hover { background: rgba(255,255,255,.18); transform: translateY(-1px); }
.btn-block { width: 100%; margin-top: 12px; }
.btn-mini {
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07);
  color: var(--text-sub); border-radius: 999px; cursor: pointer;
  font-size: 12px; padding: 5px 12px; font-family: inherit;
  transition: all .3s var(--ease-spring);
}
.btn-mini:hover { background: rgba(255,255,255,.16); color: #fff; transform: translateY(-1px); }

/* ---------- 加载动画 ---------- */
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: spin .8s linear infinite; display: inline-block; vertical-align: -4px; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  border-radius: 8px; margin: 8px 0;
  background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.14) 50%, rgba(255,255,255,.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 深度翻译 ---------- */
.deep-card { border: 1px solid rgba(139,92,246,.35); }
.progress-wrap { margin: 4px 0 16px; display: flex; align-items: center; gap: 12px; }
.progress-bar {
  flex: 1; height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08);
}
.progress-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff, #8b5cf6, #ec4899, #8b5cf6, #2f6bff);
  background-size: 300% 100%;
  animation: gradientFlow 2.2s linear infinite;
  box-shadow: 0 0 14px rgba(139, 92, 246, .65);
  transition: width .5s var(--ease-smooth);
}
@keyframes gradientFlow { from { background-position: 0% 0; } to { background-position: 300% 0; } }
.progress-label { font-size: 12px; color: var(--text-sub); white-space: nowrap; }
.deep-section { margin-top: 10px; }
.section-label {
  font-size: 12px; color: var(--text-sub); letter-spacing: 2px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.section-label::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, var(--blue), var(--violet)); }
.typewriter, .result-body, .analysis { font-size: 15.5px; line-height: 1.9; word-break: break-word; }
.typewriter .caret {
  display: inline-block; width: 2px; height: 1.1em; background: var(--violet);
  vertical-align: -2px; margin-left: 2px;
  animation: caretBlink .9s steps(1) infinite;
  box-shadow: 0 0 8px var(--violet);
}
@keyframes caretBlink { 50% { opacity: 0; } }
.deep-error { margin-top: 12px; color: #ffd7d7; background: rgba(248,113,113,.14); border: 1px solid rgba(248,113,113,.4); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; }

/* ---------- 双轨结果 ---------- */
.dual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
/* ---------- 阶段进度条 ---------- */
.stage-track { display: flex; align-items: center; gap: 6px; margin: 6px 0 16px; flex-wrap: wrap; }
.stage-step {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text-muted);
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  transition: all .45s var(--ease-spring);
  white-space: nowrap;
}
.stage-step i {
  font-style: normal; width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; background: rgba(255,255,255,.12); color: var(--text-sub);
  transition: all .4s;
}
.stage-step.active {
  color: #fff; border-color: rgba(61,126,255,.55);
  background: linear-gradient(135deg, rgba(61,126,255,.28), rgba(139,92,246,.22));
  box-shadow: 0 0 18px rgba(61,126,255,.3);
}
.stage-step.active i { background: linear-gradient(135deg, #2f6bff, #7a4dff); color: #fff; }
.stage-step.active .spinner-ring {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.stage-step.done { color: var(--text-sub); border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); }
.stage-step.done i { background: rgba(52,211,153,.8); color: #06281c; }
.stage-line { flex: 0 0 16px; height: 1px; background: rgba(255,255,255,.18); }

.best-pick {
  border: 1px solid rgba(251,191,36,.5);
  background: linear-gradient(135deg, rgba(251,191,36,.12), rgba(255,255,255,.05));
  border-radius: var(--radius-md);
  padding: 14px 16px; margin-bottom: 14px;
  animation: itemIn .5s var(--ease-spring);
  box-shadow: 0 4px 22px rgba(251,191,36,.12);
}
.best-pick-head { font-size: 13px; font-weight: 700; color: #ffe8b0; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.best-pick-text { font-size: 15.5px; line-height: 1.85; }
.best-pick-comment { font-size: 12.5px; margin-top: 8px; }
.engine-item {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  border-radius: var(--radius-md);
  padding: 14px 16px; margin-bottom: 12px;
  transition: all .35s var(--ease-spring);
  animation: itemIn .5s var(--ease-spring) backwards;
}
.engine-item:nth-child(2) { animation-delay: .06s; }
.engine-item:nth-child(3) { animation-delay: .12s; }
.engine-item:nth-child(4) { animation-delay: .18s; }
@keyframes itemIn { from { opacity: 0; transform: translateY(14px); } }
.engine-item:hover { background: rgba(255,255,255,.09); transform: translateX(3px); }
.engine-item.best { border-color: rgba(251,191,36,.55); background: rgba(251,191,36,.08); box-shadow: 0 4px 24px rgba(251,191,36,.15); }
.engine-item.failed { opacity: .55; }
.engine-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.engine-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.engine-meta { font-size: 12px; color: var(--text-muted); }
.score-pill { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: rgba(61,126,255,.2); border: 1px solid rgba(61,126,255,.4); color: #cfe0ff; }
.engine-text { font-size: 14.5px; line-height: 1.8; }
.latency { font-size: 12px; color: var(--text-muted); margin-right: 6px; }

/* ---------- markdown 渲染 ---------- */
.md { font-size: 14.5px; line-height: 1.85; }
.md h1, .md h2, .md h3 { margin: 14px 0 8px; font-size: 16px; }
.md h1 { font-size: 18px; }
.md p { margin: 6px 0; }
.md ul, .md ol { margin: 6px 0 6px 22px; }
.md li { margin: 3px 0; }
.md strong { color: #ffd9a0; }
.md code { background: rgba(255,255,255,.1); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.md table { border-collapse: collapse; margin: 10px 0; width: 100%; }
.md th, .md td { border: 1px solid rgba(255,255,255,.14); padding: 6px 10px; font-size: 13px; text-align: left; }
.md th { background: rgba(255,255,255,.08); }
.md blockquote { border-left: 3px solid var(--blue); padding-left: 12px; color: var(--text-sub); margin: 8px 0; }

/* ---------- 单词卡片 ---------- */
.word-card { animation: itemIn .5s var(--ease-spring); }
.word-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.word-title { font-size: 32px; font-weight: 800; }
.word-phonetic { color: var(--text-sub); font-size: 16px; }
.word-play { cursor: pointer; color: var(--blue); font-size: 18px; }
.sense-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.1); }
.sense-type {
  flex-shrink: 0; min-width: 44px; text-align: center; height: fit-content;
  font-size: 12px; color: #cfe0ff; background: rgba(61,126,255,.2);
  border: 1px solid rgba(61,126,255,.35); border-radius: 6px; padding: 2px 6px;
}
.sense-def { font-size: 14.5px; line-height: 1.7; }
.example-item { background: rgba(255,255,255,.05); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 8px; font-size: 13.5px; }
.example-item .zh { color: var(--text-sub); margin-top: 3px; }
.word-input-row { display: flex; gap: 12px; }
.word-input-row input { flex: 1; }

/* ---------- tabs ---------- */
.tabs-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  border: 1px solid transparent; background: transparent; color: var(--text-sub);
  font-family: inherit; font-size: 14px; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  transition: all .3s var(--ease-spring);
}
.tab:hover { color: #fff; background: rgba(255,255,255,.07); }
.tab.active {
  color: #fff; background: linear-gradient(135deg, rgba(61,126,255,.3), rgba(139,92,246,.25));
  border-color: rgba(61,126,255,.4); box-shadow: 0 2px 12px rgba(61,126,255,.25);
}

/* ---------- 历史 / 管理 ---------- */
.history-item {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 12px;
  transition: background .3s;
}
.history-item:hover { background: rgba(255,255,255,.09); }
.history-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.history-src { font-size: 13.5px; color: var(--text-sub); margin-bottom: 6px; word-break: break-word; }
.history-body { font-size: 14px; line-height: 1.75; word-break: break-word; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-tile {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md); padding: 16px; text-align: center;
  transition: all .35s var(--ease-spring);
}
.stat-tile:hover { transform: translateY(-3px); background: rgba(255,255,255,.1); }
.stat-num { font-size: 26px; font-weight: 800; background: linear-gradient(120deg, #7aa8ff, #c3a6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-wrap th, .table-wrap td { padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
.table-wrap th { color: var(--text-sub); font-weight: 600; white-space: nowrap; }
.table-wrap td { word-break: break-all; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.form-grid label { font-size: 12px; color: var(--text-sub); display: block; margin-bottom: 4px; }
.form-grid input { padding: 9px 12px; font-size: 13.5px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 10, 22, 0.55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .3s ease;
  padding: 20px;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: 100%; max-width: 420px; padding: 24px; animation: modalIn .45s var(--ease-spring); background: rgba(24, 28, 48, 0.72); }
@keyframes modalIn { from { opacity: 0; transform: translateY(26px) scale(.96); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
.auth-switch { display: flex; justify-content: space-between; font-size: 13px; margin-top: 6px; }
.auth-switch a { color: var(--text-sub); text-decoration: none; }
.auth-switch a:hover { color: #fff; }
.auth-error { color: #ffb4b4; font-size: 13px; min-height: 16px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 200; pointer-events: none;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast-item {
  background: rgba(20, 24, 44, .85);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--text-main); font-size: 14px;
  padding: 11px 22px; border-radius: 999px;
  box-shadow: 0 10px 34px rgba(0,0,0,.4);
  opacity: 0; animation: toastIn .4s var(--ease-spring) forwards;
}
.toast-item.out { animation: toastOut .4s ease forwards; }
@keyframes toastIn { to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(14px); } }

.footer {
  max-width: 1180px; margin: 0 auto 22px; padding: 12px 20px;
  text-align: center; font-size: 12px; color: var(--text-muted);
  border-radius: var(--radius-md);
}
.muted { color: var(--text-muted); font-size: 13.5px; }
.center { text-align: center; padding: 30px 0; }
.error-box { color: #ffd7d7; background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.35); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin-top: 12px; }
.ok-box { color: #d3f8e6; background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.35); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin-top: 12px; }
.grammar-err-item { background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.28); border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 10px; }
.grammar-err-item .etype { color: #ffb4b4; font-weight: 700; font-size: 13px; }
.grammar-err-item .ereason { color: var(--text-sub); font-size: 13.5px; margin-top: 4px; }
.grammar-err-item .esugg { margin-top: 6px; font-size: 14px; }
.grammar-err-item .esugg b { color: #9fe8c5; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .dual-grid { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; top: 6px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  #app { padding: 18px 12px 50px; }
  .card { padding: 16px; }
  .word-title { font-size: 26px; }
  .hero h1 { font-size: 24px; }
}
