:root {
  --bg: #0a0a0f;
  --bg-2: #0f0f18;
  --panel: rgba(0, 255, 65, 0.03);
  --neon: #00ff41;
  --accent: #00f0ff;
  /* Default copy should not be green; keep neon for emphasis only. */
  --text: rgba(235, 242, 255, 0.9);
  --muted: rgba(235, 242, 255, 0.6);
  --danger: #ff4f4f;
  --warn: #ffd166;
  --shadow: none;
  --border: 1px solid rgba(0, 255, 65, 0.15);
  --radius: 0px;
  --font: 'JetBrains Mono', 'Noto Sans SC', monospace;
  --magenta: #ff00de;
  --yellow: #f0ff00;
  --text-soft: rgba(235, 242, 255, 0.86);
  --legendary: #ff8c1a;
  --mythic: #ff3b3b;
  --epic: #b86bff;
  --rare: #4aa3ff;
  --uncommon: #4bd27f;
  --common: #f4f7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #0a0a0f;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Orbitron', var(--font);
}

body.success-flash {
  animation: screenPulse 1.4s ease-in-out;
}

.grid-background {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 65, 0.03) 2px,
    rgba(0, 255, 65, 0.03) 4px
  );
  mix-blend-mode: screen;
  opacity: 1;
  z-index: 1;
}


.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 16px 32px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: 'Orbitron', var(--font);
  font-size: 20px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--neon);
}

.glitch::before,
.glitch::after {
  content: none;
}

.glitch-line {
  animation: none;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-links a {
  color: var(--accent);
  text-decoration: none;
}

.user-pill {
  padding: 6px 12px;
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--accent);
}

.user-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.user-pill-link:hover {
  border-color: rgba(0, 255, 65, 0.6);
  background: rgba(0, 255, 65, 0.06);
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.18);
}
.user-pill-link.is-active {
  border-color: var(--neon);
  background: rgba(0, 255, 65, 0.08);
  color: var(--neon);
}
.user-pill-avatar {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border: 1px solid rgba(0, 240, 255, 0.4);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.4);
}
.user-pill-link.is-active .user-pill-avatar {
  border-color: var(--neon);
}
.user-pill-text {
  font-size: 13px;
  letter-spacing: 0.5px;
}

.page {
  position: relative;
  z-index: 1;
  padding: 24px 32px 48px;
  animation: flicker 8s infinite;
}

.panel {
  background: var(--panel);
  border: var(--border);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 20px;
}

.score-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}

.score-top {
  display: block;
}

.score-status-wrap {
  margin: 0;
}

.countdown-panel {
  width: 100%;
  padding: 14px 18px;
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.06), rgba(255, 45, 117, 0.04) 55%, rgba(10, 10, 15, 0.82));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
}

.score-status-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.score-status-right {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.score-status-sep {
  color: rgba(255, 255, 255, 0.26);
}

.score-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.score-status-dot.status-none {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
}

.score-status-dot.status-running {
  border-color: rgba(0, 240, 255, 0.55);
  background: rgba(0, 240, 255, 0.95);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}

.score-status-dot.status-planned {
  border-color: rgba(255, 184, 0, 0.55);
  background: rgba(255, 184, 0, 0.95);
  box-shadow: 0 0 18px rgba(255, 184, 0, 0.25);
}

.score-status-dot.status-finished {
  border-color: rgba(255, 45, 117, 0.55);
  background: rgba(255, 45, 117, 0.95);
  box-shadow: 0 0 18px rgba(255, 45, 117, 0.25);
}

.countdown-badge {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.countdown-title {
  font-size: 14px;
  color: var(--neon);
  font-family: 'Orbitron', var(--font);
  letter-spacing: 1px;
}

.countdown-meta {
  font-size: 12px;
  color: var(--muted);
}

.countdown-display {
  display: flex;
  align-items: center;
  gap: 6px;
}

.countdown-display-compact {
  gap: 5px;
}

.countdown-display-compact .flip-digit {
  width: 22px;
  height: 32px;
}

.countdown-display-compact .flip-digit .digit-front,
.countdown-display-compact .flip-digit .digit-back {
  font-size: 16px;
}

.countdown-display-compact .flip-sep {
  font-size: 16px;
}

.flip-sep {
  color: rgba(255, 255, 255, 0.4);
  font-size: 18px;
}

.flip-digit {
  position: relative;
  width: 24px;
  height: 34px;
  perspective: 360px;
}

.flip-digit .digit-front,
.flip-digit .digit-back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.08);
  color: var(--neon);
  font-size: 18px;
  font-weight: 600;
  backface-visibility: hidden;
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.45);
}

.flip-digit .digit-back {
  transform: rotateX(180deg);
}

.flip-digit.flip .digit-front {
  animation: flipFront 0.6s ease;
}

.flip-digit.flip .digit-back {
  animation: flipBack 0.6s ease;
}

@keyframes flipFront {
  0% {
    transform: rotateX(0);
  }
  100% {
    transform: rotateX(-180deg);
  }
}

@keyframes flipBack {
  0% {
    transform: rotateX(180deg);
  }
  100% {
    transform: rotateX(0);
  }
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-header h2 {
  font-family: 'Orbitron', var(--font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.challenges-panel h1,
.admin-panel h1 {
  margin-top: 0;
}

.challenge-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.challenge-card {
  padding: 16px;
  border-radius: 0;
  border: 1px solid rgba(0, 255, 65, 0.15);
  background: rgba(0, 255, 65, 0.03);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.challenge-card .card-top {
  margin-bottom: 10px;
}

.challenge-card .badge {
  font-size: 10px;
  padding: 3px 8px;
}

.challenge-card:hover {
  transform: translateX(4px);
  border-color: rgba(0, 255, 65, 0.4);
  background: rgba(0, 255, 65, 0.05);
  box-shadow: var(--shadow);
}

.challenge-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--neon);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.challenge-card:hover::before {
  opacity: 1;
}

.card-title {
  color: var(--neon);
  font-size: 16px;
}

.card-id {
  color: var(--accent);
  font-size: 12px;
  margin-top: 6px;
}

.card-points {
  color: var(--muted);
  font-size: 12px;
  margin-top: 10px;
}

.card-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
}

.card-status.solved {
  color: var(--neon);
}

.card-status.unsolved {
  color: rgba(255, 255, 255, 0.65);
}

.card-solvers {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.challenge-card::after {
  content: "点击查看 →";
  align-self: flex-end;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* ── Challenge Sealed State ── */
.challenge-sealed {
  position: relative;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 28px 40px;
  overflow: hidden;
}

.scan-sweep {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,65,0.5), transparent);
  box-shadow: 0 0 12px rgba(0,255,65,0.4);
  animation: scanDown 6s linear infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes scanDown {
  0%   { top: 0;    opacity: 0; }
  5%   { opacity: 1; }
  90%  { opacity: .8; }
  100% { top: 100%; opacity: 0; }
}

.corner {
  position: absolute;
  width: 22px; height: 22px;
  z-index: 3;
}
.corner::before, .corner::after {
  content: '';
  position: absolute;
  background: var(--neon);
  box-shadow: 0 0 6px rgba(0,255,65,0.6);
}
.corner-tl { top: 16px; left: 16px; }
.corner-tl::before { top: 0; left: 0; width: 100%; height: 2px; }
.corner-tl::after  { top: 0; left: 0; width: 2px; height: 100%; }
.corner-tr { top: 16px; right: 16px; }
.corner-tr::before { top: 0; right: 0; width: 100%; height: 2px; }
.corner-tr::after  { top: 0; right: 0; width: 2px; height: 100%; }
.corner-bl { bottom: 16px; left: 16px; }
.corner-bl::before { bottom: 0; left: 0; width: 100%; height: 2px; }
.corner-bl::after  { bottom: 0; left: 0; width: 2px; height: 100%; }
.corner-br { bottom: 16px; right: 16px; }
.corner-br::before { bottom: 0; right: 0; width: 100%; height: 2px; }
.corner-br::after  { bottom: 0; right: 0; width: 2px; height: 100%; }

.seal-label {
  font-family: 'Orbitron', var(--font);
  font-size: 11px;
  letter-spacing: 6px;
  color: rgba(0,255,65,0.5);
  margin-bottom: 28px;
  text-transform: uppercase;
}

.seal-title {
  font-family: 'Orbitron', var(--font);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: 10px;
  color: var(--neon);
  text-shadow:
    0 0 10px rgba(0,255,65,0.8),
    0 0 30px rgba(0,255,65,0.4),
    0 0 60px rgba(0,255,65,0.15);
  animation: titleGlitch 8s ease-in-out infinite;
  position: relative;
  z-index: 4;
  margin-bottom: 8px;
}

@keyframes titleGlitch {
  0%, 85%, 100% {
    text-shadow:
      0 0 10px rgba(0,255,65,0.8),
      0 0 30px rgba(0,255,65,0.4),
      0 0 60px rgba(0,255,65,0.15);
    transform: none;
    filter: none;
  }
  86% { transform: translateX(-3px); filter: hue-rotate(20deg); }
  87% { transform: translateX(3px); }
  88% { transform: translateX(-1px); filter: hue-rotate(-20deg); }
  89% { transform: none; filter: none; }
  92% { transform: translateX(2px); opacity: .85; }
  93% { transform: none; opacity: 1; }
}

.seal-sub {
  font-size: 11px;
  letter-spacing: 4px;
  color: rgba(0,255,65,0.35);
  margin-bottom: 52px;
}

.seal-divider {
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,65,0.4), transparent);
  margin-bottom: 48px;
  position: relative;
}

.seal-divider::before, .seal-divider::after {
  content: '◆';
  position: absolute;
  top: -6px;
  color: rgba(0,255,65,0.4);
  font-size: 8px;
}
.seal-divider::before { left: -6px; }
.seal-divider::after  { right: -6px; }

.seal-countdown-label {
  font-size: 10px;
  letter-spacing: 5px;
  color: var(--muted);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.seal-countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 52px;
}

.cd-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cd-num {
  font-family: 'Orbitron', var(--font);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 600;
  color: var(--accent);
  min-width: 64px;
  text-align: center;
  border: 1px solid rgba(0,240,255,0.2);
  padding: 8px 10px;
  background: rgba(0,240,255,0.04);
  text-shadow: 0 0 16px rgba(0,240,255,0.6);
  letter-spacing: 2px;
}

.cd-unit {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
}

.cd-sep {
  font-family: 'Orbitron', var(--font);
  font-size: 32px;
  color: rgba(0,240,255,0.3);
  margin-bottom: 18px;
  animation: sepBlink 1s step-end infinite;
}

@keyframes sepBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .2; }
}

.seal-status-rows {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  border-top: 1px solid rgba(0,255,65,0.08);
  padding-top: 24px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.status-key {
  letter-spacing: 2px;
  color: rgba(0,255,65,0.4);
}

.status-val {
  color: rgba(235,242,255,0.5);
  letter-spacing: 1px;
}

.status-val.status-ok {
  color: var(--neon);
  text-shadow: 0 0 6px rgba(0,255,65,0.5);
}

.status-val.status-warn { color: var(--warn); }

.status-val.status-blink {
  animation: valBlink 2.2s ease-in-out infinite;
}

@keyframes valBlink {
  0%, 100% { opacity: .5; }
  50%       { opacity: 1; }
}

.seal-footer {
  position: absolute;
  bottom: 20px;
  left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(0,255,65,0.15);
  pointer-events: none;
}

.card-solvers .solver {
  padding: 2px 6px;
  border-radius: 0;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--text);
  font-size: 11px;
}

.card-solvers .solver-1 {
  color: var(--legendary);
  border-color: rgba(255, 140, 26, 0.4);
  background: rgba(255, 140, 26, 0.12);
}

.card-solvers .solver-2 {
  color: var(--mythic);
  border-color: rgba(255, 59, 59, 0.4);
  background: rgba(255, 59, 59, 0.12);
}

.card-solvers .solver-3 {
  color: var(--epic);
  border-color: rgba(184, 107, 255, 0.4);
  background: rgba(184, 107, 255, 0.12);
}

.empty-state {
  padding: 24px;
  border: 1px dashed rgba(0, 240, 255, 0.4);
  border-radius: 0;
  color: var(--muted);
  text-align: center;
}

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

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

input, select, textarea {
  background: rgba(10, 10, 15, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 0;
  font-family: var(--font);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.btn {
  padding: 10px 16px;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.btn {
  text-decoration: none;
}

.btn:focus-visible {
  outline: 1px solid rgba(0, 240, 255, 0.85);
  outline-offset: 2px;
}

.btn-primary {
  background: rgba(0, 255, 65, 0.1);
  border-color: rgba(0, 255, 65, 0.4);
  color: var(--neon);
}

.btn-primary:hover:not([disabled]):not(.btn-disabled) {
  background: rgba(0, 255, 65, 0.18);
  border-color: rgba(0, 255, 65, 0.65);
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.14);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.4);
  color: var(--accent);
}

.btn-secondary:hover:not([disabled]):not(.btn-disabled) {
  background: rgba(0, 240, 255, 0.16);
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.14);
  transform: translateY(-1px);
}

.btn.env-action-muted,
.btn.env-action-muted:hover,
.btn.env-action-muted:focus-visible {
  background: rgba(255, 255, 255, 0.018);
  border-color: rgba(235, 242, 255, 0.16);
  color: rgba(235, 242, 255, 0.46);
  box-shadow: none;
  transform: none;
}

.btn.env-action-busy,
.btn.env-action-busy:hover,
.btn.env-action-busy:focus-visible {
  background: rgba(255, 209, 102, 0.14);
  border-color: rgba(255, 209, 102, 0.45);
  color: var(--warn);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.12);
  transform: none;
}

.btn-danger {
  background: rgba(255, 79, 79, 0.2);
  border-color: rgba(255, 79, 79, 0.5);
  color: var(--danger);
}

.btn-danger:hover:not([disabled]):not(.btn-disabled) {
  background: rgba(255, 79, 79, 0.26);
  border-color: rgba(255, 79, 79, 0.78);
  box-shadow: 0 0 18px rgba(255, 79, 79, 0.16);
  transform: translateY(-1px);
}

.btn-text {
  padding: 4px 2px;
  border: none;
  background: transparent;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.btn-text:hover {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.text-neon {
  color: var(--neon);
}

.text-accent {
  color: var(--accent);
}

.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: calc(100vh - 180px);
}

.leaderboard-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.leaderboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.score-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
}

.score-tabs .tab-btn {
  padding: 6px 12px;
  font-size: 12px;
}

.leaderboard-title {
  font-family: 'Orbitron', var(--font);
  font-size: 16px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.attack-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding-right: 4px;
}

.attack-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(10, 10, 15, 0.55);
  font-size: 12px;
  color: var(--text);
}

.attack-item.success .attack-result {
  color: var(--mythic);
}

.attack-item.fail .attack-result {
  color: var(--uncommon);
}

.attack-time {
  color: var(--accent);
}

.attack-user {
  color: var(--text);
}

.attack-action {
  color: var(--muted);
}

.attack-result {
  font-weight: 600;
}

.attack-empty {
  color: var(--muted);
  font-size: 12px;
}

.leaderboard-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(0, 255, 65, 0.1);
  border-radius: 0;
  background: rgba(10, 10, 15, 0.7);
  --rank-color: var(--accent);
  transition: background 0.2s ease, padding-left 0.2s ease, border-color 0.2s ease;
}

.leaderboard-item:hover {
  background: rgba(0, 255, 65, 0.05);
  border-color: rgba(0, 255, 65, 0.22);
  padding-left: 14px;
}

.leaderboard-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.4);
  object-fit: cover;
  flex-shrink: 0;
}

.rank {
  min-width: 52px;
  font-size: 18px;
  color: var(--rank-color);
}

.info .name {
  font-size: 15px;
  color: var(--rank-color);
}

.info .meta {
  font-size: 12px;
  color: var(--muted);
}

.rank-legendary {
  --rank-color: var(--legendary);
  background:
    linear-gradient(rgba(10, 10, 15, 0.85), rgba(10, 10, 15, 0.85)) padding-box,
    linear-gradient(120deg, rgba(255, 140, 26, 0.85), rgba(0, 240, 255, 0.45)) border-box;
}

.rank-mythic {
  --rank-color: var(--mythic);
  background:
    linear-gradient(rgba(10, 10, 15, 0.85), rgba(10, 10, 15, 0.85)) padding-box,
    linear-gradient(120deg, rgba(255, 59, 59, 0.85), rgba(0, 240, 255, 0.4)) border-box;
}

.rank-epic {
  --rank-color: var(--epic);
  background:
    linear-gradient(rgba(10, 10, 15, 0.85), rgba(10, 10, 15, 0.85)) padding-box,
    linear-gradient(120deg, rgba(184, 107, 255, 0.85), rgba(0, 240, 255, 0.35)) border-box;
}

.rank-rare {
  --rank-color: var(--rare);
  background:
    linear-gradient(rgba(10, 10, 15, 0.82), rgba(10, 10, 15, 0.82)) padding-box,
    linear-gradient(120deg, rgba(74, 163, 255, 0.7), rgba(0, 240, 255, 0.25)) border-box;
}

.rank-uncommon {
  --rank-color: var(--uncommon);
  background:
    linear-gradient(rgba(10, 10, 15, 0.8), rgba(10, 10, 15, 0.8)) padding-box,
    linear-gradient(120deg, rgba(75, 210, 127, 0.7), rgba(0, 255, 65, 0.2)) border-box;
}

.rank-common {
  --rank-color: var(--common);
  background:
    linear-gradient(rgba(10, 10, 15, 0.75), rgba(10, 10, 15, 0.75)) padding-box,
    linear-gradient(120deg, rgba(244, 247, 255, 0.35), rgba(0, 240, 255, 0.12)) border-box;
}

.login-panel {
  max-width: 420px;
  margin: 40px auto;
}

.login-icp {
  text-align: center;
  font-size: 12px;
  margin: -24px auto 40px;
}

.login-icp a {
  color: inherit;
  text-decoration: none;
}

.login-icp a:hover {
  text-decoration: underline;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 8px;
  align-items: stretch;
}

.captcha-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(0, 255, 65, 0.45);
  background: rgba(0, 255, 65, 0.08);
  color: var(--success);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  user-select: none;
}

.login-footer {
  margin-top: 16px;
}

.login-footer a {
  color: var(--accent);
  text-decoration: none;
}

.alert {
  padding: 10px 12px;
  border-radius: 0;
  margin-bottom: 12px;
}

