/* ============================================================
   设计系统 — 深色主题(自绘,参考行业通用深色规范)
   ============================================================ */
:root {
  --bg: #0b0b0d;
  --bg-2: #131316;
  --bg-3: #1a1a1f;
  --card: #16161a;
  --card-2: #1d1d23;
  --line: #26262d;
  --line-2: #32323a;
  --txt: #f2f2f4;
  --txt-2: #9b9ba4;
  --txt-3: #7c7c88;
  --acc: #de9070;          /* 主色:陶土橙 */
  --acc-2: #d97850;
  --acc-soft: rgba(222, 144, 112, .14);
  --gold: #e6c088;
  --red: #e5484d;
  --green: #46a758;
  --radius: 14px;
  --radius-s: 9px;
  --nav-h: 64px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-color: #333 #111; }
body { background: var(--bg); color: var(--txt); font-family: var(--font); font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }
::placeholder { color: var(--txt-3); }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 22px;
  padding: 0 28px;
  background: rgba(11, 11, 13, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: .5px; }
.nav .logo .mark { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--acc), var(--acc-2)); display: grid; place-items: center; font-size: 18px; }
.nav .links { display: flex; gap: 4px; flex: 1; }
.nav .links a { padding: 7px 13px; border-radius: 8px; color: var(--txt-2); font-size: 14px; }
.nav .links a:hover, .nav .links a.on { color: var(--txt); background: var(--bg-3); }
.nav .links a .new { color: #fff; background: var(--red); font-size: 10px; padding: 1px 5px; border-radius: 6px; margin-left: 4px; vertical-align: 2px; }
.nav .right { display: flex; align-items: center; gap: 12px; }
.nav .userbox { display: flex; align-items: center; gap: 8px; color: var(--txt-2); }
.nav .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--acc-soft); display: grid; place-items: center; color: var(--acc); font-weight: 700; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-2); background: var(--bg-3); color: var(--txt);
  border-radius: 999px; padding: 9px 22px; font-size: 14px; transition: .15s; }
.btn:hover { border-color: var(--acc); color: var(--acc); }
.btn.primary { background: linear-gradient(135deg, var(--acc), var(--acc-2)); border: none; color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.gold { background: linear-gradient(135deg, var(--gold), #c99b55); border: none; color: #241a08; font-weight: 700; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 14px; font-size: 13px; }
.btn.lg { padding: 13px 34px; font-size: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 卡片 / 面板 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 22px; }
.chip { display: inline-flex; align-items: center; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--txt-2); font-size: 13px; cursor: pointer; background: transparent; }
.chip.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--acc-soft); color: var(--acc); }
.tag.hot { background: rgba(229, 72, 77, .15); color: var(--red); }
.tag.gray { background: var(--bg-3); color: var(--txt-2); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--txt-2); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--txt);
  border-radius: var(--radius-s); padding: 10px 13px; font-size: 14px; outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--acc); }
.field textarea { min-height: 90px; resize: vertical; }
.seg { display: flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: none; background: transparent; color: var(--txt-2); padding: 7px 4px; border-radius: 7px; font-size: 13px; }
.seg button.on { background: var(--acc); color: #fff; }
.hint { font-size: 12px; color: var(--txt-3); margin-top: 5px; }

/* ---------- 弹窗 / Toast ---------- */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 200; display: grid; place-items: center; }
.modal { width: min(420px, 92vw); background: var(--card-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 28px; }
.modal h3 { font-size: 18px; margin-bottom: 16px; }
#toast { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--card-2); border: 1px solid var(--line-2); border-left: 3px solid var(--acc);
  padding: 10px 18px; border-radius: 10px; font-size: 13px; animation: fadein .2s; }
.toast.err { border-left-color: var(--red); }
@keyframes fadein { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- 通用布局 ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.muted { color: var(--txt-2); }
.small { font-size: 12px; color: var(--txt-3); }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 16px; }

/* ---------- 上传框 ---------- */
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--bg-2);
  min-height: 150px; display: grid; place-items: center; color: var(--txt-3); text-align: center;
  cursor: pointer; transition: .15s; position: relative; overflow: hidden; }
.drop:hover, .drop.over { border-color: var(--acc); color: var(--acc); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* ---------- 骨架/加载 ---------- */
.spin { width: 26px; height: 26px; border: 3px solid var(--line-2); border-top-color: var(--acc);
  border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- 表格 ---------- */
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.tb th { text-align: left; color: var(--txt-2); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tb td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tb tr:hover td { background: var(--bg-2); }

/* ---------- 移动端基础适配 ---------- */
@media (max-width: 900px) {
  .nav { padding: 0 14px; gap: 10px; }
  .nav .links { overflow-x: auto; scrollbar-width: none; }
  .wrap { padding: 0 14px; }
  .grid, .feat, .scen, .stats, .plans, .stat3 { grid-template-columns: 1fr 1fr !important; }
  .layout, body > .layout { display: block !important; }
  .layout > .side, body > .layout > .side { width: auto !important; border-right: none; border-bottom: 1px solid var(--line); display: flex; overflow-x: auto; padding: 10px; }
  .layout > .main, body > .layout > .main { padding: 14px !important; }
  .tool-page-grid { grid-template-columns: 1fr !important; }
  .panel { border-left: none; border-top: 1px solid var(--line); max-height: none; }
  .hero h1 { font-size: 30px !important; }
  .hero p.sub { font-size: 14px !important; }
  .masonry { columns: 2 150px !important; }
  .modal { padding: 18px; }
}
@media (max-width: 560px) {
  .grid, .feat, .stats, .plans { grid-template-columns: 1fr !important; }
  .nav .links a { padding: 7px 8px; font-size: 13px; }
}

/* ---------- UX 准则修订(ui-ux-pro-max 审计) ---------- */
html { scroll-behavior: smooth; }                      /* Smooth Scroll */
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }  /* Focus States */
@media (prefers-reduced-motion: reduce) {              /* Reduced Motion */
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
