/* ==================== 环联漫影studio · 全局样式（暗金主题） ==================== */
:root {
  --bg:#0E0F13; --surface:#16181F; --surface2:#1C1F27; --line:#262A35;
  --ink:#E8E6E1; --muted:#9BA0AB; --gold:#C9A24B; --red:#C0563C; --blue:#5B7C99;
  --green:#7FA97F;
}
* { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  background:var(--bg); color:var(--ink);
  font-family:"Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height:1.55; -webkit-font-smoothing:antialiased;
}
.serif { font-family:"Noto Serif SC", "SimSun", serif; }
a { color:var(--gold); }
.muted { color:var(--muted); }

/* ---------- Header ---------- */
header {
  padding:34px clamp(18px,4vw,56px) 22px;
  border-bottom:1px solid var(--line);
  background:radial-gradient(1200px 340px at 20% -10%, rgba(201,162,75,.10), transparent 60%),
             radial-gradient(900px 300px at 90% -20%, rgba(192,86,60,.08), transparent 55%), var(--bg);
}
.kicker { color:var(--gold); font-size:12px; letter-spacing:.32em; font-weight:700; }
h1 { font-family:"Noto Serif SC", serif; font-size:clamp(26px,4vw,40px); font-weight:900; margin:8px 0 4px; }
.sub { color:var(--muted); font-size:14px; margin-top:4px; }
.sub b { color:var(--gold); }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.chip { background:var(--surface2); border:1px solid var(--line); border-radius:999px;
  padding:5px 13px; font-size:12.5px; color:var(--ink); }
.chip b { color:var(--gold); font-weight:700; }

/* ---------- Toolbar ---------- */
.toolbar {
  position:sticky; top:0; z-index:30;
  display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  padding:10px clamp(18px,4vw,56px);
  background:rgba(14,15,19,.94); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.nav-btn {
  color:var(--ink); text-decoration:none; font-size:13px; font-weight:700;
  padding:9px 16px; min-height:40px; border-radius:8px; border:1px solid var(--line); background:var(--surface2);
  display:inline-flex; align-items:center;
}
.nav-btn:hover { border-color:var(--gold); color:var(--gold); }
.ep-tag { font-size:13px; color:var(--muted); font-weight:700; white-space:nowrap; }
.search-wrap { margin-left:auto; display:flex; align-items:center; gap:8px; }
.search-wrap label { color:var(--muted); font-size:13px; }
#q {
  width:min(300px,42vw); padding:8px 14px; border-radius:8px;
  border:1px solid var(--line); background:var(--surface2); color:var(--ink); font-size:14px; outline:none;
}
#q:focus { border-color:var(--gold); }
#q::placeholder { color:var(--muted); }
.cnt { font-size:12px; color:var(--muted); white-space:nowrap; }
.author-link { color:var(--gold); text-decoration:none; }
.author-link:hover { text-decoration:underline; }

