

:root {

  --bg: #070b14;
  --bg-deep: #04070d;
  --panel: rgba(16, 24, 40, 0.72);
  --panel-solid: #101828;
  --panel-hi: rgba(26, 38, 60, 0.6);

  --ink: #e6f0ff;
  --ink-dim: #9fb3d1;
  --muted: #6b82a6;

  --line: rgba(90, 130, 190, 0.22);
  --line-hi: rgba(120, 190, 255, 0.45);

  --accent: #22d3ee;
  --accent-2: #38bdf8;
  --accent-deep: #0ea5e9;
  --glow: rgba(34, 211, 238, 0.45);
  --glow-soft: rgba(34, 211, 238, 0.14);

  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;

  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  min-height: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(34, 211, 238, 0.13), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, rgba(56, 189, 248, 0.10), transparent 60%),
    radial-gradient(800px 520px at 50% 108%, rgba(14, 165, 233, 0.09), transparent 62%),
    linear-gradient(180deg, #070b14 0%, #04070d 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(90, 140, 200, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 140, 200, 0.055) 1px, transparent 1px);
  background-size: 46px 46px, 46px 46px;
  mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 78%);
}

.topbar {
  position: relative;
  background: linear-gradient(120deg, rgba(10, 18, 34, 0.94) 0%, rgba(13, 26, 48, 0.9) 55%, rgba(16, 38, 66, 0.88) 100%);
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 22%, var(--accent-2) 50%, var(--accent) 78%, transparent);
  opacity: 0.75;
  box-shadow: 0 0 14px var(--glow);
}

.brand { display: flex; align-items: center; gap: 14px; }

.logo {
  position: relative;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(140deg, #0b3b52, #0e7490 55%, #22d3ee);
  color: #04121b;
  font-weight: 800; font-size: 17px; letter-spacing: 0.5px;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.5), 0 8px 26px rgba(34, 211, 238, 0.32);
}

.logo::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 17px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  animation: pulseRing 3.2s ease-in-out infinite;
}

@keyframes pulseRing {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 0.9;  transform: scale(1.045); }
}

.topbar h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0.3px;
  background: linear-gradient(92deg, #eaf6ff 10%, #7dd3fc 55%, #22d3ee 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-dim); }

main {
  max-width: 1420px;
  margin: 0 auto;
  padding: 22px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 10px 34px rgba(0, 0, 0, 0.42);
}

.card::before {
  content: "";
  position: absolute;
  top: -1px; left: 18px;
  width: 62px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: 0 0 10px var(--glow);
  border-radius: 2px;
}

.card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.3px;
  color: var(--ink);
}

.step {
  width: 26px; height: 26px; flex: 0 0 26px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.22), rgba(34, 211, 238, 0.06));
  border: 1px solid rgba(34, 211, 238, 0.5);
  color: var(--accent);
  font-size: 12.5px; font-weight: 700;
  box-shadow: 0 0 12px var(--glow-soft);
}
.step.err {
  background: linear-gradient(140deg, rgba(248, 113, 113, 0.22), rgba(248, 113, 113, 0.06));
  border-color: rgba(248, 113, 113, 0.55);
  color: var(--err);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.2);
}

.head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.dropzone {
  position: relative;
  border: 1px dashed rgba(90, 140, 200, 0.4);
  border-radius: var(--radius);
  background: rgba(10, 18, 32, 0.5);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
  color: var(--muted);
  overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.07);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 0 26px var(--glow-soft) inset;
}

.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; z-index: 1; }
.dz-title { margin: 4px 0 0; font-size: 14.5px; color: var(--ink); }
.dz-hint { margin: 0; font-size: 12px; color: var(--muted); }

.dropzone svg { color: var(--accent); filter: drop-shadow(0 0 8px var(--glow)); }

.link {
  background: none; border: none; padding: 0;
  color: var(--accent); font: inherit; cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 211, 238, 0.45);
  transition: color .14s, border-color .14s;
}
.link:hover { color: #67e8f9; border-bottom-color: #67e8f9; }

.file-info {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.24);
  font-size: 13px;
}
.file-info .fi-row { display: flex; gap: 8px; }
.file-info .fi-key { color: var(--muted); min-width: 92px; }
.file-info .fi-val { font-weight: 600; word-break: break-all; color: var(--ink); }

.param-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
  gap: 22px;
}
@media (max-width: 860px) {
  .param-grid { grid-template-columns: 1fr; }
}

.param-label {
  display: block;
  font-size: 11.5px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 1.1px;
  margin-bottom: 8px;
}

.jump-list {
  max-height: 190px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px;
  background: rgba(8, 14, 26, 0.55);
}
.jump-list .muted { color: var(--muted); font-size: 13px; padding: 8px; margin: 0; }

.jump-list::-webkit-scrollbar,
.code-block::-webkit-scrollbar { width: 9px; height: 9px; }
.jump-list::-webkit-scrollbar-track,
.code-block::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); border-radius: 6px; }
.jump-list::-webkit-scrollbar-thumb,
.code-block::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.28);
  border-radius: 6px;
}
.jump-list::-webkit-scrollbar-thumb:hover,
.code-block::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, 0.5); }

