/* ============================================================
   Pixlix GPU 控制台 — 机房面板风
   底色近黑蓝、信号青绿强调、等宽数字、状态灯
   ============================================================ */
:root {
  --bg0: #07090d;          /* 页面底 */
  --bg1: #0c1016;          /* 面板 */
  --bg2: #121822;          /* 面板凸起/输入框 */
  --bg3: #1a2230;          /* hover */
  --line: #1d2733;         /* 常规描边 */
  --line-hi: #2e4152;      /* 强描边 */
  --tx: #cdd9e5;           /* 正文 */
  --tx-dim: #64788d;       /* 次要 */
  --tx-faint: #3d4c5e;     /* 极弱 */
  --acc: #45e0b0;          /* 信号青绿(主强调) */
  --acc-dim: #1d8f6f;
  --acc-bg: rgba(69,224,176,.08);
  --warn: #f5b14c;
  --warn-bg: rgba(245,177,76,.1);
  --dgr: #f0706a;
  --dgr-bg: rgba(240,112,106,.1);
  --info: #5aa9ff;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
  --sans: "Microsoft YaHei UI", "PingFang SC", "HarmonyOS Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }
body {
  background: var(--bg0);
  color: var(--tx);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  /* 机房氛围:顶部青光晕 + 极淡扫描线 */
  background-image:
    radial-gradient(ellipse 900px 420px at 18% -8%, rgba(69,224,176,.055), transparent 60%),
    radial-gradient(ellipse 700px 380px at 95% 0%, rgba(90,169,255,.04), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,255,255,.006) 2px 4px);
  background-attachment: fixed;
}

