/* ============ AI-Zsy 本地版 样式（晨曦·现代工作台 v241002e） ============ */
:root {
  --brand-50: #eef2ff; --brand-100: #e0e7ff; --brand-200: #c7d2fe; --brand-300: #a5b4fc;
  --brand-400: #818cf8; --brand-500: #6366f1; --brand-600: #4f46e5; --brand-700: #4338ca;
  --indigo-500: #6366f1; --fuchsia-500: #d946ef; --violet-500: #8b5cf6; --purple-500: #a855f7;
  --emerald-500: #10b981; --cyan-500: #06b6d4; --pink-500: #ec4899; --amber-500: #f59e0b; --rose-500: #f43f5e;
  --bg-void: #eef1f8; --bg-deep: #e9edf6; --bg-card: #ffffff; --bg-card-solid: #ffffff;
  --bg-input: rgba(255,255,255,.92); --line-base: rgba(100,116,139,.16); --line-strong: rgba(100,116,139,.26);
  --ink-50: rgba(100,116,139,.06); --ink-100: rgba(100,116,139,.1); --ink-200: rgba(100,116,139,.16);
  --ink-300: rgba(100,116,139,.3); --ink-400: #94a3b8; --ink-500: #64748b; --ink-600: #475569;
  --ink-700: #334155; --ink-800: #1e293b; --ink-900: #0f172a; --ink-950: #0b1220;
  --shadow-card: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px rgba(15,23,42,.07);
  --shadow-pop: 0 18px 48px rgba(15,23,42,.16);
  --shadow-glow: 0 0 0 3px rgba(99,102,241,.14);
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink-800); background: var(--bg-void); font-size: 14px;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1100px 520px at 12% -8%, rgba(99,102,241,.09), transparent 60%),
    radial-gradient(900px 480px at 95% 0%, rgba(139,92,246,.07), transparent 55%),
    radial-gradient(1000px 520px at 50% 110%, rgba(6,182,212,.05), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 13px; color: var(--ink-800); outline: none; }
svg { display: inline-block; vertical-align: middle; }
img { max-width: 100%; }
::selection { background: rgba(99,102,241,.18); color: var(--ink-900); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100,116,139,.24); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,.4); }