.alert-success {
  border: 1px solid rgba(0, 255, 65, 0.5);
  color: var(--neon);
}

.alert-danger {
  border: 1px solid rgba(255, 79, 79, 0.5);
  color: var(--danger);
}

.alert-warning {
  border: 1px solid rgba(255, 209, 102, 0.45);
  color: var(--warn);
}

.admin-panel h2 {
  margin-top: 0;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 20px;
}

.tab-btn {
  padding: 8px 14px;
  border-radius: 0;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tab-btn:hover:not(.active) {
  background: rgba(0, 240, 255, 0.13);
  border-color: rgba(0, 240, 255, 0.6);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.12);
  transform: translateY(-1px);
}

.tab-btn:focus-visible {
  outline: 1px solid rgba(0, 240, 255, 0.85);
  outline-offset: 2px;
}

.tab-btn.active {
  background: rgba(0, 255, 65, 0.18);
  border-color: rgba(0, 255, 65, 0.6);
  color: var(--neon);
  box-shadow: inset 0 -2px 0 rgba(0, 255, 65, 0.9);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-links {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-links a {
  color: var(--accent);
  text-decoration: none;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  margin: 16px 0;
}

.competition-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.competition-select {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.select-box {
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 0;
  padding: 12px;
  background: rgba(10, 10, 15, 0.55);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.select-actions {
  display: flex;
  gap: 6px;
}

.select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-form-unsaved {
  align-self: center;
  margin-right: auto;
  color: var(--warn);
  font-size: 12px;
  font-weight: 600;
}

.admin-form-unsaved::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}

.action-bar {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 240, 255, 0.22);
  justify-content: flex-end;
}

.sticky-action {
  position: sticky;
  bottom: 10px;
  z-index: 4;
  padding: 12px;
  border-radius: 0;
  border-top: 1px solid rgba(0, 255, 65, 0.3);
  background: rgba(10, 10, 15, 0.94);
  backdrop-filter: blur(6px);
}

.field-readonly {
  padding: 10px 12px;
  border-radius: 0;
  border: 1px dashed rgba(0, 240, 255, 0.35);
  color: var(--muted);
}

.results-panel {
  margin-top: 12px;
}

.hidden {
  display: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.admin-grid > * {
  min-width: 0;
}

.admin-virt-template-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(380px, 0.9fr);
  align-items: start;
}

.admin-virt-template-list-card,
.admin-virt-template-config-card {
  min-width: 0;
}

.admin-virt-template-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.admin-virt-template-table {
  min-width: 960px;
}

.admin-virt-template-table th:last-child,
.admin-virt-template-table td:last-child {
  white-space: nowrap;
}

@media (max-width: 1480px) {
  .admin-virt-template-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.virt-grid {
  margin-bottom: 18px;
}

.virt-card {
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 0;
  background: rgba(10, 10, 15, 0.5);
  padding: 14px;
  margin-bottom: 16px;
}

.virt-card h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.virt-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--accent);
}

.virt-card .card-intro {
  margin: 0 0 12px;
  font-size: 12px;
}

.virt-card > .form,
.virt-card > form.form {
  margin: 0;
}

.virt-card.danger-zone {
  border-color: rgba(255, 79, 79, 0.3);
}

.virt-card.danger-zone h3 {
  color: var(--danger);
}

.virt-card.danger-zone .inline-form {
  margin-top: 12px;
}

.danger-divider {
  border: none;
  border-top: 1px dashed rgba(255, 79, 79, 0.45);
  margin: 24px 0 18px;
}

.primary-submit {
  min-width: 148px;
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.2), 0 8px 20px rgba(0, 0, 0, 0.35);
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
}

.virt-card .table {
  margin-top: 10px;
}

.virt-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.virt-action {
  padding: 6px 10px;
}

.template-card-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.template-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.24);
  background: rgba(10, 10, 15, 0.45);
  padding: 10px;
  color: var(--text);
  cursor: pointer;
}

.template-card.active {
  border-color: rgba(0, 255, 65, 0.65);
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.28) inset;
}

.template-card-icon {
  min-width: 42px;
  height: 42px;
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(0, 240, 255, 0.08);
  font-size: 12px;
  text-transform: uppercase;
}

.template-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.template-card-title {
  color: var(--neon);
  font-size: 14px;
}

.template-card-meta {
  color: var(--muted);
  font-size: 12px;
}

.template-card-desc {
  color: var(--text);
  font-size: 12px;
}

/* ── 状态行：运行中 · 时长 ── */
.env-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 2px;
}
.env-status-row.hidden {
  display: none;
}
.env-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
  flex-shrink: 0;
  animation: env-dot-pulse 2.5s infinite;
}
@keyframes env-dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(0, 255, 65, 0.5); }
  50%       { opacity: 0.7; box-shadow: 0 0 10px rgba(0, 255, 65, 0.25); }
}
.env-status-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--neon);
}
.env-status-divider {
  width: 1px;
  height: 13px;
  background: var(--border);
  flex-shrink: 0;
}
.env-status-duration {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* ── 四按钮 2×2 网格 ── */
.env-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.env-actions .btn {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
}
.env-web-entry {
  position: relative;
  min-width: 0;
}
.env-web-entry.hidden {
  display: none !important;
}
.env-web-entry .btn {
  width: 100%;
}
.env-web-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(0, 240, 255, 0.28);
  background: rgba(6, 12, 22, 0.96);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}
.env-web-menu.hidden {
  display: none !important;
}
.env-web-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 240, 255, 0.14);
  background: rgba(0, 240, 255, 0.06);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Menlo', monospace;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.env-web-menu a::after {
  content: '↗';
  margin-left: auto;
  font-size: 10px;
  opacity: .5;
}
.env-web-menu a:hover {
  border-color: rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.14);
  color: var(--accent);
}

/* ── 复杂靶场多入口：统一 URL/端口展示（复用 AWD 服务入口风格）── */
.env-entry-block {
  display: block;
}
.env-entry-block > .env-info-key {
  display: block;
  width: auto;
  margin-bottom: 6px;
}
.lab-entry-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lab-entry-list.is-scrollable {
  max-height: 126px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}
.lab-entry-list::-webkit-scrollbar {
  width: 4px;
}
.lab-entry-list::-webkit-scrollbar-thumb {
  background: rgba(160, 180, 210, 0.32);
  border-radius: 4px;
}
.lab-entry-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 4px;
  border-radius: 4px;
  min-width: 0;
  white-space: nowrap;
  transition: background .16s ease;
}
.lab-entry-row:hover {
  background: rgba(0, 240, 255, 0.05);
}
.lab-entry-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 88px;
  min-width: 88px;
  padding: 4px 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
  flex: none;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1;
  overflow: hidden;
}
.lab-entry-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: currentColor;
}
.lab-entry-row[data-tone="web"] .lab-entry-badge {
  color: var(--accent);
  background: rgba(0, 240, 255, 0.12);
}
.lab-entry-row[data-tone="data"] .lab-entry-badge {
  color: var(--warn);
  background: rgba(255, 183, 77, 0.12);
}
.lab-entry-row[data-tone="remote"] .lab-entry-badge {
  color: #b58cff;
  background: rgba(181, 140, 255, 0.12);
}
.lab-entry-address {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
}
.lab-entry-address.is-link {
  color: var(--accent);
}
.lab-entry-address.is-link:hover {
  text-decoration: underline;
}

/* ── 运行信息：统一 key/val ── */
.env-runtime {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.env-info-row {
  display: flex;
  align-items: baseline;
  gap: 0;
  padding: 2px 0;
}
.env-info-key {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  width: 44px;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.env-info-val {
  font-size: 12px;
  color: var(--text-secondary, #8a9ab8);
  font-family: 'Consolas', 'Monaco', monospace;
}
.env-runtime-timer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.env-runtime-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.env-runtime-time-row strong {
  color: var(--text);
  font-family: 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  font-weight: 400;
}
.env-runtime-time-sep {
  color: var(--border);
}

@media (max-width: 540px) {
  .lab-entry-row {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 4px;
    padding-inline: 2px;
  }
  .lab-entry-badge {
    width: 78px;
    min-width: 78px;
    padding-inline: 4px;
    font-size: 10px;
  }
  .lab-entry-address {
    font-size: 12px;
  }
}

.env-progress {
  margin-top: 10px;
}

.env-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.env-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 0;
  background: rgba(0, 240, 255, 0.14);
  border: 1px solid rgba(0, 240, 255, 0.24);
  overflow: hidden;
}

.env-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 255, 65, 0.75), rgba(0, 240, 255, 0.85));
  transition: width 0.25s ease-out;
}
.env-progress-fill.is-error {
  background: linear-gradient(90deg, rgba(255, 79, 79, 0.8), rgba(255, 140, 60, 0.8));
}
.env-progress-fill.is-complete {
  transition: width 0.35s ease-in-out;
}

.env-progress-fill-runtime {
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.85), rgba(255, 127, 80, 0.85));
}

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 20px;
}

.list-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-item {
  padding: 8px 10px;
  border: 1px solid rgba(0, 255, 65, 0.25);
  border-radius: 0;
}

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

.bulk-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bulk-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bulk-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-divider {
  width: 1px;
  height: 26px;
  background: rgba(0, 240, 255, 0.25);
}

.bulk-input-row {
  width: 100%;
}

.bulk-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(10, 10, 15, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 0;
  overflow: hidden;
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
  font-size: 13px;
}

.table thead {
  background: rgba(0, 240, 255, 0.08);
}

.table th {
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-size: 12px;
}

.table th input[type="checkbox"] {
  transform: scale(1.05);
}

.table tbody tr:hover {
  background: rgba(0, 240, 255, 0.08);
}

.table tbody tr:nth-child(odd) {
  background: rgba(10, 10, 15, 0.55);
}

.row-hidden {
  display: none !important;
}

.row-filter-hidden,
.row-page-hidden {
  display: none !important;
}

.tab-pane-hidden {
  display: none !important;
}

.virt-config-hidden {
  display: none !important;
}

.challenge-detail-tabs {
  margin: 6px 0 14px;
}

.form-feedback {
  margin-bottom: 12px;
}

.feedback-list {
  margin-top: 6px;
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.flag-value-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flag-value-mono {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: var(--text);
}

.flag-copy-btn {
  padding: 2px 8px;
  line-height: 1.4;
}

.flag-pagination {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.flag-page-info {
  font-size: 12px;
  color: var(--muted);
  min-width: 84px;
  text-align: center;
}

.flag-pagination .btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.mono {
  color: var(--muted);
}

.status-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.status-chip {
  font-size: 11px;
}

.status-chip-practice {
  background: transparent;
}

.status-chip-practice.chip-active {
  color: var(--accent);
  border-color: rgba(0, 240, 255, 0.55);
}

.status-chip-practice.chip-inactive {
  color: rgba(177, 230, 198, 0.8);
  border-color: rgba(123, 214, 168, 0.35);
}

.status-chip-competition.chip-active {
  color: var(--neon);
  border-color: rgba(0, 255, 65, 0.65);
  background: rgba(0, 255, 65, 0.2);
}

.status-chip-competition.chip-inactive {
  color: var(--accent);
  border-color: rgba(0, 240, 255, 0.32);
  background: rgba(0, 240, 255, 0.08);
}

.table-compact th,
.table-compact td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.users-team-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}

.users-team-rename-form {
  width: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.users-team-input {
  width: clamp(88px, 11vw, 150px);
  min-width: 88px;
  max-width: 150px;
  flex: 1 1 auto;
}

.resizable-textarea {
  resize: vertical;
}

.step-manager-block {
  margin-top: 8px;
}

.step-card {
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 0;
  padding: 12px;
  background: rgba(10, 10, 15, 0.62);
  display: grid;
  gap: 10px;
}

.step-card + .step-card {
  margin-top: 10px;
}

.step-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.step-card-title {
  color: var(--accent);
  font-size: 13px;
}

.step-manager-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.step-manager-actions-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.step-flag-field {
  display: grid;
  gap: 6px;
}

.step-flag-note {
  font-size: 12px;
}

.step-flag-field input[disabled] {
  color: rgba(177, 230, 198, 0.62);
  background: rgba(10, 10, 15, 0.82);
  border-color: rgba(177, 230, 198, 0.28);
  cursor: not-allowed;
}

.step-points-required {
  border-color: rgba(255, 210, 110, 0.75) !important;
  box-shadow: 0 0 0 1px rgba(255, 210, 110, 0.35);
}

.step-total {
  font-size: 13px;
  color: var(--muted);
}

.step-total strong {
  color: var(--neon);
}

.link {
  color: var(--accent);
  text-decoration: none;
}

.challenge-item {
  padding: 12px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 0;
  margin-bottom: 12px;
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.chip {
  padding: 4px 10px;
  border-radius: 0;
  font-size: 12px;
  border: 1px solid rgba(0, 240, 255, 0.35);
}

.chip-active {
  color: var(--neon);
  border-color: rgba(0, 255, 65, 0.5);
}

.chip-inactive {
  color: var(--muted);
}

.chip-danger {
  color: var(--danger);
  border-color: rgba(255, 79, 79, 0.6);
  background: rgba(255, 79, 79, 0.12);
}

.freeze-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.inline-actions {
  display: flex;
  gap: 8px;
}

.inline-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.checkbox-grid-scroll {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 0;
}

.form.compact label {
  font-size: 12px;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.competition-context-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 0;
  background: rgba(10, 10, 15, 0.52);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.competition-context-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.competition-context-main .sep {
  color: rgba(123, 214, 168, 0.45);
}

.competition-context-title {
  color: var(--accent);
  font-weight: 600;
}

.competition-context-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-total {
  font-size: 13px;
  color: var(--text);
  margin-right: 8px;
}

.pagination-total strong {
  color: var(--accent);
  font-size: 15px;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.list-table {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.list-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr 100px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 0;
  background: rgba(10, 10, 15, 0.5);
}

.list-row.header {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.35);
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 20px;
}

.score-modal-overlay {
  --score-modal-top-offset: 74px;
  --score-modal-bottom-gap: 10px;
  --score-modal-inner-top-gap: 10px;
  top: var(--score-modal-top-offset);
  bottom: var(--score-modal-bottom-gap);
  left: 0;
  right: 0;
  align-items: flex-start;
  justify-content: flex-start;
  padding: var(--score-modal-inner-top-gap) 32px 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal-overlay.open {
  display: flex;
}

.firstblood-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.firstblood-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.firstblood-overlay.closing {
  opacity: 0;
}

.firstblood-modal {
  width: min(420px, 92vw);
  background: rgba(13, 25, 50, 0.95);
  border: 1px solid rgba(255, 45, 117, 0.4);
  border-radius: 0;
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.12), 0 18px 60px rgba(0, 0, 0, 0.65);
  padding: 18px 18px 14px;
  transform: scale(0.86);
  opacity: 0;
}

.firstblood-overlay.open .firstblood-modal {
  animation: firstbloodIn 0.3s ease-out forwards;
}

.firstblood-overlay.closing .firstblood-modal {
  animation: firstbloodOut 0.2s ease-in forwards;
}

@keyframes firstbloodIn {
  0% { transform: scale(0.82); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes firstbloodOut {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: translateY(-20px) scale(0.98); opacity: 0; }
}

.firstblood-topline {
  height: 2px;
  background: linear-gradient(90deg, #00f0ff, #ff2d75);
  margin: -18px -18px 14px;
}

.firstblood-title {
  font-family: 'Orbitron', var(--font);
  font-size: 20px;
  letter-spacing: 2px;
  text-align: center;
  color: #ff2d75;
  text-shadow: 0 0 20px rgba(255, 45, 117, 0.6);
  margin: 2px 0 14px;
  animation: flicker 6s infinite;
}

.firstblood-card {
  border: 1px solid rgba(0, 240, 255, 0.22);
  background: rgba(10, 10, 15, 0.55);
  padding: 14px 14px 12px;
}

.firstblood-challenge {
  font-family: 'Orbitron', var(--font);
  font-size: 22px;
  font-weight: 700;
  color: #00f0ff;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
  line-height: 1.2;
}

.firstblood-meta {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 1px;
}

.firstblood-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 12px 0;
}

.firstblood-winner-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}

.firstblood-winner {
  margin-top: 6px;
  font-size: 16px;
  color: #ffb800;
  text-shadow: 0 0 14px rgba(255, 184, 0, 0.35);
  font-weight: 700;
}

.firstblood-time {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.firstblood-progress {
  margin: 12px 0 10px;
  height: 3px;
  background: rgba(255, 45, 117, 0.14);
  overflow: hidden;
}

.firstblood-progress-bar {
  height: 100%;
  width: 100%;
  background: #ff2d75;
  transform-origin: left center;
  transform: scaleX(1);
  animation: none;
}

@keyframes firstbloodCountdown {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

.firstblood-close {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.24);
  color: #00f0ff;
  padding: 10px 12px;
  cursor: pointer;
  font-family: 'Orbitron', var(--font);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.firstblood-close:hover {
  border-color: rgba(255, 45, 117, 0.45);
  color: #ff2d75;
}

.modal {
  width: min(860px, 92vw);
  background: rgba(10, 10, 15, 0.98);
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: var(--shadow);
  padding: 24px;
  position: relative;
}

.modal:not(.result-modal) {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  overflow: hidden;
}

.score-challenge-modal {
  width: calc(100vw - 64px - 360px - 20px);
  max-width: calc(100vw - 64px - 360px - 20px);
  margin: 0;
}

.score-modal-overlay .modal.score-challenge-modal {
  max-height: calc(100dvh - var(--score-modal-top-offset) - var(--score-modal-bottom-gap) - var(--score-modal-inner-top-gap));
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 24px;
  cursor: pointer;
}

.modal-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.modal-hero {
  flex-shrink: 0;
  border: 1px solid rgba(0, 240, 255, 0.24);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(0, 255, 65, 0.08), rgba(0, 240, 255, 0.04) 42%, rgba(10, 10, 15, 0.72));
  padding: 14px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-hero-main {
  min-width: 0;
  flex: 1;
}

.modal-hero-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-hero h2 {
  margin: 8px 0 0;
}

.modal-tag-list {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-hero-tools {
  width: 340px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.modal-hero-tools .btn {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
  padding: 8px 12px;
}

.score-challenge-modal .hero-tools-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.score-challenge-modal .hero-tools-links .btn {
  flex: 1;
  min-width: 120px;
  text-decoration: none;
  font-family: var(--font);
}

.score-challenge-modal .hero-tools-env {
  border-top: 1px solid rgba(0, 240, 255, 0.18);
  padding-top: 10px;
}

.score-challenge-modal .hero-tools-env .env-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.score-challenge-modal .hero-tools-env .env-actions .btn {
  flex: 1 1 calc(50% - 4px);
  min-width: calc(50% - 4px);
  padding: 6px 8px;
  font-size: 12px;
}

.score-challenge-modal .hero-tools-env #modal-env-summary {
  margin: 4px 0;
}

.modal-text-block {
  color: var(--text-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.6;
  max-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 65, 0.3) transparent;
}

.score-challenge-modal .modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  margin-bottom: 0;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 65, 0.35) transparent;
}

.score-challenge-modal .modal-body::-webkit-scrollbar {
  width: 6px;
}

.score-challenge-modal .modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.score-challenge-modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 65, 0.35);
  border-radius: 0;
}

.score-challenge-modal .modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 65, 0.55);
}

.score-challenge-modal .arena-step-nav {
  margin: 0 0 12px;
}

.score-challenge-modal .modal-details {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.score-challenge-modal .modal-submit-block {
  margin-bottom: 0;
}

.score-challenge-modal #submit-form {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.modal-submit-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.modal-submit-row input[type="text"] {
  flex: 1;
  min-width: 0;
}

.modal-submit-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 120px;
}