.jump-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  transition: background .13s;
}
.jump-item:hover { background: rgba(34, 211, 238, 0.1); }
.jump-item input { accent-color: var(--accent); }
.jump-item.selected {
  background: rgba(34, 211, 238, 0.14);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.32);
}
.jump-item .badge {
  margin-left: auto;
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  color: #04121b; background: var(--ok);
  padding: 2px 8px; border-radius: 20px;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
}

.manual-row { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.checkbox { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; color: var(--ink-dim); }
.checkbox input { accent-color: var(--accent); }

.num-input {
  flex: 1; min-width: 150px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  background: rgba(8, 14, 26, 0.7);
  color: var(--ink);
  transition: border-color .14s, box-shadow .14s;
}
.num-input::placeholder { color: #4d6182; }
.num-input:disabled { background: rgba(8, 14, 26, 0.35); color: #4d6182; }
.num-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16), 0 0 14px var(--glow-soft);
}

.jump-types { display: flex; flex-direction: column; gap: 8px; }

.jump-type {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: rgba(8, 14, 26, 0.4);
  transition: border-color .14s, background .14s, box-shadow .14s;
}
.jump-type:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.07);
}
.jump-type input { accent-color: var(--accent); }
.jump-type:has(input:checked) {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.3), 0 0 18px var(--glow-soft);
}
.jt-body { display: flex; align-items: baseline; gap: 8px; }
.jt-body strong { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.jt-body em { font-style: normal; font-size: 12px; color: var(--muted); }

.actions { margin-top: 20px; display: flex; gap: 10px; }

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 22px;
  font: inherit; font-weight: 600;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn.primary {
  background: linear-gradient(135deg, #0e7490, #22d3ee);
  color: #04121b;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4), 0 6px 22px rgba(34, 211, 238, 0.3);
}
.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0891b2, #67e8f9);
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.6), 0 8px 28px rgba(34, 211, 238, 0.45);
}
.btn.primary:disabled {
  background: rgba(90, 130, 190, 0.18);
  color: #5b7093;
  box-shadow: none;
  cursor: not-allowed;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--ink-dim);
}
.btn.ghost:hover { background: rgba(34, 211, 238, 0.1); border-color: var(--line-hi); color: var(--ink); }

.btn.small {
  padding: 6px 14px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--ink-dim);
}
.btn.small:hover { background: rgba(34, 211, 238, 0.1); border-color: var(--line-hi); color: var(--ink); }

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.stat {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  background: rgba(10, 18, 32, 0.55);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.stat:hover { border-color: rgba(34, 211, 238, 0.35); box-shadow: 0 0 18px var(--glow-soft); }
.stat .k {
  font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .9px;
  font-weight: 600;
}
.stat .v {
  font-size: 17px; font-weight: 700; margin-top: 3px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: 0.2px;
}
.stat .v.small { font-size: 13.5px; }
.stat.hl {
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.14), rgba(34, 211, 238, 0.03));
  border-color: rgba(34, 211, 238, 0.42);
}
.stat.hl .v { color: #7dd3fc; text-shadow: 0 0 14px rgba(34, 211, 238, 0.45); }

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
}

.chart-card {
  position: relative;
  background: rgba(10, 18, 32, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px;
  min-width: 0;
  transition: border-color .16s, box-shadow .16s;
}
.chart-card:hover {
  border-color: rgba(34, 211, 238, 0.32);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.1);
}
.chart-card.span-2 { grid-column: span 2; }
@media (max-width: 900px) {
  .chart-card.span-2 { grid-column: span 1; }
}

.chart {
  width: 100%;
  height: 340px;
}
.chart.tall { height: 760px; }

.tabs {
  display: flex; gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.tab {
  background: none; border: none;
  padding: 10px 18px;
  font: inherit; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .14s, border-color .14s;
}
.tab:hover { color: var(--ink-dim); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 12px var(--glow);
}

.tab-panel { padding-top: 12px; }

.code-block {
  margin: 0;
  max-height: 420px;
  overflow: auto;
  background: rgba(4, 8, 16, 0.85);
  color: #a8d5f0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre;
}
.code-block.error {
  background: rgba(40, 10, 14, 0.7);
  border-color: rgba(248, 113, 113, 0.35);
  color: #ffc9c9;
}
.log-warn { color: var(--warn); }
.log-info { color: #7dd3fc; }

.hidden { display: none !important; }

.auth-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-wrap { width: 100%; max-width: 420px; }

.auth-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 26px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 18px 50px rgba(0, 0, 0, 0.55);
}

.auth-card::before {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px var(--glow);
  border-radius: 2px;
}

.auth-brand {
  display: flex; align-items: center; gap: 13px;
  margin-bottom: 24px;
}
.auth-brand .home-brand { margin: 0; gap: 0; }
.auth-brand .home-brand-word { font-size: 17px; letter-spacing: 1.8px; }

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background: rgba(8, 14, 26, 0.6);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 9px 0;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.auth-tab:hover { color: var(--ink-dim); }
.auth-tab.active {
  color: #04121b;
  background: linear-gradient(135deg, #0e7490, #22d3ee);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.32);
}

.auth-form { display: flex; flex-direction: column; gap: 15px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-submit { width: 100%; margin-top: 4px; }

.auth-error {
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 13px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

.auth-info {
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.6;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #86efac;
}
.auth-info .info-hint {
  margin-top: 5px;
  font-size: 12px;
  color: #6ee7b7;
  opacity: 0.85;
  word-break: break-all;
}

.auth-result { text-align: center; }

.result-icon {
  width: 62px; height: 62px;
  margin: 6px auto 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}
.result-icon.ok {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 26px rgba(52, 211, 153, 0.28);
}
.result-icon.warn {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 26px rgba(251, 191, 36, 0.24);
}
.result-icon.err {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.45);
  box-shadow: 0 0 26px rgba(248, 113, 113, 0.24);
}

.result-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 650;
  color: var(--ink);
}
.result-desc {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.7;
}

.auth-result #resendBox {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 10px;
  background: rgba(8, 14, 26, 0.5);
  border: 1px solid var(--line);
  text-align: left;
}
.auth-result #resendBox .auth-submit { margin-top: 12px; }

.auth-result #verifyBox {
  margin-bottom: 8px;
  text-align: left;
}
.auth-result #verifyBox .field { margin-bottom: 14px; }
.auth-result #verifyBox .auth-submit { margin-top: 4px; }