::selection { background: rgba(69,224,176,.25); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #223041; border-radius: 5px; border: 2px solid var(--bg0); }
::-webkit-scrollbar-thumb:hover { background: #2e4152; }

/* ---------- 启动画面 ---------- */
.boot-splash { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.boot-logo { font-family: var(--mono); font-size: 34px; letter-spacing: .35em; color: var(--tx); font-weight: 700; }
.boot-logo span { color: var(--acc); animation: blink 1s steps(1) infinite; }
.boot-sub { color: var(--tx-dim); font-size: 13px; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 整体布局 ---------- */
#app { display: block; min-height: 100vh; }
.shell { display: grid; grid-template-columns: 208px 1fr; min-height: 100vh; }

/* 侧边栏 */
.side {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0a0e14, #080b10);
  padding: 18px 0 20px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.side-logo {
  font-family: var(--mono); font-size: 19px; font-weight: 700; letter-spacing: .3em;
  padding: 2px 20px 16px; color: var(--tx);
}
.side-logo b { color: var(--acc); font-weight: 700; }
.side-logo small { display: block; letter-spacing: .12em; font-size: 10px; color: var(--tx-faint); margin-top: 2px; }
.nav-group { margin-top: 14px; }
.nav-group-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: .25em;
  color: var(--tx-faint); padding: 0 20px 6px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 20px; cursor: pointer; color: var(--tx-dim);
  border-left: 2px solid transparent; text-decoration: none; font-size: 13.5px;
  transition: color .15s, background .15s;
}
.nav-item:hover { color: var(--tx); background: rgba(255,255,255,.02); }
.nav-item.on {
  color: var(--acc); border-left-color: var(--acc);
  background: linear-gradient(90deg, var(--acc-bg), transparent 80%);
}
.nav-item .ni { font-family: var(--mono); font-size: 12px; width: 16px; text-align: center; opacity: .9; }
.side-foot { margin-top: auto; padding: 14px 20px 0; font-family: var(--mono); font-size: 10.5px; color: var(--tx-faint); line-height: 1.9; border-top: 1px solid var(--line); }
.side-foot .lamp { margin-right: 6px; }

/* 顶栏 */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 26px; border-bottom: 1px solid var(--line);
  background: rgba(10,14,20,.75); backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 16px; font-weight: 600; letter-spacing: .05em; }
.topbar .crumb { font-family: var(--mono); color: var(--tx-faint); font-size: 12px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 12px; color: var(--tx-dim); }

.view { padding: 24px 26px 60px; flex: 1; min-width: 0; }

/* ---------- 状态灯 ---------- */
.lamp { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tx-faint); vertical-align: middle; }
.lamp.ok { background: var(--acc); box-shadow: 0 0 6px rgba(69,224,176,.8); animation: pulse 2.4s ease-in-out infinite; }
.lamp.warn { background: var(--warn); box-shadow: 0 0 6px rgba(245,177,76,.7); }
.lamp.err { background: var(--dgr); box-shadow: 0 0 6px rgba(240,112,106,.7); }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- 面板 ---------- */
.panel {
  background: var(--bg1); border: 1px solid var(--line); border-radius: 3px;
  padding: 18px 20px; margin-bottom: 18px;
}
.panel:hover { border-color: #243342; }
.panel-title {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .18em;
  color: var(--tx-dim); margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.panel-title::before { content: "//"; color: var(--acc); font-weight: 700; }
.panel-title .pt-side { margin-left: auto; display: flex; gap: 8px; letter-spacing: 0; }
.panel-desc { color: var(--tx-dim); font-size: 12.5px; margin: -8px 0 14px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg2); color: var(--tx); border: 1px solid var(--line-hi);
  border-radius: 3px; padding: 6px 14px; font-size: 13px; cursor: pointer;
  font-family: var(--sans); transition: all .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--acc-dim); color: var(--acc); background: var(--bg3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.pri { background: var(--acc); color: #05231a; border-color: var(--acc); font-weight: 600; }
.btn.pri:hover { background: #5cf0c4; color: #05231a; box-shadow: 0 0 14px rgba(69,224,176,.35); }
.btn.dgr { color: var(--dgr); border-color: rgba(240,112,106,.4); background: transparent; }
.btn.dgr:hover { background: var(--dgr-bg); border-color: var(--dgr); }
.btn.sm { padding: 3px 10px; font-size: 12px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--tx-dim); }
.btn.ghost:hover { color: var(--acc); border-color: transparent; background: var(--acc-bg); }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- 表单 ---------- */
.inp, .sel, .ta {
  background: var(--bg2); border: 1px solid var(--line-hi); color: var(--tx);
  border-radius: 3px; padding: 7px 10px; font-size: 13.5px; font-family: var(--sans);
  outline: none; width: 100%; transition: border-color .15s;
}
.inp:focus, .sel:focus, .ta:focus { border-color: var(--acc-dim); box-shadow: 0 0 0 2px rgba(69,224,176,.12); }
.ta { resize: vertical; min-height: 110px; line-height: 1.7; }
.sel { cursor: pointer; }
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 12px; color: var(--tx-dim); margin-bottom: 5px; }
.field .hint { font-size: 11.5px; color: var(--tx-faint); margin-top: 4px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .inp, .inline-form .sel { width: auto; flex: 1; min-width: 140px; }

input[type="range"] { accent-color: var(--acc); }
input[type="checkbox"] { accent-color: var(--acc); width: 15px; height: 15px; cursor: pointer; }

/* ---------- 数据统计块 ---------- */
.stat { padding: 16px 18px; background: var(--bg1); border: 1px solid var(--line); border-radius: 3px; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--line-hi); }
.stat.hi::after { background: var(--acc); box-shadow: 0 0 8px rgba(69,224,176,.6); }
.stat .k { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--tx-dim); }
.stat .v { font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--tx); margin-top: 4px; line-height: 1.2; }
.stat .v small { font-size: 13px; color: var(--tx-dim); font-weight: 400; margin-left: 4px; }
.stat .sub { font-size: 12px; color: var(--tx-faint); margin-top: 2px; }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .15em;
  color: var(--tx-faint); font-weight: 400; padding: 8px 10px; border-bottom: 1px solid var(--line-hi);
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255,255,255,.015); }
.tbl .mono { font-family: var(--mono); font-size: 12px; }