.score-challenge-modal .modal-step-wrapper {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.modal-step-select {
  width: 140px;
  background: rgba(10, 10, 15, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 0;
  font-family: var(--font);
  font-size: 13px;
}

.modal-solves {
  border-left: 1px solid rgba(0, 240, 255, 0.2);
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.solves-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  overflow-y: auto;
  padding-right: 6px;
  max-height: 320px;
}

.solve-row {
  padding: 8px 10px;
}

.solve-name {
  color: var(--neon);
}

.solve-points {
  color: var(--accent);
}

.solve-empty {
  color: var(--muted);
  font-size: 12px;
}

.detail-block {
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 0;
  background: rgba(10, 10, 15, 0.56);
  padding: 16px;
  margin-bottom: 16px;
  min-width: 0;
}

.detail-block h3 {
  margin: 0 0 6px 0;
  font-size: 14px;
  color: var(--accent);
}

.section-label {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.detail-block p {
  margin: 0;
  color: var(--text);
}

.detail-block p + p {
  margin-top: 8px;
}

.detail-block a {
  color: var(--neon);
  text-decoration: none;
}

.detail-warning {
  color: #ffd26e;
  border-color: rgba(255, 210, 110, 0.45);
  background: rgba(255, 210, 110, 0.12);
}

.virt-step-info-block code {
  color: var(--neon);
}

.flag-scope-card {
  border-left-width: 3px;
}

.flag-scope-practice {
  border-left-color: rgba(0, 240, 255, 0.85);
}

.flag-scope-competition {
  border-left-color: rgba(255, 209, 102, 0.85);
}

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

.result-title {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 10px;
}

.result-message {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 18px;
}

#result-modal[data-status="ok"] .result-title {
  color: var(--neon);
}

#result-modal[data-status="error"] .result-title {
  color: var(--danger);
}

#result-modal[data-status="info"] .result-title {
  color: var(--warn);
}

.fx-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 6;
  background: rgba(0, 255, 65, 0.18);
}

.fx-overlay.active {
  animation: flash 1.4s ease-in-out;
}

@keyframes glitchTop {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2px, -1px); }
  40% { transform: translate(2px, 1px); }
  60% { transform: translate(-1px, 0); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0, 0); }
}

@keyframes glitchBottom {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2px, 1px); }
  50% { transform: translate(-2px, 0); }
  75% { transform: translate(1px, 1px); }
  100% { transform: translate(0, 0); }
}

@keyframes glitchFlicker {
  0% { opacity: 0.9; filter: hue-rotate(0deg); }
  30% { opacity: 1; filter: hue-rotate(12deg); }
  60% { opacity: 0.85; filter: hue-rotate(-8deg); }
  100% { opacity: 0.95; filter: hue-rotate(0deg); }
}

@keyframes flash {
  0% { opacity: 0; }
  35% { opacity: 0.8; }
  100% { opacity: 0; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  96% { opacity: 0.9; }
  97% { opacity: 1; }
}

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

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.08);
  }
  50% {
    box-shadow: 0 0 36px rgba(0, 255, 65, 0.16);
  }
}

@keyframes progressShimmer {
  0% {
    background-position: 100% center;
  }
  100% {
    background-position: -100% center;
  }
}

@keyframes screenPulse {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.08); }
  100% { filter: brightness(1); }
}

@keyframes noiseShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(1px, -2px); }
  75% { transform: translate(2px, 1px); }
  100% { transform: translate(0, 0); }
}

@media (max-width: 1200px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .score-layout {
    grid-template-columns: 1fr;
  }

  .leaderboard {
    height: auto;
  }

  .admin-split {
    grid-template-columns: 1fr;
  }

  .score-modal-overlay {
    --score-modal-top-offset: 74px;
    --score-modal-inner-top-gap: 20px;
    align-items: center;
    justify-content: center;
    padding: var(--score-modal-inner-top-gap) 20px 0;
  }

  .score-challenge-modal {
    width: min(860px, 92vw);
    max-width: none;
  }
}

@media (max-width: 640px) {
  .score-modal-overlay {
    --score-modal-top-offset: 106px;
    --score-modal-inner-top-gap: 10px;
    padding: var(--score-modal-inner-top-gap) 16px 0;
  }

  .home-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .challenge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    margin: 0 16px;
  }

  .home-hero {
    padding: 40px 16px 24px;
  }

  .home-layout {
    grid-template-columns: 1fr;
    padding: 24px 16px 48px;
    gap: 20px;
  }

  .score-status-right {
    width: 100%;
    justify-content: flex-start;
  }

  .competition-select {
    grid-template-columns: 1fr;
  }

  .action-bar {
    justify-content: stretch;
  }

  .action-bar .btn {
    width: 100%;
  }

  .bulk-divider {
    display: none;
  }

  .score-challenge-modal .modal-body {
    grid-template-columns: 1fr;
  }

  .score-challenge-modal .modal-solves {
    border-left: none;
    padding-left: 0;
    max-height: 260px;
  }

  .modal-hero {
    flex-direction: column;
  }

  .score-challenge-modal .modal-hero-tools {
    width: 100%;
    min-width: 0;
  }

  .score-challenge-modal .solves-list {
    max-height: 220px;
  }

  .modal-submit-row {
    flex-wrap: wrap;
  }

  .modal-step-select {
    width: 100%;
  }

  .arena-step-layout {
    grid-template-columns: 1fr;
  }

  .arena-hero-inner {
    flex-direction: column;
  }

  .arena-hero-tools {
    width: 100%;
    min-width: 0;
  }

  .arena-step-page .arena-sticky {
    position: static;
  }

  .arena-hero h1 {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .challenge-grid {
    grid-template-columns: 1fr;
  }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-right a {
  color: var(--accent);
  text-decoration: none;
}

.topbar-right a:hover {
  color: var(--neon);
}

.brand-mini {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-tab {
  padding: 8px 20px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s;
  position: relative;
  font-weight: 500;
}

.nav-tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 1px;
  background: var(--neon);
  transition: all 0.3s;
}

.nav-tab:hover::after,
.nav-tab.active::after {
  left: 10%;
  right: 10%;
}

.nav-tab:hover {
  color: var(--neon);
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.nav-tab.active {
  color: var(--neon);
  background: transparent;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
  box-shadow: none;
}

/* Hero 全宽区 */
.home-hero {
  padding: 60px 40px 40px;
  position: relative;
}

.home-hero .hero-header h1 {
  font-family: 'Orbitron', var(--font);
  font-size: 40px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 12px 0 8px;
}

/* Stats 全宽 4 列网格 */
.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(0, 255, 65, 0.15);
  border: 1px solid rgba(0, 255, 65, 0.15);
  margin: 0 32px;
}

.stat-cell {
  background: var(--bg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s;
  cursor: default;
}

.stat-cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.stat-cell:hover {
  background: rgba(0, 255, 65, 0.03);
}

.stat-cell:hover::before {
  opacity: 1;
}

.home-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  padding: 40px 32px 80px;
  align-items: start;
}

.home-layout-empty .home-empty {
  min-height: 1px;
}

.hero-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--muted);
  margin-bottom: 12px;
}

.stat-value {
  font-family: 'Orbitron', var(--font);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  color: var(--neon);
  margin-top: 4px;
}

.stat-value.stat-cyan {
  color: #00f0ff;
}

.stat-value.stat-magenta {
  color: #ff00de;
}

.stat-value.stat-yellow {
  color: #f0ff00;
}

.feature-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.feature-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.feature-card-wide {
  grid-column: 1 / -1;
}

.feature-card-wide p {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

.home-learn-banner {
  margin-top: 0;
}

.home-learn-alert {
  border-color: rgba(0, 255, 65, 0.28);
  border-left-color: rgba(0, 255, 65, 0.85);
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.08), 0 0 20px rgba(0, 255, 65, 0.1);
}

.home-learn-alert:hover {
  border-color: rgba(0, 255, 65, 0.45);
  border-left-color: rgba(0, 255, 65, 1);
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.18), 0 0 28px rgba(0, 255, 65, 0.2);
  transform: translateY(-1px);
}

.learn-status-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #021a07;
  background: rgba(0, 255, 65, 0.85);
}

.learn-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #047a22;
  box-shadow: 0 0 0 0 rgba(4, 122, 34, 0.5);
  animation: compPulse 2s ease-out infinite;
}

.learn-progress-stat {
  font-family: 'JetBrains Mono', var(--font);
  font-size: 13px;
  color: rgba(220, 248, 233, 0.88);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.learn-progress-sep {
  color: rgba(255, 255, 255, 0.25);
}

.learn-progress-pct {
  color: var(--neon);
  font-weight: 700;
}

.home-categories {
  margin-top: 18px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.home-rank {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideUp 0.8s ease-out 0.2s both, pulse-glow 6s ease-in-out 1s infinite;
}

.rank-tabs {
  display: inline-flex;
  gap: 8px;
  background: rgba(10, 10, 15, 0.6);
  padding: 4px;
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.rank-tab {
  padding: 6px 12px;
  border-radius: 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}

.rank-tab.active {
  color: var(--neon);
  background: rgba(0, 255, 65, 0.12);
  border: 1px solid rgba(0, 255, 65, 0.4);
}

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

.home-rank .rank-list {
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 65, 0.3) transparent;
}

.empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid transparent;
  --rank-color: var(--accent);
  transition: background 0.2s ease, padding-left 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  background: rgba(0, 255, 65, 0.05);
  border-color: rgba(0, 255, 65, 0.2);
  padding-left: 16px;
}

.rank-no {
  font-family: 'Orbitron', var(--font);
  font-weight: 900;
  color: var(--rank-color);
  min-width: 36px;
}

.rank-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--rank-color);
}

.rank-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.35);
  object-fit: cover;
  flex-shrink: 0;
}

.rank-team {
  color: var(--muted);
  margin-left: 6px;
  font-size: 12px;
}

.rank-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.arena-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.arena-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
}

.sidebar-title {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-link {
  padding: 8px 12px;
  border-radius: 0;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.95), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.category-link:hover:not(.active) {
  border-color: rgba(0, 240, 255, 0.5);
  background: rgba(0, 240, 255, 0.06);
  color: var(--accent);
  transform: translateX(2px);
}

.category-link:hover::before {
  opacity: 1;
}

.category-link:focus-visible {
  outline: 1px solid rgba(0, 240, 255, 0.85);
  outline-offset: 2px;
}

.category-link.active {
  border-color: rgba(0, 255, 65, 0.5);
  background: rgba(0, 255, 65, 0.12);
  color: var(--neon);
}

.arena-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.status-tabs,
.difficulty-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-tab,
.difficulty-tab {
  padding: 6px 12px;
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.status-tab::before,
.difficulty-tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.95), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.status-tab:hover:not(.active),
.difficulty-tab:hover:not(.active) {
  border-color: rgba(0, 240, 255, 0.65);
  color: var(--accent);
  background: rgba(0, 240, 255, 0.07);
  transform: translateY(-1px);
}

.status-tab:hover::before,
.difficulty-tab:hover::before {
  opacity: 1;
}

.status-tab:focus-visible,
.difficulty-tab:focus-visible {
  outline: 1px solid rgba(0, 240, 255, 0.85);
  outline-offset: 2px;
}

.status-tab.active,
.difficulty-tab.active {
  border-color: rgba(0, 255, 65, 0.6);
  color: var(--neon);
  background: rgba(0, 255, 65, 0.12);
}

.rank-tab {
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.rank-tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.95), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rank-tab:hover:not(.active) {
  color: var(--accent);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.1);
}

.rank-tab:hover::before {
  opacity: 1;
}

.rank-tab:focus-visible {
  outline: 1px solid rgba(0, 240, 255, 0.85);
  outline-offset: 2px;
}

.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-form input[type=\"search\"] {
  min-width: 200px;
}

.arena-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.arena-detail-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.arena-step-page {
  gap: 20px;
}

.arena-hero {
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.24);
  background: rgba(0, 255, 65, 0.03);
  padding: 18px;
  box-shadow: var(--shadow);
}

.arena-hero-inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.arena-hero-info {
  flex: 1;
  min-width: 0;
}

.arena-hero h1 {
  margin: 10px 0 8px;
  font-size: 28px;
  text-shadow: 0 0 16px rgba(0, 255, 65, 0.22);
}

.arena-hero-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.arena-hero-meta {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.arena-hero-desc {
  margin: 0;
  color: var(--text-soft);
  white-space: pre-wrap;
  line-height: 1.6;
}

.arena-hero-tools {
  width: 340px;
  min-width: 300px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 0;
  background: rgba(10, 10, 15, 0.56);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-tools-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-tools-links .btn {
  flex: 1;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-family: var(--font);
  font-size: 13px;
  justify-content: center;
}

.btn-attachment-highlight {
  border-color: var(--neon) !important;
  color: var(--neon) !important;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.25);
  transition: box-shadow 0.18s ease;
}

.btn-attachment-highlight:hover {
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.4);
}

.hero-tools-env {
  gap: 10px;
}

.hero-tools-env:not(.hidden) {
  display: grid;
}

.hero-tools-links + .hero-tools-env {
  border-top: 1px solid rgba(0, 240, 255, 0.18);
  padding-top: 12px;
}

.hero-tools-env .env-actions {
  flex-wrap: wrap;
}

.arena-step-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.step-nav-item {
  border: 1px solid rgba(0, 240, 255, 0.22);
  background: rgba(10, 10, 15, 0.72);
  color: var(--muted);
  border-radius: 0;
  padding: 8px 12px;
  font-family: var(--font);
  cursor: pointer;
}

.step-nav-item.current {
  border-color: rgba(0, 240, 255, 0.65);
  color: var(--accent);
  background: rgba(0, 240, 255, 0.12);
}

.step-nav-item.done {
  border-color: rgba(0, 255, 65, 0.6);
  color: var(--neon);
  background: rgba(0, 255, 65, 0.14);
}

.arena-step-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(300px, 0.82fr);
  gap: 18px;
  align-items: start;
}

.arena-step-main {
  display: grid;
  gap: 14px;
}

.arena-step-side {
  display: grid;
  gap: 14px;
}

.arena-step-subblock {
  margin: 0;
}

.step-progress-list {
  display: grid;
  gap: 8px;
}

.step-progress-item {
  width: 100%;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 0;
  padding: 8px 10px;
  background: rgba(10, 10, 15, 0.62);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
}

.step-progress-item.current {
  border-color: rgba(0, 240, 255, 0.6);
  color: var(--accent);
}

.step-progress-item.done {
  border-color: rgba(0, 255, 65, 0.55);
  color: var(--neon);
}

.step-solved-hint {
  border: 1px solid rgba(0, 255, 65, 0.45);
  border-radius: 0;
  padding: 10px 12px;
  color: var(--neon);
  background: rgba(0, 255, 65, 0.1);
}

.arena-detail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.arena-back-link {
  display: inline-flex;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 12px;
}

.arena-back-link:hover {
  color: var(--neon);
}

.arena-detail-title-wrap h1 {
  margin: 0;
}

.arena-detail-title-wrap p {
  margin: 4px 0 0;
}

.arena-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.arena-detail-main {
  display: grid;
  gap: 14px;
}

.arena-detail-sidebar {
  display: grid;
  gap: 14px;
}

.arena-sticky {
  position: sticky;
  top: 90px;
}

.arena-meta-card {
  margin-bottom: 0;
}

.arena-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
  margin-bottom: 10px;
}

.arena-tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.arena-detail-text {
  white-space: pre-wrap;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  overflow-x: hidden;
}

.arena-hero-desc {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

#step-content-card .arena-detail-text {
  color: var(--text-soft);
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 65, 0.3) transparent;
}

#step-content-card .arena-detail-text::-webkit-scrollbar {
  width: 6px;
}

#step-content-card .arena-detail-text::-webkit-scrollbar-thumb {
  border-radius: 0;
  background: rgba(0, 255, 65, 0.3);
}

.arena-detail-submit .btn {
  width: 100%;
}

.arena-detail-solves {
  max-height: 460px;
}

.arena-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.arena-card:hover {
  border-color: rgba(0, 240, 255, 0.6);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.15), var(--shadow);
  transform: translateY(-3px);
}

.arena-card:focus-visible {
  outline: 1px solid rgba(0, 240, 255, 0.8);
  outline-offset: 2px;
}

.arena-card.solved:hover {
  border-color: rgba(75, 210, 127, 0.7);
  box-shadow: 0 0 16px rgba(75, 210, 127, 0.18), var(--shadow);
}

.arena-card h3 {
  margin-top: 12px;
  margin-bottom: 6px;
}

.arena-card .desc {
  flex: 1;
  color: var(--muted);
  font-size: 12px;
  min-height: 36px;
  max-height: 54px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-top {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-challenge-type {
  font-size: 11px;
  padding: 2px 7px;
  letter-spacing: 0.3px;
  border-radius: 0;
}

.type-live {
  border: 1px solid rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.07);
  color: var(--accent);
}

.type-offline {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--muted);
}

.badge {
  padding: 4px 8px;
  border-radius: 0;
  font-size: 11px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--accent);
}

.badge-difficulty {
  border-color: rgba(255, 209, 102, 0.5);
  color: var(--warn);
}

