/* ============================================================================
   万物灵镜 · 高级科技风
   深空渐变 + 玻璃拟态 + 霓虹光晕 + 科技网格 + 扫描动效
   说明：保留全部原有类名，仅重设计观感，不影响任何功能逻辑。
   ========================================================================== */

:root {
  /* 深空底 */
  --bg: #04040e;
  --bg2: #0a0a1c;
  --panel: rgba(22, 24, 48, 0.56);
  --panel2: rgba(28, 30, 64, 0.72);
  --border: rgba(163, 160, 255, 0.16);
  --border-soft: rgba(163, 160, 255, 0.08);
  --text: #eef2ff;
  --muted: #9aa3d6;

  /* 霓虹主色 */
  --cyan: #00e5ff;
  --violet: #8a6bff;
  --magenta: #ff4fd8;
  --accent: #6a6cff;
  --accent2: #74e1ff;

  --ok: #35e0a6;
  --warn: #ffcf5c;
  --err: #ff5d73;

  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(138, 107, 255, 0.05);
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { background: var(--bg); }
body {
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  background: transparent;
}

/* 全屏星空画布（星座互动）：位于最底层，不拦截鼠标 */
#starfield {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* 漂浮的极光光斑 */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -3;
  background:
    radial-gradient(38% 34% at 22% 28%, rgba(0, 229, 255, 0.16), transparent 60%),
    radial-gradient(32% 30% at 78% 30%, rgba(123, 108, 255, 0.2), transparent 60%),
    radial-gradient(30% 34% at 60% 78%, rgba(255, 47, 179, 0.15), transparent 60%);
  filter: blur(30px);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate3d(-3%, -2%, 0) scale(1); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.1); }
}

/* 科技网格 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(120, 160, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(140% 110% at 50% 0%, #000 32%, transparent 92%);
  -webkit-mask-image: radial-gradient(140% 110% at 50% 0%, #000 32%, transparent 92%);
  pointer-events: none;
}

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

.app {
  display: grid;
  grid-template-columns: 236px 1fr;
  grid-template-rows: 60px 1fr;
  height: 100vh;
}

/* ---------- topbar ---------- */
.topbar {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: linear-gradient(180deg, rgba(10, 14, 30, 0.72), rgba(10, 14, 30, 0.42));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  position: relative;
}
/* 顶栏霓虹底光线 */
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), var(--magenta), transparent);
  opacity: 0.55;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-logo {
  width: 42px; height: 42px; flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(150, 160, 255, 0.4));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.12; justify-content: center; }
.logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #a3ecff, #b6a0ff, #ff9ade);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle { color: var(--muted); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.conn { font-size: 12px; padding: 5px 12px; border-radius: 20px; letter-spacing: 0.5px; }
.status-ok { color: var(--ok); background: rgba(53, 224, 166, 0.12); box-shadow: 0 0 12px rgba(53, 224, 166, 0.15); }
.status-err { color: var(--err); background: rgba(255, 93, 115, 0.14); }

.badge {
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 20px; letter-spacing: 0.5px;
}
.badge-mock { color: var(--warn); background: rgba(255, 207, 92, 0.12); box-shadow: 0 0 12px rgba(255, 207, 92, 0.15); }
.badge-http { color: var(--cyan); background: rgba(0, 229, 255, 0.12); box-shadow: 0 0 12px rgba(0, 229, 255, 0.18); }

