/* ============================================================
   DF1v1 对战平台 · 暗色战术风 v2
   设计语言：深空蓝黑 + 琥珀金渐变 + 玻璃拟态顶栏 + 微光细节
   ============================================================ */
:root {
  --bg: #090d13;
  --bg-soft: #0d131b;
  --panel: #0f1620;
  --panel-2: #141d29;
  --border: #223042;
  --border-soft: #1a2635;
  --text: #e6edf6;
  --text-dim: #93a1b3;
  --text-faint: #617085;
  --accent: #ffc94d;
  --accent-dark: #c98f14;
  --green: #2ecc71;
  --red: #ff4655;
  --blue: #45aaf2;
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --cut: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --cut-sm: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  --glow-accent: 0 0 22px rgba(247, 183, 49, 0.14);
}

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

body {
  background: #06090e;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  min-height: 100vh;
  background-image:
    radial-gradient(1100px 600px at 75% -10%, rgba(247, 183, 49, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(69, 170, 242, 0.06), transparent 60%),
    radial-gradient(1000px 600px at 110% 95%, rgba(150, 120, 250, 0.05), transparent 60%);
  background-attachment: fixed;
}
/* 固定网格纹理（向下渐隐）+ 全屏扫描线，垫在内容下方 */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 20%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 0%, black 20%, transparent 78%);
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}

.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
.mono { font-variant-numeric: tabular-nums; font-family: "SF Mono", Menlo, Consolas, monospace; }
::selection { background: rgba(247, 183, 49, 0.25); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1e2a3a; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2c3e56; }

/* ===== 顶栏（玻璃拟态） ===== */
#topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  height: 62px;
  background: rgba(8, 12, 18, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  clip-path: var(--cut-sm);
  background: linear-gradient(135deg, #ffd166, #f79c11);
  color: #1c1503; font-size: 12px; font-weight: 900; letter-spacing: 1px;
}
.brand-name { font-weight: 800; letter-spacing: 2px; font-size: 17px; }
.brand-name b { color: var(--accent); font-weight: 800; }
.brand-sub { font-size: 12px; color: var(--text-dim); border-left: 1px solid rgba(148, 163, 184, 0.15); padding-left: 10px; }

#nav { display: flex; gap: 4px; flex: 1; }
#nav a {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-dim);
  transition: all .18s ease;
}
#nav a:hover { color: var(--text); background: rgba(148, 163, 184, 0.08); }
#nav a.active {
  color: var(--accent);
  background: linear-gradient(180deg, rgba(247, 183, 49, 0.16), rgba(247, 183, 49, 0.04));
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
#nav a.admin-only { color: var(--red); }
#nav a.admin-only.active {
  color: #ff6b7a;
  background: linear-gradient(180deg, rgba(255, 70, 85, 0.16), rgba(255, 70, 85, 0.04));
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.user-chip { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dim); }
.user-chip .name { color: var(--text); font-weight: 600; }
.user-chip button { margin-left: 4px; }

/* ===== 布局 ===== */
#app { max-width: 1100px; margin: 0 auto; padding: 30px 20px 64px; position: relative; z-index: 1; }
.page-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.page-title::before {
  content: ''; display: inline-block; width: 4px; height: 22px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(247, 183, 49, 0.15));
  box-shadow: 0 0 10px rgba(247, 183, 49, 0.3);
}
.page-title .sub { font-size: 13px; color: var(--text-faint); font-weight: 400; letter-spacing: 1px; }

/* ===== 卡片 ===== */
/* ===== 卡片（切角 HUD 面板） ===== */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 29, 41, 0.85), rgba(13, 19, 27, 0.95));
  border: 1px solid var(--border);
  clip-path: var(--cut);
  border-radius: 0;
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.card::after {
  content: ''; position: absolute; top: 7px; right: 7px; width: 13px; height: 13px;
  border-top: 2px solid rgba(247, 183, 49, 0.4); border-right: 2px solid rgba(247, 183, 49, 0.4);
  pointer-events: none;
}
.card + .card { margin-top: 16px; }
.card h3 { font-size: 13px; color: var(--text-dim); font-weight: 700; letter-spacing: 1.5px; margin-bottom: 14px; text-transform: uppercase; }
.card h3::before { content: '// '; color: var(--accent); }