.verify-resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12.5px;
}

.result-action {
  display: block;
  text-decoration: none;
  text-align: center;
}

.auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  margin: -6px 0 10px;
  color: #7dd3fc;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-link-btn:hover {
  color: #a5e8ff;
}

.auth-forgot-row {
  margin-top: -4px;
  text-align: right;
}
.auth-forgot-row .auth-link-btn {
  margin: 0;
  text-decoration: none;
}
.auth-forgot-row .auth-link-btn:hover {
  text-decoration: underline;
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-dim);
}
.topbar-user .uname {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.home-body::before,
.home-body::after {
  display: none;
}

html:has(.home-body),
.home-body {
  background-color: transparent;
}

.home-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  perspective: 900px;
  overflow: hidden;
}

.home-bg-img {
  position: absolute;
  inset: -6%;
  background: url("/background.png") center center / cover no-repeat;
  transform: translate3d(0, 0, 0) scale(1.06);
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.32s ease;
}

.home-bg-img.fading {
  opacity: 0;
}

.home-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(900px 520px at 50% 42%, rgba(4, 7, 13, 0.3), transparent 68%),
    linear-gradient(180deg, rgba(4, 7, 13, 0.78) 0%, rgba(4, 7, 13, 0.34) 34%,
                    rgba(4, 7, 13, 0.42) 68%, rgba(4, 7, 13, 0.86) 100%);
}

.yaw-wave {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.9;
}

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.42);
  border-bottom: 1px solid var(--line);
}

.home-topbar-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.home-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(16, 24, 40, 0.5);
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.home-nav-link:hover {
  color: var(--ink);
  border-color: var(--line-hi);
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 20px var(--glow-soft);
}

.home-nav-link:hover .bili-icon {
  color: #fb7299;
}
.bili-icon {
  transition: color 0.2s;
}

@media (max-width: 860px) {
  .home-nav {
    position: static;
    transform: none;
    margin-left: auto;
  }
  .home-topbar-user {
    margin-left: 0;
  }
  .home-brand-word {
    font-size: 16px;
    letter-spacing: 1.2px;
  }
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}

.home-brand-word {
  position: relative;
  display: inline-block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2.2px;
  line-height: 1.2;
  white-space: nowrap;
  background: linear-gradient(92deg, #eaf6ff 8%, #7dd3fc 52%, #22d3ee 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.45));
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1),
              filter 0.25s ease, letter-spacing 0.25s ease;
}

.home-brand:hover .home-brand-word {
  transform: translateY(-1px) scale(1.045);
  letter-spacing: 3.2px;
  filter: drop-shadow(0 0 16px rgba(34, 211, 238, 0.85))
          drop-shadow(0 0 34px rgba(34, 211, 238, 0.45));
}

@keyframes brandGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.35)); }
  50%      { filter: drop-shadow(0 0 16px rgba(34, 211, 238, 0.7)); }
}
.home-brand-word {
  animation: brandGlow 3.6s ease-in-out infinite;
}
.home-brand:hover .home-brand-word {
  animation: none;
}

.home-brand-word::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%,
              rgba(255, 255, 255, 0.85) 50%, transparent 65%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 260% 100%;
  background-position: 130% 0;
  background-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
}
.home-brand:hover .home-brand-word::after {
  opacity: 1;
  animation: brandSheen 0.85s ease-out;
}
@keyframes brandSheen {
  from { background-position: 130% 0; }
  to   { background-position: -30% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .home-brand-word { animation: none; }
  .home-brand:hover .home-brand-word { transform: none; }
  .home-brand:hover .home-brand-word::after { animation: none; opacity: 0; }
}

.home-topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-dim);
}
.home-topbar-user .uname {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uname-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.uname-btn:hover {
  background: rgba(34, 211, 238, 0.1);
  color: var(--ink);
}

.home-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 26px 60px;
}

.hero {
  text-align: center;
  padding: 96px 0 72px;
  width: 100%;
}

.hero.hero-loading {
  visibility: hidden;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 22px;
  padding: 7px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3.4px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18), inset 0 0 18px rgba(34, 211, 238, 0.06);
}