.badge-category {
  border-color: rgba(0, 255, 65, 0.4);
  color: var(--neon);
}

.badge-web {
  border-color: rgba(0, 240, 255, 0.4);
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.05);
}

.badge-crypto {
  border-color: rgba(255, 0, 222, 0.4);
  color: #ff00de;
  background: rgba(255, 0, 222, 0.05);
}

.badge-pwn {
  border-color: rgba(240, 255, 0, 0.4);
  color: #f0ff00;
  background: rgba(240, 255, 0, 0.05);
}

.badge-misc {
  border-color: rgba(0, 255, 65, 0.4);
  color: #00ff41;
  background: rgba(0, 255, 65, 0.05);
}

.badge-solved {
  border-color: rgba(75, 210, 127, 0.6);
  color: var(--uncommon);
}

.arena-card.solved {
  border-color: rgba(75, 210, 127, 0.5);
  box-shadow: 0 8px 18px rgba(75, 210, 127, 0.12);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0 12px;
}

.card-meta-people {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icon-people {
  opacity: 0.72;
  flex-shrink: 0;
}

.arena-env-mini {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 0;
  background: rgba(255, 209, 102, 0.08);
}

.arena-env-mini-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}

.arena-env-mini-status {
  color: var(--warn);
}

.arena-env-mini-remaining {
  color: var(--text);
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
}

.arena-env-mini-track {
  height: 7px;
  background: rgba(255, 209, 102, 0.2);
  border-color: rgba(255, 209, 102, 0.32);
}

.arena-env-mini-fill {
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.9), rgba(255, 127, 80, 0.9));
}

.practice-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10;
}

.practice-modal.open {
  display: block;
}

.practice-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(6px);
}

.practice-modal-card {
  position: relative;
  margin: 80px auto;
  max-width: 520px;
  background: rgba(10, 10, 15, 0.95);
  border-radius: 0;
  padding: 20px;
  border: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow: var(--shadow);
}

.practice-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.practice-modal-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.practice-modal-close {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 22px;
  cursor: pointer;
}

.practice-modal-category {
  color: var(--muted);
  font-size: 12px;
}

.practice-modal-tags,
.practice-modal-hint,
.practice-modal-link,
.practice-modal-attachment {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.practice-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.practice-form input[type=\"text\"] {
  flex: 1;
}

.practice-result {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.practice-result.ok {
  color: var(--neon);
}

.practice-result.error {
  color: var(--danger);
}

.rank-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rank-tabs-standalone {
  align-self: flex-start;
}

.rank-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.podium-card {
  padding: 20px;
  border-radius: 0;
  text-align: center;
  border: var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  position: relative;
  --podium-color: var(--accent);
  --podium-rest-offset: 0px;
  opacity: 0;
  transform: translateY(calc(16px + var(--podium-rest-offset)));
  animation: podiumSlideUp 0.6s ease forwards;
}

.podium-card .podium-rank {
  font-size: 28px;
  font-weight: 700;
  color: var(--podium-color);
}

.podium-name {
  margin-top: 6px;
  font-size: 16px;
  color: var(--podium-color);
}

.podium-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.4);
  object-fit: cover;
  margin-top: 8px;
}

.podium-team {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.podium-stats {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.podium-empty {
  color: var(--muted);
  padding: 24px 0;
  font-size: 14px;
}

.podium-first {
  --podium-color: var(--legendary);
  --podium-rest-offset: -10px;
  background: linear-gradient(150deg, rgba(255, 140, 26, 0.24), rgba(10, 10, 15, 0.85));
  border-color: rgba(255, 140, 26, 0.6);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.1), var(--shadow);
  animation-delay: 0.24s;
}

.podium-second {
  --podium-color: var(--mythic);
  background: linear-gradient(150deg, rgba(255, 59, 59, 0.22), rgba(10, 10, 15, 0.85));
  border-color: rgba(255, 59, 59, 0.55);
  animation-delay: 0.08s;
}

.podium-third {
  --podium-color: var(--epic);
  background: linear-gradient(150deg, rgba(184, 107, 255, 0.22), rgba(10, 10, 15, 0.85));
  border-color: rgba(184, 107, 255, 0.55);
  animation-delay: 0.16s;
}

.podium-first .podium-avatar {
  box-shadow: 0 0 0 rgba(255, 140, 26, 0.35);
  animation: podiumAura 2.4s ease-in-out infinite;
}

.rank-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 120px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid transparent;
  --rank-color: var(--accent);
}

.rank-row .col-rank {
  color: var(--rank-color);
  font-weight: 600;
}

.rank-head {
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-size: 12px;
}

@media (max-width: 1080px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .home-layout {
    grid-template-columns: 1fr;
  }
  .arena-layout {
    grid-template-columns: 1fr;
  }
  .arena-sidebar {
    position: static;
  }
  .arena-toolbar {
    grid-template-columns: 1fr;
  }
  .arena-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  .arena-detail-layout {
    grid-template-columns: 1fr;
  }
  .arena-detail-sidebar {
    order: -1;
  }
  .arena-detail-sidebar.arena-sticky {
    position: static;
  }
  .podium {
    grid-template-columns: 1fr;
  }
  .podium-first {
    order: -1;
  }
  .rank-row {
    grid-template-columns: 60px 1fr 80px 80px;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 12px 16px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .nav-tabs {
    width: 100%;
    order: 2;
  }

  .topbar-right {
    width: 100%;
    order: 3;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .user-pill {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@keyframes podiumSlideUp {
  0% {
    opacity: 0;
    transform: translateY(calc(16px + var(--podium-rest-offset)));
  }
  100% {
    opacity: 1;
    transform: translateY(var(--podium-rest-offset));
  }
}

@keyframes podiumAura {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 140, 26, 0.3);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 140, 26, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 140, 26, 0);
  }
}

/* ===== Admin Layout: Sidebar + Main ===== */

.admin-layout {
  --admin-surface: #11151b;
  --admin-surface-raised: #171d25;
  --admin-surface-muted: #0d1117;
  --admin-border: rgba(173, 186, 199, 0.24);
  --admin-border-strong: rgba(173, 186, 199, 0.42);
  --admin-text: #edf2f7;
  --admin-text-muted: #a8b3bf;
  --admin-info: #55add6;
  --admin-success: #53c982;
  --admin-warning: #e3b65b;
  --admin-danger: #e66b6b;
  --admin-neutral: #9da9b5;
  --admin-focus: #f0c674;
  --admin-control-height: 34px;
  --admin-panel-radius: 4px;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

.admin-sidebar {
  width: 240px;
  min-width: 240px;
  background: rgba(10, 10, 15, 0.97);
  border-right: 1px solid rgba(0, 255, 65, 0.2);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.sidebar-brand-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--neon);
  text-transform: uppercase;
}

.sidebar-brand-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

/* ============================================================
   一级分组：折叠"标题区"
   ============================================================ */
.sidebar-group {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(0, 255, 65, 0.06);
}
.sidebar-group:last-of-type {
  border-bottom: none;
}

.sidebar-group-title {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: rgba(123, 214, 168, 0.6);
  font-weight: 700;
  font-family: inherit;
  text-align: left;
  border: 0;
  cursor: pointer;
  user-select: none;
  background: rgba(0, 255, 65, 0.02);
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-group-title:hover {
  background: rgba(0, 255, 65, 0.06);
  color: rgba(123, 214, 168, 0.95);
}
.sidebar-group-title:focus-visible,
.sidebar-subgroup-title:focus-visible,
.sidebar-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.sidebar-group-title:hover .sidebar-chevron {
  color: var(--neon);
}
.sidebar-group-title > span:first-child {
  flex: 1;
}
.sidebar-group.is-open > .sidebar-group-title {
  background: rgba(0, 255, 65, 0.05);
  color: rgba(123, 214, 168, 0.9);
}

.sidebar-group-badge {
  padding: 1px 6px;
  font-size: 9px;
  letter-spacing: 1px;
  background: var(--neon);
  color: #000;
  font-weight: 900;
  border-radius: 2px;
}

/* chevron：明显可见的"展开/收起"图标 */
.sidebar-chevron {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: rgba(123, 214, 168, 0.6);
  width: 14px;
  text-align: center;
  transition: transform 0.2s ease, color 0.2s ease;
}
/* 一级 chevron 用三角，旋转切换 */
.sidebar-group > .sidebar-group-title .sidebar-chevron::before {
  content: '\25B8'; /* ▸ */
}
.sidebar-group.is-open > .sidebar-group-title .sidebar-chevron {
  transform: rotate(90deg);
  color: var(--neon);
}

.sidebar-group-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.18);
}
.sidebar-group.is-open > .sidebar-group-body {
  max-height: 1000px;
  padding: 6px 0 8px;
}

/* ============================================================
   叶子链接：跳转项（前面加 · 表示 item）
   ============================================================ */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px 7px 26px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  border-left: 3px solid transparent;
  position: relative;
  transition: background 0.12s ease, color 0.12s ease, border-left-color 0.12s ease;
}
.sidebar-link::before {
  content: '\B7'; /* · 中点 */
  display: inline-block;
  width: 8px;
  margin-right: 4px;
  color: rgba(255, 255, 255, 0.22);
  font-size: 16px;
  line-height: 0;
  flex-shrink: 0;
}
.sidebar-link:hover {
  background: rgba(0, 240, 255, 0.06);
  color: var(--accent);
  border-left-color: rgba(0, 240, 255, 0.3);
}
.sidebar-link:hover::before {
  color: var(--accent);
}
.sidebar-link.active {
  background: rgba(0, 255, 65, 0.1);
  color: var(--neon);
  border-left-color: var(--neon);
  font-weight: 600;
}
.sidebar-link.active::before {
  color: var(--neon);
}

/* 旧 icon 元素已移除；兼容性保留为隐藏避免老模板残留报错 */
.sidebar-icon { display: none; }

/* ============================================================
   二级子组（宿主层管理）：卡片化样式
   ============================================================ */
.sidebar-subgroup {
  margin: 6px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-left: 2px solid rgba(0, 255, 65, 0.18);
  transition: border-left-color 0.2s ease, background 0.2s ease;
}
.sidebar-subgroup.is-open {
  border-left-color: var(--neon);
  background: rgba(0, 255, 65, 0.04);
}
.sidebar-subgroup-title {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 14px;
  font-size: 12.5px;
  color: rgba(123, 214, 168, 0.85);
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.sidebar-subgroup-title:hover {
  background: rgba(0, 240, 255, 0.05);
  color: var(--accent);
}
.sidebar-subgroup-title:hover .sidebar-chevron {
  color: var(--accent);
}
.sidebar-subgroup-title > span:first-child { flex: 1; }
.sidebar-subgroup-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(235, 242, 255, 0.35);
  letter-spacing: 0;
  font-weight: 400;
  text-transform: none;
}
.sidebar-subgroup.is-open .sidebar-subgroup-count {
  color: rgba(0, 240, 255, 0.6);
}

/* 二级 chevron 用 [+] / [-]，比三角更直白 */
.sidebar-subgroup-title .sidebar-chevron {
  font-size: 14px;
  font-weight: 900;
}
.sidebar-subgroup-title .sidebar-chevron::before {
  content: '+';
}
.sidebar-subgroup.is-open > .sidebar-subgroup-title .sidebar-chevron {
  color: var(--accent);
  transform: none;
}
.sidebar-subgroup.is-open > .sidebar-subgroup-title .sidebar-chevron::before {
  content: '\2212'; /* − */
}

.sidebar-subgroup-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.sidebar-subgroup.is-open > .sidebar-subgroup-body {
  max-height: 400px;
  padding-bottom: 4px;
}

/* 子组里的叶子链接：去掉竖线（父级已有竖条），调整缩进 */
.sidebar-link.sidebar-sublink {
  padding-left: 22px;
  font-size: 12.5px;
  color: rgba(235, 242, 255, 0.7);
  margin-left: 0;
  border-left: 2px solid transparent;
}
.sidebar-link.sidebar-sublink::before {
  content: '\2013'; /* – 短破折号，区别于一级的 · */
  color: rgba(255, 255, 255, 0.22);
  font-size: 11px;
}
.sidebar-link.sidebar-sublink:hover {
  color: var(--neon);
  border-left-color: var(--accent);
  background: rgba(0, 240, 255, 0.05);
}
.sidebar-link.sidebar-sublink:hover::before {
  color: var(--accent);
}
.sidebar-link.sidebar-sublink.active {
  color: var(--neon);
  border-left: 2px solid var(--neon);
  padding-left: 22px;
  background: rgba(0, 255, 65, 0.05);
}
.sidebar-link.sidebar-sublink.active::before {
  color: var(--neon);
}

/* 底部退出/身份区 */
.sidebar-footer-area {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 255, 65, 0.1);
}
.sidebar-logout {
  padding-left: 18px;
  color: rgba(255, 79, 79, 0.7);
  font-size: 12px;
}
.sidebar-logout:hover {
  color: var(--danger);
  background: rgba(255, 79, 79, 0.05);
  border-left-color: var(--danger);
}
.sidebar-identity {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 11px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
}
.sidebar-identity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon);
}

.admin-main {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 12px 28px;
  background: rgba(10, 10, 15, 0.92);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(8px);
}

.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--accent);
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 0;
  cursor: pointer;
}

.admin-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.admin-breadcrumb .sep {
  color: rgba(123, 214, 168, 0.35);
}

.admin-content {
  flex: 1;
  padding: 24px 28px 48px;
}

/* Admin Page Header (replaces old admin-header) */
.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-page-heading {
  display: grid;
  flex: 1 1 320px;
  min-width: 0;
  gap: 6px;
}

