:root {
  --bg: #060a12;
  --bg2: #0b1220;
  --panel: #0e1728;
  --panel2: #131f33;
  --line: rgba(125, 211, 252, .14);
  --line-strong: rgba(125, 211, 252, .32);
  --text: #e8f1ff;
  --muted: #8ea3c0;
  --cyan: #67e8f9;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #fb7185;
  --purple: #c084fc;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

* { 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;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(56, 189, 248, .13), transparent 60%),
    radial-gradient(900px 600px at 90% 0%, rgba(192, 132, 252, .10), transparent 55%),
    radial-gradient(800px 500px at 50% 110%, rgba(251, 191, 36, .06), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 15%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 45% 75%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1px 1px at 10% 85%, rgba(255,255,255,.3) 50%, transparent 51%);
  background-size: 900px 900px, 700px 700px, 800px 800px, 1000px 1000px, 600px 600px;
  pointer-events: none;
  opacity: .7;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

input, select, textarea, button { font-family: inherit; }
input, select, textarea {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(103,232,249,.12); }
input[type=number] { -moz-appearance: textfield; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(103,232,249,.08); color: var(--text); cursor: pointer;
  font-size: 14px; font-weight: 600; transition: .15s; white-space: nowrap;
}
.btn:hover { background: rgba(103,232,249,.16); border-color: var(--cyan); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, #22d3ee, #0ea5e9); border-color: transparent; color: #04121f; }
.btn-primary:hover { background: linear-gradient(135deg, #67e8f9, #38bdf8); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: rgba(251,113,133,.1); border-color: rgba(251,113,133,.4); color: #fda4af; }
.btn-danger:hover { background: rgba(251,113,133,.2); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn[disabled], .btn.disabled { opacity: .38; cursor: not-allowed; filter: grayscale(.4); transform: none; }

.bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #22d3ee, #a78bfa); transition: width .3s; }

.tag {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.tag.green { color: var(--green); border-color: rgba(74,222,128,.3); }
.tag.amber { color: var(--amber); border-color: rgba(251,191,36,.3); }
.tag.red { color: var(--red); border-color: rgba(251,113,133,.3); }
.tag.cyan { color: var(--cyan); border-color: rgba(103,232,249,.3); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 22px;
  background: rgba(6,10,18,.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .5px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #fef3c7, #fbbf24 40%, #b45309 70%, #451a03);
  box-shadow: 0 0 18px rgba(251,191,36,.45), inset -6px -6px 10px rgba(0,0,0,.35);
  position: relative; flex: none;
}
.brand-logo::after {
  content: ""; position: absolute; width: 43px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(103,232,249,.55); top: 10px; left: -5px; transform: rotate(-18deg);
  box-shadow: 0 0 10px rgba(103,232,249,.25);
}
.brand small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; letter-spacing: 2px; }

.res-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  display: flex; align-items: center; gap: 7px; padding: 6px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.035);
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.chip b { font-weight: 700; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; }
.chip.h3 .dot { background: #67e8f9; color: #67e8f9; }
.chip.ice .dot { background: #93c5fd; color: #93c5fd; }
.chip.metal .dot { background: #fbbf24; color: #fbbf24; }
.chip.crystal .dot { background: #c084fc; color: #c084fc; }
.chip.credits .dot { background: #4ade80; color: #4ade80; }
.chip.moon-soil .dot { background: #f0c674; color: #f0c674; }
.chip small { color: var(--muted); font-size: 11px; }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; width: 38px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.035);
  color: var(--text); cursor: pointer; font-size: 16px; transition: .15s;
}
.icon-btn:hover { border-color: var(--cyan); background: rgba(103,232,249,.1); }
.badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #30060c; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.user-box { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-left: 1px solid var(--line); }
.user-box .dot-on { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ---------- 导航 ---------- */
.navbar {
  display: flex; gap: 4px; padding: 0 22px; overflow-x: auto;
  border-bottom: 1px solid var(--line); background: rgba(8,13,23,.6); scrollbar-width: none;
}
.navbar::-webkit-scrollbar { display: none; }
.nav-item {
  padding: 12px 16px 10px; cursor: pointer; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap; transition: .15s; background: none; border-top: 0; border-left: 0; border-right: 0;
}
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--cyan); border-bottom-color: var(--cyan); font-weight: 700; }
.nav-item .nd { display: inline-block; margin-left: 5px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; font-size: 10px; border-radius: 8px; background: rgba(251,113,133,.9); color: #30060c; }

/* ---------- 布局 ---------- */
.wrap { max-width: 1440px; margin: 0 auto; padding: 18px 22px 60px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .layout { grid-template-columns: 1fr; } }

.panel {
  background: linear-gradient(180deg, rgba(19,31,51,.85), rgba(10,17,30,.92));
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-pad { padding: 16px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.panel-head h2 { font-size: 16px; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.panel-head h2 .sq { width: 4px; height: 16px; border-radius: 3px; background: linear-gradient(180deg, var(--cyan), var(--purple)); }
.panel-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.section-title { font-size: 13px; color: var(--muted); letter-spacing: 1px; margin: 18px 0 10px; text-transform: uppercase; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 14px; }
.grid.tight { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }

/* ---------- 卡片 ---------- */
.card {
  background: linear-gradient(180deg, rgba(28,44,70,.55), rgba(13,22,38,.85));
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  transition: border-color .18s, transform .18s, box-shadow .18s; position: relative;
}
.card:hover { border-color: rgba(103,232,249,.45); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.35); }
.card .card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card .cname { font-size: 15px; font-weight: 700; }
.card .clv { font-size: 11px; color: var(--muted); margin-top: 2px; }
.card .icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: var(--cyan);
  background: radial-gradient(circle at 30% 20%, rgba(103,232,249,.25), rgba(15,27,45,.6));
  border: 1px solid rgba(103,232,249,.25);
}
.card .effect { margin: 9px 0 4px; font-size: 12px; color: #b6c8e2; line-height: 1.55; min-height: 34px; }
.card .costline { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--muted); margin: 6px 0; }
.card .costline b { color: #dbeafe; font-weight: 600; }
.card .card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.card .time { font-size: 11px; color: var(--muted); }
.card.locked { opacity: .62; }
.card.owned { border-color: rgba(74,222,128,.22); }

/* ---------- 统计 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 14px; }
.stat {
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(103,232,249,.07), rgba(255,255,255,.01));
}
.stat .k { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.stat .v { font-size: 20px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat.good .v { color: var(--green); }
.stat.warn .v { color: var(--amber); }
.stat.bad .v { color: var(--red); }

/* ---------- 队列 ---------- */
.queues { display: grid; gap: 10px; padding: 14px; }
.queue {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: rgba(255,255,255,.025);
}
.queue .q-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.queue .q-name { font-weight: 700; }
.queue .q-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.queue .q-bar { margin: 9px 0 8px; }
.queue .q-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.queue .q-left { font-size: 11px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.queue.empty { color: var(--muted); font-size: 12px; text-align: center; padding: 16px; border-style: dashed; }

/* ---------- 任务 ---------- */
.quest-tabs { display: flex; gap: 8px; padding: 14px 14px 0; flex-wrap: wrap; }
.pill {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); color: var(--muted); cursor: pointer; font-size: 13px;
}
.pill.active { color: var(--cyan); border-color: var(--cyan); background: rgba(103,232,249,.1); }
.quest-list { display: grid; gap: 10px; padding: 14px; }
.quest {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02);
}
.quest.done { border-color: rgba(74,222,128,.35); }
.quest.claimed { opacity: .55; }
.quest.locked { opacity: .5; filter: grayscale(.3); }
.quest .qt { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quest .qd { color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.quest .qprog { display: flex; align-items: center; gap: 9px; max-width: 460px; }
.quest .qprog .bar { flex: 1; }
.quest .qprog span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rewards { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.rewards .rw { font-size: 11px; color: #cdd9ea; border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px; background: rgba(255,255,255,.03); }

/* ---------- 列表行 ---------- */
.rows { padding: 6px 14px 14px; }
.row-item {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px;
  padding: 12px 10px; border-bottom: 1px solid rgba(125,211,252,.08);
}
.row-item:last-child { border-bottom: 0; }
.row-item:hover { background: rgba(103,232,249,.035); }
.ri-name { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ri-sub { color: var(--muted); font-size: 11.5px; margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.ri-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.num { font-variant-numeric: tabular-nums; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid rgba(125,211,252,.09); }
.table th { color: var(--muted); font-size: 11px; letter-spacing: .5px; font-weight: 600; }
.table tr:hover td { background: rgba(103,232,249,.03); }

/* ---------- 聊天 ---------- */
.chat-wrap { display: flex; flex-direction: column; height: 520px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { font-size: 13px; line-height: 1.5; }
.msg b { color: var(--cyan); font-weight: 600; margin-right: 6px; }
.msg time { color: #566b86; font-size: 10px; margin-left: 6px; }
.msg.mine b { color: var(--amber); }
.chat-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; }

/* ---------- 模态 ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 80; background: rgba(3,7,13,.72); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 20px; overflow-y: auto;
}
.modal {
  width: 100%; max-width: 680px; border-radius: 16px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #121e33, #0a1220); box-shadow: 0 30px 80px rgba(0,0,0,.6);
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; }
.modal-head .x { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-body { padding: 16px 18px 20px; font-size: 13.5px; line-height: 1.65; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 18px 18px; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px; font-size: 13px; }
.kv .k { color: var(--muted); }
.help { color: var(--muted); font-size: 12px; line-height: 1.7; }

/* ---------- 资源消耗 ---------- */
.cost-item { display: inline-flex; gap: 4px; align-items: baseline; }
.cost-item.neg { color: var(--red); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- Toast ---------- */
.toasts { position: fixed; top: 76px; right: 22px; z-index: 120; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  min-width: 220px; max-width: 380px; padding: 11px 14px; border-radius: 10px;
  background: rgba(13,24,40,.96); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  font-size: 13px; animation: slide .2s ease-out; pointer-events: auto;
}
.toast.err { border-color: rgba(251,113,133,.55); color: #fecdd3; }
.toast.ok { border-color: rgba(74,222,128,.45); color: #d1fae5; }
@keyframes slide { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 侧栏 ---------- */
.aside .panel + .panel { margin-top: 14px; }
.side-info { padding: 14px 16px; font-size: 12.5px; color: #b6c8e2; line-height: 1.8; }
.side-info .ann { padding: 10px 0; border-bottom: 1px dashed rgba(125,211,252,.12); }
.side-info .ann:last-child { border: 0; }
.side-info .ann h4 { font-size: 13px; margin-bottom: 4px; }
.side-info .ann p { color: var(--muted); font-size: 12px; }
.online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 6px; box-shadow: 0 0 6px var(--green); }

/* ---------- 登录 ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 18px; }
.auth-card {
  width: 100%; max-width: 420px; border-radius: 18px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20,33,55,.95), rgba(9,15,26,.98));
  box-shadow: 0 40px 100px rgba(0,0,0,.6); overflow: hidden;
}
.auth-brand { text-align: center; padding: 30px 24px 18px; }
.auth-brand .big-logo {
  width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff7d6, #fcd34d 38%, #b45309 68%, #3f1d05);
  box-shadow: 0 0 40px rgba(251,191,36,.4), inset -10px -10px 18px rgba(0,0,0,.35);
  position: relative;
}
.auth-brand .big-logo::after {
  content: ""; position: absolute; width: 100px; height: 30px; border-radius: 50%; top: 24px; left: -12px;
  border: 3px solid rgba(103,232,249,.55); transform: rotate(-16deg); box-shadow: 0 0 20px rgba(103,232,249,.3);
}
.auth-brand h1 { font-size: 26px; letter-spacing: 4px; }
.auth-brand p { color: var(--muted); font-size: 12px; letter-spacing: 2px; margin-top: 6px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); }
.auth-tabs button { flex: 1; padding: 12px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; border-bottom: 2px solid transparent; }
.auth-tabs button.active { color: var(--cyan); border-bottom-color: var(--cyan); font-weight: 700; }
.auth-form { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.auth-form label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }
.auth-msg { min-height: 18px; font-size: 12px; color: var(--red); }
.auth-meta { text-align: center; color: #566b86; font-size: 11px; padding: 0 0 18px; }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; color: var(--muted); padding: 44px 20px; font-size: 13px; }
.empty-state .big { font-size: 30px; opacity: .35; margin-bottom: 8px; }

 /* ---------- 管理后台 ---------- */
.admin-body { background: var(--bg); }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: rgba(6,10,18,.9); position: sticky; top: 0; z-index: 30; }
.admin-side { position: fixed; left: 0; top: 61px; bottom: 0; width: 210px; border-right: 1px solid var(--line); background: rgba(9,15,26,.85); padding: 14px 10px; overflow-y: auto; }
.admin-side a { display: block; padding: 10px 14px; border-radius: 9px; color: var(--muted); font-size: 13.5px; margin-bottom: 2px; }
.admin-side a:hover { background: rgba(255,255,255,.04); color: var(--text); text-decoration: none; }
.admin-side a.active { background: rgba(103,232,249,.1); color: var(--cyan); font-weight: 700; }
.admin-main { margin-left: 210px; padding: 20px 24px 60px; }
.admin-main h1 { font-size: 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.admin-main h1 .sq { width: 4px; height: 18px; border-radius: 3px; background: linear-gradient(180deg, var(--cyan), var(--purple)); }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: rgba(255,255,255,.02); }
.admin-table th, .admin-table td { padding: 9px 10px; border-bottom: 1px solid rgba(125,211,252,.1); text-align: left; vertical-align: top; }
.admin-table th { color: var(--muted); font-size: 11px; background: rgba(255,255,255,.02); }
.admin-table tr:hover td { background: rgba(103,232,249,.03); }
.admin-section { background: linear-gradient(180deg, rgba(19,31,51,.8), rgba(10,17,30,.9)); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.admin-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.admin-form .full { grid-column: 1 / -1; }
.admin-form label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 5px; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-pager { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.badge-num { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 8px; background: rgba(103,232,249,.12); color: var(--cyan); font-size: 11px; text-align: center; }

/* ---------- 响应 ---------- */
@media (max-width: 760px) {
  .topbar { gap: 10px; padding: 10px 14px; }
  .brand small { display: none; }
  .res-chips { order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .user-box { padding-left: 0; border-left: 0; }
  .navbar { padding: 0 10px; }
  .wrap { padding: 12px 12px 40px; }
  .grid { grid-template-columns: 1fr; }
  .quest { grid-template-columns: 1fr; }
  .ri-actions { justify-content: flex-start; }
  .admin-side { display: none; }
  .admin-main { margin-left: 0; padding: 16px; }
  .toasts { right: 12px; left: 12px; align-items: flex-end; }
  .row-item { grid-template-columns: 1fr; }
}

.flash, .ins-err { padding:10px 12px; border-radius:10px; font-size:12.5px; margin-bottom:14px; border:1px solid rgba(251,113,133,.35); background:rgba(251,113,133,.08); color:#fecdd3; }

/* ---------- 建筑解锁链 / 指挥中心升级条件 ---------- */
.cc-req{margin:12px 16px 0;padding:12px 14px;border:1px solid rgba(104,168,255,.22);border-radius:12px;background:rgba(18,30,56,.72)}
.cc-req.done{border-color:rgba(53,208,138,.38);background:rgba(18,44,38,.55)}
.cc-req-head{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;font-weight:600;color:var(--text)}
.req-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.req-chip{font-size:11px;padding:3px 8px;border-radius:999px;border:1px solid rgba(255,255,255,.12);color:var(--muted);background:rgba(255,255,255,.02)}
.req-chip b{font-weight:600;color:var(--text)}
.req-chip.ok{color:#7fe0b0;border-color:rgba(53,208,138,.35);background:rgba(53,208,138,.08)}
.req-chip.ok b{color:#b9f5d7}
.req-chip.bad{color:#ffc477;border-color:rgba(255,178,72,.35);background:rgba(255,178,72,.08)}
.req-chip.bad b{color:#ffe1b5}
.cc-req-note{margin-top:8px;font-size:11.5px;color:var(--muted)}

/* ---------- 图标与图形化首页 ---------- */
.ico { width: 20px; height: 20px; object-fit: contain; flex: none; display: inline-block; vertical-align: -4px; }
.ico-sm { width: 16px; height: 16px; vertical-align: -3px; }
.ico-lg { width: 42px; height: 42px; }
.ico-hero { width: 96px; height: 96px; }
.nav-item { display: inline-flex; align-items: center; gap: 6px; }
.nav-item .ico { opacity: .72; filter: grayscale(.25); }
.nav-item.active .ico, .nav-item:hover .ico { opacity: 1; filter: none; }
.chip .ico { margin-right: 1px; }
.top-actions .icon-btn { gap: 3px; font-size: 12px; padding: 0 8px; width: auto; min-width: 38px; }
.vip-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 10px;
  border: 1px solid rgba(251,191,36,.28); background: rgba(251,191,36,.07);
  color: #fcd34d; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.vip-badge.on { background: linear-gradient(135deg, rgba(251,191,36,.2), rgba(251,113,133,.12)); border-color: rgba(251,191,36,.5); box-shadow: 0 0 18px rgba(251,191,36,.15); }
.card .icon.b-ico { background: transparent; border-color: transparent; width: 42px; height: 42px; }
.card .icon.b-ico .ico { width: 40px; height: 40px; }
.moon-hero {
  position: relative; overflow: hidden; min-height: 210px; margin-bottom: 16px;
  border-radius: 18px; border: 1px solid rgba(125,211,252,.24);
  background: #07101f url('../img/moon-hero.svg') center/cover no-repeat;
  box-shadow: 0 22px 50px rgba(0,0,0,.45);
}
.moon-hero::after { content:""; position:absolute; inset:0; background: linear-gradient(90deg, rgba(5,9,20,.72) 0%, rgba(5,9,20,.35) 46%, rgba(5,9,20,.05) 75%), linear-gradient(0deg, rgba(5,9,20,.55), transparent 60%); pointer-events:none; }
.moon-hero-glow { position:absolute; width:340px; height:180px; left:-60px; top:-70px; background:radial-gradient(circle, rgba(103,232,249,.22), transparent 68%); filter:blur(10px); }
.hero-copy { position:relative; z-index:2; padding: 28px 30px; max-width: 620px; }
.hero-kicker { font-size: 10px; letter-spacing: 3px; color: #7dd3fc; opacity: .8; }
.hero-copy h1 { font-size: 34px; letter-spacing: 6px; margin: 8px 0 6px; text-shadow: 0 2px 18px rgba(103,232,249,.3); }
.hero-copy p { font-size: 12.5px; color: #b6c8e2; letter-spacing: .5px; }
.hero-tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.hero-tags span { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:999px; border:1px solid rgba(125,211,252,.22); background:rgba(8,16,28,.55); color:#cfe5ff; font-size:11px; backdrop-filter: blur(6px); }
.hero-tags .ico { width:14px; height:14px; }
.hero-moon { position:absolute; right:34px; bottom:24px; z-index:2; opacity:.55; filter: drop-shadow(0 0 22px rgba(251,191,36,.25)); }
.res-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:10px; padding: 0 14px 14px; }
.res-card {
  position:relative; overflow:hidden; min-height: 132px; padding: 12px 12px 10px; border-radius: 14px;
  border: 1px solid rgba(125,211,252,.16); background: linear-gradient(160deg, rgba(22,36,60,.7), rgba(9,17,30,.9));
}
.res-card::before { content:""; position:absolute; width:90px; height:90px; right:-28px; top:-28px; border-radius:50%; background: var(--rc, #67e8f9); opacity:.12; filter: blur(8px); }
.res-card.h3 { --rc:#67e8f9; } .res-card.ice { --rc:#93c5fd; } .res-card.metal { --rc:#fbbf24; } .res-card.crystal { --rc:#c084fc; } .res-card.credits { --rc:#4ade80; } .res-card.moon-soil { --rc:#f0c674; cursor:pointer; border-color: rgba(240,198,116,.28); } .res-card.vip-card { --rc:#fbbf24; cursor:pointer; border-color: rgba(251,191,36,.26); }
.res-card:hover { border-color: var(--rc); transform: translateY(-2px); transition: .16s; }
.res-card-head { display:flex; align-items:center; gap:8px; }
.res-card-head .ico-lg { width:36px; height:36px; }
.res-card-name { font-size: 13px; font-weight: 700; }
.res-card-sub { font-size: 10px; color: var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.res-card-num { font-size: 23px; font-weight: 800; margin: 10px 0 4px; font-variant-numeric: tabular-nums; }
.res-card.vip-card .res-card-num { font-size: 22px; color:#fcd34d; }
.res-card-meta { display:flex; justify-content:space-between; font-size: 10px; color: var(--muted); gap:6px; }
.res-card-meta .plus { color: var(--green); }
.res-meter { height:5px; border-radius:6px; background:rgba(255,255,255,.08); margin-top:7px; overflow:hidden; }
.res-meter i { display:block; height:100%; border-radius:6px; background: linear-gradient(90deg, var(--rc), #a5f3fc); }
.res-card.credits .res-meter i { background: linear-gradient(90deg,#4ade80,#a3e635); }
.res-card.moon-soil .res-meter i { background: linear-gradient(90deg,#f0c674,#fb7185); }
.res-card.moon-soil .res-card-num { color:#f0c674; }
.res-card.vip-card .res-meter i { background: linear-gradient(90deg,#fbbf24,#fb7185); }
.vip-panel { padding: 2px 0 4px; }
.vip-hero { display:flex; align-items:center; gap:14px; padding:14px; border-radius:14px; border:1px solid rgba(251,191,36,.24); background: radial-gradient(circle at 20% 0%, rgba(251,191,36,.18), rgba(10,17,30,.2)); }
.vip-hero h3 { font-size: 22px; margin: 4px 0 2px; color:#fcd34d; }
.vip-hero p { color: var(--muted); font-size: 12px; }
.vip-stats { display:grid; grid-template-columns: repeat(4, 1fr); gap:8px; margin: 12px 0; }
.vip-stats > div { padding:10px; border-radius:10px; background:rgba(255,255,255,.03); border:1px solid var(--line); }
.vip-stats span { display:block; font-size:10.5px; color:var(--muted); }
.vip-stats b { display:block; font-size:18px; margin-top:4px; color:#fcd34d; }
.vip-cost { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.vip-cost > div { display:flex; align-items:center; gap:6px; padding:8px 10px; border-radius:9px; border:1px solid var(--line); background:rgba(255,255,255,.03); font-size:12px; }
.vip-cost b { margin-left:4px; color:#fde68a; font-size:15px; }
.vip-note { margin-top:10px; color:var(--muted); font-size:11.5px; line-height:1.6; }
/* 月壤兑换 / 充值 */
.exchange-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.exchange-card { border-color: rgba(240,198,116,.22); background: linear-gradient(160deg, rgba(48,36,16,.55), rgba(12,15,24,.92)); }
.exchange-card .card-top .tag.amber { border-color: rgba(240,198,116,.4); color:#f0c674; }
.ex-res-list { display:flex; flex-wrap:wrap; gap:6px; margin: 8px 0 10px; }
.ex-res { display:inline-flex; align-items:center; gap:5px; font-size:11px; color:var(--muted); padding:4px 7px; border:1px solid var(--line); border-radius:8px; }
.ex-res .ico { width:13px; height:13px; }
.ex-res b { color:#fde68a; }
.recharge-wrap { padding: 2px 0 4px; }
.recharge-hero { position:relative; border-radius:14px; overflow:hidden; border:1px solid rgba(240,198,116,.24); background:#08111f; }
.recharge-hero img { display:block; width:100%; aspect-ratio: 3 / 1; object-fit:cover; }
.recharge-hero-copy { position:absolute; left:20px; top:50%; transform:translateY(-50%); text-shadow:0 2px 16px rgba(0,0,0,.55); }
.recharge-hero-copy span { font-size:10px; letter-spacing:3px; color:#f0c674; }
.recharge-hero-copy h3 { font-size:26px; margin:5px 0 2px; color:#fff3d6; }
.recharge-hero-copy p { font-size:11.5px; color:#cbd8e8; }
.recharge-body { display:grid; grid-template-columns: 1.45fr .55fr; gap:14px; margin-top:14px; }
.recharge-left h4 { font-size:14px; margin-bottom:6px; color:#fde68a; }
.recharge-left p { font-size:11.5px; line-height:1.7; color:var(--muted); }
.recharge-contact { display:flex; align-items:center; gap:8px; margin:10px 0; padding:9px 10px; border-radius:9px; border:1px solid rgba(240,198,116,.28); background:rgba(240,198,116,.06); }
.recharge-contact span { font-size:11px; color:var(--muted); }
.recharge-contact b { font-size:15px; color:#fde68a; flex:1; letter-spacing:.5px; }
.recharge-ratio { margin-top:10px; padding:10px; border-radius:9px; border:1px solid var(--line); background:rgba(255,255,255,.025); }
.recharge-ratio-title { font-size:12px; font-weight:700; color:var(--text); margin-bottom:2px; }
.recharge-ratio p { margin-bottom:7px; }
.recharge-table { width:100%; border-collapse:collapse; font-size:11px; }
.recharge-table th, .recharge-table td { padding:5px 6px; border-bottom:1px solid rgba(255,255,255,.07); text-align:left; }
.recharge-table th { color:var(--muted); font-weight:500; }
.recharge-table td b { color:#fde68a; }
.recharge-qr { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:10px; border:1px solid var(--line); border-radius:10px; background:rgba(0,0,0,.18); }
.recharge-qr img { width:100%; max-width:170px; border-radius:8px; }
.recharge-qr small { font-size:10px; color:var(--muted); }
.recharge-note { margin-top:12px; padding:9px 10px; border-radius:8px; background:rgba(103,232,249,.05); color:var(--muted); font-size:11px; line-height:1.6; }

@media (max-width: 1280px) { .res-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 620px) {
  .res-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .moon-hero { min-height: 190px; }
  .hero-copy { padding: 22px 18px; }
  .hero-copy h1 { font-size: 26px; letter-spacing: 4px; }
  .hero-moon { right: 12px; bottom: 12px; }
  .hero-moon .ico-hero { width: 64px; height: 64px; }
  .vip-stats { grid-template-columns: 1fr; }
  .exchange-grid { grid-template-columns: 1fr; }
  .recharge-body { grid-template-columns: 1fr; }
  .recharge-hero-copy h3 { font-size: 21px; }
  .recharge-hero-copy { left: 14px; }
}

/* v1.7 · 下拉框在深色后台/前台统一使用深底浅字，展开项不再白底 */
select, option {
  background-color: #0c1728 !important;
  color: #e7f0ff !important;
  color-scheme: dark;
}
select {
  border: 1px solid rgba(125, 211, 252, .22);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
select option:checked, select option:hover {
  background-color: #16324f !important;
  color: #ffffff !important;
}

/* v1.7 · 后台奖励可视化小方块 */
.reward-editor {
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 12px;
  padding: 12px;
  background: rgba(8, 18, 32, .55);
}
.rw-head { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; font-size:13px; font-weight:600; color:#dceaff; }
.rw-head span, .rw-label { font-size:11px; font-weight:400; color:var(--muted); }
.rw-label { margin: 10px 0 6px; letter-spacing: .5px; }
.reward-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:9px; }
.reward-tile {
  display:flex; align-items:center; gap:10px; min-height:44px; padding:9px 11px;
  border:1px solid rgba(125, 211, 252, .16); border-radius:10px;
  background:rgba(15, 29, 48, .75); cursor:pointer; min-width:0;
  transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.reward-tile:hover { border-color:rgba(125, 211, 252, .38); background:rgba(18, 38, 61, .9); }
.reward-tile input[type=checkbox] {
  width:18px; height:18px; flex:0 0 18px; margin:0; cursor:pointer;
  accent-color:#38bdf8; border-radius:4px;
}
.reward-tile .rw-name { flex:1 1 auto; font-size:13px; color:#cfe5ff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.reward-tile input[type=number] {
  display:none; width:64px; flex:0 0 64px; padding:4px 6px; font-size:12px; border-radius:6px;
}
.reward-tile:has(input[type=checkbox]:checked) {
  border-color:rgba(56, 189, 248, .65); background:linear-gradient(90deg, rgba(14, 52, 82, .95), rgba(12, 32, 52, .9));
  box-shadow:0 0 0 1px rgba(56, 189, 248, .18), 0 6px 18px rgba(0, 0, 0, .18);
}
.reward-tile:has(input[type=checkbox]:checked) input[type=number] { display:inline-block; }
.reward-tile:has(input[type=checkbox]:disabled) { opacity:.42; cursor:not-allowed; }
.reward-tile:has(input[type=checkbox]:disabled):hover { border-color:rgba(125, 211, 252, .16); background:rgba(15, 29, 48, .75); }
.rw-preview { margin-top:10px; font-size:11px; color:#93c5fd; }

/* v1.7 · 首页后台自定义公告条 */
.home-notice {
  margin: -6px 0 16px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, .18);
  background: linear-gradient(90deg, rgba(14, 36, 60, .85), rgba(8, 18, 32, .55));
  color: #cfe5ff; font-size: 12px; letter-spacing: .3px;
}

/* v2.0 · 后台剩余 JSON 可视化 */
.req-editor, .tech-editor, .item-eff-editor, .defense-editor, .tiers-editor {
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 12px;
  padding: 12px;
  background: rgba(8, 18, 32, .55);
}
.req-rows { margin-top: 8px; }
.req-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; min-width: 0; }
.req-row select { flex: 1 1 auto; min-width: 140px; }
.req-row input[type=number] { width: 96px; flex: 0 0 96px; }
.req-row .btn { flex: 0 0 auto; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 8px; }
.tech-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.tech-grid label select, .tech-grid label input { width: 100%; }
.eff-group { display: none; margin-top: 8px; }
.eff-group[data-type="boost"], .eff-group[data-type="shield"], .eff-group[data-type="slot"], .eff-group[data-type="rename"] { display: block; }
.item-eff-editor .reward-grid { margin-top: 8px; }

/* v2.0 · 英雄 / 武器 / 战队 */
.hero-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.hero-card {
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(15, 35, 58, .9), rgba(8, 18, 32, .75));
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.hero-card.rarity-SR { border-color: rgba(56, 189, 248, .45); }
.hero-card.rarity-SSR { border-color: rgba(251, 191, 36, .5); box-shadow: 0 0 0 1px rgba(251, 191, 36, .12) inset; }
.hero-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hero-avatar {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14, 52, 82, .8); border: 1px solid rgba(125, 211, 252, .22);
}
.hero-avatar.weapon-avatar { background: rgba(54, 38, 12, .65); border-color: rgba(251, 191, 36, .25); }
.hero-id { flex: 1 1 auto; min-width: 0; }
.hero-id .cname { font-size: 15px; }
.hero-id .clv { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-line { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #a9c7e8; }
.hero-weapon { font-size: 12px; }
.hero-desc { font-size: 11px; color: var(--muted); line-height: 1.5; min-height: 33px; }
.hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 1px solid rgba(125, 211, 252, .1); }
.hero-foot .time { font-size: 11px; color: var(--muted); }
.mini-select { max-width: 150px; padding: 5px 7px; font-size: 12px; border-radius: 7px; }
.team-card .effect .tag { margin: 0 4px 4px 0; }
.empty-hint { padding: 26px 12px; text-align: center; color: var(--muted); font-size: 13px; }