/* ---------- 标签/徽章 ---------- */
.tag {
  display: inline-block; font-family: var(--mono); font-size: 11px; padding: 1px 8px;
  border: 1px solid var(--line-hi); border-radius: 2px; color: var(--tx-dim); letter-spacing: .05em;
}
.tag.ok { color: var(--acc); border-color: var(--acc-dim); background: var(--acc-bg); }
.tag.warn { color: var(--warn); border-color: rgba(245,177,76,.4); background: var(--warn-bg); }
.tag.err { color: var(--dgr); border-color: rgba(240,112,106,.4); background: var(--dgr-bg); }
.tag.info { color: var(--info); border-color: rgba(90,169,255,.4); background: rgba(90,169,255,.08); }

/* ---------- 进度条 ---------- */
.prog { height: 5px; background: var(--bg2); border-radius: 3px; overflow: hidden; min-width: 80px; }
.prog > i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc-dim), var(--acc)); border-radius: 3px; transition: width .4s; box-shadow: 0 0 8px rgba(69,224,176,.5); }
.prog-row { display: flex; align-items: center; gap: 10px; }
.prog-row .pct { font-family: var(--mono); font-size: 12px; color: var(--acc); min-width: 42px; text-align: right; }

/* ---------- 页签 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs .tab {
  padding: 8px 16px; cursor: pointer; color: var(--tx-dim); font-size: 13.5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; user-select: none;
}
.tabs .tab:hover { color: var(--tx); }
.tabs .tab.on { color: var(--acc); border-bottom-color: var(--acc); }

/* ---------- 卡片网格(素材/形象) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.card {
  background: var(--bg1); border: 1px solid var(--line); border-radius: 3px; overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--acc-dim); }
.card .thumb {
  aspect-ratio: 16/10; background: var(--bg2); display: flex; align-items: center; justify-content: center;
  color: var(--tx-faint); font-family: var(--mono); font-size: 11px; overflow: hidden; position: relative;
}
.card .thumb.tall { aspect-ratio: 3/4; }
.card .thumb img, .card .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .cbody { padding: 10px 12px; }
.card .cname { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .cdesc { font-size: 11.5px; color: var(--tx-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .cact { display: flex; gap: 6px; padding: 0 12px 10px; flex-wrap: wrap; }

/* 快速入口大卡 */
.quick {
  display: flex; flex-direction: column; gap: 6px; padding: 20px;
  background: var(--bg1); border: 1px solid var(--line); border-radius: 3px;
  cursor: pointer; text-decoration: none; color: var(--tx); transition: all .15s; position: relative; overflow: hidden;
}
.quick::before {
  content: attr(data-no); position: absolute; right: 12px; top: 8px;
  font-family: var(--mono); font-size: 30px; color: rgba(255,255,255,.04); font-weight: 700;
}
.quick:hover { border-color: var(--acc-dim); background: var(--bg3); transform: translateY(-2px); }
.quick:hover .q-t { color: var(--acc); }
.quick .q-t { font-size: 15px; font-weight: 600; transition: color .15s; }
.quick .q-d { font-size: 12px; color: var(--tx-dim); }