/* ---------- 分镜表格 ---------- */
main { padding:18px clamp(18px,4vw,56px) 60px; }
.table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--line); border-radius:12px; background:var(--surface); max-width:100%; }
table { width:100%; min-width:1180px; border-collapse:collapse; table-layout:fixed; }
th, td { padding:11px 12px; font-size:13px; vertical-align:top; text-align:left; word-break:break-word; overflow-wrap:anywhere; }
th {
  background:var(--surface2); color:var(--gold); font-weight:700; font-size:12px;
  border-bottom:1px solid var(--line); white-space:nowrap;
}
td { border-bottom:1px solid #1F222C; color:var(--ink); }
tbody tr:last-child td { border-bottom:none; }
tr:hover td { background:rgba(201,162,75,.05); }

th.c-ep { width:4%; } th.c-num { width:4%; } th.c-dur { width:4.5%; }
th.c-shot { width:6%; } th.c-cam { width:8.5%; } th.c-light { width:9%; }
th.c-body { width:15.5%; } th.c-cost { width:9.5%; } th.c-dial { width:9.5%; }
th.c-sub { width:9.5%; } th.c-snd { width:8.5%; } th.c-prompt { width:11.5%; }

.t-ch { color:var(--muted); font-size:12px; }
.t-num { font-family:"Consolas",monospace; font-size:13px; }
.t-dur { font-family:"Consolas","Microsoft YaHei",monospace; color:var(--gold); font-size:12.5px; white-space:nowrap; }
.t-shot, .t-cam, .t-light { color:#B9BEC8; font-size:12.5px; }
.t-dial { color:#F0EEE9; }
.no { color:#6E7480; font-weight:700; }
.t-cost, .t-sub, .t-snd { color:#B9BEC8; font-size:12.5px; }

.pbtn {
  background:var(--surface2); color:var(--gold); border:1px solid var(--gold);
  border-radius:8px; padding:9px 12px; min-height:40px; font-size:13px; font-weight:700; cursor:pointer;
  white-space:nowrap; transition:all .15s; font-family:inherit;
}
.pbtn:hover { background:var(--gold); color:#0E0F13; }

/* 集标题行（caption：表格最顶部，表头上方） */
.ch-caption {
  caption-side:top; text-align:left; padding:11px 16px;
  background:#1A1D25; color:var(--ink);
  border-left:6px solid #C9A24B; border-bottom:1px solid var(--line);
  font-family:"Noto Serif SC", serif; font-weight:900; font-size:16px;
}
.ch-caption .ch-name { margin-right:16px; color:var(--ink); }
.ch-caption .ch-time { color:var(--gold); font-size:12.5px; font-family:Consolas,monospace; }
.ch-fn { color:var(--muted); font-size:12px; }

/* ---------- Dialog ---------- */
dialog {
  border:none; border-radius:14px; background:var(--surface); color:var(--ink);
  width:min(760px,92vw); max-height:82vh; padding:0; box-shadow:0 24px 80px rgba(0,0,0,.6);
}
dialog::backdrop { background:rgba(5,6,8,.72); backdrop-filter:blur(3px); }
.dlg-head {
  display:flex; align-items:center; gap:10px; padding:16px 20px;
  border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--surface2);
}
.dlg-title { font-family:"Noto Serif SC", serif; font-weight:900; font-size:16px; }
.dlg-close { margin-left:auto; background:none; border:none; color:var(--muted); font-size:22px; cursor:pointer; line-height:1; font-family:inherit; }
.dlg-close:hover { color:var(--ink); }
.dlg-body { padding:18px 20px 20px; overflow:auto; max-height:calc(82vh - 60px); }
.dlg-meta { color:var(--muted); font-size:12.5px; margin-bottom:12px; }
.dlg-prompt {
  white-space:pre-wrap; word-break:break-word; font-size:13.5px; line-height:1.75;
  background:#12141A; border:1px solid var(--line); border-radius:10px; padding:16px;
}
.dlg-actions { margin-top:14px; text-align:right; }
.copy-btn {
  background:var(--gold); color:#0E0F13; border:none; border-radius:8px;
  padding:9px 18px; font-size:14px; font-weight:700; cursor:pointer;
}
.copy-btn:hover { filter:brightness(1.1); }
.copy-ok { color:var(--green); font-size:12.5px; margin-left:10px; }

/* ---------- 系统页面（首页 / 表单 / 用户主页 / 后台） ---------- */
.system-page header { padding-bottom:26px; }
.auth-main, .form-main { max-width:1080px; margin:0 auto; padding:26px clamp(18px,4vw,56px) 60px; }
.auth-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:18px; }
.auth-card, .form-card {
  background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:24px 24px 26px;
}
.card-title { font-family:"Noto Serif SC", serif; font-size:18px; font-weight:900; margin-bottom:16px; color:var(--ink); }

/* 首页：项目数量统计 */
.stat-line { margin:10px 0 0; font-size:14px; color:var(--ink); }
.stat-num { color:var(--gold); font-size:20px; font-weight:900; margin:0 4px; font-family:Consolas,monospace; }

/* 首页：我的项目 / 其他使用者项目（参考图2 卡片样式） */
.proj-section { margin-top:24px; }
.proj-sec-title {
  font-family:"Noto Serif SC", serif; font-size:17px; font-weight:900;
  color:var(--gold); margin-bottom:14px; letter-spacing:.5px;
}
.proj-cards { display:flex; flex-wrap:wrap; gap:14px; }
.proj-card {
  display:flex; flex-direction:column; gap:6px; width:250px; padding:16px 16px 14px;
  background:var(--surface); border:1px solid var(--line); border-radius:14px;
  text-decoration:none; transition:border-color .15s, transform .15s;
}
.proj-card:hover { border-color:var(--gold); transform:translateY(-2px); }
.proj-no { color:var(--gold); font-size:11px; font-weight:700; letter-spacing:1.5px; font-family:Consolas,monospace; }
.proj-card-title { color:var(--ink); font-weight:700; font-size:14.5px; line-height:1.45; min-height:20px; }
.proj-meta { color:var(--muted); font-size:12px; line-height:1.55; }
.proj-view { margin-top:6px; color:var(--gold); font-size:12.5px; font-weight:700; }
.proj-group { margin-bottom:20px; }
.proj-user {
  color:var(--ink); font-size:14px; font-weight:700; margin-bottom:10px;
  display:flex; align-items:center; gap:8px;
}
.proj-user::before { content:""; width:4px; height:14px; background:var(--gold); border-radius:2px; }

/* 设备信息（手机拦截页卡片式） */
.dev-info {
  display:flex; align-items:flex-start; gap:14px; max-width:520px; margin:20px auto 0;
  padding:16px 18px; background:var(--surface); border:1px solid var(--line); border-radius:14px; text-align:left;
}
.dev-icon {
  width:44px; height:44px; border-radius:50%; background:rgba(201,162,75,.13);
  border:1px solid var(--gold); color:var(--gold); font-weight:900; font-size:19px;
  display:flex; align-items:center; justify-content:center;
  font-family:"Noto Serif SC", serif; flex-shrink:0;
}
.dev-title { color:var(--gold); font-weight:700; font-size:13px; letter-spacing:1px; margin-bottom:7px; }
.dev-row { font-size:12.5px; color:var(--muted); line-height:1.9; }
.dev-row span { color:var(--gold); font-weight:700; }

/* 设备信息（电脑端 footer 上方横条） */
.dev-strip {
  display:flex; flex-wrap:wrap; gap:8px 22px; align-items:center;
  padding:11px clamp(18px,4vw,56px);
  background:var(--surface2); border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  font-size:12.5px; color:var(--muted);
}
.dev-strip-label { color:var(--gold); font-weight:700; letter-spacing:1px; }
.dev-strip b { color:var(--ink); font-weight:700; }

label { display:block; font-size:13.5px; color:var(--muted); margin-bottom:14px; font-weight:700; }
label small { display:block; font-weight:400; color:var(--muted); font-size:11.5px; margin-top:2px; }
input[type="text"], input[type="password"], textarea, select {
  width:100%; margin-top:6px; padding:11px 14px; border-radius:10px;
  border:1px solid var(--line); background:var(--surface2); color:var(--ink);
  font-size:14px; outline:none; font-family:inherit;
}
input:focus, textarea:focus, select:focus { border-color:var(--gold); }
textarea { resize:vertical; line-height:1.7; }
.opt-row { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.opt-row label { flex:1; min-width:180px; margin-bottom:0; }
.opt-row select { cursor:pointer; }

/* 操作列：单镜编辑按钮 */
.t-ch { text-align:center; }
.shot-edit {
  background:transparent; color:var(--gold); border:1px solid var(--gold);
  border-radius:8px; padding:4px 12px; font-size:12.5px; font-weight:700;
  cursor:pointer; font-family:inherit; white-space:nowrap;
}
.shot-edit:hover { background:var(--gold); color:#0E0F13; }

/* 单镜编辑弹窗 */
#editDlg { width:min(680px, 92vw); border:1px solid var(--line); border-radius:14px; padding:0; background:var(--surface); color:var(--ink); }
#editDlg::backdrop { background:rgba(0,0,0,.6); }
.edit-form { display:flex; flex-direction:column; gap:16px; padding:18px 22px 22px; }
.edit-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px 16px; }
.edit-grid label { margin-bottom:0; }
.edit-grid .full { grid-column:1 / -1; }
.edit-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.edit-actions .btn-primary { width:auto; padding:11px 28px; }
.edit-actions .muted { font-size:12px; }

.btn-primary {
  width:100%; padding:12px; border-radius:10px; cursor:pointer;
  background:var(--gold); color:#0E0F13; border:none; font-size:15px; font-weight:700; font-family:inherit;
}
.btn-primary:hover { filter:brightness(1.1); }
.btn-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:6px; }
.btn-row .btn-primary { width:auto; padding:12px 26px; }

.alert { border-radius:10px; padding:14px 16px; margin-bottom:16px; font-size:13.5px; border:1px solid var(--line); }
.alert p { margin:2px 0; }
.alert-error { background:rgba(192,86,60,.12); border-color:var(--red); color:#E8B4A6; }
.alert-ok { background:rgba(127,169,127,.12); border-color:var(--green); color:#BFD9BF; }
.alert-warn { background:rgba(201,162,75,.12); border-color:var(--gold); color:#E4CFA0; }

/* 项目卡片 */
.ep-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:16px; }
.ep-card {
  background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:20px 20px 18px;
  text-decoration:none; color:inherit; display:flex; flex-direction:column;
  transition:border-color .15s, transform .15s; position:relative;
}
.ep-card:hover { border-color:var(--gold); transform:translateY(-2px); }
.ep-num { color:var(--gold); font-size:11.5px; letter-spacing:.28em; font-weight:700; }
.ep-name { font-family:"Noto Serif SC", serif; font-size:20px; font-weight:900; margin:7px 0 9px; }
.ep-meta { color:var(--muted); font-size:12.5px; margin-bottom:10px; }
.ep-meta b { color:var(--gold); }
.ep-point { font-size:13px; color:#B9BEC8; line-height:1.65; }
.ep-scene { font-size:12px; color:var(--muted); margin-top:10px; line-height:1.6; }
.ep-go { margin-top:14px; color:var(--gold); font-size:13px; font-weight:700; }
.card-del { position:absolute; top:14px; right:14px; z-index:2; }
.card-del form { display:inline; }
.empty-box { background:var(--surface); border:1px dashed var(--line); border-radius:14px; padding:48px 24px; text-align:center; color:var(--muted); font-size:14px; }

.mini-btn {
  display:inline-block; padding:6px 12px; border-radius:8px; font-size:12.5px; font-weight:700;
  border:1px solid var(--line); background:var(--surface2); color:var(--ink);
  text-decoration:none; cursor:pointer; font-family:inherit;
}
.mini-btn:hover { border-color:var(--gold); color:var(--gold); }
.mini-danger:hover { border-color:var(--red); color:var(--red); }

.tag { display:inline-block; padding:2px 10px; border-radius:999px; font-size:11.5px; font-weight:700; border:1px solid var(--line); }
.tag-gold { color:var(--gold); border-color:var(--gold); }
.tag-green { color:var(--green); border-color:var(--green); }
.tag-red { color:var(--red); border-color:var(--red); }

/* 管理后台表格 */
.admin-table { min-width:900px; }
.admin-table th, .admin-table td { padding:10px 12px; white-space:nowrap; }
.admin-table td:last-child { display:flex; gap:8px; align-items:center; }

/* 分页 */
.pager { display:flex; gap:8px; justify-content:center; margin-top:22px; flex-wrap:wrap; }
.pager a {
  min-width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:8px; border:1px solid var(--line); background:var(--surface2);
  color:var(--ink); text-decoration:none; font-size:13px; font-weight:700; padding:0 8px;
}
.pager a:hover { border-color:var(--gold); color:var(--gold); }
.pager a.pg-on { background:var(--gold); color:#0E0F13; border-color:var(--gold); }

/* 粘贴格式示例（表单上方，默认展开，新建/编辑前必读） */
.spec {
  margin:0 0 18px; background:var(--surface); border:1px solid var(--line); border-radius:12px; overflow:hidden;
}
.spec-title {
  padding:13px 18px; font-size:14px; font-weight:700;
  color:var(--gold); border-bottom:1px solid var(--line); user-select:none;
}
.spec-body { padding:16px 18px 18px; }
.spec h4 { font-size:13px; color:var(--ink); margin:14px 0 8px; font-weight:700; }
.spec h4:first-child { margin-top:0; }
.code-block {
  background:#12141A; border:1px solid var(--line); border-radius:10px;
  padding:14px 16px; font-size:12.5px; line-height:1.75; overflow-x:auto;
  font-family:"Consolas","Microsoft YaHei",monospace; color:#C9CDD6; white-space:pre-wrap;
}

footer { padding:20px clamp(18px,4vw,56px) 40px; color:var(--muted); font-size:12.5px; border-top:1px solid var(--line); }
footer p { margin:4px 0; }
footer .site-copy { color:rgba(201,162,75,.72); letter-spacing:.4px; margin-top:10px; }

@media (max-width:640px) {
  body { font-size:15px; }
  #q { font-size:16px; }
  .nav-btn { min-height:44px; font-size:14px; }
  .pbtn { min-height:44px; font-size:14px; }
  .cnt { font-size:13px; }
  .chip { font-size:13px; }
  th { font-size:12px; }
  .toolbar .search-wrap { margin-left:0; width:100%; }
  #q { width:100%; }
}