/* ===== 登录页 ===== */
.login-wrap { min-height: calc(100vh - 40px); display: flex; align-items: center; justify-content: center; }
.login-box { width: 400px; }
.login-hero { text-align: center; margin-bottom: 30px; }
.login-hero .brand-mark {
  width: 68px; height: 68px; font-size: 24px;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 20px rgba(247, 183, 49, 0.4));
}
.login-hero h1 { font-size: 28px; letter-spacing: 4px; }
.login-hero h1 b { color: var(--accent); text-shadow: 0 0 26px rgba(247, 183, 49, 0.4); }
.login-hero p { color: var(--text-dim); font-size: 13px; margin-top: 8px; }
.login-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: var(--bg-soft); padding: 4px; border-radius: 11px; border: 1px solid var(--border-soft); }
.login-tabs button { flex: 1; padding: 9px; border: none; background: transparent; color: var(--text-dim); border-radius: 8px; cursor: pointer; font-size: 14px; transition: all .18s; }
.login-tabs button.on { background: linear-gradient(180deg, rgba(247, 183, 49, 0.16), rgba(247, 183, 49, 0.06)); color: var(--accent); font-weight: 700; box-shadow: inset 0 0 0 1px rgba(247, 183, 49, 0.22); }
.login-note { font-size: 12px; color: var(--text-faint); text-align: center; margin-top: 14px; line-height: 1.7; }

/* 注册内测提示 */
.reg-notice {
  font-size: 12px; line-height: 1.7; color: var(--accent);
  background: rgba(247, 183, 49, 0.07);
  border: 1px solid rgba(247, 183, 49, 0.25);
  border-radius: 8px; padding: 9px 12px; margin-bottom: 8px;
}

/* ===== 表单 ===== */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.form-row input, .form-row select {
  width: 100%;
  padding: 11px 12px;
  background: rgba(6, 9, 14, 0.65);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.form-row input:focus, .form-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(247, 183, 49, 0.13);
}
.error-msg { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ===== 按钮（切角） ===== */
button { font-family: inherit; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 0;
  clip-path: var(--cut-sm);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel-2), #121a25);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all .16s ease;
}
.btn:hover { border-color: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, #ffd166, #f79c11);
  border-color: transparent;
  color: #1c1503;
  font-weight: 800;
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 5px 14px rgba(247, 168, 17, 0.35)) brightness(1.05);
  border-color: transparent;
}
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-danger { background: rgba(255, 70, 85, 0.12); border-color: rgba(255, 70, 85, 0.45); color: #ff8a7a; }
.btn-danger:hover { border-color: var(--red); filter: drop-shadow(0 0 10px rgba(255, 70, 85, 0.25)); }
.btn-ghost { background: rgba(6, 9, 14, 0.5); }
.btn-ghost:hover { background: rgba(148, 163, 184, 0.06); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 16px 46px; font-size: 17px; border-radius: 0; font-weight: 900; letter-spacing: 3px; }
.btn-block { width: 100%; }

/* ===== 大厅 ===== */
.lobby-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 800px) { .lobby-grid { grid-template-columns: 1fr; } }

/* 待命图标 + 战术 CTA */
.standby-icon { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; }
.standby-icon .tac-icon {
  width: 72px; height: 72px; color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(247, 183, 49, 0.35));
  animation: radar-pulse 2s ease-out infinite;
}
.standby-text {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: 4px; color: var(--text-faint);
}
.standby-text b { color: var(--accent); font-weight: 700; }