/* ---------- sidebar ---------- */
.sidebar {
  grid-row: 2 / 3;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 12px;
  background: linear-gradient(180deg, rgba(10, 14, 30, 0.6), rgba(8, 12, 26, 0.5));
  backdrop-filter: blur(10px);
}
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.nav-item:hover { background: rgba(111, 130, 255, 0.08); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.14), rgba(123, 108, 255, 0.1));
  border-color: rgba(0, 229, 255, 0.28);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 18px rgba(0, 229, 255, 0.06);
}
.nav-item.active::before {
  content: "";
  position: absolute; left: -1px; top: 20%; bottom: 20%; width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--magenta));
  border-radius: 4px;
}
.nav-ico { width: 20px; text-align: center; }
.count-pill {
  margin-left: auto;
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  color: #04070f;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}
.sidebar-foot { padding: 12px 14px; color: var(--muted); }
.mini-label { font-size: 10px; opacity: 0.6; letter-spacing: 1px; }
.mini-text { font-size: 12px; }

/* ---------- main ---------- */
.main { grid-row: 2 / 3; overflow-y: auto; padding: 26px 30px; }
.view { max-width: 1200px; margin: 0 auto; }
.view h1 {
  font-size: 25px; font-weight: 800; margin-bottom: 8px; letter-spacing: 1px;
  background: linear-gradient(90deg, #eaf2ff, #c9d4ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.view .lead { color: var(--muted); margin-bottom: 24px; letter-spacing: 0.2px; }

/* ---------- cards（玻璃拟态） ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.card-title {
  font-size: 15px; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before {
  content: "";
  width: 4px; height: 15px; border-radius: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

/* ---------- forms ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); letter-spacing: 0.4px; }
.field .req { color: var(--err); }
.field .help { font-size: 11px; color: var(--muted); opacity: 0.85; }
input[type="text"], input[type="number"], input[type="password"], select, textarea {
  background: rgba(8, 12, 26, 0.7);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}
textarea { resize: vertical; min-height: 86px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13px; font-weight: 700; letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.06s, filter 0.15s, box-shadow 0.15s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(100deg, #86ccff 0%, #a99bff 52%, #e39bff 100%);
  background-size: 200% 100%;
  color: #080a1a;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 26px rgba(120, 130, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { background-position: 100% 0; }
.btn-ghost { background: rgba(111, 130, 255, 0.06); border-color: var(--border); color: var(--text); }
.btn-danger { background: rgba(255, 93, 115, 0.12); color: var(--err); border-color: rgba(255, 93, 115, 0.3); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.icon-btn { background: transparent; border: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }

/* ---------- status badges ---------- */
.st-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 20px; letter-spacing: 0.4px;
}
.st-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.st-badge.st-queued { color: var(--warn); background: rgba(255, 207, 92, 0.12); }
.st-badge.st-processing { color: var(--accent2); background: rgba(111, 227, 255, 0.12); }
.st-badge.st-processing .dot { animation: pulse 1s ease-in-out infinite; }
.st-badge.st-completed { color: var(--ok); background: rgba(53, 224, 166, 0.12); }
.st-badge.st-failed { color: var(--err); background: rgba(255, 93, 115, 0.12); }
.st-badge.st-canceled { color: var(--muted); background: rgba(138, 148, 201, 0.12); }
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---------- progress ---------- */
.progress { height: 8px; border-radius: 6px; background: rgba(8, 12, 26, 0.8); overflow: hidden; }
.progress .bar {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
  transition: width 0.5s ease;
}

/* ---------- task list ---------- */
.tasklist { display: flex; flex-direction: column; gap: 12px; }
.task-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) auto minmax(140px, 1fr) auto;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.task-row:hover { border-color: rgba(0, 229, 255, 0.45); transform: translateY(-1px); box-shadow: 0 0 24px rgba(0, 229, 255, 0.08); }
.task-row .meta .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row .meta .sub { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.task-row .status-col { display: flex; flex-direction: column; gap: 6px; }
.task-row .time { font-size: 11px; color: var(--muted); text-align: right; }
.task-row .actions { display: flex; gap: 6px; }

.empty {
  text-align: center; color: var(--muted); padding: 52px 20px;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: rgba(10, 14, 30, 0.3);
}

/* ---------- detail / preview ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.player { width: 100%; border-radius: var(--radius); background: #000; display: block; min-height: 120px; }
.player-wrap { background: rgba(4, 7, 16, 0.8); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); flex-shrink: 0; }
.kv .v { text-align: right; word-break: break-all; }

/* ---------- params read grid ---------- */
.param-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.param-item { font-size: 13px; }
.param-item .pk { color: var(--muted); font-size: 12px; }

/* ---------- settings ---------- */
.settings-card { margin-bottom: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mode-toggle { display: flex; gap: 8px; }
.mode-toggle button { padding: 9px 18px; border-radius: 9px; }
.mode-toggle button.on {
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.16), rgba(123, 108, 255, 0.16));
  border-color: rgba(0, 229, 255, 0.4);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.18);
}
.form-hint { font-size: 12px; color: var(--muted); margin: 6px 0 14px; }
table.schema-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.schema-table th, table.schema-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border-soft); }
table.schema-table input, table.schema-table select { padding: 6px 8px; font-size: 12px; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(3, 5, 14, 0.7);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  backdrop-filter: blur(6px);
}
.modal {
  width: min(700px, 92vw); max-height: 86vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 22px;
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.06), 0 20px 60px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
  font-size: 16px; font-weight: 700;
}