.admin-page-title-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-page-title-row h1,
.admin-page-header > h1 {
  margin: 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.admin-page-subtitle,
.admin-page-next-step {
  margin: 0;
  color: var(--admin-text-muted, var(--muted));
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.admin-page-next-step {
  color: var(--admin-info, var(--accent));
}

.admin-page-status {
  flex: 0 0 auto;
}

.admin-page-actions {
  display: flex;
  flex: 0 1 auto;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-page-primary-action {
  order: -1;
}

.admin-page-more-actions {
  position: relative;
}

@media (max-width: 640px) {
  .admin-page-header,
  .admin-page-actions {
    width: 100%;
  }

  .admin-page-actions {
    justify-content: flex-start;
  }
}

/* ===== Admin shared UI primitives (AP1-4b) ===== */

.admin-ui-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: var(--admin-panel-radius, 4px);
  background: var(--admin-surface-muted, #0d1117);
  color: var(--admin-neutral, #9da9b5);
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.admin-ui-tone-info { color: var(--admin-info, #55add6); }
.admin-ui-tone-success { color: var(--admin-success, #53c982); }
.admin-ui-tone-warning { color: var(--admin-warning, #e3b65b); }
.admin-ui-tone-danger { color: var(--admin-danger, #e66b6b); }
.admin-ui-tone-neutral { color: var(--admin-neutral, #9da9b5); }

.admin-ui-feedback,
.admin-ui-access,
.admin-ui-progress,
.admin-ui-readonly {
  width: 100%;
  border: 1px solid var(--admin-border, rgba(173, 186, 199, 0.24));
  border-left: 3px solid currentColor;
  border-radius: var(--admin-panel-radius, 4px);
  background: var(--admin-surface, #11151b);
  color: var(--admin-text, #edf2f7);
}

.admin-ui-feedback,
.admin-ui-access,
.admin-ui-progress {
  padding: 12px 14px;
}

.admin-ui-feedback.admin-ui-tone-info { border-left-color: var(--admin-info, #55add6); }
.admin-ui-feedback.admin-ui-tone-success { border-left-color: var(--admin-success, #53c982); }
.admin-ui-feedback.admin-ui-tone-warning { border-left-color: var(--admin-warning, #e3b65b); }
.admin-ui-feedback.admin-ui-tone-danger { border-left-color: var(--admin-danger, #e66b6b); }
.admin-ui-feedback.admin-ui-tone-neutral { border-left-color: var(--admin-neutral, #9da9b5); }

.admin-ui-feedback-title,
.admin-ui-access-title,
.admin-ui-toast-title {
  display: block;
  margin-bottom: 4px;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
}

.admin-ui-feedback-message,
.admin-ui-access-message,
.admin-ui-toast-message {
  display: block;
  color: var(--admin-text-muted, #a8b3bf);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.admin-ui-feedback-details {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--admin-text-muted, #a8b3bf);
  font-size: 13px;
}

.admin-ui-feedback-details li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-ui-feedback-details li + li { margin-top: 3px; }

.admin-ui-diagnostics {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 10px;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--admin-border, rgba(173, 186, 199, 0.24));
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0;
}

.admin-ui-diagnostics dt { color: var(--admin-text-muted, #a8b3bf); }
.admin-ui-diagnostics dd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  margin: 0;
  color: var(--admin-text, #edf2f7);
  overflow-wrap: anywhere;
}

.admin-ui-diagnostics dd > span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-ui-diagnostic-copy {
  flex: 0 0 auto;
  padding: 1px 5px;
  border: 1px solid var(--admin-border, #34414f);
  border-radius: 3px;
  background: transparent;
  color: var(--admin-text-muted, #a8b3bf);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.admin-ui-diagnostic-copy:hover {
  border-color: var(--admin-info, #55add6);
  color: var(--admin-text, #edf2f7);
}

.admin-ui-diagnostic-copy:focus-visible {
  outline: 2px solid var(--admin-focus, #f0c674);
  outline-offset: 2px;
}

.admin-ui-toast-region {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: grid;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  gap: 8px;
  pointer-events: none;
}

.admin-ui-toast {
  position: relative;
  min-height: 58px;
  padding: 11px 42px 11px 13px;
  border: 1px solid currentColor;
  border-radius: var(--admin-panel-radius, 4px);
  background: #171d25;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  pointer-events: auto;
}

.admin-ui-toast-close {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.admin-ui-toast-close:focus-visible,
.admin-confirm-dialog input:focus-visible,
.admin-ui-is-readonly [data-admin-write]:focus-visible {
  outline: 2px solid var(--admin-focus, #f0c674);
  outline-offset: 2px;
}

.admin-ui-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-ui-progress-label {
  min-width: 0;
  color: var(--admin-text, #edf2f7);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.admin-ui-progress-value {
  flex: 0 0 auto;
  color: var(--admin-text-muted, #a8b3bf);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.admin-ui-progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--admin-border, rgba(173, 186, 199, 0.24));
  background: var(--admin-surface-muted, #0d1117);
}

.admin-ui-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--admin-info, #55add6);
  transition: width 180ms ease;
}

.admin-ui-progress-meta {
  display: block;
  margin-top: 8px;
  color: var(--admin-text-muted, #a8b3bf);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-ui-progress[data-state='succeeded'] .admin-ui-progress-bar,
.admin-ui-progress[data-state='done'] .admin-ui-progress-bar {
  background: var(--admin-success, #53c982);
}

.admin-ui-progress[data-state='partial'] .admin-ui-progress-bar,
.admin-ui-progress[data-state='partially_succeeded'] .admin-ui-progress-bar {
  background: var(--admin-warning, #e3b65b);
}

.admin-ui-progress[data-state='failed'] .admin-ui-progress-bar,
.admin-ui-progress[data-state='error'] .admin-ui-progress-bar {
  background: var(--admin-danger, #e66b6b);
}

.admin-ui-readonly {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-left-color: var(--admin-warning, #e3b65b);
  color: var(--admin-warning, #e3b65b);
  font-size: 12px;
  line-height: 1.5;
}

.admin-ui-is-readonly [data-admin-write] {
  cursor: not-allowed;
  opacity: 0.5;
}

.admin-ui-access {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.admin-ui-access-forbidden { border-left-color: var(--admin-danger, #e66b6b); }
.admin-ui-access-readonly { border-left-color: var(--admin-warning, #e3b65b); }

.admin-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.66);
}

.admin-confirm-dialog {
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--admin-danger, #e66b6b);
  border-left: 4px solid var(--admin-danger, #e66b6b);
  border-radius: var(--admin-panel-radius, 4px);
  background: var(--admin-surface, #11151b);
  color: var(--admin-text, #edf2f7);
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.admin-confirm-dialog h2 {
  margin: 0 0 8px;
  color: var(--admin-danger, #e66b6b);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

.admin-confirm-message,
.admin-confirm-impact {
  margin: 0 0 12px;
  color: var(--admin-text-muted, #a8b3bf);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.admin-confirm-impact {
  padding: 10px 12px;
  border: 1px solid rgba(230, 107, 107, 0.35);
  background: rgba(230, 107, 107, 0.08);
  color: var(--admin-text, #edf2f7);
}

.admin-confirm-typed {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: var(--admin-text-muted, #a8b3bf);
  font-size: 12px;
}

.admin-confirm-typed input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(230, 107, 107, 0.45);
  border-radius: var(--admin-panel-radius, 4px);
  background: var(--admin-surface-muted, #0d1117);
  color: var(--admin-text, #edf2f7);
  padding: 8px 10px;
  font-family: var(--font);
}

.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.admin-action-risk-low {
  border-color: var(--admin-info, #55add6);
  border-left-color: var(--admin-info, #55add6);
}

.admin-action-risk-medium {
  border-color: var(--admin-warning, #e3b65b);
  border-left-color: var(--admin-warning, #e3b65b);
}

.admin-action-risk-high,
.admin-action-risk-critical {
  border-color: var(--admin-danger, #e66b6b);
  border-left-color: var(--admin-danger, #e66b6b);
}

@media (max-width: 480px) {
  .admin-ui-toast-region {
    top: auto;
    bottom: 8px;
    right: 8px;
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .admin-ui-diagnostics { grid-template-columns: 1fr; }
  .admin-ui-diagnostics dd { margin-bottom: 5px; }
  .admin-ui-progress-header { align-items: flex-start; }
  .admin-confirm-overlay { padding: 12px; }
  .admin-confirm-dialog { max-height: calc(100vh - 24px); }
  .admin-confirm-actions { flex-direction: column-reverse; }
  .admin-confirm-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-ui-progress-bar { transition: none; }
}

/* Dashboard Stats */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.dashboard-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: -6px 0 20px;
}

.dash-stat {
  padding: 16px;
  border-radius: 0;
  border: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(10, 10, 15, 0.6);
  min-height: 108px;
  display: flex;
  flex-direction: column;
}

.dash-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 6px;
}

.dash-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--neon);
  min-height: 36px;
  display: flex;
  align-items: center;
  line-height: 1.1;
}

.dash-stat-chip {
  font-size: 14px;
  font-weight: 600;
  vertical-align: middle;
}

.dash-stat-accent .dash-stat-value {
  color: var(--accent);
}

.dash-stat-warn .dash-stat-value {
  color: var(--warn);
}

/* Dashboard Sections */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
}

.dashboard-operations {
  margin-bottom: 20px;
}

.dash-section {
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: 0;
  background: rgba(10, 10, 15, 0.5);
  padding: 16px;
}

.dash-section-title {
  font-size: 14px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0;
}

.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.dash-section-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
}

.dash-section-link:hover {
  color: var(--neon);
}

.dash-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.06);
}

.dash-item:last-child {
  border-bottom: none;
}

.dash-item-label {
  color: var(--text);
}

.dash-item-value {
  color: var(--muted);
}

.dash-status-chip {
  margin-left: 6px;
}

.empty-state-block {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  border: 1px dashed rgba(0, 240, 255, 0.25);
  border-radius: 0;
}

.empty-state-icon {
  font-size: 16px;
  color: var(--accent);
}

.empty-state-text {
  font-size: 12px;
}

.dash-overflow-hint {
  padding: 6px 0;
  font-size: 12px;
  color: var(--muted);
}

.dash-submission-user {
  color: var(--accent);
}

.dash-submission-arrow {
  margin: 0 4px;
  color: var(--muted);
}

.dash-submission-ok {
  color: var(--neon);
}

.dash-submission-fail {
  color: var(--danger);
}

.dash-team-item:nth-child(even) {
  background: rgba(0, 240, 255, 0.04);
}

.virt-overview-stats {
  margin-bottom: 0;
}

/* Settings Page */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.settings-card {
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 0;
  background: rgba(10, 10, 15, 0.55);
  padding: 18px;
}

.settings-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--accent);
}

.settings-card p {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
}

.settings-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.settings-import-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-import-form input[type="file"] {
  color: var(--text);
  padding: 8px 10px;
  border-radius: 0;
  border: 1px dashed rgba(0, 240, 255, 0.35);
  background: rgba(10, 10, 15, 0.72);
}

.settings-import-form input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 0;
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent);
  padding: 6px 10px;
  cursor: pointer;
}

.settings-card.danger-zone {
  border-color: rgba(255, 79, 79, 0.35);
}

.settings-card.danger-zone h3 {
  color: var(--danger);
}

.competition-section-card {
  margin-bottom: 24px;
}

.competition-section-card:last-of-type {
  margin-bottom: 0;
}

.competition-select-list {
  max-height: 280px;
  overflow-y: auto;
}

/* ===========================================================
   Challenge Picker — 比赛 → 本场题目 美化版
   挂在 .select-box.challenge-picker 上，与旧 .select-list 共存
   =========================================================== */
.challenge-picker {
  border: 1px solid rgba(0, 240, 255, 0.22);
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.025), rgba(0, 0, 0, 0.35));
  padding: 16px 18px;
  gap: 14px;
}

.cp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cp-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cp-title {
  font-family: 'Orbitron', 'Noto Sans SC', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: rgba(235, 242, 255, 0.95);
}
.cp-count-chip {
  padding: 2px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: rgba(0, 240, 255, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.32);
  background: rgba(0, 240, 255, 0.06);
  border-radius: 2px;
}
.cp-count-chip b {
  color: #fff;
  font-weight: 700;
  font-family: 'Orbitron', monospace;
  margin: 0 1px;
}

.cp-actions {
  display: flex;
  gap: 6px;
}
.cp-action-btn {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.28);
  color: rgba(0, 240, 255, 0.85);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cp-action-btn:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.55);
  color: #fff;
}

.cp-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.cp-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.cp-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: rgba(235, 242, 255, 0.4);
  pointer-events: none;
}
.cp-search-input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 240, 255, 0.18);
  color: rgba(235, 242, 255, 0.95);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cp-search-input:focus {
  border-color: rgba(0, 240, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.2);
}

.cp-filter-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.cp-pill {
  padding: 4px 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(235, 242, 255, 0.55);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.cp-pill:hover {
  color: rgba(235, 242, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
}
.cp-pill.is-active {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.55);
  color: rgba(0, 240, 255, 0.95);
}
.cp-pill-only-selected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cp-pill-only-selected .cp-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 255, 65, 0.8);
  box-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
}
.cp-pill-only-selected.is-active {
  background: rgba(0, 255, 65, 0.08);
  border-color: rgba(0, 255, 65, 0.55);
  color: rgba(0, 255, 65, 0.95);
}

.cp-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 4px 6px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(0, 240, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}
.cp-list::-webkit-scrollbar {
  width: 6px;
}
.cp-list::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.18);
}
.cp-list::-webkit-scrollbar-track {
  background: transparent;
}

/* 让 row 在新样式下重置，但保留 checkbox-line 的兼容 */
.cp-row {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 14px 10px 12px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  font-size: 12.5px;
  color: rgba(235, 242, 255, 0.9);
}
.cp-row:hover {
  background: rgba(0, 240, 255, 0.04);
  border-color: rgba(0, 240, 255, 0.18);
}
.cp-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}
.cp-row-tick {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(235, 242, 255, 0.28);
  background: rgba(0, 0, 0, 0.45);
  color: transparent;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.cp-row-tick svg {
  width: 12px;
  height: 12px;
}
.cp-row:hover .cp-row-tick {
  border-color: rgba(0, 240, 255, 0.5);
}
.cp-row input[type="checkbox"]:checked ~ .cp-row-tick {
  background: rgba(0, 255, 65, 0.85);
  border-color: rgba(0, 255, 65, 0.85);
  color: #050608;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.45);
}
.cp-row:has(input[type="checkbox"]:checked) {
  background: rgba(0, 255, 65, 0.06);
  border-color: rgba(0, 255, 65, 0.2);
  border-left-color: rgba(0, 255, 65, 0.85);
}

.cp-row-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cp-row-title {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}
.cp-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: rgba(235, 242, 255, 0.55);
}
.cp-row-id {
  color: rgba(235, 242, 255, 0.42);
}
.cp-row-cat,
.cp-row-diff,
.cp-row-pts,
.cp-row-flag {
  padding: 1px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(235, 242, 255, 0.65);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.cp-row-pts {
  color: rgba(255, 209, 102, 0.85);
  border-color: rgba(255, 209, 102, 0.28);
  background: rgba(255, 209, 102, 0.06);
}
.cp-row-flag {
  color: rgba(180, 130, 255, 0.85);
  border-color: rgba(180, 130, 255, 0.28);
  background: rgba(180, 130, 255, 0.05);
}
.cp-row-diff.cp-diff-easy,
.cp-row-diff.cp-diff-入门,
.cp-row-diff.cp-diff-简单 {
  color: rgba(0, 255, 65, 0.85);
  border-color: rgba(0, 255, 65, 0.3);
  background: rgba(0, 255, 65, 0.06);
}
.cp-row-diff.cp-diff-medium,
.cp-row-diff.cp-diff-med,
.cp-row-diff.cp-diff-中等 {
  color: rgba(255, 209, 102, 0.85);
  border-color: rgba(255, 209, 102, 0.3);
  background: rgba(255, 209, 102, 0.06);
}
.cp-row-diff.cp-diff-hard,
.cp-row-diff.cp-diff-困难 {
  color: rgba(255, 140, 26, 0.92);
  border-color: rgba(255, 140, 26, 0.32);
  background: rgba(255, 140, 26, 0.06);
}
.cp-row-diff.cp-diff-insane,
.cp-row-diff.cp-diff-地狱,
.cp-row-diff.cp-diff-噩梦 {
  color: rgba(255, 79, 79, 0.92);
  border-color: rgba(255, 79, 79, 0.32);
  background: rgba(255, 79, 79, 0.06);
}

.cp-empty {
  padding: 36px 20px;
  text-align: center;
  color: rgba(235, 242, 255, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.cp-empty-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', monospace;
  font-size: 22px;
  color: rgba(0, 240, 255, 0.35);
  border: 1px dashed rgba(0, 240, 255, 0.25);
  margin-bottom: 4px;
}
.cp-empty-title {
  font-size: 13px;
  color: rgba(235, 242, 255, 0.85);
}
.cp-empty-sub {
  font-size: 11px;
  color: rgba(235, 242, 255, 0.45);
  font-family: 'JetBrains Mono', monospace;
}

.cp-foot {
  font-size: 11px;
  color: rgba(235, 242, 255, 0.45);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.3px;
  padding-top: 2px;
}

.cp-row.row-hidden,
.cp-row.cp-hidden-cat,
.cp-row.cp-hidden-only-selected {
  display: none !important;
}

@media (max-width: 720px) {
  .cp-toolbar { flex-direction: column; align-items: stretch; }
  .cp-filter-pills { width: 100%; }
}

.competition-results .competition-result-tab {
  min-width: 60px;
  padding: 6px 16px;
}

.competition-results td.rank-1 {
  color: var(--legendary);
  font-weight: 700;
}

.competition-results td.rank-2 {
  color: var(--muted);
  font-weight: 700;
}

.competition-results td.rank-3 {
  color: var(--warn);
  font-weight: 700;
}

.users-submit-btn {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.35);
  color: var(--accent);
}

.users-submit-btn:hover {
  background: rgba(0, 240, 255, 0.16);
}

.virt-card-desc {
  color: rgba(214, 255, 224, 0.86);
}

/* Mobile: sidebar collapse */
@media (max-width: 900px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  }

  .sidebar-toggle {
    display: block;
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-content {
    padding: 16px 14px 40px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Admin Users Page ===== */

/* 顶部栏：左右分区 */
.pagination-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pagination-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pagination-search {
  padding: 6px 10px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  width: 200px;
  transition: border-color 0.2s;
}
.pagination-search:focus {
  outline: none;
  border-color: rgba(0, 240, 255, 0.6);
}
.pagination-search::placeholder {
  color: var(--muted);
}

.user-search-form {
  gap: 8px;
}

/* 批量操作横排三列 */
.bulk-filter-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  background: rgba(0, 240, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: 3px;
}
.bulk-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bulk-hint {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

/* 分区分隔线 */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 240, 255, 0.12);
}

/* CSV 格式说明块 */
.bulk-format-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: rgba(0, 240, 255, 0.04);
  border-left: 2px solid rgba(0, 240, 255, 0.3);
  border-radius: 0 3px 3px 0;
  margin-bottom: 12px;
  font-size: 12px;
}
.bulk-format-hint code {
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  color: var(--accent);
  background: rgba(0, 240, 255, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}

/* Learning Center */
.learn-hero {
  max-width: 1180px;
  margin: 0 auto 22px;
  padding: 36px 4px 12px;
}
.learn-hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: 2px;
  color: var(--text);
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.18);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(0, 240, 255, 0.24);
  background: rgba(0, 240, 255, 0.06);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.learn-tracks-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.learn-track-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.learn-track-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 240, 255, 0.4);
  background: rgba(0, 240, 255, 0.035);
}
.track-card-top,
.track-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.track-card-top {
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.track-card-title {
  font-family: 'Orbitron', var(--font);
  font-size: 22px;
  color: var(--text);
  letter-spacing: 1px;
}
.track-card-desc {
  min-height: 46px;
  margin: 0;
  line-height: 1.65;
}
.track-progress-bar {
  position: relative;
  flex: 1;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.track-progress-fill {
  height: 100%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon);
  transition: width 0.2s ease;
}
.track-progress-label {
  flex: 0 0 auto;
  font-size: 12px;
}
.learn-empty {
  grid-column: 1 / -1;
}
.learn-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 260px;
  gap: 0;
  min-height: calc(100vh - 64px);
  margin: -24px -32px;
}
.learn-sidebar {
  position: sticky;
  top: 73px;
  align-self: start;
  height: calc(100vh - 73px);
  padding: 28px 18px;
  border-right: 1px solid rgba(0, 255, 65, 0.14);
  background: rgba(0, 0, 0, 0.22);
}
.learn-sidebar-track-title {
  margin-bottom: 18px;
  color: var(--accent);
  font-family: 'Orbitron', var(--font);
  font-size: 14px;
  letter-spacing: 1px;
}
.learn-chapter-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.learn-chapter-link {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 11px 10px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.learn-chapter-link:hover {
  color: var(--text);
  background: rgba(0, 240, 255, 0.04);
}
.learn-chapter-link.done {
  border-left-color: var(--neon);
  color: rgba(235, 242, 255, 0.72);
}
.learn-chapter-link.active {
  border-left-color: var(--accent);
  color: var(--text);
  background: rgba(0, 240, 255, 0.07);
}
.chapter-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(235, 242, 255, 0.28);
}
.learn-chapter-link.done .chapter-status-dot {
  background: var(--neon);
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}
.learn-chapter-link.active .chapter-status-dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}
.learn-content-main {
  min-width: 0;
  padding: 28px;
}
.learn-content-header {
  margin-bottom: 12px;
}
.learn-content-header h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  color: var(--text);
}
.learn-content-body {
  min-height: 620px;
  padding: 26px;
}
.learn-html-frame {
  width: 100%;
  min-height: 600px;
  border: none;
  background: #fff;
}
.learn-md-body {
  max-width: 920px;
  color: var(--text);
  line-height: 1.82;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.learn-md-body h1,
.learn-md-body h2,
.learn-md-body h3 {
  color: var(--text);
  line-height: 1.35;
  margin: 1.6em 0 0.6em;
}
.learn-md-body h1 {
  font-size: 30px;
  margin-top: 0;
}
.learn-md-body h2 {
  font-size: 22px;
  padding-bottom: 0.35em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.learn-md-body h3 {
  font-size: 18px;
}
.learn-md-body p,
.exercise-writeup-body p {
  margin: 0 0 1em;
}
.learn-md-body ul,
.learn-md-body ol,
.exercise-writeup-body ul,
.exercise-writeup-body ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}
.learn-md-body li,
.exercise-writeup-body li {
  margin: 0.35em 0;
}
.learn-md-body blockquote,
.exercise-writeup-body blockquote {
  margin: 1.2em 0;
  padding: 0.1em 0 0.1em 1em;
  border-left: 3px solid rgba(255, 255, 255, 0.16);
  color: rgba(235, 242, 255, 0.72);
}
.learn-md-body hr,
.exercise-writeup-body hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 1.5em 0;
}
.learn-md-body code,
.exercise-writeup-body code {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(248, 250, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.92em;
}
.learn-md-body pre,
.exercise-writeup-body pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 8, 14, 0.9);
  border-radius: 8px;
  line-height: 1.7;
}
.learn-md-body pre code,
.exercise-writeup-body pre code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: rgba(240, 244, 255, 0.92);
  font-size: 0.94em;
}
.learn-md-body a,
.exercise-writeup-body a {
  color: var(--accent);
}
.learn-complete-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.learn-exercise-panel {
  position: sticky;
  top: 73px;
  align-self: start;
  height: calc(100vh - 73px);
  overflow-y: auto;
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}
.exercise-panel-title {
  margin-bottom: 16px;
  color: var(--accent);
  font-family: 'Orbitron', var(--font);
  letter-spacing: 1px;
}
.exercise-item {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.exercise-item.solved {
  border-left: 2px solid var(--neon);
  padding-left: 10px;
}
.exercise-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.exercise-item-name {
  min-width: 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.exercise-item-desc {
  margin: 10px 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.exercise-actions {
  margin-bottom: 10px;
}
.btn-sm {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}
.exercise-flag-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}
.exercise-step-select {
  grid-column: 1 / -1;
}
.exercise-flag-input,
.exercise-step-select {
  width: 100%;
  border: 1px solid rgba(0, 255, 65, 0.18);
  background: rgba(0, 0, 0, 0.38);
  color: var(--text);
  font-family: var(--font);
  padding: 9px 10px;
}
.exercise-submit-state {
  grid-column: 1 / -1;
  min-height: 16px;
  font-size: 12px;
}
.exercise-writeup {
  margin-top: 12px;
  border: 1px solid rgba(0, 240, 255, 0.12);
  background: rgba(0, 240, 255, 0.025);
}
.exercise-writeup-toggle {
  cursor: pointer;
  padding: 9px 10px;
  color: var(--accent);
  font-size: 12px;
}
.exercise-writeup-body {
  padding: 0 10px 12px;
  color: var(--text-soft);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.exercise-panel-footer {
  position: sticky;
  bottom: 0;
  margin: 16px -18px -18px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.82);
  border-top: 1px solid rgba(0, 255, 65, 0.12);
}
.chapter-link-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.chapter-done-check {
  margin-left: auto;
  font-size: 11px;
  color: var(--neon);
}
.text-neon {
  color: var(--neon);
}
.learn-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  margin-bottom: 20px;
}
.learn-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  margin-bottom: -1px;
}
.learn-tab:hover {
  color: var(--text);
  background: rgba(0, 240, 255, 0.035);
}
.learn-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.learn-tab-panel.hidden {
  display: none;
}
.learn-writeup-section {
  padding: 20px 0;
}
.learn-writeup-section:first-child {
  padding-top: 0;
}
.learn-writeup-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.learn-writeup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.learn-writeup-title {
  font-weight: 700;
  color: var(--text);
}
.learn-exercise-block {
  padding: 24px 0;
}
.learn-exercise-block:first-child {
  padding-top: 0;
}
.learn-exercise-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.learn-exercise-block.solved {
  border-left: 2px solid var(--neon);
  padding-left: 16px;
}
.learn-exercise-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.learn-exercise-name {
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
}
.learn-exercise-desc {
  margin: 0 0 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.learn-exercise-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.learn-exercise-note {
  margin-top: 10px;
}
.learn-exercise-progress {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 255, 65, 0.12);
}

.learn-exercise-progress .track-progress-bar {
  display: block;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
  margin-bottom: 6px;
}

.learn-exercise-progress .track-progress-fill {
  height: 100%;
  background: var(--neon);
  transition: width 0.6s ease;
  min-width: 0;
}
.learn-arena-embed-wrap {
  padding: 20px 0;
  border-top: 1px solid rgba(0, 255, 65, 0.1);
}

.learn-arena-embed-wrap:first-child {
  border-top: none;
}

.learn-arena-embed-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.learn-arena-embed-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 28px;
}

.learn-arena-frame {
  display: block;
  width: 100%;
  min-height: 200px;
  border: none;
  background: transparent;
}
.learn-side-panel {
  position: sticky;
  top: 73px;
  align-self: start;
  height: calc(100vh - 73px);
  overflow-y: auto;
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}
.side-panel-section {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.1);
}
.side-panel-section:last-child {
  border-bottom: none;
}
.side-panel-title {
  color: var(--accent);
  font-family: 'Orbitron', var(--font);
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.side-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}
.side-stat-value {
  font-weight: 700;
  font-size: 18px;
}
.side-exercise-entry {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.side-exercise-entry:last-child {
  border-bottom: none;
}
.side-exercise-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}
.side-exercise-name {
  color: var(--text);
  font-size: 13px;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.side-exercise-entry.solved .side-exercise-name {
  color: var(--muted);
}
.side-exercise-btn {
  width: 100%;
  text-align: center;
}
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-learning-table {
  margin-top: 16px;
}
.admin-learning-editor {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.admin-learning-chapter-nav {
  position: sticky;
  top: 88px;
}
.admin-learning-chapter-nav .sidebar-link {
  margin: 4px 0;
}
.admin-learning-new-chapter-form {
  margin-top: 12px;
}
.admin-learning-new-chapter-form .btn {
  width: 100%;
}
.admin-learning-textarea {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.65;
}
.admin-learning-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 24px 0;
}
.admin-learning-switches {
  margin-top: 12px;
}
.admin-learning-upload-form {
  margin-top: 16px;
}
.admin-learning-binding-card {
  margin-bottom: 12px;
}
.admin-learning-search {
  width: 100%;
  margin-bottom: 12px;
  padding: 9px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(0, 255, 65, 0.18);
  color: var(--text);
  font-family: var(--font);
}
.admin-learning-challenge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}
.admin-learning-bind-form {
  margin-left: auto;
}
.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chip-html {
  border-color: rgba(0, 240, 255, 0.28);
  color: var(--accent);
}
.chip-markdown {
  border-color: rgba(0, 255, 65, 0.22);
  color: var(--neon);
}
.learn-page,
.learn-layout {
  display: block;
  margin: -24px -32px;
  min-height: calc(100vh - 64px);
}
.learn-chapter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 28px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(0, 255, 65, 0.1);
  flex-wrap: wrap;
}
.learn-chapter-bar-left,
.learn-chapter-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.learn-back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}
.learn-back-link:hover {
  color: var(--neon);
}
.learn-bar-sep {
  color: rgba(255, 255, 255, 0.2);
}
.learn-bar-track {
  color: var(--muted);
  font-size: 13px;
}
.learn-chapter-select {
  max-width: 260px;
  padding: 5px 8px;
  border: 1px solid rgba(0, 255, 65, 0.2);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
}
.learn-bar-count,
.learn-bar-learners {
  font-size: 12px;
}
.learn-page .learn-tab-bar {
  display: flex;
  gap: 0;
  padding: 0 28px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  background: rgba(0, 0, 0, 0.15);
}
.learn-page .learn-tab-panel.hidden {
  display: none;
}
.learn-html-frame-full {
  display: block;
  width: 100%;
  height: calc(100vh - 156px);
  border: none;
  background: #fff;
}
.learn-content-prose {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 28px;
}
.learn-page .learn-complete-bar {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px 32px;
}
.learn-env-block {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background: rgba(0, 240, 255, 0.03);
}
.learn-env-summary {
  margin: 0 0 10px;
  font-size: 13px;
}
.learn-env-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.learn-env-runtime {
  margin-top: 14px;
}
.learn-env-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.learn-env-inline-label {
  margin-left: 16px;
}
.learn-env-endpoint {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.learn-env-progress-track {
  margin-top: 8px;
}
.learn-exercise-links {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  flex-wrap: wrap;
}
.learn-inline-flag-form {
  margin-top: 16px;
}
.learn-page .learn-exercise-block.solved {
  border-left: 3px solid var(--neon);
  padding-left: 16px;
}

@media (max-width: 1200px) {
  .learn-layout {
    grid-template-columns: 200px minmax(0, 1fr) 240px;
  }
}

@media (max-width: 960px) {
  .admin-learning-editor {
    grid-template-columns: 1fr;
  }
  .admin-learning-chapter-nav {
    position: relative;
    top: auto;
  }
}

@media (max-width: 768px) {
  .learn-page,
  .learn-layout {
    margin: -24px -18px;
  }
  .learn-chapter-bar {
    padding: 8px 16px;
  }
  .learn-page .learn-tab-bar {
    padding: 0 16px;
    overflow-x: auto;
  }
  .learn-content-prose {
    padding: 20px 16px;
  }
  .learn-html-frame-full {
    height: calc(100vh - 180px);
  }
}

@media (max-width: 960px) {
  .learn-layout {
    grid-template-columns: 1fr;
    margin: -24px -18px;
  }
  .learn-sidebar {
    display: none;
  }
  .learn-content-main {
    padding: 18px;
  }
  .learn-exercise-panel,
  .learn-side-panel {
    position: relative;
    top: auto;
    order: -1;
    height: auto;
    border-left: 0;
    border-bottom: 1px solid rgba(0, 255, 65, 0.14);
  }
}

/* Learning immersive chapter page */
.learn-immersive-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 52px;
  padding: 0 24px;
  background: rgba(0, 0, 0, 0.75);
  border-bottom: 1px solid rgba(0, 255, 65, 0.1);
  backdrop-filter: blur(20px);
}

.learn-itb-left {
  display: flex;
  align-items: center;
}

.learn-itb-back {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: color 0.15s ease;
}

.learn-itb-back:hover {
  color: var(--text);
}

.learn-itb-center {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.learn-itb-track {
  color: var(--muted);
}

.learn-itb-sep {
  color: rgba(255, 255, 255, 0.2);
}

.learn-itb-chapter {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-weight: 500;
}

.learn-itb-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.learn-itb-logout {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s ease;
}

.learn-itb-logout:hover {
  color: var(--text);
}

.learn-control-bar {
  position: sticky;
  top: 52px;
  z-index: 9;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  gap: 16px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: none;
  backdrop-filter: blur(16px);
}

.learn-ctrl-left,
.learn-ctrl-center,
.learn-ctrl-right {
  display: flex;
  align-items: center;
}

.learn-ctrl-center {
  justify-content: center;
  gap: 0;
}

.learn-ctrl-right {
  justify-content: flex-end;
  gap: 10px;
}

.learn-control-bar .learn-tab {
  height: 44px;
  padding: 0 16px;
  margin-bottom: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.learn-control-bar .learn-tab:hover {
  color: var(--text);
}

.learn-control-bar .learn-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  margin-bottom: -2px;
}

.learn-chapter-picker {
  position: relative;
}

.learn-chapter-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  max-width: 240px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 65, 0.18);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease;
  white-space: nowrap;
}

.learn-chapter-trigger:hover,
.learn-chapter-picker.open .learn-chapter-trigger {
  border-color: rgba(0, 240, 255, 0.4);
}

.chapter-trigger-index {
  min-width: 18px;
  color: var(--accent);
  font-family: 'Orbitron', var(--font);
  font-size: 15px;
  font-weight: 700;
}

.chapter-trigger-slash {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}

.chapter-trigger-name {
  flex: 1;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-trigger-caret {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 10px;
  transition: transform 0.15s ease;
}

.learn-chapter-picker.open .chapter-trigger-caret {
  transform: rotate(180deg);
}

.learn-chapter-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 100;
  min-width: 260px;
  max-height: 320px;
  overflow-y: auto;
  background: rgba(10, 10, 20, 0.97);
  border: 1px solid rgba(0, 255, 65, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
}

.learn-chapter-menu[hidden] {
  display: none;
}

.learn-chapter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.12s ease, color 0.12s ease;
}

.learn-chapter-option:last-child {
  border-bottom: none;
}

.learn-chapter-option:hover {
  background: rgba(0, 240, 255, 0.06);
  color: var(--text);
}

.learn-chapter-option.active {
  border-left: 2px solid var(--accent);
  background: rgba(0, 240, 255, 0.08);
  color: var(--accent);
}

.chapter-opt-num {
  min-width: 16px;
  flex-shrink: 0;
  color: var(--accent);
  font-family: 'Orbitron', var(--font);
  font-size: 11px;
}

.chapter-opt-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chapter-opt-status {
  flex-shrink: 0;
  font-size: 11px;
}

.learn-ctrl-nav {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.learn-ctrl-nav:hover {
  color: var(--accent);
  border-color: rgba(0, 240, 255, 0.3);
}

.learn-ctrl-stat {
  font-size: 12px;
  white-space: nowrap;
}

.learn-progress-track {
  position: sticky;
  top: 96px;
  z-index: 8;
  margin-top: 2px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.learn-progress-fill {
  position: relative;
  height: 100%;
  min-width: 0;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.85), rgba(255, 127, 80, 0.85));
  transition: width 1s ease;
}

.learn-progress-fill::after {
  content: '';
  position: absolute;
  top: -2px;
  right: 0;
  width: 40px;
  height: 7px;
  background: inherit;
  filter: blur(6px);
  opacity: 0.55;
}

.learn-progress-fill.is-empty {
  width: 0 !important;
}

.learn-progress-fill.is-empty::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 100%;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.18), rgba(255, 127, 80, 0.16));
  background-size: 200% 100%;
  animation: emptyProgressGlow 5s linear infinite;
}

.learn-progress-fill.is-empty::after {
  display: none;
}

@keyframes emptyProgressGlow {
  0% {
    opacity: 0.45;
    background-position: 100% center;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.45;
    background-position: -100% center;
  }
}

.learn-page {
  display: block;
  margin: -24px -32px;
}

.learn-html-frame-full {
  display: block;
  width: 100%;
  height: calc(100vh - 99px);
  border: none;
  background: #fff;
}

.learn-content-prose {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 28px 36px;
}

.track-overview-hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 36px 28px 24px;
}

.track-overview-back {
  margin-bottom: 20px;
}

.track-overview-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.track-overview-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.track-overview-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 44px);
}

.track-overview-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

.track-overview-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.track-stat-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.track-stat-value {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
}

.track-stat-label {
  font-size: 12px;
}

.track-stat-sep-dot {
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
}

.track-overview-bar {
  width: 100%;
  max-width: 480px;
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
}

.track-overview-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon), var(--accent));
  transition: width 0.8s ease;
}

.track-overview-cta {
  align-self: flex-start;
  margin-top: 8px;
  padding: 12px 28px;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.track-chapter-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 28px 48px;
}

.track-chapter-list-title {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.1);
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.track-chapter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease;
}

.track-chapter-row:hover {
  background: rgba(0, 240, 255, 0.04);
}

.track-chapter-row.completed .track-chapter-name {
  color: var(--muted);
}

.track-chapter-row.in-progress .track-chapter-name {
  color: var(--accent);
}

.track-chapter-row-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.track-chapter-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.track-ch-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted);
  font-size: 12px;
}

.track-ch-icon.done {
  border-color: rgba(0, 255, 65, 0.4);
  background: rgba(0, 255, 65, 0.08);
  color: var(--neon);
}

.track-ch-icon.active {
  border-color: rgba(0, 240, 255, 0.5);
  background: rgba(0, 240, 255, 0.08);
  color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.track-chapter-name {
  font-size: 15px;
  font-weight: 500;
}

.track-chapter-status {
  margin-top: 2px;
  font-size: 12px;
}

.track-chapter-arrow {
  font-size: 14px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.track-chapter-row:hover .track-chapter-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ── Accordion 分节样式 ── */
.track-section {
  border: 1px solid #1e293b;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
.track-section.done { border-color: rgba(16,185,129,.25); }
.track-section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #0f172a;
  border: none;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  gap: 12px;
  transition: background .15s;
}
.track-section-header:hover { background: #1e293b; }
.track-section-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.track-section-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.track-section-icon {
  font-size: .75rem;
  width: 20px;
  text-align: center;
  color: var(--muted);
  flex-shrink: 0;
}
.track-section.open .track-section-icon,
.track-section.done .track-section-icon { color: var(--neon); }
.track-section-title-text {
  font-size: .95rem;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: .02em;
}
.track-section-count {
  font-size: .8rem;
  white-space: nowrap;
}
.track-section-minibar {
  width: 60px;
  height: 4px;
  background: #1e293b;
  border-radius: 2px;
  overflow: hidden;
}
.track-section-minibar-fill {
  height: 100%;
  background: var(--neon);
  border-radius: 2px;
  transition: width .3s;
}
.track-section.done .track-section-minibar-fill { background: var(--neon); }
.track-section-chevron {
  font-size: .75rem;
  color: var(--muted);
  transition: transform .25s;
  display: inline-block;
}
.track-section.open .track-section-chevron { transform: rotate(180deg); }
.track-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.track-section.open .track-section-body { max-height: 4000px; }
.track-section:not([class*='open']) .track-section-body { max-height: 0; }
/* 无 header 的节（无 section_title）直接展开 */
.track-section:not(:has(.track-section-header)) .track-section-body { max-height: none; }
.track-section .track-chapter-row {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: 1px solid #1e293b;
  border-bottom: none;
  padding-left: 28px;
}
.track-section .track-chapter-row:last-child { border-bottom: 1px solid #1e293b; }

@media (max-width: 900px) {
  .learn-immersive-topbar {
    grid-template-columns: 1fr 1fr;
    height: auto;
    padding: 8px 16px;
    gap: 6px;
  }

  .learn-itb-center {
    display: none;
  }

  .learn-control-bar {
    grid-template-columns: 1fr;
    height: auto;
    padding: 8px 16px;
    gap: 8px;
  }

  .learn-ctrl-center {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .learn-chapter-trigger {
    max-width: 100%;
  }

  .learn-chapter-menu {
    min-width: min(260px, calc(100vw - 32px));
  }

  .learn-ctrl-right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .learn-progress-track {
    top: 130px;
  }

  .learn-html-frame-full {
    height: calc(100vh - 160px);
  }

  .learn-content-prose {
    padding: 20px 16px;
  }

  .track-overview-hero,
  .track-chapter-list {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.user-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 4px;
}

@media (max-width: 700px) {
  .user-form-grid {
    grid-template-columns: 1fr;
  }
}

.user-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.user-list-toolbar-left,
.user-list-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.15);
}

.user-delete-btn {
  color: var(--danger, #ff4f4f) !important;
  background: none !important;
  border: none !important;
  padding: 4px 8px !important;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.user-delete-btn:hover {
  opacity: 1;
}

.teacher-card {
  margin-bottom: 12px;
}

/* 宿主机管理页 */
.host-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.host-stat-card {
  padding: 14px 16px;
  border: 1px solid rgba(0, 255, 65, 0.15);
  background: rgba(0, 255, 65, 0.025);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.host-stat-card.type-missing {
  border-color: rgba(255, 79, 79, 0.3);
  background: rgba(255, 79, 79, 0.04);
}

.host-stat-card.type-stopped {
  border-color: rgba(255, 209, 102, 0.3);
  background: rgba(255, 209, 102, 0.04);
}

.host-stat-card.type-dup {
  border-color: rgba(255, 0, 222, 0.25);
  background: rgba(255, 0, 222, 0.04);
}

.host-stat-card.type-stale {
  border-color: rgba(160, 160, 180, 0.25);
  background: rgba(160, 160, 180, 0.04);
}

.host-stat-card.type-warn {
  border-color: rgba(255, 140, 26, 0.35);
  background: rgba(255, 140, 26, 0.05);
}

.host-stat-card.type-healthy {
  border-color: rgba(0, 255, 65, 0.3);
  background: rgba(0, 255, 65, 0.05);
}

.host-stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.host-stat-value {
  font-size: 22px;
  font-weight: 700;
  font-family: 'Orbitron', var(--font);
}

.host-stat-card.type-missing .host-stat-value {
  color: #ff6666;
}

.host-stat-card.type-stopped .host-stat-value {
  color: var(--warn);
}

.host-stat-card.type-dup .host-stat-value {
  color: var(--magenta);
}

.host-stat-card.type-stale .host-stat-value {
  color: var(--muted);
}

.host-stat-card.type-warn .host-stat-value {
  color: #ff8c1a;
}

.host-stat-card.type-healthy .host-stat-value {
  color: var(--neon);
}

.host-cleanup-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.host-cleanup-count {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  margin-left: 4px;
  background: rgba(255, 79, 79, 0.2);
  color: #ff6666;
  font-size: 11px;
  border-radius: 999px;
}

.host-cleanup-count.warn {
  background: rgba(255, 140, 26, 0.2);
  color: #ff8c1a;
}

.host-problem-chip {
  font-size: 10px;
  padding: 2px 7px;
  letter-spacing: 0.3px;
}

.problem-missing {
  border-color: rgba(255, 79, 79, 0.5);
  color: #ff6666;
  background: rgba(255, 79, 79, 0.08);
}

.problem-stopped {
  border-color: rgba(255, 209, 102, 0.5);
  color: var(--warn);
  background: rgba(255, 209, 102, 0.08);
}

.problem-duplicate_vmid,
.problem-duplicate_ip {
  border-color: rgba(255, 0, 222, 0.4);
  color: var(--magenta);
  background: rgba(255, 0, 222, 0.06);
}

.problem-offline_stale {
  border-color: rgba(160, 160, 180, 0.4);
  color: var(--muted);
  background: rgba(160, 160, 180, 0.06);
}

.problem-provisioning_stale {
  border-color: rgba(255, 140, 26, 0.5);
  color: #ff8c1a;
  background: rgba(255, 140, 26, 0.08);
}

.chip-host-status {
  font-size: 10px;
  padding: 2px 7px;
}

.chip-ready {
  border-color: rgba(0, 255, 65, 0.4);
  color: var(--neon);
  background: rgba(0, 255, 65, 0.07);
}

.chip-offline {
  border-color: rgba(160, 160, 180, 0.35);
  color: var(--muted);
  background: rgba(160, 160, 180, 0.05);
}

.chip-provisioning {
  border-color: rgba(0, 240, 255, 0.4);
  color: var(--accent);
  background: rgba(0, 240, 255, 0.07);
}

.host-summary-widget {
  margin-top: 12px;
}

.host-summary-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.host-summary-chip {
  font-size: 11px;
  padding: 2px 8px;
}

.chip-missing {
  border-color: rgba(255, 79, 79, 0.5);
  color: #ff6666;
  background: rgba(255, 79, 79, 0.08);
}

.chip-stopped {
  border-color: rgba(255, 209, 102, 0.5);
  color: var(--warn);
  background: rgba(255, 209, 102, 0.08);
}

.chip-duplicate_vmid,
.chip-duplicate_ip {
  border-color: rgba(255, 0, 222, 0.4);
  color: var(--magenta);
  background: rgba(255, 0, 222, 0.06);
}

.chip-offline_stale {
  border-color: rgba(160, 160, 180, 0.4);
  color: var(--muted);
  background: rgba(160, 160, 180, 0.06);
}

.chip-provisioning_stale {
  border-color: rgba(255, 140, 26, 0.5);
  color: #ff8c1a;
  background: rgba(255, 140, 26, 0.08);
}

/* ══════════════════════════════════
   挑战详情浮动窗口
══════════════════════════════════ */
.btn-challenge-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.04);
  color: var(--accent);
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.btn-challenge-detail::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--magenta));
}
.btn-challenge-detail:hover {
  background: rgba(0, 240, 255, 0.09);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.15);
}
.cw-btn-icon { font-size: 14px; }
.cw-btn-arrow {
  margin-left: auto;
  transition: transform 0.2s;
}
.btn-challenge-detail:hover .cw-btn-arrow { transform: translateX(3px); }

#cw-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 8, 14, 0.65);
  backdrop-filter: blur(6px) saturate(0.7);
  -webkit-backdrop-filter: blur(6px) saturate(0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#cw-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

#cw-window {
  position: fixed;
  z-index: 300;
  background: #0a0f16;
  border: 1px solid rgba(0, 240, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.08), 0 32px 80px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 顶部紧贴导航栏，左右与 .page 的 padding 32px 对齐 */
  top: 57px;
  left: 32px;
  right: 32px;
  width: auto;
  height: calc(100vh - 57px);
  transform: scale(0.94);
  transform-origin: center top;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.38s cubic-bezier(0.22, 0.68, 0, 1.2),
    opacity 0.28s ease,
    border-color 0.2s;
}
#cw-window::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon) 0%, var(--accent) 50%, var(--magenta) 100%);
  z-index: 1;
}
#cw-window.open {
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
}
#cw-window.minimized {
  top: auto; bottom: 24px;
  left: auto; right: 24px;
  width: 240px; height: 44px;
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.18), 0 8px 32px rgba(0, 0, 0, 0.6);
}

.cw-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  background: rgba(0, 240, 255, 0.04);
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
  flex-shrink: 0;
  user-select: none;
  cursor: default;
}
.cw-dots { display: flex; gap: 7px; align-items: center; }
.cw-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: filter 0.15s;
}
.cw-dot:hover { filter: brightness(1.3); }
.cw-close    { background: #ff5f57; }
.cw-minimize { background: #febc2e; }
.cw-expand   { background: #28c840; }
.cw-title {
  flex: 1;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cw-badge {
  font-size: 10px;
  padding: 2px 7px;
  border: 1px solid rgba(0, 255, 65, 0.3);
  color: var(--neon);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.cw-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  transition: opacity 0.2s;
}
#cw-window.minimized .cw-body {
  opacity: 0;
  pointer-events: none;
  height: 0;
  flex: 0;
}
#cw-window.minimized .cw-titlebar {
  border-bottom: none;
  background: transparent;
  cursor: pointer;
}
.cw-body iframe {
  width: 100%; height: 100%;
  border: none;
  background: #080c10;
  display: block;
}

#cw-window.minimized .cw-minimize {
  animation: cwDotPulse 2s ease-out infinite;
}
@keyframes cwDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254, 188, 46, 0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(254, 188, 46, 0); }
}

/* 环境冲突提示 — 方案 C */
.env-conflict-c {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  flex-wrap: wrap;
}

.env-conflict-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.4);
  color: var(--warn);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  font-family: var(--font);
}

.env-conflict-badge-link {
  text-decoration: none;
}

.env-conflict-badge-link:hover {
  background: rgba(255, 209, 102, 0.18);
  border-color: rgba(255, 209, 102, 0.56);
}

.env-conflict-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
  flex-shrink: 0;
  animation: conflictDotPulse 2s ease-out infinite;
}

@keyframes conflictDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(255, 209, 102, 0); }
}

.env-conflict-text {
  font-size: 12px;
  color: var(--muted);
}

/* ── PVE 孤儿 VM 页 ── */
.orphan-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.orphan-stat-card {
  padding: 14px 16px;
  border: 1px solid rgba(0, 255, 65, 0.15);
  background: rgba(0, 255, 65, 0.025);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.orphan-stat-card.type-managed {
  border-color: rgba(0, 240, 255, 0.3);
  background: rgba(0, 240, 255, 0.04);
}

.orphan-stat-card.type-template {
  border-color: rgba(160, 160, 180, 0.2);
  background: rgba(160, 160, 180, 0.03);
}

.orphan-stat-card.type-orph-stop {
  border-color: rgba(255, 209, 102, 0.4);
  background: rgba(255, 209, 102, 0.05);
}

.orphan-stat-card.type-orph-run {
  border-color: rgba(255, 140, 26, 0.4);
  background: rgba(255, 140, 26, 0.05);
}

.orphan-stat-card.type-unknown {
  border-color: rgba(255, 0, 222, 0.25);
  background: rgba(255, 0, 222, 0.04);
}

.orphan-stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.orphan-stat-value {
  font-size: 24px;
  font-weight: 700;
  font-family: 'Orbitron', var(--font);
}

.type-managed .orphan-stat-value {
  color: var(--accent);
}

.type-template .orphan-stat-value {
  color: var(--muted);
}

.type-orph-stop .orphan-stat-value {
  color: var(--warn);
}

.type-orph-run .orphan-stat-value {
  color: #ff8c1a;
}

.type-unknown .orphan-stat-value {
  color: var(--magenta);
}

.orphan-row-orphan_stopped {
  background: rgba(255, 209, 102, 0.04);
}

.orphan-row-orphan_running {
  background: rgba(255, 140, 26, 0.04);
}

.orphan-chip-stopped {
  font-size: 10px;
  padding: 2px 7px;
  border-color: rgba(255, 209, 102, 0.5);
  color: var(--warn);
  background: rgba(255, 209, 102, 0.08);
}

.orphan-chip-running {
  font-size: 10px;
  padding: 2px 7px;
  border-color: rgba(255, 140, 26, 0.5);
  color: #ff8c1a;
  background: rgba(255, 140, 26, 0.08);
}

.chip-vm-status {
  font-size: 10px;
  padding: 2px 7px;
}

.chip-vm-running {
  border-color: rgba(0, 255, 65, 0.4);
  color: var(--neon);
  background: rgba(0, 255, 65, 0.07);
}

.chip-vm-stopped {
  border-color: rgba(160, 160, 180, 0.3);
  color: var(--muted);
  background: rgba(160, 160, 180, 0.05);
}

.orphan-count-badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  margin-left: 4px;
  background: rgba(255, 79, 79, 0.25);
  color: #ff6666;
  font-size: 11px;
  border-radius: 999px;
}

/* ── 宿主预热卡片 ───────────────────────────────────────── */
.prewarm-card .panel-header { margin-bottom: 8px; }
.prewarm-stat-row {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 12px; color: var(--muted);
  padding: 10px 14px;
  background: rgba(0,240,255,.04);
  border: 1px solid rgba(0,240,255,.15);
  margin-bottom: 14px;
}
.prewarm-stat-row span:nth-child(odd) { color: var(--muted); }
.prewarm-stat-row span:nth-child(even) { color: var(--accent); font-weight: 700; }
.radio-line { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.prewarm-estimate {
  font-size: 12px; color: var(--warn);
  padding: 6px 10px;
  background: rgba(255,209,102,.06);
  border: 1px solid rgba(255,209,102,.2);
  margin-top: 6px;
}
.prewarm-job {
  margin-top: 18px;
  border: 1px solid rgba(0,240,255,.2);
  padding: 14px 16px;
}
.prewarm-job-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; margin-bottom: 10px;
}
.prewarm-job-counts { font-size: 12px; color: var(--muted); }
.prewarm-job-bar-track {
  width: 100%; height: 6px;
  background: rgba(0,240,255,.12);
  border: 1px solid rgba(0,240,255,.2);
}
.prewarm-job-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, rgba(0,255,65,.75), rgba(0,240,255,.85));
  transition: width 0.5s ease;
}
.prewarm-job-errors {
  margin-top: 8px; font-size: 11px;
  color: var(--red); padding: 6px 0;
}

/* ── 环境运行中状态指示 ── */
.env-running-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon);
  margin-right: 6px;
  vertical-align: middle;
  animation: env-dot-pulse 2s ease-in-out infinite;
}
@keyframes env-dot-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--neon); }
  50%       { opacity: 0.4; box-shadow: 0 0 2px var(--neon); }
}

/* ── Navbar 环境指示器 ── */
.nav-env-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--neon);
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 1px;
  opacity: 0.92;
  transition: opacity 0.2s;
  flex-wrap: wrap;
}
.nav-env-indicator:hover {
  opacity: 1;
}
.nav-env-indicator.is-muted,
.nav-env-indicator.is-muted:hover {
  color: rgba(235, 242, 255, 0.46);
  opacity: 0.7;
}
.nav-env-indicator.is-muted .env-running-dot {
  background: rgba(235, 242, 255, 0.24);
  box-shadow: 0 0 4px rgba(235, 242, 255, 0.08);
  animation: none;
}
.nav-env-label {
  line-height: 1;
}
.nav-env-entry {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.nav-env-entry:hover {
  opacity: 1;
}
.nav-env-entry.is-muted,
.nav-env-entry:disabled {
  cursor: default;
  opacity: 0.72;
}
.nav-env-entry:disabled .env-running-dot,
.nav-env-entry.is-muted .env-running-dot {
  background: rgba(235, 242, 255, 0.24);
  box-shadow: 0 0 4px rgba(235, 242, 255, 0.08);
  animation: none;
}
.nav-env-sep {
  color: rgba(235, 242, 255, 0.36);
}
.nav-env-more {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-env-more summary {
  list-style: none;
}
.nav-env-more summary::-webkit-details-marker {
  display: none;
}
.nav-env-more-trigger {
  cursor: pointer;
}
.nav-env-more-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background: rgba(8, 12, 18, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  z-index: 80;
}
.nav-env-more:not([open]) .nav-env-more-menu {
  display: none;
}
.nav-env-more-entry {
  justify-content: flex-start;
}

/* ── Web Terminal 面板 ───────────────────────────────────────── */
.wt-hidden { display: none !important; }

.wt-overlay {
  position: fixed; inset: 0; z-index: 1800;
  background: rgba(0,0,0,.45);
}

.wt-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1900;
  /* top 由 JS 動態設為導航欄高度，不覆蓋導航 */
  background: #080c10;
  display: flex; flex-direction: column;
  transition: top .15s ease, height .15s ease;
}
.wt-panel.wt-minimized {
  top: auto !important; inset: auto 0 0 0;
  height: 36px; overflow: hidden;
  border-top: 2px solid rgba(0,240,255,.4);
  box-shadow: 0 -4px 24px rgba(0,0,0,.5);
}

.wt-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; height: 36px; flex-shrink: 0;
  background: rgba(0,240,255,.04);
  border-bottom: 1px solid rgba(0,240,255,.15);
}

.wt-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 1px; color: rgba(0,240,255,.7);
}

.wt-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #00ff41; box-shadow: 0 0 6px #00ff41;
  animation: env-dot-pulse 2s ease-in-out infinite;
}