.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.avatar {
  width: 52px; height: 52px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #10151c;
  background: linear-gradient(135deg, #ffd166, #d98e0b);
  box-shadow: 0 4px 14px rgba(247, 168, 17, 0.25);
  flex-shrink: 0;
}
.profile-head .name { font-size: 17px; font-weight: 700; }
.profile-head .tier-line { font-size: 12px; margin-top: 3px; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
  background: rgba(6, 9, 14, 0.55); border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 10px 12px; transition: all .18s;
}
.stat:hover { border-color: rgba(247, 183, 49, 0.25); }
.stat .k { font-size: 11px; color: var(--text-faint); }
.stat .v { font-size: 18px; font-weight: 700; margin-top: 2px; }

.match-panel { text-align: center; padding: 48px 20px; }
.match-panel .hint { color: var(--text-dim); font-size: 13px; margin-top: 14px; line-height: 1.8; }
.match-panel .hint b { color: var(--accent); }

.queue-box { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.radar {
  width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(247, 183, 49, 0.06), transparent 70%);
  animation: radar-pulse 2s ease-out infinite;
}
.radar::before {
  content: ''; position: absolute; inset: -12px; border-radius: 50%;
  border: 1px solid rgba(247, 183, 49, 0.25);
}
.radar .icon { font-size: 34px; }
.radar svg.radar-icon { width: 40px; height: 40px; color: var(--accent); filter: drop-shadow(0 0 10px rgba(247, 183, 49, 0.4)); }
.tac-icon { display: block; }
@keyframes radar-pulse {
  0% { box-shadow: 0 0 0 0 rgba(247, 183, 49, 0.25); }
  70% { box-shadow: 0 0 0 18px rgba(247, 183, 49, 0); }
  100% { box-shadow: 0 0 0 0 rgba(247, 183, 49, 0); }
}
.queue-meta { font-size: 14px; color: var(--text-dim); }
.queue-meta .mono { color: var(--accent); font-size: 20px; font-weight: 700; display: block; margin-bottom: 4px; text-shadow: 0 0 14px rgba(247, 183, 49, 0.3); }
.queue-meta .range-line { font-size: 13px; }

.cta { position: relative; }
.cta-arrows {
  font-size: 13px; letter-spacing: 2px; opacity: .7; margin-left: 12px;
  animation: cta-nudge 1.4s ease-in-out infinite;
}
@keyframes cta-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

/* ===== 对局页 ===== */
.vs-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 700px) { .vs-row { grid-template-columns: 1fr; } .vs-mid { justify-self: center; } }
.player-card { text-align: center; padding: 22px; border-radius: 12px; transition: border-color .18s; }
.player-card:hover { border-color: rgba(247, 183, 49, 0.28); }
.player-card .avatar { margin: 0 auto 10px; }
.player-card .name { font-size: 18px; font-weight: 800; }
.player-card .score-line { margin-top: 8px; font-size: 13px; color: var(--text-dim); }
.player-card .score-line b { color: var(--accent); font-size: 20px; }
.vs-mid { display: flex; align-items: center; }
.vs-badge {
  font-weight: 900; font-size: 22px; letter-spacing: 1px;
  color: var(--accent);
  padding: 10px 18px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  background: linear-gradient(135deg, rgba(247, 183, 49, 0.18), rgba(247, 183, 49, 0.03));
  border: 1px solid rgba(247, 183, 49, 0.45);
  text-shadow: 0 0 16px rgba(247, 183, 49, 0.5);
}

.rules-list { list-style: none; }
.rules-list li {
  padding: 8px 0 8px 22px; position: relative; font-size: 13px;
  color: var(--text-dim); line-height: 1.7; border-bottom: 1px dashed var(--border-soft);
}
.rules-list li:last-child { border-bottom: none; }
.rules-list li::before { content: '▸'; position: absolute; left: 4px; color: var(--accent); }