.hero-title {
  margin: 0;
  font-size: clamp(46px, 9vw, 108px);
  font-weight: 800;
  letter-spacing: -2.4px;
  line-height: 1.04;
  background: linear-gradient(100deg, #ffffff 6%, #a5e8ff 42%, #22d3ee 76%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 40px rgba(34, 211, 238, 0.34));
}

.hero-sub {
  margin: 20px 0 0;
  font-size: clamp(13px, 1.6vw, 16px);
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(230, 240, 255, 0.72);
}

.hero-desc {
  max-width: 660px;
  margin: 30px auto 0;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(230, 240, 255, 0.86);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.hero-desc p {
  margin: 0 0 14px;
}
.hero-desc p:last-child {
  margin-bottom: 0;
}

.news-section {
  margin-top: 8px;
}

.news-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(90, 130, 190, 0.2);
}

.news-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ink);
}
.news-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 16px;
  margin-right: 10px;
  vertical-align: -2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 12px var(--glow);
}

.news-count {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-empty {
  margin: 0;
  padding: 34px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: rgba(10, 18, 32, 0.4);
}

.news-item {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 18, 32, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.news-item:hover {
  border-color: var(--line-hi);
  background: rgba(16, 28, 48, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.36), 0 0 22px var(--glow-soft);
}
.news-item.expanded {
  border-color: var(--line-hi);
  background: rgba(16, 28, 48, 0.72);
}

.news-item-head {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 18px 20px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}

.news-item-main {
  flex: 1;
  min-width: 0;
}

.news-item-category {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #7dd3fc;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.42);
}

.news-item-title {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 650;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-item-excerpt {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item.expanded .news-item-excerpt {
  display: none;
}

.news-item-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.news-item-date {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.news-item-arrow {
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 0.2s, transform 0.25s;
}
.news-item:hover .news-item-arrow {
  color: var(--accent);
}

.news-item.expanded .news-item-arrow {
  color: var(--accent);
  transform: rotate(180deg);
}

.news-item-body {
  padding: 4px 20px 22px;
  border-top: 1px solid rgba(90, 130, 190, 0.16);
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(230, 240, 255, 0.88);
  word-break: break-word;
  animation: newsExpand 0.22s ease-out;
}
.news-item-body p {
  margin: 16px 0 0;
  white-space: pre-wrap;
}
.news-item-body p:first-child {
  margin-top: 16px;
}

.news-item-loading {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

@keyframes newsExpand {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.news-pager {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.news-pager .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.news-page-info {
  font-size: 13px;
  color: var(--ink-dim);
  min-width: 56px;
  text-align: center;
}

@media (max-width: 640px) {
  .news-item-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .news-item-side {
    width: 100%;
  }
  .news-item-arrow {
    margin-left: auto;
  }
}

.analyzer-main {
  flex: 1;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  padding: 22px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-body::before,
.auth-body::after {
  display: none;
}
html:has(.auth-body),
.auth-body {
  background-color: transparent;
}

.auth-body .home-bg {
  z-index: -1;
}

.upload-gate {
  border: 1px dashed var(--line-hi);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(520px 220px at 50% 0%, rgba(34, 211, 238, 0.08), transparent 70%),
    rgba(10, 18, 32, 0.5);
  padding: 44px 26px;
  text-align: center;
}

.gate-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.34);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.2);
}

.gate-title {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 650;
  color: var(--ink);
}

.gate-desc {
  margin: 0 auto 22px;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-dim);
}

.gate-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.gate-actions .btn {
  text-decoration: none;
  padding: 10px 28px;
  display: inline-flex;
  align-items: center;
}

.admin-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 26px 60px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px 18px 16px;
  border-radius: var(--radius-sm);
  background: rgba(10, 18, 32, 0.6);
  border: 1px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  border-color: var(--line-hi);
  box-shadow: 0 0 22px var(--glow-soft);
}

.stat-value {
  font-size: 27px;
  font-weight: 750;
  line-height: 1.15;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.stat-label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.admin-search {
  width: 220px;
  padding: 7px 12px;
  font-size: 13px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(8, 14, 26, 0.45);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}

.admin-table th,
.admin-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(90, 130, 190, 0.14);
}

.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(13, 22, 38, 0.96);
  font-weight: 650;
  font-size: 12.5px;
  color: var(--ink-dim);
  letter-spacing: 0.3px;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: rgba(34, 211, 238, 0.05);
}

.admin-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.admin-table th.sortable:hover {
  color: var(--ink);
}
.admin-table th.sortable::after {
  content: "⇅";
  margin-left: 6px;
  font-size: 10px;
  opacity: 0.4;
}
.admin-table th.sort-active {
  color: var(--accent);
}
.admin-table th.sort-active::after {
  content: "▲";
  opacity: 0.9;
}
.admin-table th.sort-active[data-order="desc"]::after {
  content: "▼";
}

.admin-table .muted {
  color: var(--muted);
  text-align: center;
  padding: 26px 14px;
}

.ann-title-cell {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.btn.danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}
.btn.danger:hover:not(:disabled) {
  color: #fff;
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.6);
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: middle;
}
.tag.ok {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.32);
}
.tag.warn {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.32);
}
.tag.admin {
  color: var(--accent);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.36);
}
.tag.danger {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.34);
}