.wt-header-actions { display: flex; gap: 8px; }

.wt-btn {
  padding: 3px 10px; font-size: 11px; letter-spacing: .5px;
  border: 1px solid rgba(0,240,255,.3); background: transparent;
  color: rgba(0,240,255,.7); cursor: pointer; font-family: var(--font);
  transition: all .15s;
}
.wt-btn:hover { background: rgba(0,240,255,.08); color: var(--accent); }
.wt-btn.wt-close { border-color: rgba(255,79,79,.3); color: rgba(255,79,79,.7); }
.wt-btn.wt-close:hover { background: rgba(255,79,79,.08); color: var(--red); }

#wt-container {
  flex: 1; overflow: hidden; padding: 6px 8px;
}
#wt-container .xterm { height: 100%; }
#wt-container .xterm-viewport { background: transparent !important; }

.wt-status {
  padding: 6px 14px; font-size: 12px; letter-spacing: .5px;
  color: rgba(0,240,255,.7); flex-shrink: 0;
  border-top: 1px solid rgba(0,240,255,.08);
}

/* ════════════════════════════════════════════
   比赛封存页 (competition_finished)
   所有类名以 archive- 开头，避免全局污染
   ════════════════════════════════════════════ */
.archive-wrap { max-width: 1100px; margin: 28px auto 0; padding: 0 20px; }