/* ---------- toast ---------- */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  background: var(--panel2); border: 1px solid var(--border); color: var(--text);
  padding: 13px 20px; border-radius: 12px; box-shadow: var(--shadow); font-size: 13px;
  backdrop-filter: blur(10px);
  transition: opacity 0.25s, transform 0.25s;
}
.toast.hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }

.hidden { display: none !important; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.mono { font-family: var(--mono); }
.text-muted { color: var(--muted); }
.text-sm { font-size: 12px; }
code { background: rgba(8, 12, 26, 0.7); padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: 12px; border: 1px solid var(--border-soft); }

/* 选中文字颜色 */
::selection { background: rgba(0, 229, 255, 0.3); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(120, 160, 255, 0.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 229, 255, 0.4); }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================================
   登录界面
   ========================================================================== */
.auth-root {
  position: fixed; inset: 0; z-index: 220;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3, 5, 14, 0.55);
  backdrop-filter: blur(12px) saturate(120%);
  padding: 24px;
}
.auth-root.hidden { display: none; }
.auth-panel {
  width: min(420px, 92vw);
  background: linear-gradient(165deg, rgba(26, 28, 58, 0.86), rgba(14, 16, 38, 0.8));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 34px 30px 28px;
  box-shadow: 0 0 0 1px rgba(138, 107, 255, 0.08), 0 24px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  text-align: center;
}
.auth-logo-wrap { position: relative; width: 66px; height: 66px; margin: 0 auto; }
.auth-logo-wrap::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  background: conic-gradient(#7cc8ff, #b39bff, #ff9ade, #7cc8ff);
  filter: blur(12px); opacity: 0.55;
  animation: spin 6s linear infinite;
}
.auth-logo-wrap::after {
  content: ""; position: absolute; inset: 2px; border-radius: 50%;
  background: linear-gradient(165deg, rgba(26, 28, 58, 0.9), rgba(14, 16, 38, 0.85));
  z-index: 0;
}
.auth-logo { position: relative; z-index: 1; width: 66px; height: 66px; filter: drop-shadow(0 0 12px rgba(150, 160, 255, 0.5)); }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-tagline { color: var(--muted); font-size: 12px; letter-spacing: 2px; margin-top: 6px; opacity: 0.8; }
.auth-panel {
  position: relative;
  animation: authGlow 5s ease-in-out infinite;
}
.auth-panel::before {
  content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 2px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, transparent, #7cc8ff, #b39bff, #ff9ade, transparent);
  opacity: 0.8;
}
@keyframes authGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(150, 140, 255, 0.12), 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 44px rgba(0, 229, 255, 0.07); }
  50% { box-shadow: 0 0 0 1px rgba(150, 140, 255, 0.16), 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 64px rgba(138, 107, 255, 0.14); }
}
.auth-title {
  font-size: 26px; font-weight: 800; letter-spacing: 6px; margin-top: 10px;
  background: linear-gradient(90deg, #a3ecff, #b6a0ff, #ff9ade);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-sub { color: var(--muted); font-size: 11px; letter-spacing: 2.5px; margin-top: 4px; text-transform: uppercase; }
.auth-tabs {
  display: flex; gap: 6px; margin: 24px 0 20px;
  background: rgba(8, 12, 26, 0.5); border: 1px solid var(--border-soft); border-radius: 12px; padding: 5px;
}
.auth-tabs button {
  flex: 1; padding: 9px; border: none; border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.auth-tabs button.on { background: linear-gradient(100deg, rgba(134, 204, 255, 0.2), rgba(163, 155, 255, 0.2)); color: #fff; }
.auth-body { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.auth-submit { justify-content: center; width: 100%; margin-top: 6px; }
.auth-note { font-size: 11px; color: var(--muted); line-height: 1.5; }
.auth-hint { font-size: 12px; color: var(--ok); padding: 9px 12px; background: rgba(53, 224, 166, 0.08); border-radius: 8px; }
.auth-hint.bad { color: var(--err); background: rgba(255, 93, 115, 0.1); }
.qr-wrap { display: flex; justify-content: center; padding: 8px 0; }
.qr-wrap canvas { border-radius: 10px; box-shadow: 0 0 0 1px var(--border), 0 0 30px rgba(0, 229, 255, 0.06); }
.user-badge {
  font-size: 12px; padding: 5px 12px; border-radius: 20px;
  background: rgba(138, 107, 255, 0.16); color: var(--accent2); white-space: nowrap;
}

/* ============================================================================
   参考素材上传区
   ========================================================================== */
.media-row { margin-top: 14px; }
.media-label {
  font-size: 13px; color: var(--muted); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px; font-weight: 600;
}
.media-max { font-size: 11px; opacity: 0.7; font-weight: 400; }
.media-slots { display: flex; flex-wrap: wrap; gap: 10px; }
.media-item { position: relative; display: flex; align-items: center; height: 74px; min-width: 74px; }
.media-thumb { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; display: block; border: 1px solid var(--border); }
.media-file {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: rgba(8, 12, 26, 0.6); border: 1px solid var(--border); border-radius: 10px;
  font-size: 12px; color: #fff; height: 74px;
}
.mf-ico { font-size: 18px; }
.mf-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-remove {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.media-remove:hover { background: var(--err); }
.media-slot.add {
  width: 74px; height: 74px; border-radius: 10px; border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--muted);
  cursor: pointer; font-size: 22px; background: rgba(8, 12, 26, 0.3);
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.media-slot.add:hover { border-color: var(--cyan); color: #fff; box-shadow: 0 0 16px rgba(0, 229, 255, 0.12); }

/* ============================================================================
   放大提示词
   ========================================================================== */
.prompt-wrap { position: relative; }
.prompt-wrap textarea { padding-right: 34px; }
.prompt-expand {
  position: absolute; top: 7px; right: 7px; width: 24px; height: 24px;
  border: 1px solid var(--border); border-radius: 7px; background: rgba(8, 12, 26, 0.8);
  color: var(--muted); font-size: 13px; cursor: pointer; line-height: 1;
  transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.prompt-expand:hover { color: #fff; border-color: var(--cyan); box-shadow: 0 0 12px rgba(0, 229, 255, 0.2); }
.prompt-big { min-height: 300px; width: 100%; font-size: 14px; line-height: 1.7; }

/* ============================================================================
   积分可视化
   ========================================================================== */
.credits-card {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(100deg, rgba(134, 204, 255, 0.08), rgba(163, 155, 255, 0.08));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
.credits-left { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.credits-ico { font-size: 20px; filter: drop-shadow(0 0 6px rgba(255, 207, 92, 0.6)); }
.credits-label { letter-spacing: 1px; }
.credits-bar { flex: 1; height: 12px; border-radius: 6px; background: rgba(8, 12, 26, 0.8); overflow: hidden; box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5); }
.credits-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ffcf5c, #ff9a4d); box-shadow: 0 0 16px rgba(255, 207, 92, 0.5); transition: width 0.5s ease; }
.credits-right { display: flex; flex-direction: column; align-items: flex-end; }
.credits-num { font-size: 26px; font-weight: 800; line-height: 1; background: linear-gradient(90deg, #ffe29a, #ffb04d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.credits-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.credits-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 12px;
  border-radius: 20px; background: rgba(255, 207, 92, 0.12); color: var(--warn);
  white-space: nowrap; box-shadow: 0 0 12px rgba(255, 207, 92, 0.12);
}
.credits-badge b { color: #fff; }

/* ============================================================================
   个人中心
   ========================================================================== */
.profile-grid { max-width: 560px; }
.profile-card { display: flex; flex-direction: column; gap: 16px; text-align: center; }
.avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pf-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); box-shadow: 0 0 20px rgba(120, 130, 255, 0.2); }
.profile-card .field { text-align: left; }
.profile-card .auth-submit { margin-top: 4px; }

/* ============================================================================
   无限画布
   ========================================================================== */
.canvas-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cv-zoom { display: flex; align-items: center; gap: 6px; }
.cv-zoom-pct { min-width: 44px; text-align: center; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.canvas-wrap {
  position: relative; overflow: hidden; height: calc(100vh - 210px); min-height: 420px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(8, 12, 26, 0.5); cursor: grab; touch-action: none;
}
.canvas-wrap.panning { cursor: grabbing; }
.cv-stage {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  transform-origin: 0 0; will-change: transform;
}
.cv-grid {
  position: absolute; top: -2000px; left: -2000px; width: 6000px; height: 6000px;
  background-image:
    linear-gradient(rgba(120, 160, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.cv-nodes { position: absolute; top: 0; left: 0; }
.cv-node {
  position: absolute; width: 330px; padding: 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); backdrop-filter: blur(10px);
}
.cv-node-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cv-handle { cursor: grab; color: var(--muted); font-size: 14px; user-select: none; }
.cv-handle:active { cursor: grabbing; }
.cv-st {
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px;
  color: var(--muted); background: rgba(138, 148, 201, 0.12);
}
.cv-st.active { color: var(--accent2); background: rgba(111, 227, 255, 0.14); }
.cv-st.completed { color: var(--ok); background: rgba(53, 224, 166, 0.14); }
.cv-st.failed { color: var(--err); background: rgba(255, 93, 115, 0.14); }
.cv-del { margin-left: auto; background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.cv-del:hover { color: var(--err); }
.cv-prompt { width: 100%; min-height: 72px; font-size: 13px; }
.cv-params { display: flex; align-items: center; gap: 6px; margin-top: 10px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.cv-duration { width: 70px; padding: 7px 8px; }
.cv-ratio { width: 88px; padding: 7px 8px; }
.cv-gen { flex: 1; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; background: linear-gradient(100deg, #86ccff, #a99bff); color: #080a1a; font-weight: 700; cursor: pointer; }
.cv-gen:hover { filter: brightness(1.08); }
.cv-gen.busy { opacity: 0.6; cursor: wait; }
.cv-node .progress { margin-top: 10px; }
.cv-result { margin-top: 10px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-soft); background: #05070f; }
.cv-result img, .cv-result video { width: 100%; display: block; max-height: 220px; object-fit: contain; }
.cv-err { margin-top: 8px; font-size: 12px; color: var(--err); }

/* 素材节点 */
.cv-node.cv-mat { width: 190px; }
.cv-mat-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; color: var(--cyan); background: rgba(0, 229, 255, 0.12); }
.cv-mat-body { margin-top: 8px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-soft); background: #05070f; }
.cv-mat-body img { width: 100%; display: block; max-height: 150px; object-fit: cover; }
.cv-mat-file { display: flex; align-items: center; gap: 8px; padding: 14px 10px; color: #fff; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-mat-name { margin-top: 6px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-mat-tip { margin-top: 8px; font-size: 10px; color: var(--muted); opacity: 0.8; border-top: 1px solid var(--border-soft); padding-top: 6px; }

/* 参考素材栏 */
.cv-refs { margin-top: 10px; border-top: 1px solid var(--border-soft); padding-top: 8px; }
.cv-refs-label { font-size: 11px; color: var(--muted); }
.cv-refs-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cv-refs-empty { font-size: 11px; color: var(--muted); opacity: 0.7; }
.cv-ref { position: relative; width: 46px; height: 46px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); background: rgba(8, 12, 26, 0.7); display: flex; align-items: center; justify-content: center; }
.cv-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-ref b { font-size: 18px; font-weight: 400; }
.cv-ref i { position: absolute; top: 0; right: 0; width: 15px; height: 15px; line-height: 14px; text-align: center; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 10px; font-style: normal; cursor: pointer; border-radius: 0 0 0 5px; }
.cv-ref i:hover { background: var(--err); }