.report-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.report-btns .btn.sel-win { background: rgba(46, 204, 113, .15); border-color: var(--green); color: var(--green); box-shadow: 0 0 14px rgba(46, 204, 113, 0.18); }
.report-btns .btn.sel-loss { background: rgba(231, 76, 60, .15); border-color: var(--red); color: #ff8a7a; box-shadow: 0 0 14px rgba(231, 76, 60, 0.18); }
.report-btns .btn.sel-draw { background: rgba(69, 170, 242, .15); border-color: var(--blue); color: var(--blue); }

.banner { border-radius: 0; padding: 16px 20px; margin-bottom: 16px; font-size: 15px; line-height: 1.8; border: 1px solid; border-left-width: 3px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); }
.banner b { font-size: 18px; }
.banner.win { background: rgba(46, 204, 113, .08); border-color: rgba(46, 204, 113, .35); color: #7bedb0; }
.banner.loss { background: rgba(231, 76, 60, .08); border-color: rgba(231, 76, 60, .35); color: #ff9d92; }
.banner.draw { background: rgba(69, 170, 242, .08); border-color: rgba(69, 170, 242, .35); color: #8fd0ff; }
.banner.warn { background: rgba(247, 183, 49, .08); border-color: rgba(247, 183, 49, .35); color: #ffd57a; }
.banner .delta { font-size: 22px; font-weight: 800; margin: 0 6px; }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; padding: 10px 12px; color: var(--text-faint);
  font-size: 12px; font-weight: 600; letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: 12px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; transition: background .15s; }
tbody tr:hover td { background: rgba(148, 163, 184, 0.04); }
tr:last-child td { border-bottom: none; }
tr.me-row { background: rgba(247, 183, 49, 0.05); }
tr.me-row td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.rank-cell { font-weight: 800; color: var(--text-dim); }
.rank-1 .rank-cell { color: #ffd700; text-shadow: 0 0 12px rgba(255, 215, 0, 0.35); }
.rank-2 .rank-cell { color: #c0c0c0; }
.rank-3 .rank-cell { color: #cd7f32; }

.tier-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 4px 12px; border-radius: 20px;
  border: 1px solid currentColor; font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}
.tier-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; box-shadow: 0 0 8px currentColor; }

.chip { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.chip.win { background: rgba(46,204,113,.12); color: var(--green); }
.chip.loss { background: rgba(231,76,60,.12); color: #ff8a7a; }
.chip.draw { background: rgba(69,170,242,.12); color: var(--blue); }
.chip.muted { background: var(--panel-2); color: var(--text-faint); }
.chip.warn { background: rgba(247,183,49,.12); color: var(--accent); }

/* ===== 历史记录 ===== */
.hist-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 8px; border-bottom: 1px solid var(--border-soft); font-size: 14px;
  border-radius: 8px; transition: background .15s;
}
.hist-item:hover { background: rgba(148, 163, 184, 0.04); }
.hist-item:last-child { border-bottom: none; }
.hist-item .who { flex: 1; }
.hist-item .who .vs-label { font-size: 12px; color: var(--text-faint); }
.hist-item .who .opp { font-weight: 700; }
.hist-item .when { font-size: 12px; color: var(--text-faint); }
.empty { text-align: center; color: var(--text-faint); padding: 40px 0; font-size: 14px; }

/* ===== 仲裁 ===== */
.dispute-card { border-color: rgba(231, 76, 60, 0.3); }
.report-side { flex: 1; background: rgba(6, 9, 14, 0.55); border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px; font-size: 13px; }
.report-side .who { font-weight: 700; margin-bottom: 6px; }
.report-side .claim { font-size: 15px; font-weight: 700; }
.resolve-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ===== Toast ===== */
#toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: rgba(21, 29, 40, 0.9);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  color: var(--text); border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  padding: 12px 16px;
  font-size: 13px; max-width: 340px;
  animation: toast-in .25s ease-out;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.toast.err { border-left-color: var(--red); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.loading { text-align: center; color: var(--text-faint); padding: 60px 0; font-size: 14px; }
.loading::before {
  content: ''; display: block; width: 28px; height: 28px; margin: 0 auto 14px;
  border: 3px solid rgba(247, 183, 49, 0.15); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 房间码 ===== */
.room-card {
  text-align: center; border-color: rgba(247, 183, 49, 0.3);
  background: linear-gradient(180deg, rgba(247, 183, 49, 0.05), rgba(16, 22, 31, 0.92));
}
.room-card.host { border-color: rgba(247, 183, 49, 0.5); }
.room-code {
  font-size: 40px; font-weight: 800; letter-spacing: 12px;
  text-align: center; padding: 18px; margin: 14px 0;
  user-select: all;
  color: transparent;
  clip-path: var(--cut-sm);
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.08) 0 1px, transparent 1px 3px),
    linear-gradient(135deg, #ffe08a, #f7a811);
  -webkit-background-clip: text; background-clip: text;
  border: 1px solid rgba(247, 183, 49, 0.4);
  text-shadow: 0 0 18px rgba(247, 183, 49, 0.3);
}
.room-hint { font-size: 13px; color: var(--text-dim); line-height: 1.8; }
.room-input-row { display: flex; gap: 10px; margin-top: 14px; }
.room-input-row input {
  flex: 1; padding: 11px 12px;
  background: rgba(6, 9, 14, 0.65); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); font-size: 16px;
  letter-spacing: 2px; outline: none; text-align: center;
  transition: border-color .18s, box-shadow .18s;
}
.room-input-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(247, 183, 49, 0.13); }
.room-actions { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4, 8, 12, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: toast-in .2s ease-out;
}
.modal-box {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: 16px; padding: 26px; width: 400px; max-width: 92vw;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.modal-box h3 { font-size: 17px; margin-bottom: 10px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* ===== 举报 ===== */
.form-row textarea {
  width: 100%; padding: 11px 12px;
  background: rgba(6, 9, 14, 0.65); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); font-size: 14px;
  outline: none; resize: vertical; font-family: inherit; line-height: 1.6;
  transition: border-color .18s, box-shadow .18s;
}
.form-row textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(247, 183, 49, 0.13); }
.report-preview { max-width: 100%; border-radius: 8px; margin-top: 10px; border: 1px solid var(--border); }
.report-reason {
  font-size: 13px; color: var(--text-dim); line-height: 1.7;
  background: rgba(6, 9, 14, 0.55); border-radius: 8px; padding: 10px 12px;
  white-space: pre-wrap; word-break: break-word;
}
.report-thumb {
  max-width: 280px; max-height: 180px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border);
  margin-top: 10px; display: block; cursor: zoom-in;
  transition: transform .18s, box-shadow .18s;
}
.report-thumb:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }

/* ===== 玩家主页 / 编辑资料 ===== */
.signature {
  font-size: 13px; color: var(--text-dim); line-height: 1.7;
  background: rgba(6, 9, 14, 0.55); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 10px 12px; margin: 12px 0;
}
.avatar-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-opt {
  width: 42px; height: 42px; font-size: 22px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-soft); cursor: pointer; transition: all .15s;
}
.avatar-opt:hover { border-color: var(--accent-dark); transform: translateY(-1px); }
.avatar-opt.on { border-color: var(--accent); background: rgba(247, 183, 49, 0.12); box-shadow: 0 0 12px rgba(247, 183, 49, 0.18); }
.ladder-name { cursor: pointer; }
.ladder-name:hover b { color: var(--accent); }
.linklike { cursor: pointer; transition: color .15s; }
.linklike:hover { color: var(--accent); }

/* 资料卡独立操作行（分享按钮不挤占标题排版） */
.profile-actions { margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--border-soft); }
.profile-actions .btn { width: 100%; }