/* ---------- 分镜(编辑器) ---------- */
.step-item {
  border: 1px solid var(--line); border-radius: 3px; background: var(--bg1);
  margin-bottom: 10px; overflow: hidden;
}
.step-item.dragover { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.step-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--bg2); border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.step-head .no { font-family: var(--mono); color: var(--acc); font-weight: 700; }
.step-head .drag { cursor: grab; color: var(--tx-faint); font-family: var(--mono); user-select: none; }
.step-head .drag:hover { color: var(--acc); }
.step-head .sp { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.step-body { padding: 10px 12px; }
.asset-chip {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 3px; margin-bottom: 6px; background: var(--bg0); font-size: 12.5px;
}
.asset-chip .an { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.asset-chip .ad { color: var(--tx-dim); font-family: var(--mono); font-size: 11px; }
.asset-chip .btn-row { gap: 4px; }

/* 编辑器工作流锚点条 */
.flow-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; position: sticky; top: 57px; z-index: 30; background: rgba(7,9,13,.9); backdrop-filter: blur(4px); padding: 8px 0; }
.flow-nav a {
  font-family: var(--mono); font-size: 12px; color: var(--tx-dim); text-decoration: none;
  padding: 4px 12px; border: 1px solid var(--line); border-radius: 3px; transition: all .15s;
}
.flow-nav a:hover { color: var(--acc); border-color: var(--acc-dim); }
.flow-nav .sep { color: var(--tx-faint); align-self: center; font-family: var(--mono); font-size: 11px; }

/* ---------- 空状态 / 加载 ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--tx-faint); font-size: 13px; }
.empty .e-icon { font-family: var(--mono); font-size: 26px; color: var(--tx-faint); display: block; margin-bottom: 8px; letter-spacing: .2em; }
.spin {
  display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line-hi);
  border-top-color: var(--acc); border-radius: 50%; animation: rot .7s linear infinite; vertical-align: middle;
}
.loading-line { display: flex; align-items: center; gap: 10px; color: var(--tx-dim); font-size: 13px; padding: 20px 0; justify-content: center; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- Toast ---------- */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 999; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast {
  background: var(--bg2); border: 1px solid var(--line-hi); border-left: 3px solid var(--acc);
  padding: 10px 16px; border-radius: 3px; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.5);
  animation: t-in .25s ease-out; word-break: break-all;
}
.toast.err { border-left-color: var(--dgr); }
.toast.warn { border-left-color: var(--warn); }
@keyframes t-in { from { transform: translateX(30px); opacity: 0; } }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(4,6,9,.72); backdrop-filter: blur(3px);
  z-index: 900; display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .18s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--bg1); border: 1px solid var(--line-hi); border-radius: 4px;
  width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.6); animation: m-in .2s ease-out;
}
.modal.wide { max-width: 860px; }
@keyframes m-in { from { transform: translateY(14px); opacity: 0; } }
.modal-head {
  display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 13px; letter-spacing: .12em; color: var(--tx);
}
.modal-head::before { content: "//"; color: var(--acc); margin-right: 8px; font-weight: 700; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--tx-dim); font-family: var(--mono); padding: 0 4px; }
.modal-head .x:hover { color: var(--dgr); }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

.modal video, .modal audio, .modal img.preview { width: 100%; border-radius: 3px; background: #000; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { width: 100%; max-width: 400px; }
.login-logo { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: .3em; text-align: center; margin-bottom: 4px; }
.login-logo b { color: var(--acc); }
.login-sub { text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .3em; color: var(--tx-faint); margin-bottom: 30px; }
.login-panel { background: var(--bg1); border: 1px solid var(--line-hi); border-radius: 4px; padding: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.login-panel details { margin-top: 14px; }
.login-panel summary { cursor: pointer; font-size: 12px; color: var(--tx-dim); user-select: none; }
.login-foot { text-align: center; font-family: var(--mono); font-size: 10.5px; color: var(--tx-faint); margin-top: 18px; letter-spacing: .15em; }

/* ---------- 杂项 ---------- */
.mono { font-family: var(--mono); }
.dim { color: var(--tx-dim); }
.faint { color: var(--tx-faint); }
.acc { color: var(--acc); }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 13px; }
.kv .k { color: var(--tx-dim); font-family: var(--mono); font-size: 12px; }
.kv .v { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.clickable { cursor: pointer; }
.wrap-anywhere { word-break: break-all; }

.demand-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: 3px; margin-bottom: 10px; background: var(--bg1); }
.demand-item:hover { border-color: var(--acc-dim); }
.demand-item .dt { font-weight: 600; font-size: 14px; cursor: pointer; }
.demand-item .dt:hover { color: var(--acc); }
.demand-item .dm { color: var(--tx-dim); font-size: 12.5px; margin-top: 4px; }
.vote-btn { font-family: var(--mono); }

audio { width: 100%; height: 36px; }
audio::-webkit-media-controls-panel { background: var(--bg2); }