.admin-pager {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-pager .muted {
  font-size: 12.5px;
  color: var(--muted);
}
.pager-btns {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.pager-btns .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ann-editor {
  margin-bottom: 18px;
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-hi);
  background:
    radial-gradient(520px 220px at 50% 0%, rgba(34, 211, 238, 0.07), transparent 70%),
    rgba(10, 18, 32, 0.6);
}

.bg-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bg-item {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-hi);
  background: rgba(10, 18, 32, 0.6);
}

.bg-thumb {
  width: 160px;
  height: 100px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(6, 12, 23, 0.8) center center / cover no-repeat;
}

.bg-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.bg-fields .field {
  gap: 4px;
}

.bg-fields textarea.num-input {
  min-height: 70px;
  resize: vertical;
  font-family: inherit;
}

.bg-ops {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.bg-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bg-upload-tip {
  font-size: 12px;
  word-break: break-all;
}

@media (max-width: 720px) {
  .bg-item {
    grid-template-columns: 1fr;
  }
  .bg-thumb {
    width: 100%;
    height: 140px;
  }
  .bg-ops {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

.ann-editor-head {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.ann-editor-head strong {
  font-size: 14.5px;
  color: var(--ink);
}
.ann-editor-head .btn {
  margin-left: auto;
}

.ann-textarea {
  width: 100%;
  resize: vertical;
  min-height: 180px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
}

.ann-editor .checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 4px;
  font-size: 13px;
  color: var(--ink-dim);
  cursor: pointer;
}

.ann-editor .actions {
  margin-top: 18px;
}

.totp-qr {
  display: inline-block;
  padding: 12px;
  margin: 6px 0 12px;
  background: #fff;
  border-radius: 10px;
  line-height: 0;
}
.totp-qr svg {
  display: block;
  width: 200px;
  height: 200px;
}

.totp-secret-line {
  margin: 0 0 16px;
  font-size: 12.5px;
}
.totp-secret-line code {
  padding: 2px 7px;
  background: rgba(8, 14, 26, 0.7);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #7dd3fc;
  font-size: 12.5px;
  letter-spacing: 1px;
  word-break: break-all;
}

.totp-input {
  max-width: 180px;
  letter-spacing: 6px;
  font-size: 18px;
  text-align: center;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-input {
  flex: 1;
  min-width: 0;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.captcha-img {
  flex: none;
  width: 140px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b1220;
  cursor: pointer;
  user-select: none;
}
.captcha-img:hover { border-color: var(--accent); }

.pw-wrap {
  position: relative;
  display: flex;
}

.pw-wrap .num-input {
  flex: 1;
  min-width: 0;
  padding-right: 42px;
}

.pw-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .14s, background-color .14s;
}
.pw-eye:hover { color: var(--ink); background: rgba(148, 163, 184, 0.12); }
.pw-eye.active { color: var(--accent); }

.pw-eye .eye-slash { display: block; }
.pw-eye.active .eye-slash { display: none; }

.pw-strength {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -6px;
}

.pw-strength-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.pw-strength-text { letter-spacing: 0; text-transform: none; }

.pw-strength-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(8, 14, 26, 0.7);
  border: 1px solid var(--line);
  overflow: hidden;
}

.pw-strength-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--muted);
  transition: width .2s ease, background-color .2s ease;
}

.pw-strength-tips {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.logout-dialog { max-width: 380px; }

.logout-dialog .modal-body { text-align: left; }

.logout-dialog p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.logout-dialog .actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.logout-dialog .actions .btn { flex: 1; }

.logout-dialog .auth-error {
  margin-top: 12px;
  font-size: 12.5px;
}

.totp-tip {
  margin: 0 0 16px;
  font-size: 12.5px;
  line-height: 1.7;
}

.totp-recovery-status {
  margin: 0 0 14px;
  font-size: 13px;
}
.totp-recovery-status strong {
  color: #7dd3fc;
  font-size: 15px;
}

.totp-recovery-panel {
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 10px;
}

.totp-recovery-title {
  margin: 0 0 8px;
  font-weight: 700;
  color: #e6f0ff;
  font-size: 14px;
}

.totp-recovery-hint {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.7;
}
.totp-recovery-hint strong {
  color: #fbbf24;
}

.totp-recovery-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.totp-recovery-list li {
  padding: 8px 12px;
  background: rgba(8, 14, 26, 0.7);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: #7dd3fc;
  text-align: center;
  user-select: all;
}

.access-note {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.7;
}

.checkbox.inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-dim);
  cursor: pointer;
}

tr.access-admin-row {
  background: rgba(251, 191, 36, 0.08);
}
tr.access-admin-row td:first-child {
  box-shadow: inset 3px 0 0 #fbbf24;
}

