/* ============================================================
   词间 LexiWord · 极简静奢 高级版
   Hero 仪表盘 · 超大字号 · 大留白 · 去边框分层 · 冰蓝点缀
   ============================================================ */

:root {
  --bg: #080b14;
  --bg-soft: #0b1020;
  --text: #f2f5fb;
  --text-2: #b9c1d2;
  --muted: #7d8699;
  --faint: rgba(255, 255, 255, 0.055);
  --faint-2: rgba(255, 255, 255, 0.09);
  --accent: #8ab6f2;
  --accent-light: #b3cff8;
  --accent-dark: #5b8fd6;
  --grad: linear-gradient(120deg, #b3cff8, #8ab6f2 55%, #5b8fd6);
  --danger: #e2836f;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

:root {
  font-family: "DM Sans", "Noto Sans SC", -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  margin: 0; min-width: 320px;
  background:
    radial-gradient(1000px 560px at 78% -14%, rgba(138, 182, 242, 0.10), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, p { margin-top: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
.hidden { display: none !important; }
i[data-lucide], svg.lucide { width: 18px; height: 18px; stroke-width: 1.8; flex: none; }
.muted { color: var(--muted); }
::selection { background: rgba(138, 182, 242, 0.3); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1d2740; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #2a3555; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; z-index: 60; right: 26px; top: 24px;
  padding: 14px 22px;
  background: rgba(12, 17, 30, 0.94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--faint-2);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-10px);
  pointer-events: none; transition: 0.25s var(--ease);
  max-width: 360px; font-size: 13px; font-weight: 500;
}
#toast.show { opacity: 1; transform: none; }
#toast.error { border-color: rgba(226, 131, 111, 0.45); color: #f4b8a9; }

/* ---------- 按钮 ---------- */
.button {
  border: 0; min-height: 47px;
  border-radius: 999px;
  padding: 0 26px;
  display: inline-flex; gap: 9px; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; letter-spacing: 0.2px;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s;
}
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(-1px) scale(0.97); }
.button.primary {
  color: #06101f;
  background: var(--grad);
  box-shadow: 0 16px 40px -16px rgba(91, 143, 214, 0.7);
}
.button.primary:hover:not(:disabled) { box-shadow: 0 22px 52px -16px rgba(91, 143, 214, 0.8); }
.button.secondary {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--faint-2);
}
.button.secondary:hover:not(:disabled) { border-color: rgba(138, 182, 242, 0.5); color: var(--accent-light); }

.icon-button {
  height: 36px; width: 36px; border: 0; background: transparent;
  color: var(--muted); display: grid; place-items: center;
  border-radius: 10px;
  transition: background 0.18s, color 0.18s, transform 0.12s var(--ease);
}
.icon-button:hover { background: rgba(138, 182, 242, 0.1); color: var(--accent-light); }
.icon-button:active { transform: scale(0.9); }

/* ---------- 品牌 / 标签 ---------- */
.brand-mark {
  background: var(--grad); color: #06101f;
  width: 38px; height: 38px; flex: none;
  border-radius: 12px; display: grid; place-items: center;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 20px; font-weight: 700; line-height: 1;
}
.eyebrow {
  color: var(--accent-light);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  opacity: 0.85;
}

/* ---------- 输入 ---------- */
.input-wrap {
  display: flex; align-items: center; gap: 12px;
  border: 0; border-bottom: 1px solid var(--faint-2);
  background: transparent;
  border-radius: 0;
  padding: 0 2px; margin-bottom: 26px;
  color: var(--muted);
  transition: border-color 0.2s;
}
.input-wrap:focus-within { border-bottom-color: var(--accent); color: var(--accent-light); }
.input-wrap input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  height: 50px; font-size: 15px; color: var(--text);
}
.input-wrap input::placeholder { color: #4f5871; }

/* ============================================================
   Auth
   ============================================================ */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 54% 46%; }

.auth-art {
  position: relative; overflow: hidden;
  min-height: 680px;
  background: linear-gradient(160deg, #0c1428 0%, #080b14 62%);
  border-right: 1px solid var(--faint);
  padding: 46px 58px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-art::before {
  content: ""; position: absolute;
  width: 760px; height: 760px; border-radius: 50%;
  border: 1px solid rgba(138, 182, 242, 0.12);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 110px rgba(138, 182, 242, 0.03), inset 0 0 140px rgba(138, 182, 242, 0.06);
}
.auth-art::after {
  content: ""; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 182, 242, 0.20), transparent 66%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.auth-art-top, .auth-art-bottom {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: 2.4px; color: var(--accent-light);
}
.auth-art-bottom { justify-content: space-between; letter-spacing: 0; font-size: 13px; font-weight: 400; color: var(--text-2); }
.auth-art-bottom span:last-child { font-size: 11px; letter-spacing: 1.6px; color: var(--muted); }

.auth-sample {
  position: relative; z-index: 1; align-self: center;
  width: min(470px, 86%);
  background: rgba(11, 16, 30, 0.72);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--faint-2);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 44px 48px;
  transform: rotate(-2deg);
}
.sample-label { font-size: 10px; font-weight: 600; letter-spacing: 3px; color: var(--muted); margin-bottom: 32px; }
.sample-word {
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: -2.5px; font-weight: 700; line-height: 1.1;
  overflow-wrap: anywhere;
  background: linear-gradient(120deg, #f2f5fb 30%, var(--accent-light) 78%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.sample-accent { -webkit-text-fill-color: var(--accent); }
.sample-pron { font-size: 13px; color: var(--muted); margin-top: 14px; letter-spacing: 0.6px; }
.sample-rule { height: 1px; background: var(--faint-2); margin: 34px 0 28px; }
.sample-meaning { font-size: 17px; line-height: 1.55; color: var(--text-2); }
.sample-translation { font-size: 14px; color: var(--accent-light); margin-top: 20px; font-weight: 500; }

.auth-side { display: grid; place-items: center; padding: 44px; }
.auth-form { width: min(380px, 100%); }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 34px; font-size: 18px; font-weight: 700; }
.auth-form .eyebrow { display: block; margin-bottom: 18px; }
.auth-form h1 { font-size: clamp(32px, 3.4vw, 40px); font-weight: 700; letter-spacing: -0.03em; margin: 0 0 12px; }
.auth-form > p { font-size: 14px; color: var(--muted); margin-bottom: 46px; }
.auth-form label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.6px; color: var(--muted); margin: 0 0 4px; }
.auth-submit { width: 100%; margin-top: 14px; }
.auth-switch { margin: 28px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.auth-switch button { border: 0; background: none; padding: 0; color: var(--accent-light); font-weight: 600; font-size: 13px; }
.auth-switch button:hover { text-decoration: underline; }

/* ============================================================
   Shell
   ============================================================ */
.app-shell { min-height: 100vh; display: flex; }

.sidebar {
  width: 240px; flex: none;
  background: transparent;
  border-right: 1px solid var(--faint);
  padding: 42px 22px 24px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { padding: 0 10px; display: flex; align-items: center; gap: 12px; margin-bottom: 60px; }
.sidebar-brand strong { display: block; font-size: 19px; line-height: 1.1; letter-spacing: 0.6px; }
.sidebar-brand small { display: block; font-size: 8.5px; color: var(--muted); font-weight: 600; letter-spacing: 2.6px; margin-top: 5px; }
.sidebar-section-label { padding: 0 12px; color: var(--muted); font-size: 9.5px; font-weight: 600; letter-spacing: 2.6px; margin-bottom: 14px; opacity: 0.7; }

.navigation { display: grid; gap: 3px; }
.nav-item {
  width: 100%; height: 45px;
  display: flex; align-items: center; gap: 13px;
  text-align: left; border: 0; background: transparent;
  color: var(--muted); padding: 0 14px; border-radius: 11px;
  font-size: 13.5px; font-weight: 500;
  transition: background 0.18s, color 0.18s;
}
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--text); background: rgba(138, 182, 242, 0.08); }
.nav-item svg { transition: transform 0.22s var(--ease); }
.nav-item:hover svg, .nav-item.active svg { transform: translateX(2px); }
.nav-item span { flex: 1; }
.nav-count {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 7px; background: rgba(138, 182, 242, 0.16); color: var(--accent-light);
  display: grid; place-items: center; font-size: 10.5px; font-weight: 600;
}

.sidebar-bottom { margin-top: auto; }
.sidebar-tip {
  display: flex; align-items: flex-start; gap: 10px;
  color: var(--muted); font-size: 11.5px; line-height: 1.65;
  padding: 0 12px; margin-bottom: 22px;
}
.sidebar-tip svg { width: 15px; height: 15px; color: var(--accent); margin-top: 2px; }
.account { border-top: 1px solid var(--faint); padding: 18px 4px 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-avatar {
  height: 36px; width: 36px; flex: none; display: grid; place-items: center;
  border-radius: 11px; background: rgba(138, 182, 242, 0.14);
  color: var(--accent-light); font-weight: 600; font-size: 14px;
}
.account-info { flex: 1; min-width: 0; }
.account-info strong, .account-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-info strong { font-size: 12.5px; }
.account-info small { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.main-content {
  flex: 1; min-width: 0; max-width: 1300px; margin: 0 auto;
  padding: 60px clamp(28px, 6vw, 96px) 120px;
}

.mobile-header { display: none; }
.mobile-nav { display: none; }

/* ============================================================
   Hero 大焦点区
   ============================================================ */
.page-hero {
  position: relative;
  padding: 10px 0 58px;
  margin-bottom: 60px;
  border-bottom: 1px solid var(--faint);
}
.page-hero::before {
  content: ""; position: absolute;
  width: 820px; height: 500px;
  top: -240px; left: -140px;
  background: radial-gradient(circle, rgba(138, 182, 242, 0.14), transparent 62%);
  pointer-events: none; z-index: 0;
  animation: glowPulse 10s ease-in-out infinite;
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(46px, 7vw, 82px);
  font-weight: 700; letter-spacing: -0.045em; line-height: 1.0;
  margin: 22px 0 22px;
}
.heading-dot { color: var(--accent); }
.hero-sub { font-size: 16.5px; color: var(--muted); margin: 0 0 52px; max-width: 460px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(44px, 9vw, 110px); margin-bottom: 50px; }
.hero-stat strong {
  display: block;
  font-size: clamp(38px, 4.6vw, 56px);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.hero-stat span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 14px; letter-spacing: 0.3px; }
.hero-cta { margin-top: 4px; }

/* ============================================================
   词库
   ============================================================ */
.section-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-top h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.section-top .muted { font-size: 12.5px; display: block; margin-top: 5px; }

.section-actions { display: flex; align-items: center; gap: 10px; }
.section-tools { display: flex; align-items: center; gap: 8px; }
#batch-count { font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }

.word-groups {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px; padding-bottom: 20px;
  border-bottom: 1px solid var(--faint);
}
.word-group {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--faint-2); background: rgba(255, 255, 255, 0.02);
  color: var(--text-2); padding: 8px 15px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; max-width: 300px;
  transition: all 0.16s var(--ease);
}
.word-group:hover { border-color: rgba(255, 255, 255, 0.16); color: var(--text); }
.word-group.active {
  background: rgba(138, 182, 242, 0.13);
  border-color: rgba(138, 182, 242, 0.5);
  color: var(--accent-light);
}
.word-group svg { width: 14px; height: 14px; opacity: 0.75; flex: none; }
.word-group-name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-group-count {
  font-size: 11px; color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 7px; border-radius: 999px; flex: none;
}
.word-group.active .word-group-count { color: var(--accent-light); background: rgba(138, 182, 242, 0.18); }
.word-group.new { border-style: dashed; color: var(--muted); }
.word-group.new:hover { color: var(--accent-light); border-color: rgba(138, 182, 242, 0.5); }

.text-button {
  border: 0; background: transparent; color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; padding: 9px 13px; border-radius: 10px;
  white-space: nowrap; transition: color 0.16s, background 0.16s;
}
.text-button:hover { color: var(--accent-light); background: rgba(138, 182, 242, 0.08); }
.text-button.danger { color: #e9a08e; }
.text-button.danger:hover { color: #f4b8a9; background: rgba(226, 131, 111, 0.1); }
.text-button svg { width: 16px; height: 16px; }

.search-box {
  display: flex; align-items: center; gap: 10px;
  width: min(300px, 46%);
  border: 0; border-bottom: 1px solid var(--faint-2);
  background: transparent; border-radius: 0; padding: 0 2px;
  color: var(--muted); transition: border-color 0.2s;
}
.search-box:focus-within { border-bottom-color: var(--accent); color: var(--accent-light); }
.search-box input { flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: var(--text); }
.search-box input::placeholder { color: #4f5871; }

.category-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.category-tabs button {
  border: 1px solid var(--faint-2); background: transparent; color: var(--muted);
  padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 500;
  transition: all 0.16s var(--ease);
}
.category-tabs button:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.16); }
.category-tabs button.active {
  color: var(--cat, var(--accent-light));
  border-color: var(--cat-bd, rgba(138, 182, 242, 0.5));
  background: var(--cat-bg, rgba(138, 182, 242, 0.12));
}

.library-layout { display: block; }
.word-list { display: grid; grid-template-columns: minmax(0, 1fr); }

.word-row {
  width: 100%; min-width: 0; display: flex; align-items: center; gap: 22px;
  background: transparent; border: 0;
  border-bottom: 1px solid var(--faint);
  border-radius: 0; padding: 24px 8px;
  text-align: left;
  overflow: hidden;
  content-visibility: auto; contain-intrinsic-size: auto 76px;
  transition: background 0.2s, padding-left 0.2s;
}
.word-row:hover { background: rgba(138, 182, 242, 0.035); padding-left: 14px; }
.word-row.selected { background: rgba(138, 182, 242, 0.06); }
.word-row.checked { background: rgba(138, 182, 242, 0.07); }
.word-check {
  width: 20px; height: 20px; flex: none; border-radius: 6px;
  border: 1.5px solid var(--faint-2); display: grid; place-items: center;
  color: transparent; transition: all 0.16s;
}
.word-check.on { background: var(--grad); border-color: transparent; color: #06101f; }
.word-check svg { width: 13px; height: 13px; }
.word-index { width: 30px; flex: none; color: var(--muted); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.word-main { flex: 1; min-width: 0; }
.word-main strong { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-main span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-arrow { color: var(--muted); opacity: 0.45; }
.word-category {
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.2px;
  white-space: nowrap; padding: 4px 12px; border-radius: 999px;
  color: var(--cat, var(--muted)); background: var(--cat-bg, rgba(255, 255, 255, 0.05));
}
.word-category.awaiting_server { color: #e6b98a; background: rgba(230, 185, 138, 0.13); }
.word-category.pending { color: var(--accent-light); background: rgba(138, 182, 242, 0.12); }
.word-category.needs_review { color: #c6b6f0; background: rgba(198, 182, 240, 0.13); }
.word-category.error { color: #e9a08e; background: rgba(233, 160, 142, 0.13); }
.word-category.partial { color: var(--accent-light); background: rgba(138, 182, 242, 0.12); }

.word-detail {
  position: fixed; z-index: 45;
  top: clamp(112px, 15vh, 168px); right: clamp(16px, 3vw, 40px);
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100vh - 190px); overflow: auto;
  background: #0e1626;
  border: 1px solid var(--faint-2);
  border-radius: 22px;
  box-shadow: 0 40px 90px -28px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(138, 182, 242, 0.06);
  padding: 26px 28px;
  animation: detailIn 0.35s var(--ease) both;
}
.detail-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.detail-top > span { font-size: 10px; font-weight: 600; letter-spacing: 2.8px; color: var(--muted); }
.detail-actions { display: flex; gap: 4px; }
.detail-word {
  font-size: clamp(34px, 3.6vw, 46px); font-weight: 700; letter-spacing: -0.04em;
  margin: 0 0 10px; overflow-wrap: anywhere; line-height: 1.05;
}
.detail-pos { font-size: 12.5px; color: var(--accent-light); font-weight: 500; letter-spacing: 0.4px; overflow-wrap: anywhere; }
.detail-status {
  margin: 22px 0 4px; padding: 14px 0;
  border-top: 1px solid var(--faint); border-bottom: 1px solid var(--faint);
  color: #e6b98a; font-size: 12px; line-height: 1.65;
}
.detail-section { margin-top: 30px; }
.detail-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 2.2px;
  color: var(--muted); margin-bottom: 12px; text-transform: uppercase;
}
.detail-label svg { width: 14px; height: 14px; color: var(--accent); }
.detail-section p { font-size: 14.5px; line-height: 1.75; color: var(--text-2); margin: 0 0 8px; }
.detail-section .translation { color: var(--accent-light); font-size: 18px; font-weight: 500; }
.detail-section .example {
  padding: 2px 0 2px 18px; margin: 0 0 12px;
  border-left: 2px solid rgba(138, 182, 242, 0.4);
  color: var(--text-2); font-size: 13.5px; line-height: 1.7;
}
.example-zh {
  display: block; color: var(--muted); font-size: 12.5px;
  margin-top: 3px; line-height: 1.6;
}
.detail-footer { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--faint); display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }

.empty-state { text-align: center; padding: 90px 30px; }
.empty-icon {
  height: 58px; width: 58px; margin: 0 auto 24px; border-radius: 16px;
  display: grid; place-items: center;
  background: rgba(138, 182, 242, 0.09); color: var(--accent);
}
.empty-icon svg { width: 25px; height: 25px; }
.empty-state h2 { font-size: 21px; font-weight: 600; margin: 0 0 10px; }
.empty-state p { font-size: 13.5px; color: var(--muted); margin: 0 auto 26px; max-width: 380px; }

/* ============================================================
   导入
   ============================================================ */
.import-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
.import-main { min-width: 0; }
.block-heading { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 26px; }
.step-number { height: 28px; width: 28px; flex: none; background: rgba(138, 182, 242, 0.12); color: var(--accent-light); border-radius: 9px; display: grid; place-items: center; font-weight: 600; font-size: 11.5px; }
.block-heading h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 1px 0 6px; }
.block-heading p { font-size: 11.5px; color: var(--muted); margin: 0; }

.import-tabs { display: flex; gap: 30px; border-bottom: 1px solid var(--faint); margin-bottom: 28px; }
.import-tabs button {
  display: flex; align-items: center; gap: 8px;
  border: 0; background: none; color: var(--muted);
  padding: 0 0 14px; font-size: 13.5px; font-weight: 500;
  position: relative; border-bottom: 1.5px solid transparent; margin-bottom: -1px;
  transition: color 0.18s, border-color 0.18s;
}
.import-tabs button:hover { color: var(--text-2); }
.import-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.import-tabs svg { width: 16px; height: 16px; }

.dropzone {
  height: 240px;
  border: 1px dashed var(--faint-2);
  background: transparent; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 20px; outline: 0;
  transition: border-color 0.22s, background 0.22s;
}
.dropzone.drag, .dropzone:hover, .dropzone:focus-visible {
  border-color: rgba(138, 182, 242, 0.6);
  background: rgba(138, 182, 242, 0.035);
}
.drop-icon { height: 56px; width: 56px; border-radius: 16px; display: grid; place-items: center; color: var(--accent-light); background: rgba(138, 182, 242, 0.1); margin-bottom: 6px; }
.drop-icon svg { width: 24px; height: 24px; }
.dropzone strong { font-size: 13.5px; color: var(--text-2); font-weight: 500; overflow-wrap: anywhere; }
.dropzone span { font-size: 11.5px; color: var(--muted); }

#text-panel label { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 12px; }
#word-text {
  width: 100%; min-height: 240px;
  border: 1px solid var(--faint-2); background: transparent;
  border-radius: 18px; padding: 20px; resize: vertical; outline: 0;
  font-size: 14px; line-height: 1.9; color: var(--text);
  transition: border-color 0.2s;
}
#word-text:focus { border-color: rgba(138, 182, 242, 0.5); }
#word-text::placeholder { color: #4f5871; }

.preview-button { margin-top: 24px; }
.preview-section { margin-top: 56px; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.preview-toolbar button { border: 0; background: none; padding: 0; color: var(--accent-light); font-size: 11.5px; font-weight: 500; }
.preview-toolbar button:hover { text-decoration: underline; }
.preview-words { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.preview-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--faint-2); background: transparent;
  color: var(--text-2); padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  transition: all 0.16s var(--ease);
}
.preview-chip:hover { color: var(--text); }
.preview-chip.selected { background: rgba(138, 182, 242, 0.12); border-color: rgba(138, 182, 242, 0.5); color: var(--accent-light); }
.preview-chip svg { width: 14px; height: 14px; }

.connection-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.connection-note svg { width: 16px; height: 16px; margin-top: 2px; color: var(--accent); flex: none; }

.jobs-section { margin-top: 60px; }
.jobs-list { display: grid; }
.job-row {
  display: flex; align-items: center; gap: 18px;
  background: transparent; border: 0; border-bottom: 1px solid var(--faint);
  border-radius: 0; padding: 20px 8px; min-height: 72px;
  transition: background 0.2s, padding-left 0.2s;
}
.job-row:hover { background: rgba(138, 182, 242, 0.035); padding-left: 14px; }
.job-icon { height: 40px; width: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(138, 182, 242, 0.1); color: var(--accent-light); }
.job-main { flex: 1; min-width: 0; }
.job-main strong { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-main span { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.job-status { font-size: 11.5px; color: #e6b98a; white-space: nowrap; font-weight: 500; }
.job-status.ready { color: var(--accent-light); }
.job-status.error { color: #e9a08e; }
.job-row .icon-button { width: 30px; height: 30px; }
.jobs-empty { padding: 30px 18px; border: 1px dashed var(--faint-2); border-radius: 16px; color: var(--muted); text-align: center; font-size: 12px; }

.import-side { min-width: 0; }
.side-illustration {
  position: relative; height: 200px; border-radius: 20px;
  border: 1px solid var(--faint);
  background: radial-gradient(320px 220px at 50% 40%, rgba(138, 182, 242, 0.12), transparent 70%);
  display: grid; place-items: center; margin-bottom: 28px; overflow: hidden;
}
.side-illustration > svg { width: 24px; height: 24px; color: var(--accent); opacity: 0.85; }
.floating-letter { position: absolute; font-weight: 700; font-size: 34px; animation: floaty 5s ease-in-out infinite; }
.floating-letter.one { color: var(--accent-light); top: 28px; left: 36px; }
.floating-letter.two { color: #c6b6f0; font-family: "Noto Sans SC", sans-serif; bottom: 30px; right: 44px; animation-delay: 1.2s; }
.floating-letter.three { color: #e9a08e; top: 46px; right: 62px; font-size: 26px; animation-delay: 2.2s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.import-side h3 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.import-side > p { font-size: 12.5px; line-height: 1.75; color: var(--muted); margin: 0; }
.side-rule { height: 1px; background: var(--faint-2); margin: 26px 0; }
.side-note { display: flex; align-items: flex-start; gap: 9px; font-size: 11.5px; line-height: 1.65; color: var(--muted); }
.side-note svg { width: 15px; height: 15px; margin-top: 2px; flex: none; color: var(--accent); }

/* ============================================================
   复习
   ============================================================ */
.review-meta { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; margin: 0 auto 40px; max-width: 700px; font-weight: 500; }
.review-meta span:first-child { color: var(--accent-light); font-weight: 600; }

.review-prompt-label {
  font-size: 10px; font-weight: 600; letter-spacing: 2.4px;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 18px;
}
.review-prompt {
  font-size: clamp(19px, 2.3vw, 26px);
  line-height: 1.62; color: var(--text);
  max-width: 580px; font-weight: 500; overflow-wrap: anywhere;
}
.review-prompt .review-cloze { font-style: italic; color: var(--text-2); margin: 0; }
.review-form { display: flex; gap: 10px; width: 100%; max-width: 480px; margin-top: 34px; }
.review-form input {
  flex: 1; min-width: 0; height: 54px;
  border: 1.5px solid var(--faint-2); background: rgba(255, 255, 255, 0.03);
  border-radius: 14px; padding: 0 18px; outline: 0;
  font-size: 16px; color: var(--text); text-align: center; letter-spacing: 1.5px;
  transition: border-color 0.16s, background 0.16s;
}
.review-form input:focus { border-color: rgba(138, 182, 242, 0.6); background: rgba(138, 182, 242, 0.05); }
.review-form input::placeholder { color: #4f5871; letter-spacing: 0.5px; }
.review-result { margin-top: 24px; width: 100%; }
.review-verdict { font-size: 12.5px; font-weight: 600; letter-spacing: 1.2px; margin-bottom: 14px; }
.review-verdict.ok { color: #8fd0a0; }
.review-verdict.no { color: #e9a08e; }
#review-definition { font-size: 13.5px; line-height: 1.7; color: var(--text-2); margin: 14px 0; }
.progress-track { height: 4px; border-radius: 999px; background: var(--faint-2); flex: 1; overflow: hidden; }
.progress-track div { height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width 0.3s var(--ease); }

.review-card {
  max-width: 700px; min-height: 480px;
  border: 1px solid var(--faint-2); border-radius: 28px;
  background: rgba(11, 16, 30, 0.5);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  margin: 0 auto; display: flex; flex-direction: column;
  padding: 32px 42px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.review-card::before {
  content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 182, 242, 0.10), transparent 66%);
  top: -150px; left: 50%; transform: translateX(-50%); pointer-events: none;
}
.review-card-top, .review-card-bottom { display: flex; justify-content: space-between; align-items: center; position: relative; }
.review-card-top { color: var(--muted); font-size: 10.5px; letter-spacing: 2.6px; font-weight: 600; }
.review-card-top #review-category { color: var(--accent-light); }
.review-center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 26px 0; position: relative; }
.review-word { font-size: clamp(40px, 5.6vw, 66px); font-weight: 700; letter-spacing: -0.04em; overflow-wrap: anywhere; width: 100%; line-height: 1.05; }
.review-answer { margin-top: 22px; max-width: 520px; }
.review-translation { color: var(--accent-light); font-size: 19px; font-weight: 600; }
.review-answer > p { font-size: 13.5px; line-height: 1.7; color: var(--text-2); margin: 16px 0; }
.review-answer .example { font-size: 12.5px; text-align: left; color: var(--text-2); line-height: 1.7; padding: 2px 0 2px 16px; border-left: 2px solid rgba(138, 182, 242, 0.4); margin: 0 0 10px; }
.review-card-bottom { justify-content: center; padding-top: 10px; position: relative; }

.rating-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.rating-buttons button {
  min-height: 56px; border: 1px solid var(--faint-2); border-radius: 14px;
  background: transparent; color: var(--accent-light);
  font-size: 12.5px; font-weight: 500; transition: all 0.16s var(--ease);
}
.rating-buttons button:hover { border-color: rgba(138, 182, 242, 0.5); background: rgba(138, 182, 242, 0.06); transform: translateY(-2px); }
.rating-buttons button:first-child { color: #e9a08e; }
.rating-buttons button:first-child:hover { border-color: rgba(226, 131, 111, 0.45); background: rgba(226, 131, 111, 0.06); }
.rating-buttons small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 5px; font-weight: 400; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 14, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-panel {
  position: relative; width: min(460px, 100%);
  background: #0e1526; border: 1px solid var(--faint-2); border-radius: 22px;
  box-shadow: var(--shadow); padding: 28px;
  max-height: calc(100vh - 48px); overflow: auto;
  animation: modalIn 0.25s var(--ease) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-head h3 { font-size: 20px; font-weight: 700; margin: 7px 0 0; letter-spacing: -0.02em; }
.modal-hint { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }
.collect-list { display: grid; gap: 6px; margin-bottom: 20px; max-height: 300px; overflow: auto; }
.collect-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--faint); border-radius: 12px;
  background: rgba(255, 255, 255, 0.02); color: var(--text-2);
  padding: 13px 15px; text-align: left; font-size: 13.5px; font-weight: 500;
  transition: all 0.16s var(--ease);
}
.collect-item:hover { border-color: rgba(138, 182, 242, 0.45); background: rgba(138, 182, 242, 0.08); color: var(--text); }
.collect-item svg { width: 16px; height: 16px; }
.collect-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collect-item-count { font-size: 11.5px; color: var(--muted); flex: none; }
.collect-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 12.5px; border: 1px dashed var(--faint-2); border-radius: 12px; }
.collect-new { display: flex; gap: 8px; padding-top: 18px; border-top: 1px solid var(--faint); }
.collect-new input {
  flex: 1; min-width: 0; height: 46px; border-radius: 12px;
  border: 1px solid var(--faint-2); background: transparent;
  padding: 0 15px; outline: 0; font-size: 13.5px; color: var(--text);
  transition: border-color 0.16s;
}
.collect-new input:focus { border-color: rgba(138, 182, 242, 0.55); }
.collect-new input::placeholder { color: #4f5871; }

/* ---------- 动画 ---------- */
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes detailIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes glowPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

.page { animation: pageIn 0.5s var(--ease) both; }

.jobs-list .job-row,
.word-groups .word-group,
.preview-words .preview-chip,
.collect-list .collect-item {
  animation: rise 0.45s var(--ease) both;
  animation-delay: var(--d, 0s);
}
.word-list.animate-in .word-row {
  animation: rise 0.45s var(--ease) both;
  animation-delay: var(--d, 0s);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
  .library-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; }
  .import-grid { grid-template-columns: minmax(0, 1fr) 250px; gap: 40px; }
  .main-content { padding: 46px 40px 100px; }
}

@media (max-width: 820px) {
  .sidebar { width: 76px; padding-left: 12px; padding-right: 12px; }
  .sidebar-brand { padding: 0 8px; margin-bottom: 52px; justify-content: center; }
  .sidebar-brand > span:last-child, .sidebar-section-label, .nav-item span, .nav-count, .sidebar-tip, .account-info, .account button { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .account { justify-content: center; }
  .main-content { padding: 44px 32px 100px; }
  .library-layout { display: block; }
  .word-detail {
    top: auto; bottom: 16px; right: 14px; left: 14px;
    width: auto; max-height: 76vh; border-radius: 22px;
    padding: 26px 24px;
    box-shadow: 0 -8px 50px rgba(0, 0, 0, 0.7), 0 30px 80px rgba(0, 0, 0, 0.9);
  }
  .import-side { display: none; }
  .import-grid { display: block; }
}

@media (max-width: 600px) {
  .auth-screen { display: block; }
  .auth-art { display: none; }
  .auth-side { min-height: 100vh; padding: 40px 26px; align-items: start; }
  .auth-mobile-brand { display: flex; }
  .auth-form { align-self: start; margin-top: 20px; }

  .sidebar { display: none; }
  .app-shell { display: block; }
  .main-content { padding: 28px 22px 104px; }
  .mobile-header { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
  .mobile-header .brand-mark { width: 32px; height: 32px; font-size: 17px; border-radius: 10px; }
  .mobile-header strong { font-size: 17.5px; letter-spacing: 0.5px; }
  .mobile-header button { margin-left: auto; }
  .mobile-nav {
    display: grid; position: fixed; z-index: 40; bottom: 0; left: 0; right: 0;
    background: rgba(8, 11, 20, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--faint); grid-template-columns: repeat(3, 1fr);
    padding: 7px 10px env(safe-area-inset-bottom);
  }
  .mobile-nav button { border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; height: 50px; font-size: 10.5px; font-weight: 500; border-radius: 12px; }
  .mobile-nav button.active { color: var(--accent-light); }
  .mobile-nav svg { width: 19px; height: 19px; }

  .page-hero { padding-bottom: 40px; margin-bottom: 42px; }
  .page-hero h1 { font-size: 42px; }
  .hero-sub { font-size: 14px; margin-bottom: 36px; }
  .hero-stats { gap: 32px; margin-bottom: 34px; }
  .hero-stat strong { font-size: 34px; }
  .hero-stat span { font-size: 11px; margin-top: 9px; }

  .section-top { flex-wrap: wrap; align-items: flex-start; }
  .section-actions { flex-wrap: wrap; width: 100%; }
  .section-tools { flex-wrap: wrap; }
  .search-box { width: 100%; }
  .category-tabs { gap: 8px; }
  .category-tabs button { padding: 8px 14px; font-size: 12px; }
  .word-row { padding: 18px 4px; gap: 14px; }
  .word-main strong { font-size: 16px; }
  .word-index { width: 20px; font-size: 10px; }
  .word-category { font-size: 10.5px; }
  .word-detail { bottom: 74px; left: 10px; right: 10px; max-height: 68vh; padding: 22px 20px; border-radius: 20px; }

  .review-card { padding: 26px 20px; min-height: 460px; border-radius: 24px; }
  .rating-buttons { gap: 6px; }
  .rating-buttons button { font-size: 11px; min-height: 52px; }
  .dropzone { height: 200px; }
  .modal-panel { padding: 22px; border-radius: 20px; }
  .collect-new { flex-direction: column; }
  #toast { right: 14px; left: 14px; max-width: none; }
}
