/* 登录页、主页、后台共用：和游戏一样的深蓝底 + 金色 */
:root {
  --bg0: #0d1530; --bg1: #17244a;
  --panel: rgba(255, 255, 255, .06); --line: rgba(255, 255, 255, .1);
  --ink: #eef2ff; --muted: #9aa6c7;
  --gold: #f5c451; --gold-deep: #d79b1d;
  --pos: #4ade80; --neg: #fb7185; --accent: #60a5fa;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 700px at 30% 0%, #22346a 0%, transparent 60%), linear-gradient(160deg, var(--bg1), var(--bg0));
  background-color: var(--bg0); background-attachment: fixed;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; }

.top { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo img { width: 34px; height: 34px; }
.top .grow { flex: 1; }
.who { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }

.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  border-radius: 12px; padding: 10px 18px; color: #2a1d00;
  background: linear-gradient(180deg, #ffd978, var(--gold-deep)); box-shadow: 0 6px 18px rgba(215, 155, 29, .25);
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn.danger { background: rgba(251, 113, 133, .15); color: var(--neg); box-shadow: inset 0 0 0 1px rgba(251, 113, 133, .35); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
h2 { font-size: 18px; margin: 32px 0 12px; display: flex; align-items: baseline; gap: 10px; }
h2 small { font-weight: 400; font-size: 13px; color: var(--muted); }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input {
  width: 100%; font: inherit; color: var(--ink); background: rgba(0, 0, 0, .25);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: none;
}
input:focus { border-color: var(--gold); }
.err { color: var(--neg); min-height: 22px; font-size: 14px; margin-top: 10px; }
.ok { color: var(--pos); font-size: 14px; }

.av { width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .08); object-fit: contain; flex: none; }
.av.lg { width: 40px; height: 40px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: rgba(255, 255, 255, .06); font-size: 13px; }
.chip.win { background: rgba(245, 196, 81, .16); color: var(--gold); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.tag.gold { background: rgba(245, 196, 81, .15); color: var(--gold); }
.tag.red { background: rgba(251, 113, 133, .15); color: var(--neg); }
.tag.green { background: rgba(74, 222, 128, .13); color: var(--pos); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.empty { color: var(--muted); padding: 28px; text-align: center; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px 40px; }
  .who { display: none; }
}