.access-time {
  white-space: nowrap;
}
.access-time .tz {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.access-ip {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  white-space: nowrap;
}

.access-ip-text {
  color: #7dd3fc;
  user-select: all;
}

.ip-copy-btn {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  vertical-align: middle;
  transition: border-color .15s, background .15s, color .15s;
}
.ip-copy-btn:hover {
  border-color: var(--line-hi);
  background: rgba(34, 211, 238, 0.12);
  color: var(--ink);
}

.access-loc {
  min-width: 180px;
}
.access-loc-main {
  display: block;
  font-size: 12.5px;
  color: var(--ink-dim);
}
.access-loc-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-ua {
  display: block;
  max-width: 320px;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 16, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-box {
  width: 100%;
  max-width: 720px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #0b1220;
  border: 1px solid var(--line-hi);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.modal-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover {
  color: var(--ink);
}

.modal-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
}

.modal-box-sm {
  max-width: 420px;
}

.nickname-hint {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 18px;
  margin: 0 0 20px;
}
.detail-item .k {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 3px;
}
.detail-item .v {
  font-size: 13.5px;
  color: var(--ink);
  word-break: break-all;
}

.detail-section-title {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.ban-box {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 10px;
}
.ban-box.is-banned {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.45);
}

.ban-status {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-dim);
}
.ban-status strong {
  color: #f87171;
}

.ban-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ban-preset {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-dim);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.ban-preset:hover {
  border-color: var(--line-hi);
  color: var(--ink);
}
.ban-preset.active {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fca5a5;
}

.ban-reason-input {
  width: 100%;
  margin-bottom: 12px;
}

.nickname-box {
  background: rgba(34, 211, 238, 0.06);
  border-color: rgba(34, 211, 238, 0.24);
}

.modal-empty {
  padding: 16px 0;
  font-size: 12.5px;
  color: var(--muted);
}

.admin-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 100;
  padding: 11px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #04121b;
  background: linear-gradient(135deg, #22d3ee, #38bdf8);
  box-shadow: 0 10px 34px rgba(34, 211, 238, 0.34);
  animation: toastIn 0.22s ease-out;
}
.admin-toast.err {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f87171);
  box-shadow: 0 10px 34px rgba(248, 113, 113, 0.34);
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 720px) {
  .admin-search { width: 100%; }
  .head-actions { flex-wrap: wrap; }
}

.chat-panel {
  position: fixed;
  top: 78px;
  left: 18px;
  z-index: 30;
  width: 296px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line);

  background: rgba(10, 18, 32, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.chat-panel:hover {
  border-color: var(--line-hi);
  background: rgba(16, 28, 48, 0.72);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55), 0 0 24px var(--glow-soft);
}

.online-panel {
  left: auto;
  right: 18px;
}

.chat-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  background: linear-gradient(120deg, rgba(14, 116, 144, 0.28), rgba(34, 211, 238, 0.08));
  border: none;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.chat-toggle:hover {
  background: linear-gradient(120deg, rgba(14, 116, 144, 0.42), rgba(34, 211, 238, 0.14));
}
.chat-toggle-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chat-toggle-title svg {
  color: var(--accent);
  filter: drop-shadow(0 0 6px var(--glow));
}
.chat-toggle-arrow {
  margin-left: auto;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.25s, color 0.2s;
}
.chat-panel.collapsed .chat-toggle-arrow {
  transform: rotate(-90deg);
}

.chat-body {
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
  gap: 8px;
}
.chat-panel.collapsed .chat-body {
  display: none;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: 268px;
  overflow-y: auto;
  padding-right: 4px;
}
.chat-list::-webkit-scrollbar { width: 7px; }
.chat-list::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); border-radius: 6px; }
.chat-list::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, 0.28); border-radius: 6px; }
.chat-list::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, 0.5); }

.chat-empty {
  margin: auto 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.chat-item {
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(8, 14, 26, 0.6);
  border: 1px solid rgba(90, 130, 190, 0.16);
  animation: chatIn 0.2s ease-out;
}
.chat-item.mine {
  background: rgba(34, 211, 238, 0.09);
  border-color: rgba(34, 211, 238, 0.3);
}

.chat-item.admin {
  border-color: rgba(251, 191, 36, 0.42);
  background:
    linear-gradient(90deg, rgba(251, 191, 36, 0.07), transparent 42%),
    rgba(8, 14, 26, 0.6);
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.12);
}
.chat-item.admin .chat-item-name {
  color: #fcd34d;
}

.chat-item.pending {
  opacity: 0.72;
  border-style: dashed;
}
.chat-item.rejected {
  opacity: 0.55;
}