/* 大厅比赛规则卡 */
.lobby-rules {
  margin-top: 26px; text-align: left;
  background: rgba(6, 9, 14, 0.55); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 14px 16px;
}
.lobby-rules .lr-title {
  font-size: 13px; font-weight: 700; color: var(--accent);
  letter-spacing: 1px; margin-bottom: 8px; text-align: center;
}
.lobby-rules .lr-item {
  font-size: 13px; color: var(--text-dim); line-height: 2;
  padding-left: 18px; position: relative;
}
.lobby-rules .lr-item::before { content: '▸'; position: absolute; left: 2px; color: var(--accent); }
.lobby-rules .lr-item b { color: var(--text); }

/* ===== 版本更新公告（静态展示） ===== */
.changelog-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
  margin-bottom: 16px;
}
.cl-badge {
  flex-shrink: 0;
  font-size: 11px; font-weight: 800; letter-spacing: 2px;
  color: #1a1400; background: linear-gradient(135deg, #ffd166, #e09b0d);
  border-radius: 6px; padding: 4px 10px;
}
.cl-static { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.cl-static .cl-item { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-item { font-size: 13px; color: var(--text-dim); }
.cl-item b { color: var(--accent); margin-right: 4px; }
.changelog-all {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px;
}
.changelog-all .cl-item { padding: 6px 0; border-bottom: 1px dashed var(--border-soft); }
.changelog-all .cl-item:last-child { border-bottom: none; }
.changelog-all.hidden { display: none; }

/* ===== 用户名审核 ===== */
.name-status {
  font-size: 13px; color: var(--text-dim);
  background: rgba(247, 183, 49, 0.07);
  border: 1px dashed rgba(247, 183, 49, 0.3);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
}
.name-status.warn {
  color: #ff8a7a;
  background: rgba(255, 107, 87, 0.07);
  border-color: rgba(255, 107, 87, 0.3);
}
.review-hint { font-size: 12px; color: var(--text-faint); margin: -6px 0 12px; line-height: 1.7; }
.approve-input {
  width: 150px; padding: 8px 10px; font-size: 13px;
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; outline: none;
}
.approve-input:focus { border-color: var(--accent-dark); }
.ev-uploaded {
  font-size: 13px; color: var(--green);
  background: rgba(46, 204, 113, 0.08);
  border: 1px dashed rgba(46, 204, 113, 0.35);
  border-radius: 8px; padding: 10px 12px; text-align: center;
}

.room-code-changing {
  font-size: 16px; font-weight: 700; color: var(--accent);
  text-align: center;
  background: rgba(6, 9, 14, 0.55);
  border: 1px dashed var(--accent-dark);
  border-radius: 10px; padding: 20px 14px; margin: 14px 0;
  animation: room-changing 1.6s ease-in-out infinite;
}
@keyframes room-changing { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ===== 管理中心子页导航 + 存档 ===== */
.admin-tabs { display: flex; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }
.admin-tab {
  padding: 8px 16px; border-radius: 9px;
  background: rgba(6, 9, 14, 0.55); color: var(--text-dim);
  font-size: 13px; text-decoration: none; border: 1px solid var(--border);
  transition: all .16s;
}
.admin-tab.on {
  color: var(--accent); border-color: rgba(247, 183, 49, 0.35);
  background: linear-gradient(180deg, rgba(247, 183, 49, 0.12), rgba(247, 183, 49, 0.04));
  font-weight: 600;
}
.admin-tab:hover { color: var(--text); border-color: var(--accent-dark); }
details.archive-box { margin-top: 22px; }
details.archive-box summary {
  cursor: pointer; font-size: 14px; color: var(--text-dim);
  padding: 10px 0; user-select: none;
}
details.archive-box summary:hover { color: var(--text); }
details.archive-box[open] summary { margin-bottom: 10px; }
.archive-row {
  padding: 10px 0; border-bottom: 1px solid var(--border-soft);
  font-size: 13px; color: var(--text-dim);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.archive-row:last-child { border-bottom: none; }

/* ===== 移动端微调 ===== */
@media (max-width: 700px) {
  #app { padding: 18px 14px 48px; }
  #topbar { padding: 0 14px; gap: 14px; height: 56px; }
  .brand-sub { display: none; }
  .page-title { font-size: 19px; }
  .page-title::before { height: 19px; }
}

/* ===== 管理中心页内标签 ===== */
.admin-tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.admin-tab {
  flex: 1; text-align: center; padding: 12px 8px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; font-size: 15px; font-weight: 700;
  color: var(--text-dim); text-decoration: none;
  transition: all .15s ease;
}
.admin-tab:hover { border-color: var(--accent-dark); color: var(--text); }
.admin-tab.on {
  background: rgba(247, 183, 49, 0.08); border-color: var(--accent);
  color: var(--accent);
}

/* ===== 已处理举报折叠 ===== */
.done-fold { margin-top: 22px; }
.done-fold .fold-toggle { margin-bottom: 10px; }
.done-fold .fold-body.hidden { display: none; }

/* ===== 争议截图已上传提示 ===== */
.ev-uploaded {
  font-size: 13px; color: var(--green);
  background: rgba(46, 204, 113, 0.08);
  border: 1px dashed rgba(46, 204, 113, 0.35);
  border-radius: 8px; padding: 10px 12px; text-align: center;
}

/* ===== 手机号注册 ===== */
.sms-tabs { margin-bottom: 6px; }
.sms-tabs button { font-size: 13px; padding: 8px 10px; }
.sms-input-row { display: flex; gap: 10px; }
.sms-input-row input { flex: 1; min-width: 0; }
.sms-input-row .btn { white-space: nowrap; font-size: 13px; }