/* ---------- 背景 ---------- */
.page-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.page-bg-solid { position: absolute; inset: 0; background: var(--bg-void); }
.hero-grid {
  position: absolute; inset: 0; opacity: .45;
  background-image:
    linear-gradient(to right, rgba(99,102,241,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(80% 70% at 50% 0%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 0%, #000 30%, transparent 90%);
}
#bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }

/* ============ 布局：固定宽侧栏 + 内容区 ============ */
.layout { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 244px; z-index: 50;
  background: linear-gradient(180deg, #101b36 0%, #131c38 55%, #1c1b4d 100%);
  border-right: 1px solid rgba(148,163,184,.14);
  box-shadow: 4px 0 24px rgba(15,23,42,.18);
  overflow-y: auto; overflow-x: visible;
  transition: width .22s cubic-bezier(.4,0,.2,1);
}
.sidebar::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(420px 200px at 20% -8%, rgba(99,102,241,.3), transparent 70%),
    radial-gradient(300px 180px at 110% 20%, rgba(139,92,246,.22), transparent 70%);
}
.side-inner { position: relative; display: flex; flex-direction: column; height: 100%; padding: 10px 12px 14px; }
/* 品牌 */
.side-brand { padding: 10px 8px 12px; display: flex; align-items: center; }
.brand-link { display: flex; align-items: center; gap: 11px; text-decoration: none; white-space: nowrap; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; object-fit: contain; background: rgba(255,255,255,.97); box-shadow: 0 0 0 1px rgba(255,255,255,.24), 0 8px 24px rgba(99,102,241,.5); flex-shrink: 0; }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -.02em; color: #fff; text-shadow: 0 2px 14px rgba(99,102,241,.5); }
/* 分组标题 */
.side-group { padding: 16px 10px 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: rgba(148,163,184,.66); text-transform: uppercase; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 12px; white-space: nowrap;
  color: rgba(226,232,240,.76); font-size: 13.5px; font-weight: 500; text-decoration: none;
  transition: all .16s ease;
}
.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-link.active {
  background: linear-gradient(90deg, rgba(99,102,241,.36), rgba(139,92,246,.22) 78%);
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(139,92,246,.45), 0 8px 26px rgba(99,102,241,.22);
}
.side-link.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3.5px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #818cf8, #a78bfa);
  box-shadow: 0 0 10px rgba(129,140,248,.8);
}
.side-chip {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  background: rgba(255,255,255,.08); color: inherit; transition: all .16s ease;
}
.side-chip svg { width: 16px; height: 16px; }
.side-link:hover .side-chip { background: rgba(255,255,255,.14); }
.side-link.active .side-chip { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; box-shadow: 0 4px 14px rgba(99,102,241,.5); }
.side-label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.side-label > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-free {
  flex-shrink: 0; font-size: 10px; font-weight: 700; color: #fcd34d;
  background: rgba(251,191,36,.16); border: 1px solid rgba(251,191,36,.36);
  padding: 0 7px; border-radius: 7px; line-height: 16px;
}
.badge-paid { color: #93c5fd; background: rgba(59,130,246,.18); border-color: rgba(59,130,246,.38); }
.side-arrow { color: #c7d2fe; opacity: 0; transition: opacity .15s; }
.side-link.active .side-arrow { opacity: 1; }
.side-bottom { margin-top: auto; padding-top: 10px; }
.auth-box { display: flex; gap: 8px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(148,163,184,.18); padding: 8px; }
.auth-box .btn { flex: 1; justify-content: center; padding: 8px 0; }
.auth-box .btn svg { width: 17px; height: 17px; margin: 0; }
.auth-box .btn-ghost { border-color: rgba(148,163,184,.4); color: #e2e8f0; }
.auth-box .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(165,180,252,.65); color: #fff; }
.auth-user { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.au-top { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-size: 13px; font-weight: 700;
  box-shadow: 0 0 0 2px rgba(255,255,255,.14), 0 4px 12px rgba(99,102,241,.45);
  background-size: cover; background-position: center;
}
.auth-user .uname { font-size: 13px; font-weight: 600; color: #fff; }
.auth-me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; }
.auth-me:hover .avatar { box-shadow: 0 0 0 3px rgba(129,140,248,.5); }
.auth-me:hover .uname { color: #c7d2fe; }
.auth-user .icon-btn { flex-shrink: 0; width: 30px; height: 30px; color: rgba(226,232,240,.7); }
.auth-user .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.bal-pill {
  display: inline-flex; align-items: center; gap: 4px; justify-content: center;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #6ee7b7;
  background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.38); text-decoration: none; white-space: nowrap;
}
.bal-pill:hover { background: rgba(16,185,129,.26); color: #a7f3d0; }

.mobile-mask { position: fixed; inset: 0; z-index: 49; background: rgba(15,23,42,.45); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.mobile-mask.show { opacity: 1; pointer-events: auto; }
/* 抽屉遮罩浅色化：去掉深色背景与模糊，避免历史记录等窗口边缘发黑（2026-10-02） */
.mobile-mask { background: rgba(15,23,42,.06); backdrop-filter: none; }
/* 宽屏下侧栏常显，无需抽屉遮罩；点击汉堡误开后遮罩全屏变黑 → 宽屏强制隐藏（2026-10-02） */
@media (min-width: 1024px) { .mobile-mask { opacity: 0 !important; pointer-events: none !important; } }

.main-wrap { margin-left: 244px; min-height: 100vh; display: flex; flex-direction: column; }
/* ============ 顶栏：品牌+标题+公告+用户区 ============ */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 22px; background: rgba(255,255,255,.78); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line-base);
  box-shadow: 0 1px 0 rgba(255,255,255,.6), 0 6px 24px rgba(15,23,42,.05);
}
.topbar-brand { display: none; align-items: center; gap: 8px; }
.topbar-brand .brand-logo { width: 30px; height: 30px; border-radius: 9px; }
.topbar-brand .brand-name { font-size: 14px; color: var(--ink-900); text-shadow: none; }
.topbar-title { font-size: 15.5px; font-weight: 800; color: var(--ink-900); letter-spacing: -.01em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-user { display: flex; align-items: center; gap: 8px; }
.top-user .bal-pill { color: #059669; background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.28); }
.top-user-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line-base); background: #fff; transition: all .15s; text-decoration: none;
}
.top-user-btn:hover { border-color: var(--brand-400); background: var(--brand-50); }
.top-user-btn .avatar { width: 28px; height: 28px; font-size: 12px; box-shadow: 0 0 0 2px #fff; }
.top-user-btn .uname { font-size: 12.5px; font-weight: 600; color: var(--ink-700); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-pill {
  display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 12px;
  border: 1px solid var(--line-base); background: #fff; color: var(--ink-500); font-size: 13px; font-weight: 500; transition: all .15s;
}
.api-pill:hover { border-color: var(--brand-400); color: var(--brand-600); background: var(--brand-50); }
.api-pill svg { width: 14px; height: 14px; }
.model-btn {
  display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 12px;
  border: 1px solid rgba(139,92,246,.36); background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(139,92,246,.12));
  color: var(--brand-600); font-size: 13px; font-weight: 600; transition: all .15s; text-decoration: none;
}
.model-btn:hover { border-color: var(--brand-400); color: var(--brand-600); box-shadow: 0 4px 14px rgba(99,102,241,.2); }
.model-btn svg { width: 15px; height: 15px; }

.view { flex: 1; width: 100%; max-width: 1800px; margin: 0 auto; padding: 24px; }
.mobile-only { display: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-500); }
.icon-btn:hover { background: var(--ink-100); color: var(--ink-700); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- 通用组件（工作台风格） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; padding: 8px 15px; font-size: 13px; font-weight: 600; transition: all .15s;
  border: 1px solid transparent;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: linear-gradient(135deg, var(--indigo-500), var(--violet-500)); color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.32);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,.42); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-amber { background: linear-gradient(135deg, var(--amber-500), var(--rose-500)); color: #fff; box-shadow: 0 4px 14px rgba(245,158,11,.3); }
.btn-amber:hover { filter: brightness(1.08); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink-600); }
.btn-ghost:hover { border-color: var(--brand-400); color: var(--brand-600); background: var(--brand-50); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.btn-danger { background: rgba(244,63,94,.08); color: #e11d48; border-color: rgba(244,63,94,.3); }
.btn-danger:hover { background: rgba(244,63,94,.16); }
.btn-full { width: 100%; }

.card {
  background: var(--bg-card); border: 1px solid var(--line-base); border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card-glass { background: rgba(255,255,255,.8); backdrop-filter: blur(14px); }

.input, .textarea, .select {
  width: 100%; background: var(--bg-input); border: 1px solid var(--ink-200); border-radius: 12px;
  padding: 10px 13px; transition: all .15s; font-size: 13.5px; color: var(--ink-800);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand-500); box-shadow: var(--shadow-glow); background: #fff; }
.textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.select option { background: #fff; color: var(--ink-800); }
.label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-500); margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--ink-400); margin-top: 6px; line-height: 1.5; }

.tabs { display: flex; gap: 4px; background: var(--ink-100); padding: 4px; border-radius: 12px; }
.tab { flex: 1; padding: 8px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-500); text-align: center; transition: all .15s; }
.tab.active { background: #fff; color: var(--ink-900); box-shadow: var(--shadow-card); border: 1px solid rgba(99,102,241,.2); }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; border: 1px solid var(--ink-200); background: var(--ink-50); color: var(--ink-500); transition: all .15s;
}
.chip:hover { border-color: var(--brand-400); color: var(--brand-600); }
.chip.on { border-color: var(--brand-400); color: var(--brand-600); background: rgba(99,102,241,.1); }

.pill-tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 18px; }
.pill-hot { background: rgba(244,63,94,.1); color: #e11d48; border: 1px solid rgba(244,63,94,.28); }
.pill-new { background: rgba(16,185,129,.1); color: #059669; border: 1px solid rgba(16,185,129,.28); }
.pill-top { background: linear-gradient(135deg, #f59e0b, #f43f5e); color: #fff; }
.pill-pick { background: rgba(245,158,11,.12); color: #b45309; border: 1px solid rgba(245,158,11,.3); }
.pill-reco { background: rgba(99,102,241,.1); color: #4f46e5; border: 1px solid rgba(99,102,241,.32); }
.pill-feat { background: rgba(217,70,239,.1); color: #c026d3; border: 1px solid rgba(217,70,239,.28); }
.pill-video { background: rgba(139,92,246,.1); color: #7c3aed; border: 1px solid rgba(139,92,246,.3); }
.pill-audio { background: rgba(6,182,212,.1); color: #0891b2; border: 1px solid rgba(6,182,212,.28); }

.page-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 90px 0; color: var(--ink-400); }
.spinner { width: 26px; height: 26px; border: 3px solid var(--ink-100); border-top-color: var(--brand-500); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shimmer { border-radius: 12px; background: linear-gradient(90deg, var(--ink-100) 25%, rgba(148,163,184,.18) 50%, var(--ink-100) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-400); }
.empty svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 10px; }
.empty p { font-size: 13px; }

/* ---------- 提示 ---------- */
.toast-wrap { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 100003; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 400px); pointer-events: none; }
.toast { background: #1e293b; color: #fff; border-radius: 12px; padding: 11px 16px; font-size: 13px; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 12px 32px rgba(15,23,42,.28); animation: toast-in .25s ease; pointer-events: auto; }
.toast.ok { border-color: rgba(52,211,153,.5); }
.toast.err { border-color: rgba(251,113,133,.55); }
.toast.warn { border-color: rgba(251,191,36,.5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 弹窗 ---------- */
/* 2026-10-07 需求1：modal 层级提到 100000（高于全屏画布层 z9999），全屏模式下弹窗在画布层之上独立显示 */
.modal-mask { position: fixed; inset: 0; z-index: 100000; background: rgba(15,23,42,.5); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 20px; width: min(94vw, 460px); max-height: 88vh; overflow-y: auto; border: 1px solid rgba(15,23,42,.08); box-shadow: 0 24px 64px rgba(15,23,42,.24); animation: pop .22s ease; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal.wide { width: min(94vw, 720px); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 4px; }
.modal-head h3 { font-size: 15.5px; font-weight: 700; color: var(--ink-900); flex: 1; }
.modal-close { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-400); }
.modal-close:hover { background: var(--ink-100); color: var(--ink-700); }
.modal-body { padding: 14px 22px 22px; }

/* ---------- 移动端 ---------- */
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); width: 264px; box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: 8px 0 40px rgba(15,23,42,.35); }
  .main-wrap { margin-left: 0; }
  .mobile-only { display: grid; }
  .view { padding: 16px; }
  .topbar { padding: 0 14px; }
  .topbar .api-pill span { display: none; }
  .top-user .uname { display: none; }
  .top-user-btn .uname { display: none; }
}

/* ---------- 放大查看 ---------- */
.zoom-wrap { position: relative; cursor: zoom-in; }
.zoom-wrap::after { content: ''; position: absolute; inset: 0; background: rgba(15,23,42,.28); border-radius: inherit; opacity: 0; transition: opacity .15s; pointer-events: none; z-index: 1; }
.zoom-wrap:hover::after { opacity: 1; }
.zoom-ico { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.8); width: 40px; height: 40px; border-radius: 50%; background: rgba(15,23,42,.55); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transition: all .15s; z-index: 2; pointer-events: none; }
.zoom-wrap:hover .zoom-ico { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.lightbox-mask { position: fixed; inset: 0; z-index: 9999; background: rgba(10,14,26,.82); display: flex; align-items: center; justify-content: center; padding: 24px; animation: lbIn .16s ease; }
.lightbox-body { position: relative; max-width: 94vw; max-height: 92vh; }
.lightbox-body img, .lightbox-body video { max-width: 94vw; max-height: 92vh; border-radius: 12px; box-shadow: 0 24px 64px rgba(0,0,0,.5); display: block; }
.lightbox-close { position: absolute; right: -38px; top: -38px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 18px; line-height: 1; border: 0; cursor: pointer; }
.lightbox-close:hover { background: rgba(255,255,255,.3); }
@keyframes lbIn { from { opacity: 0 } to { opacity: 1 } }

/* ============ 241003x 浅色玻璃科技增强段 ============ */
:root {
  --neon-cyan: #22d3ee; --neon-indigo: #6366f1; --neon-violet: #8b5cf6; --neon-pink: #ec4899;
  --grad-neon: linear-gradient(135deg, #22d3ee 0%, #6366f1 52%, #8b5cf6 100%);
  --grad-neon-line: linear-gradient(120deg, rgba(34,211,238,.55), rgba(99,102,241,.55), rgba(139,92,246,.55));
  --glass-bg: rgba(255,255,255,.74);
  --glass-bg-strong: rgba(255,255,255,.88);
  --glass-line: linear-gradient(90deg, transparent, rgba(34,211,238,.6), rgba(99,102,241,.6), rgba(139,92,246,.6), transparent);
  --shadow-glass: 0 1px 2px rgba(15,23,42,.04), 0 10px 30px rgba(99,102,241,.10);
  --shadow-neon: 0 6px 22px rgba(99,102,241,.30);
}

/* ---------- 全页面动态背景：浅色极光流动层 ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora::before, .aurora::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 150vmax; height: 150vmax;
  border-radius: 50%; will-change: transform;
}
.aurora::before {
  background:
    radial-gradient(closest-side, rgba(34,211,238,.15), transparent 62%),
    radial-gradient(closest-side, rgba(139,92,246,.13), transparent 60%);
  background-blend-mode: screen;
  animation: auroraFlow1 22s ease-in-out infinite;
}
.aurora::after {
  background:
    radial-gradient(closest-side, rgba(56,189,248,.13), transparent 60%),
    radial-gradient(closest-side, rgba(236,72,153,.06), transparent 55%);
  background-blend-mode: screen;
  animation: auroraFlow2 27s ease-in-out infinite reverse;
}
@keyframes auroraFlow1 {
  0%, 100% { transform: translate(-52%, -50%) rotate(0deg) scale(1); }
  33% { transform: translate(-46%, -44%) rotate(24deg) scale(1.08); }
  66% { transform: translate(-56%, -54%) rotate(-18deg) scale(.96); }
}
@keyframes auroraFlow2 {
  0%, 100% { transform: translate(-48%, -50%) rotate(0deg) scale(1); }
  40% { transform: translate(-54%, -44%) rotate(-28deg) scale(1.06); }
  70% { transform: translate(-44%, -56%) rotate(16deg) scale(.98); }
}

/* ---------- 鼠标跟随霓虹光晕 ---------- */
#cursor-glow {
  position: fixed; left: 0; top: 0; width: 480px; height: 480px; z-index: 3; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(99,102,241,.18), rgba(34,211,238,.11) 45%, transparent 72%);
  transform: translate(-50%, -50%) scale(.6);
  opacity: 0; transition: opacity .45s ease;
  will-change: transform;
}
body.glow-on #cursor-glow { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .aurora, #cursor-glow { display: none; } }

/* ---------- 按钮统一体系（241003x） ---------- */
.btn { border-radius: 11px; position: relative; }
.btn-primary {
  background: var(--grad-neon); color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,.34), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-primary:hover {
  filter: brightness(1.07); transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(99,102,241,.46), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 42%; border-radius: 11px 11px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.32), transparent); pointer-events: none;
}
.btn-ghost {
  background: var(--glass-bg); border-color: rgba(139,92,246,.28); color: var(--ink-600);
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
}
.btn-ghost:hover { border-color: rgba(99,102,241,.5); color: var(--brand-600); background: rgba(255,255,255,.96); box-shadow: 0 4px 14px rgba(99,102,241,.16); }
.btn-amber { background: linear-gradient(135deg, #fbbf24, #f43f5e); color: #fff; box-shadow: 0 4px 16px rgba(245,158,11,.32); }
.btn-amber:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-danger { background: rgba(244,63,94,.08); color: #e11d48; border-color: rgba(244,63,94,.32); }
.btn-danger:hover { background: rgba(244,63,94,.16); }

/* ---------- 玻璃卡片 ---------- */
.card {
  background: var(--glass-bg); backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255,255,255,.65); box-shadow: var(--shadow-glass);
}
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1.5px; border-radius: 16px 16px 0 0;
  background: var(--glass-line); opacity: .8; pointer-events: none;
}
.card:hover { border-color: rgba(139,92,246,.32); box-shadow: 0 2px 6px rgba(15,23,42,.05), 0 14px 40px rgba(99,102,241,.14); }

/* ---------- 输入框玻璃 ---------- */
.input, .textarea, .select { background: var(--glass-bg-strong); border-color: rgba(139,92,246,.18); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(34,211,238,.16), 0 4px 14px rgba(99,102,241,.10);
  background: #fff;
}

/* ---------- 弹窗 / 下拉 玻璃 ---------- */
.modal {
  background: var(--glass-bg-strong); backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 24px 64px rgba(99,102,241,.16);
}
.tab.active { background: #fff; border: 1px solid rgba(139,92,246,.28); box-shadow: 0 2px 10px rgba(99,102,241,.12); }
.chip { background: rgba(255,255,255,.8); border-color: rgba(139,92,246,.2); }
.chip:hover { border-color: rgba(99,102,241,.5); color: var(--brand-600); box-shadow: 0 2px 8px rgba(99,102,241,.12); }
.chip.on { border-color: rgba(99,102,241,.45); color: var(--brand-600); background: rgba(99,102,241,.09); }

/* ================= 任务中心（2026-10-07） ================= */
.task-stats { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.task-stat { flex: 1 1 110px; background: #fff; border: 1px solid rgba(15,23,42,.08); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.task-stat b { font-size: 22px; font-weight: 800; color: #1e293b; }
.task-stat span { font-size: 12px; color: #64748b; }
.task-stat.ok b { color: #059669; }
.task-stat.fail b { color: #e11d48; }
.task-stat.run b { color: #2563eb; }
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-row { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid rgba(15,23,42,.08); border-radius: 14px; padding: 13px 16px; transition: box-shadow .15s ease; }
.task-row:hover { box-shadow: 0 6px 20px rgba(15,23,42,.08); }
.task-main { flex: 1; min-width: 0; }
.task-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-kind { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #4f46e5; }
.task-kind.video { background: #f3e8ff; color: #7c3aed; }
.task-kind.audio { background: #d1fae5; color: #047857; }
.task-kind.text, .task-kind.writing, .task-kind.reverse { background: #e0f2fe; color: #0369a1; }
.task-model { font-size: 13px; font-weight: 600; color: #1e293b; }
.task-fee-ic { font-size: 12px; color: #0f766e; background: #ccfbf1; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.task-prompt { margin: 5px 0 6px; font-size: 12.5px; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #94a3b8; }
.task-meta .task-dur { color: #475569; font-weight: 600; }
.task-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.task-pay { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.task-pay.paid { background: #d1fae5; color: #047857; }
.task-pay.paying { background: #e0e7ff; color: #4338ca; }
.task-pay.refunding { background: #fef3c7; color: #b45309; }
.task-pay.refunded { background: #fce7f3; color: #be185d; }
.task-status { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.task-status.ok { background: #d1fae5; color: #047857; }
.task-status.fail { background: #ffe4e6; color: #e11d48; }
.task-status.run { background: #dbeafe; color: #2563eb; }
.task-status.wait { background: #fef3c7; color: #b45309; }
.task-fail-btn { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(225,29,72,.25); background: #fff1f2; color: #e11d48; cursor: pointer; }
.task-fail-btn:hover { background: #ffe4e6; }

/* 2026-10-07 媒体框预览按钮：节点卡片放大居中 */
.cv-node-zoom { position: fixed; inset: 0; z-index: 200000; background: rgba(2,6,23,.72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; }
.cv-node-zoom-box { position: relative; width: 86vw; max-width: 1280px; max-height: 88vh; background: #0b1120; border: 1px solid rgba(139,92,246,.35); border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.6); overflow: hidden; display: flex; flex-direction: column; }
.cv-node-zoom-head { padding: 10px 16px; font-size: 14.5px; font-weight: 700; color: #fff; background: linear-gradient(90deg, rgba(56,189,248,.18), rgba(168,85,247,.18)); border-bottom: 1px solid rgba(255,255,255,.08); }
.cv-node-zoom-body { flex: 1; min-height: 0; padding: 14px; display: flex; align-items: center; justify-content: center; }
.cv-node-zoom-body .cv-media { width: 100%; height: 100%; min-height: 0; }
.cv-node-zoom-body .cv-media-view { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.cv-node-zoom-body .cv-media-view img, .cv-node-zoom-body .cv-media-view video { max-width: 100%; max-height: calc(88vh - 90px); object-fit: contain; border-radius: 10px; }
.cv-node-zoom-body .cv-media-view audio { width: 70%; }
.cv-node-zoom-x { position: absolute; top: 10px; right: 10px; z-index: 5; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.cv-node-zoom-x:hover { background: rgba(244,63,94,.85); }

/* 2026-10-07 全屏画布「上传附件」自绘面板（资产勾选不退出全屏；本地上传临时退出后恢复） */
.cv-up-mask { position: fixed; inset: 0; z-index: 100010; background: rgba(2,6,23,.62); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; }
.cv-up-panel { width: min(680px, 92vw); max-height: 86vh; display: flex; flex-direction: column; background: #0b1120; border: 1px solid rgba(139,92,246,.35); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.55); overflow: hidden; transition: border-color .15s; }
.cv-up-panel.cv-up-drag { border-color: #22d3ee; box-shadow: 0 0 0 4px rgba(34,211,238,.35), 0 30px 80px rgba(0,0,0,.55); }
.cv-up-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid rgba(148,163,184,.16); }
.cv-up-head b { color: #f1f5f9; font-size: 16px; }
.cv-up-sub { color: #94a3b8; font-size: 12.5px; margin-left: 8px; }
.cv-up-x { width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(148,163,184,.14); color: #e2e8f0; font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cv-up-x:hover { background: rgba(244,63,94,.35); color: #fff; }
.cv-up-body { padding: 14px 18px 10px; overflow-y: auto; flex: 1; }
.cv-up-sec { color: #cbd5e1; font-size: 13px; font-weight: 700; margin: 8px 0 10px; }
.cv-up-sec em { color: #64748b; font-weight: 400; font-size: 11.5px; margin-left: 4px; }
.cv-up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; max-height: 40vh; overflow-y: auto; padding: 2px; }
.cv-up-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: rgba(15,23,42,.6); cursor: pointer; padding: 0; display: block; }
.cv-up-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-up-item.on { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,.35); }
.cv-up-item i { position: absolute; left: 5px; bottom: 5px; font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 999px; background: rgba(2,6,23,.7); color: #e2e8f0; }
.cv-up-item em { position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.75); display: none; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: #8b5cf6; }
.cv-up-item.on em { display: flex; }
.cv-up-item.on em::after { content: '✓'; }
.cv-up-ic { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #8b5cf6; background: linear-gradient(135deg, rgba(139,92,246,.15), rgba(14,165,233,.12)); }
.cv-up-empty, .cv-up-loading { grid-column: 1 / -1; color: #64748b; font-size: 12.5px; text-align: center; padding: 30px 10px; }
.cv-up-local { font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 10px; border: none; background: linear-gradient(90deg, #0ea5e9, #6366f1); color: #fff; cursor: pointer; box-shadow: 0 6px 16px rgba(99,102,241,.3); }
.cv-up-local:hover { opacity: .92; }
.cv-up-tip { color: #64748b; font-size: 11.5px; margin-top: 8px; }
.cv-up-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid rgba(148,163,184,.16); }
.cv-up-n { color: #94a3b8; font-size: 12.5px; }
.cv-up-ok { font-size: 13px; font-weight: 700; padding: 8px 20px; border-radius: 10px; border: none; background: linear-gradient(90deg, #8b5cf6, #6366f1); color: #fff; cursor: pointer; box-shadow: 0 6px 16px rgba(139,92,246,.3); }
.cv-up-ok:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.task-filter { display: flex; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; align-items: center; }
.task-filter-sel { font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(100,116,139,.3); background: #fff; color: #334155; cursor: pointer; min-width: 130px; box-shadow: 0 2px 6px rgba(15,23,42,.05); }
.task-filter-sel:focus { outline: none; border-color: rgba(99,102,241,.6); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.task-f-count { font-size: 12.5px; color: #64748b; }
.task-f-count b { color: #4338ca; }
.task-grid-wrap { overflow: auto; background: rgba(255,255,255,.72); border: 1px solid rgba(148,163,184,.22); border-radius: 14px; max-height: calc(100vh - 320px); }
.task-grid { display: grid; grid-template-columns: 64px 150px 200px 150px 150px 104px 92px 116px 94px; min-width: 1120px; font-size: 12.5px; padding: 0; margin: 0; gap: 0; border-top: none; border-left: none; border-right: none; border-radius: 0; box-shadow: none; background: transparent; }
.task-grid.task-head { position: sticky; top: 0; z-index: 2; background: #eef0ff; border-bottom: 1px solid rgba(148,163,184,.35); border-radius: 14px 14px 0 0; }
.task-grid.task-head .task-cell { color: #3730a3; font-weight: 700; padding: 10px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-grid.task-row { border-bottom: 1px solid rgba(148,163,184,.16); transition: background .12s; cursor: default; }
.task-grid.task-row:hover { background: rgba(99,102,241,.05); }
.task-grid.task-row:last-child { border-bottom: none; }
.task-grid.task-row .task-cell { padding: 9px 10px; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-model { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.task-prompt { max-width: 240px; overflow: hidden; text-overflow: ellipsis; color: #64748b; }
.task-end, .task-dur { white-space: nowrap; }
.task-kind { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.task-kind.image { background: #fae8ff; color: #a21caf; }
.task-kind.video { background: #ede9fe; color: #6d28d9; }
.task-kind.audio { background: #d1fae5; color: #047857; }
.task-kind.text { background: #dbeafe; color: #1d4ed8; }
.task-kind.writing { background: #fef3c7; color: #b45309; }
.task-kind.reverse { background: #fce7f3; color: #be185d; }

/* ============ 独立登录页（2026-10-10） ============ */
.auth-page {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(120, 80, 255, .25), transparent 60%),
              radial-gradient(1000px 500px at 90% 110%, rgba(0, 200, 255, .18), transparent 55%),
              #0c0e18;
  overflow: auto; padding: 24px;
}
.auth-page-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
}
.auth-page-card {
  position: relative; width: 100%; max-width: 392px;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.045));
  border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
  padding: 30px 28px 20px; box-sizing: border-box;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
  backdrop-filter: blur(14px);
}
.auth-page-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-page-name { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.25; }
.auth-page-sub { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 2px; }
.auth-page-tabs { display: flex; gap: 4px; background: rgba(255,255,255,.07); border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.auth-tab { flex: 1; border: 0; background: transparent; color: rgba(255,255,255,.65); font-size: 14px; font-weight: 600; padding: 9px 0; border-radius: 8px; cursor: pointer; }
.auth-tab.on { background: rgba(255,255,255,.14); color: #fff; }
.auth-pane .label { color: rgba(255,255,255,.75); font-size: 12px; }
.auth-pane .input { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #fff; }
.auth-pane .input::placeholder { color: rgba(255,255,255,.4); }
.auth-switch-line { text-align: center; font-size: 12.5px; color: rgba(255,255,255,.55); margin-top: 2px; }
.auth-switch { color: #8ab4ff; font-weight: 600; text-decoration: none; cursor: pointer; }
.auth-page-foot { text-align: center; font-size: 11px; color: rgba(255,255,255,.32); margin-top: 16px; }