.chat-item-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.chat-item-name {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-item-status {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}
.chat-item-status.pending {
  color: var(--warn);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.chat-item-status.rejected {
  color: var(--err);
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.chat-item-time {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}
.chat-item-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-dim);
  word-break: break-word;
  white-space: pre-wrap;
}

@keyframes chatIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chat-page-btn {
  flex: 1;
  padding: 5px 8px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-dim);
  background: rgba(8, 14, 26, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.chat-page-btn:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-hi);
  background: rgba(34, 211, 238, 0.1);
}
.chat-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chat-page-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  font-size: 11.5px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  background: rgba(8, 14, 26, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.chat-page-info:focus-within {
  border-color: var(--line-hi);
  background: rgba(34, 211, 238, 0.1);
}
.chat-page-input,
.chat-page-total {
  flex: 0 0 auto;
  width: 2.2em;
  font: inherit;
  font-size: 11.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.chat-page-input {
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
}

.chat-page-total,
.chat-page-sep {
  position: relative;
  top: 1px;
}
.chat-page-sep {
  flex: 0 0 auto;
  padding: 0 1px;
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 7px;
}
.chat-input {
  flex: 1;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  background: rgba(8, 14, 26, 0.7);
  color: var(--ink);
  transition: border-color 0.14s, box-shadow 0.14s;
}
.chat-input::placeholder { color: #4d6182; }
.chat-input:disabled { background: rgba(8, 14, 26, 0.35); color: #4d6182; cursor: not-allowed; }
.chat-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16), 0 0 14px var(--glow-soft);
}

.chat-send {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 9px;
  color: #04121b;
  background: linear-gradient(135deg, #0e7490, #22d3ee);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}
.chat-send:hover:not(:disabled) {
  background: linear-gradient(135deg, #0891b2, #67e8f9);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.45);
}
.chat-send:active:not(:disabled) { transform: translateY(1px); }
.chat-send:disabled {
  background: rgba(90, 130, 190, 0.18);
  border-color: var(--line);
  color: #5b7093;
  cursor: not-allowed;
}

.chat-msg {
  margin: 0;
  font-size: 12px;
  color: var(--ok);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s, max-height 0.2s;
}
.chat-msg.show {
  opacity: 1;
  max-height: 40px;
}
.chat-msg.err { color: #fca5a5; }

.chat-tip {
  margin: 0;
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
}

.online-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.online-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 9px;
  background: rgba(8, 14, 26, 0.6);
  border: 1px solid rgba(90, 130, 190, 0.16);
}
.online-stat.total {
  background: rgba(34, 211, 238, 0.09);
  border-color: rgba(34, 211, 238, 0.3);
}

.online-stat-num {
  font-size: 19px;
  font-weight: 750;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.online-stat.total .online-stat-num {
  color: var(--accent);
  text-shadow: 0 0 14px var(--glow);
}

.online-stat-label {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.online-list {
  gap: 6px;
}

.online-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(8, 14, 26, 0.6);
  border: 1px solid rgba(90, 130, 190, 0.16);
  animation: chatIn 0.2s ease-out;
}
.online-member.mine {
  background: rgba(34, 211, 238, 0.09);
  border-color: rgba(34, 211, 238, 0.3);
}

.online-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
}

.online-member-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.online-member.mine .online-member-name {
  color: var(--accent);
}

@media (max-width: 860px) {
  .chat-panel {
    top: 72px;
    left: 12px;
    width: 244px;
  }
  .online-panel {
    left: auto;
    right: 12px;
  }
  .chat-list { height: 200px; }
}

@media (max-width: 700px) {
  .online-panel { display: none; }
}

.forum-main {
  padding-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.forum-compose {
  padding: 22px 24px 24px;
}

.forum-compose-hint {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
}

.forum-review-tip {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.forum-badge.status-pending {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.42);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.18);
}
.forum-badge.status-rejected {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.18);
}

.post-filter {
  width: auto;
  min-width: 130px;
  padding: 6px 10px;
}

.forum-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.forum-textarea {
  width: 100%;
  resize: vertical;
  min-height: 130px;
  line-height: 1.75;
  font-family: inherit;
}

.forum-form .actions {
  margin-top: 0;
  align-items: center;
}

.forum-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.forum-image-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.forum-image-row input[type="file"] {
  font-size: 13px;
  color: var(--ink-dim);
}
.forum-image-row input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.forum-image-row input[type="file"]::file-selector-button:hover {
  background: rgba(34, 211, 238, 0.1);
  border-color: var(--line-hi);
  color: var(--ink);
}

.forum-image-tip {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
}

.forum-image-preview {
  margin-top: 4px;
  max-width: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(8, 14, 26, 0.6);
}
.forum-image-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.forum-section { margin-top: 0; }

.forum-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.forum-item {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 18, 32, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 18px 20px 14px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.forum-item:hover {
  border-color: var(--line-hi);
  background: rgba(16, 28, 48, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.36), 0 0 22px var(--glow-soft);
}

.forum-item.featured {
  border-color: rgba(251, 191, 36, 0.42);
  background:
    linear-gradient(90deg, rgba(251, 191, 36, 0.07), transparent 42%),
    rgba(10, 18, 32, 0.6);
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.12);
}
.forum-item.featured:hover {
  border-color: rgba(251, 191, 36, 0.62);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.36), 0 0 26px rgba(251, 191, 36, 0.2);
}

.forum-item-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.forum-item-titlewrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.forum-badge {
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.42);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.18);
}

.forum-badge.category {
  color: #7dd3fc;
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.16);
}

.forum-item-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.4;
  word-break: break-word;
}

.forum-item-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  white-space: nowrap;
}
.forum-item-author {
  color: var(--accent);
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.forum-item-time { color: var(--muted); }

.forum-item-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(90, 130, 190, 0.16);
  font-size: 14px;
  line-height: 1.9;
  color: rgba(230, 240, 255, 0.88);
  word-break: break-word;
  animation: newsExpand 0.22s ease-out;
}
.forum-item-body p {
  margin: 0 0 12px;
  white-space: pre-wrap;
}
.forum-item-body p:last-child { margin-bottom: 0; }

.forum-item-figure {
  margin: 14px 0 0;
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(8, 14, 26, 0.6);
}
.forum-item-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.forum-item-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .forum-item-head {
    flex-direction: column;
    gap: 8px;
  }
  .forum-item-meta { white-space: normal; }
  .forum-compose { padding: 18px 16px 20px; }
}