/* Hero */
.archive-hero {
  position: relative; min-height: 480px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 28px 44px; overflow: hidden; margin-bottom: 32px;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,215,0,.04) 0%, transparent 70%);
  border: 1px solid rgba(255,215,0,.1);
}
.archive-scan-sweep {
  position: absolute; left: 0; right: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,.4), transparent);
  box-shadow: 0 0 12px rgba(255,215,0,.3);
  animation: archiveScan 9s linear infinite;
}
@keyframes archiveScan {
  0%   { top: 0; opacity: 0; }
  5%   { opacity: 1; }
  90%  { opacity: .6; }
  100% { top: 100%; opacity: 0; }
}
.archive-corner { position: absolute; width: 22px; height: 22px; }
.archive-corner::before,.archive-corner::after {
  content: ''; position: absolute; background: var(--legendary);
  box-shadow: 0 0 6px rgba(255,140,26,.4);
}
.archive-corner-tl { top: 16px; left: 16px; }
.archive-corner-tl::before { top:0;left:0;width:100%;height:2px; }
.archive-corner-tl::after  { top:0;left:0;width:2px;height:100%; }
.archive-corner-tr { top: 16px; right: 16px; }
.archive-corner-tr::before { top:0;right:0;width:100%;height:2px; }
.archive-corner-tr::after  { top:0;right:0;width:2px;height:100%; }
.archive-corner-bl { bottom: 16px; left: 16px; }
.archive-corner-bl::before { bottom:0;left:0;width:100%;height:2px; }
.archive-corner-bl::after  { bottom:0;left:0;width:2px;height:100%; }
.archive-corner-br { bottom: 16px; right: 16px; }
.archive-corner-br::before { bottom:0;right:0;width:100%;height:2px; }
.archive-corner-br::after  { bottom:0;right:0;width:2px;height:100%; }