.rank-page {
  margin-top: 0;
  padding-top: 30px;
}

.rank-selectors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.rank-select {
  min-width: 150px;
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background-color: rgba(8, 14, 26, 0.7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b82a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rank-select:hover { border-color: var(--line-hi); }
.rank-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}
.rank-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rank-select option {
  background: #0b1220;
  color: var(--ink);
}

.rank-board {
  max-width: 560px;
  margin: 0 auto;
}

.leaderboard-section {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 18, 32, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 18px 20px 8px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.leaderboard-section:hover {
  border-color: var(--line-hi);
  background: rgba(16, 28, 48, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.36), 0 0 22px var(--glow-soft);
}

.rank-sub-empty {
  padding: 22px 12px;
  margin-bottom: 10px;
}

.rank-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid rgba(90, 130, 190, 0.14);
  transition: background 0.16s;
}
.rank-entry:last-child { border-bottom: none; }
.rank-entry:hover { background: rgba(34, 211, 238, 0.06); }

.rank-entry.is-clickable { cursor: pointer; }
.rank-entry.is-clickable:hover { background: rgba(34, 211, 238, 0.1); }

.rank-entry-rank {
  flex: 0 0 30px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.rank-entry-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.rank-entry-player {
  font-size: 14px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-entry-loc {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.rank-entry-tag {
  flex: 0 0 auto;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.rank-entry-tag.is-current {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.18);
}
.rank-entry-tag.is-previous {
  color: #5eead4;
  background: rgba(45, 212, 191, 0.13);
  border: 1px solid rgba(45, 212, 191, 0.42);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.16);
}

.rank-entry-info {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.rank-entry-info:hover:not(:disabled) {
  color: var(--accent);
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 0 14px var(--glow-soft);
}
.rank-entry-info svg { display: block; }

.rank-entry-info.is-empty {
  opacity: 0.28;
  cursor: not-allowed;
}

.rank-entry-bili {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.rank-entry-bili:hover {
  color: #fb7299;
  background: rgba(251, 114, 153, 0.12);
  border-color: rgba(251, 114, 153, 0.42);
  box-shadow: 0 0 14px rgba(251, 114, 153, 0.28);
}
.rank-entry-bili svg { display: block; }

.rank-entry-bili.is-empty {
  opacity: 0.28;
  cursor: not-allowed;
}
.rank-entry-bili.is-empty:hover {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: transparent;
  box-shadow: none;
}

.rank-entry-time {
  flex: 0 0 auto;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #7dd3fc;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.08);
  white-space: nowrap;
}
.rank-entry:hover .rank-entry-time {
  background: rgba(34, 211, 238, 0.16);
  box-shadow: 0 0 14px var(--glow-soft);
}

.rank-admin-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rank-admin-cat {
  border: 1px solid var(--line-hi);
  border-radius: var(--radius-sm);
  background: rgba(10, 18, 32, 0.6);
  padding: 16px 18px;
}

.rank-admin-cat-head,
.rank-admin-sub-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rank-admin-cat-head strong {
  font-size: 15px;
  color: var(--ink);
}
.rank-admin-sub-head strong {
  font-size: 13.5px;
  color: var(--accent);
}

.rank-admin-sub-ops {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rank-admin-subs {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rank-admin-sub {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(8, 14, 26, 0.5);
  padding: 12px 14px;
}

.rank-admin-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.rank-admin-entry .num-input {
  padding: 6px 10px;
  font-size: 12.5px;
}
.rank-admin-entry-ops {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.rank-admin-tag {
  flex: 0 0 auto;
  max-width: 140px;
  padding: 6px 10px;
  font-size: 12.5px;
  cursor: pointer;
}

.rank-admin-detail {
  flex: 1 1 100%;
  width: 100%;
  min-height: 52px;
  padding: 7px 10px;
  font-size: 12.5px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
}

.rank-admin-image-row {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.rank-admin-image-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 48px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(6, 12, 23, 0.8) center center / cover no-repeat;
}

.rank-admin-image-input {
  flex: 1;
  min-width: 0;
}

.rank-detail-mask {
  background: rgba(4, 8, 16, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.rank-detail-box {

  max-width: 620px;

  background: rgba(16, 28, 48, 0.42);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(120, 190, 255, 0.3);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 40px rgba(34, 211, 238, 0.12);
}

.rank-detail-head {
  align-items: baseline;
  border-bottom: 1px solid rgba(90, 130, 190, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.rank-detail-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  font-size: 15px;
  color: var(--ink);
}

.rank-detail-custom {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #7dd3fc;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.rank-detail-body {
  padding: 18px 20px 22px;
}

.rank-detail-figure {
  margin: 0 0 16px;

  display: inline-block;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: transparent;
  line-height: 0;
}
.rank-detail-figure img {
  display: block;

  width: auto;
  height: auto;
  max-width: 100%;
}

.rank-detail-text {
  font-size: 14px;
  line-height: 1.9;
  color: rgba(230, 240, 255, 0.9);
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 720px) {
  .rank-admin-entry {
    flex-wrap: wrap;
  }
  .rank-admin-entry .num-input {
    flex: 1 1 40%;
    max-width: none !important;
  }
  .rank-admin-entry-ops {
    margin-left: 0;
    width: 100%;
  }
}