.archive-hero-label {
  font-family: var(--font-mono, monospace); font-size: 11px; letter-spacing: 6px;
  color: rgba(255,140,26,.45); margin-bottom: 20px; text-transform: uppercase;
}
.archive-hero-title {
  font-family: var(--font-mono, monospace); font-size: clamp(36px,5vw,60px); font-weight: 900;
  letter-spacing: 10px; color: var(--legendary);
  text-shadow: 0 0 10px rgba(255,140,26,.9), 0 0 30px rgba(255,140,26,.5), 0 0 70px rgba(255,140,26,.2);
  animation: archiveGlitch 10s ease-in-out infinite; margin-bottom: 8px;
}
@keyframes archiveGlitch {
  0%,80%,100% { transform: none; filter: none; }
  81% { transform: translateX(-2px); filter: hue-rotate(12deg); }
  82% { transform: translateX(2px); }
  83% { transform: none; filter: none; }
}
.archive-hero-sub  { font-size: 11px; letter-spacing: 4px; color: rgba(255,140,26,.3); margin-bottom: 10px; }
.archive-hero-comp { font-size: 15px; letter-spacing: 2px; color: rgba(255,140,26,.7); margin-bottom: 4px; }
.archive-hero-date { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-bottom: 36px; }
.archive-hero-divider {
  width: 220px; height: 1px; margin-bottom: 36px;
  background: linear-gradient(90deg, transparent, rgba(255,140,26,.35), transparent);
  position: relative;
}
.archive-hero-divider::before,.archive-hero-divider::after {
  content:'◆'; position:absolute; top:-6px; color:rgba(255,140,26,.3); font-size:8px;
}
.archive-hero-divider::before { left:-6px; }
.archive-hero-divider::after  { right:-6px; }

.archive-hero-rows {
  display: flex; flex-direction: column; width: 100%; max-width: 500px;
  border-top: 1px solid rgba(255,140,26,.08); padding-top: 18px;
}
.archive-h-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.03);
}
.archive-h-key { letter-spacing: 2px; color: rgba(255,140,26,.4); }
.archive-h-val { letter-spacing: 1px; color: rgba(235,242,255,.5); }
.archive-h-val.ok     { color: var(--neon); text-shadow: 0 0 6px rgba(0,255,65,.5); }
.archive-h-val.frozen { color: var(--accent); text-shadow: 0 0 6px rgba(0,240,255,.5); }
.archive-h-val.gold   { color: var(--legendary); text-shadow: 0 0 6px rgba(255,140,26,.5); }
.archive-hero-footer {
  position: absolute; bottom: 16px; left: 0; right: 0; text-align: center;
  font-size: 10px; letter-spacing: 3px; color: rgba(255,140,26,.12); pointer-events: none;
}

/* 颁奖台 */
.archive-podium-section { margin-bottom: 28px; }
.archive-section-label {
  font-size: 10px; letter-spacing: 4px; color: var(--muted); text-transform: uppercase;
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.archive-section-label::after {
  content:''; flex:1; height:1px;
  background: linear-gradient(90deg, rgba(255,255,255,.06), transparent);
}
.archive-tabs { display:flex; gap:2px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.06); padding:3px; }
.archive-tab {
  font-size: 10px; letter-spacing: 2px; padding: 5px 14px;
  cursor: pointer; color: var(--muted); border: 1px solid transparent;
  background: none; transition: all .15s;
}
.archive-tab:hover { color: var(--text); }
.archive-tab.active { color: var(--accent); border-color: rgba(0,240,255,.3); background: rgba(0,240,255,.07); }

.archive-podium-wrap {
  display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 0 16px;
}
.archive-podium-col { display:flex; flex-direction:column; align-items:center; flex:1; max-width:260px; }
.archive-podium-card {
  width: 100%; border: 1px solid; padding: 18px 14px 14px; text-align: center;
  position: relative; overflow: hidden;
}
.archive-podium-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
}
.archive-rank-1.archive-podium-card { border-color:rgba(255,140,26,.35); background:rgba(255,140,26,.04); }
.archive-rank-1.archive-podium-card::before { background:linear-gradient(90deg,transparent,var(--legendary),transparent); }
.archive-rank-2.archive-podium-card { border-color:rgba(255,59,59,.3);   background:rgba(255,59,59,.03);  }
.archive-rank-2.archive-podium-card::before { background:linear-gradient(90deg,transparent,var(--mythic),transparent); }
.archive-rank-3.archive-podium-card { border-color:rgba(184,107,255,.3); background:rgba(184,107,255,.03);}
.archive-rank-3.archive-podium-card::before { background:linear-gradient(90deg,transparent,var(--epic),transparent); }

.arch-medal  { font-size:26px; margin-bottom:8px; line-height:1; }
.arch-rank   { font-size:10px; letter-spacing:3px; margin-bottom:7px; }
.archive-rank-1 .arch-rank { color:var(--legendary); }
.archive-rank-2 .arch-rank { color:var(--mythic); }
.archive-rank-3 .arch-rank { color:var(--epic); }
.arch-name   { font-size:14px; font-weight:700; color:var(--text); margin-bottom:7px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.arch-score  { font-size:22px; font-weight:700; margin-bottom:3px; }
.archive-rank-1 .arch-score { color:var(--legendary); text-shadow:0 0 12px rgba(255,140,26,.6); }
.archive-rank-2 .arch-score { color:var(--mythic);    text-shadow:0 0 10px rgba(255,59,59,.5);  }
.archive-rank-3 .arch-score { color:var(--epic);      text-shadow:0 0 10px rgba(184,107,255,.5);}
.arch-solves { font-size:11px; color:var(--muted); }

.archive-podium-stand {
  width:100%; border:1px solid rgba(255,255,255,.06); border-top:none;
  display:flex; align-items:center; justify-content:center;
}
.archive-podium-col.archive-rank-1 .archive-podium-stand { height:56px; background:rgba(255,140,26,.05); }
.archive-podium-col.archive-rank-2 .archive-podium-stand { height:36px; background:rgba(255,59,59,.04); }
.archive-podium-col.archive-rank-3 .archive-podium-stand { height:22px; background:rgba(184,107,255,.04); }
.arch-stand-num { font-size:18px; font-weight:900; opacity:.14; }
.archive-rank-1 .arch-stand-num { color:var(--legendary); }
.archive-rank-2 .arch-stand-num { color:var(--mythic); }
.archive-rank-3 .arch-stand-num { color:var(--epic); }

/* 4列统计 */
.archive-stats-row {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 28px;
}
.archive-stat-card {
  background: rgba(13,18,32,.8); border: 1px solid rgba(255,255,255,.06); padding: 18px 14px; text-align: center;
}
.archive-stat-num  { font-size:32px; font-weight:700; color:var(--accent); text-shadow:0 0 14px rgba(0,240,255,.5); line-height:1; margin-bottom:7px; }
.archive-stat-label{ font-size:10px; letter-spacing:3px; color:var(--muted); text-transform:uppercase; }

/* 题目卡片：封存态解题率进度条 */
.archive-ch-progress-track {
  height: 3px; background: rgba(255,255,255,.06); margin: 8px 0 6px; overflow: hidden;
}
.archive-ch-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--neon), var(--accent));
  box-shadow: 0 0 5px rgba(0,255,65,.35); transition: width .6s ease;
}
.archive-ch-progress-fill.unsolved { background: rgba(255,59,59,.35); box-shadow: none; }
.archive-ch-meta {
  display: flex; justify-content: space-between; font-size: 11px;
}
.archive-ch-solves { color: var(--muted); }
.archive-ch-num    { color: var(--accent); font-size: 13px; font-weight: 600; }
.archive-ch-blood  { color: var(--muted); font-size: 10px; }
.archive-ch-blood em { color: rgba(255,140,26,.8); font-style: normal; }

/* 排行榜标题区已有 FROZEN badge - 复用 lb-frozen-badge 样式（score.html 已有） */
@media (max-width: 700px) {
  .archive-stats-row { grid-template-columns: repeat(2,1fr); }
  .archive-podium-wrap { flex-direction: column; align-items: center; }
  .archive-podium-col { max-width: 100%; width: 100%; }
  .archive-podium-col.archive-rank-1 { order: -1; }
  .archive-podium-stand { display: none; }
}

/* 封存页：题目回顾网格 */
.archive-challenges-section { margin-bottom: 28px; }
.archive-ch-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px;
}
.archive-ch-card {
  background: rgba(13,18,32,.8); border: 1px solid rgba(255,255,255,.06);
  padding: 14px; position: relative; transition: border-color .15s;
}
.archive-ch-card:hover { border-color: rgba(0,240,255,.2); }
.archive-ch-card.unsolved { border-color: rgba(255,59,59,.15); }
.archive-ch-card.unsolved:hover { border-color: rgba(255,59,59,.3); }
.archive-ch-zero {
  position: absolute; top: 10px; right: 10px;
  font-size: 9px; letter-spacing: 2px; color: rgba(255,59,59,.5);
  border: 1px solid rgba(255,59,59,.2); padding: 1px 5px;
}
.archive-ch-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 封存页：最终排行榜 */
.archive-lb-section { margin-bottom: 40px; }
.archive-lb-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.archive-frozen-badge {
  font-size: 10px; letter-spacing: 3px; color: var(--accent);
  border: 1px solid rgba(0,240,255,.3); padding: 4px 10px;
  background: rgba(0,240,255,.05);
  animation: archiveFrozen 3s ease-in-out infinite;
}
@keyframes archiveFrozen { 0%,100%{opacity:1} 50%{opacity:.6} }
.archive-lb-list {}
.archive-lb-row {
  display: grid; grid-template-columns: 56px 1fr 90px 80px;
  align-items: center; padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.03); font-size: 13px;
  transition: background .1s;
}
.archive-lb-row:hover { background: rgba(255,255,255,.02); }
.archive-lb-row.hl-1 { background: rgba(255,140,26,.05); }
.archive-lb-row.hl-2 { background: rgba(255,59,59,.04); }
.archive-lb-row.hl-3 { background: rgba(184,107,255,.04); }
.archive-lb-rank { font-size: 12px; font-weight: 700; }
.archive-lb-rank.r1 { color:var(--legendary); text-shadow:0 0 8px rgba(255,140,26,.5); }
.archive-lb-rank.r2 { color:var(--mythic);    text-shadow:0 0 8px rgba(255,59,59,.4); }
.archive-lb-rank.r3 { color:var(--epic);      text-shadow:0 0 8px rgba(184,107,255,.4); }
.archive-lb-rank.rn { color:var(--rare); }
.archive-lb-name   { font-weight: 600; color: var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.archive-lb-score  { font-size: 14px; font-weight: 700; color: var(--accent); text-align: right; }
.archive-lb-solved { font-size: 12px; color: var(--muted); text-align: right; }
.archive-lb-empty  { padding: 20px 12px; color: var(--muted); font-size: 13px; }
@media (max-width: 700px) {
  .archive-ch-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-lb-row { grid-template-columns: 44px 1fr 70px 60px; font-size: 12px; }
}

/* ── Admin File Deploy ───────────────────────────────────── */
.file-deploy-page .step-wrap { display:flex; flex-direction:column; gap:16px; }
.file-deploy-page .step-header { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.file-deploy-page .step-num {
  width:22px; height:22px; border-radius:50%;
  border:1px solid rgba(0,240,255,0.4);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-size:11px; color:var(--accent); flex-shrink:0;
}
.file-deploy-page .step-num.done { border-color:var(--success); color:var(--success); }
.file-deploy-page .step-title {
  font-family:var(--font-display);
  font-size:12px;
  color:var(--accent);
  letter-spacing:1px;
}
.file-deploy-page .section-divider {
  border:none;
  border-top:1px solid rgba(0,240,255,0.12);
  margin:0;
}
.file-deploy-page .challenge-info-row {
  display:flex; gap:16px; flex-wrap:wrap;
  padding:10px 12px;
  background:rgba(0,240,255,0.04);
  border:1px solid rgba(0,240,255,0.12);
  margin-top:8px;
}
.file-deploy-page .deploy-summary {
  flex-direction:column;
  gap:8px;
  margin-bottom:14px;
}
.file-deploy-page .deploy-summary-grid { display:flex; gap:24px; flex-wrap:wrap; }
.file-deploy-page .ch-info-item { display:flex; flex-direction:column; gap:2px; }
.file-deploy-page .ch-info-label {
  font-size:10px; color:var(--muted); letter-spacing:1px; text-transform:uppercase;
}
.file-deploy-page .ch-info-val { font-size:12px; color:var(--text); }
.file-deploy-page .ch-info-val.ok { color:var(--success); }
.file-deploy-page .label-text.file-deploy-label {
  font-size:11px;
  letter-spacing:1px;
  color:var(--muted);
  text-transform:uppercase;
  display:block;
  margin-bottom:6px;
}
.file-deploy-page .instance-list { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.file-deploy-page .instance-row {
  display:flex; align-items:center; gap:10px;
  padding:8px 12px;
  border:1px solid rgba(0,255,65,0.1);
  background:rgba(0,0,0,0.2);
  font-size:11px;
  transition:border-color .15s;
}
.file-deploy-page .instance-row:hover { border-color:rgba(0,255,65,0.25); }
.file-deploy-page .instance-row input[type="checkbox"] {
  accent-color:var(--success);
  width:14px; height:14px; flex-shrink:0;
}
.file-deploy-page .inst-user { color:var(--text); font-weight:600; min-width:80px; }
.file-deploy-page .inst-ip { color:var(--muted); font-family:var(--font-mono); }
.file-deploy-page .inst-status { margin-left:auto; }
.file-deploy-page .inst-badge {
  font-size:10px; letter-spacing:1px; padding:2px 7px;
  border:1px solid; display:inline-block;
}
.file-deploy-page .inst-badge.running {
  color:var(--success);
  border-color:rgba(0,255,65,0.3);
  background:rgba(0,255,65,0.07);
}
.file-deploy-page .inst-badge.shared {
  color:var(--accent);
  border-color:rgba(0,240,255,0.3);
  background:rgba(0,240,255,0.07);
}
.file-deploy-page .select-all-row {
  display:flex; align-items:center; gap:8px;
  font-size:11px; color:var(--muted);
  margin-bottom:4px; cursor:pointer; user-select:none;
}
.file-deploy-page .select-all-row input[type="checkbox"] { accent-color:var(--success); }
.file-deploy-page .inst-count { font-size:11px; color:var(--muted); margin-top:4px; }
.file-deploy-page .file-drop-zone {
  border:2px dashed rgba(0,255,65,0.25);
  padding:32px 20px;
  text-align:center;
  cursor:pointer;
  transition:all .2s;
  position:relative;
}
.file-deploy-page .file-drop-zone:hover,
.file-deploy-page .file-drop-zone.drag-over {
  border-color:rgba(0,255,65,0.55);
  background:rgba(0,255,65,0.04);
}
.file-deploy-page .file-drop-zone input[type="file"] {
  position:absolute; inset:0; opacity:0; cursor:pointer; width:100%;
}
.file-deploy-page .drop-icon { font-size:28px; margin-bottom:8px; opacity:.5; }
.file-deploy-page .drop-primary { font-size:13px; color:var(--text); margin-bottom:4px; }
.file-deploy-page .drop-secondary { font-size:11px; color:var(--muted); }
.file-deploy-page .file-list { display:flex; flex-direction:column; gap:6px; margin-top:10px; }
.file-deploy-page .file-item {
  display:flex; align-items:center; gap:10px;
  padding:7px 12px;
  border:1px solid rgba(0,255,65,0.12);
  background:rgba(0,0,0,0.2);
  font-size:12px;
}
.file-deploy-page .file-icon { font-size:16px; flex-shrink:0; }
.file-deploy-page .file-name {
  flex:1; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.file-deploy-page .file-size { color:var(--muted); font-size:11px; flex-shrink:0; }
.file-deploy-page .file-remove {
  background:none; border:none; color:var(--muted); cursor:pointer;
  font-size:14px; padding:0 2px; line-height:1; flex-shrink:0;
  transition:color .15s;
}
.file-deploy-page .file-remove:hover { color:var(--danger); }
.file-deploy-page .options-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.file-deploy-page .file-deploy-actions { display:flex; gap:10px; align-items:center; }
.file-deploy-page .file-deploy-progress-title {
  font-family:var(--font-display);
  font-size:12px;
  color:var(--accent);
  margin-bottom:12px;
  letter-spacing:1px;
}
.file-deploy-page .deploy-progress-wrap { margin-top:14px; }
.file-deploy-page .deploy-progress-header {
  display:flex; justify-content:space-between; font-size:11px; color:var(--muted); margin-bottom:6px;
}
.file-deploy-page .deploy-progress-track {
  height:4px; background:rgba(255,255,255,0.06); overflow:hidden; margin-bottom:14px;
}
.file-deploy-page .deploy-progress-fill {
  height:100%;
  background:linear-gradient(90deg, var(--success), var(--accent));
  box-shadow:0 0 8px rgba(0,255,65,0.4);
  transition:width .4s ease;
}
.file-deploy-page .deploy-log {
  background:rgba(0,0,0,0.4);
  border:1px solid rgba(0,255,65,0.1);
  padding:10px 12px;
  font-size:11px;
  line-height:1.8;
  max-height:200px;
  overflow-y:auto;
  font-family:var(--font-mono);
}
.file-deploy-page .log-line { display:flex; gap:10px; }
.file-deploy-page .log-time { color:var(--muted); flex-shrink:0; }
.file-deploy-page .log-ok { color:var(--success); }
.file-deploy-page .log-err { color:var(--danger); }
.file-deploy-page .log-info { color:var(--accent); }
.file-deploy-page .result-summary {
  display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:14px;
}
.file-deploy-page .result-stat {
  padding:12px;
  border:1px solid rgba(255,255,255,0.07);
  text-align:center;
  background:rgba(0,0,0,0.2);
}
.file-deploy-page .result-num {
  font-family:var(--font-display);
  font-size:22px;
  margin-bottom:4px;
}
.file-deploy-page .result-label {
  font-size:10px; letter-spacing:1px; color:var(--muted); text-transform:uppercase;
}
.file-deploy-page .result-num.ok { color:var(--success); text-shadow:0 0 10px rgba(0,255,65,.5); }
.file-deploy-page .result-num.err { color:var(--danger); }
.file-deploy-page .result-num.warn { color:var(--warn); }
.file-deploy-page .result-num.info { color:var(--accent); }

@media (max-width: 860px) {
  .file-deploy-page .options-grid,
  .file-deploy-page .result-summary { grid-template-columns:1fr; }
}
