/* ── 灯带连击 · Arcade theme (shared with ranking board) ── */

:root {
  --arcade-radius: 4px;
  --arcade-bg-top: #161632;
  --arcade-bg-mid: #1e1e42;
  --arcade-surface: rgba(52, 48, 100, .92);
  --arcade-border: rgba(124, 58, 237, .4);
  --arcade-border-accent: rgba(103, 232, 249, .45);
  --arcade-gold: #fde047;
}

body {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(124, 58, 237, .14) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 90%, rgba(34, 211, 238, .1) 0%, transparent 45%),
    linear-gradient(180deg, var(--arcade-bg-top) 0%, var(--arcade-bg-mid) 55%, #1a1a38 100%);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ── Nav / board header (unified) ── */
.navbar,
.board-header {
  padding: .85rem 2rem;
  background: rgba(36, 34, 72, .92);
  border-bottom: 1px solid rgba(124, 58, 237, .38);
}

.navbar-brand,
.board-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: ui-monospace, monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
  text-decoration: none;
}

.navbar-brand span,
.board-title span { color: var(--accent); }

/* ── Brand: 灯带连击 (LED strip combo mark) ── */
.arcade-brand {
  gap: .85rem;
  text-decoration: none;
  align-items: center;
}
.arcade-brand-icon {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: var(--arcade-radius);
  background: linear-gradient(180deg, rgba(28, 26, 56, .95) 0%, rgba(18, 16, 38, .98) 100%);
  border: 2px solid rgba(34, 211, 238, .38);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, .35),
    0 0 18px rgba(124, 58, 237, .22),
    inset 0 0 14px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.arcade-led-strip {
  display: flex;
  align-items: center;
  gap: 3px;
}
.arcade-led {
  display: block;
  width: 5px;
  height: 13px;
  border-radius: 2px;
  opacity: 0;
  transform: scaleY(.35);
  animation: arcade-led-boot .38s cubic-bezier(.25, .9, .35, 1) forwards;
}
.arcade-led--r { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, .75); animation-delay: .04s; }
.arcade-led--o { background: #f97316; box-shadow: 0 0 8px rgba(249, 115, 22, .7); animation-delay: .08s; }
.arcade-led--y { background: #fde047; box-shadow: 0 0 8px rgba(253, 224, 71, .75); animation-delay: .12s; }
.arcade-led--g { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, .7); animation-delay: .16s; }
.arcade-led--c { background: #22d3ee; box-shadow: 0 0 8px rgba(34, 211, 238, .8); animation-delay: .2s; }
.arcade-led--b { background: #3b82f6; box-shadow: 0 0 8px rgba(59, 130, 246, .75); animation-delay: .24s; }
.arcade-led--m { background: #a855f7; box-shadow: 0 0 8px rgba(168, 85, 247, .75); animation-delay: .28s; }
@keyframes arcade-led-boot {
  0% { opacity: 0; transform: scaleY(.35); filter: brightness(1.6); }
  70% { opacity: 1; transform: scaleY(1.08); }
  100% { opacity: 1; transform: scaleY(1); filter: brightness(1); }
}
.arcade-combo-mark {
  flex-shrink: 0;
  font-family: 'VT323', ui-monospace, monospace;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1;
  color: #fde047;
  text-shadow: 0 0 10px rgba(255, 215, 0, .55);
  animation: arcade-combo-pop .5s cubic-bezier(.2, 1.3, .3, 1) .32s both;
}
@keyframes arcade-combo-pop {
  0% { opacity: 0; transform: scale(.4) rotate(-12deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.arcade-brand-text {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #f8fafc;
  white-space: nowrap;
}
.arcade-brand-accent {
  color: #22d3ee;
  text-shadow: 0 0 16px rgba(34, 211, 238, .45);
}
.arcade-brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .05rem;
  min-width: 0;
}
.arcade-brand-en {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: .82rem;
  letter-spacing: .18em;
  color: rgba(148, 163, 184, .92);
  line-height: 1.1;
}
.arcade-brand--hero {
  gap: 1.05rem;
}
.arcade-brand--hero .arcade-brand-text {
  font-size: 1.45rem;
  letter-spacing: .08em;
}
.arcade-brand--hero .arcade-brand-en {
  font-size: .88rem;
  color: rgba(103, 232, 249, .75);
  text-shadow: 0 0 12px rgba(34, 211, 238, .25);
}
.arcade-brand--hero .arcade-brand-icon {
  padding: 8px 11px;
  gap: 6px;
}
.arcade-brand--hero .arcade-combo-mark {
  font-size: .88rem;
}
.arcade-brand--hero .arcade-led {
  width: 6px;
  height: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .arcade-led,
  .arcade-combo-mark {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.logo-ring {
  width: 34px;
  height: 34px;
  border-radius: var(--arcade-radius);
  background: linear-gradient(180deg, rgba(52, 48, 100, .97) 0%, rgba(40, 38, 84, .98) 100%);
  border: 2px solid var(--arcade-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(124, 58, 237, .22);
}

.navbar-brand-icon,
.board-title-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, .4));
}

.nav-links a {
  border-radius: var(--arcade-radius);
  font-family: ui-monospace, monospace;
  font-size: .82rem;
  letter-spacing: .04em;
  border: 1px solid transparent;
  box-shadow: none;
  transition: background-color .2s, color .2s, border-color .2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(124, 58, 237, .22);
  color: var(--accent-l);
  border-color: rgba(124, 58, 237, .35);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .2);
}

.nav-links a.active {
  color: var(--accent);
}

.ws-status {
  font-family: ui-monospace, monospace;
  font-size: .75rem;
}

.board-subtitle {
  font-family: ui-monospace, monospace;
  font-size: .78rem;
  color: rgba(186, 196, 214, .92);
}

/* ── Page chrome ── */
.page-title,
.ranking-title {
  font-family: 'VT323', ui-monospace, monospace;
  font-weight: 400;
  letter-spacing: .14em;
  color: var(--arcade-gold);
  text-shadow:
    0 0 12px rgba(253, 224, 71, .5),
    0 0 28px rgba(255, 215, 0, .22);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}

.page-title { font-size: 2.25rem; line-height: 1.1; }
.page-subtitle { color: #b8c5d6; font-size: .9375rem; }

.list-section-label {
  font-family: 'VT323', ui-monospace, monospace;
}

/* ── Cards & panels ── */
.card,
.stat-card,
.filter-bar,
.champion-card,
.device-card,
.modal,
.toast {
  border-radius: var(--arcade-radius);
}

.card,
.stat-card,
.filter-bar {
  background: linear-gradient(180deg, rgba(52, 48, 100, .94) 0%, rgba(40, 38, 84, .96) 100%);
  border: 2px solid var(--arcade-border);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, .22),
    inset 0 0 40px rgba(34, 211, 238, .04);
}

.card:hover,
.stat-card:hover {
  border-color: rgba(103, 232, 249, .45);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, .22),
    inset 0 0 48px rgba(124, 58, 237, .08);
}

.card-title,
.stat-label,
.stat-mini-lbl,
.form-label {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1rem;
  letter-spacing: .12em;
  color: rgba(103, 232, 249, .88);
  text-transform: uppercase;
}

.stat-value,
.stat-mini-val,
.score-mono {
  font-family: ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.stat-value { text-shadow: 0 0 10px rgba(34, 211, 238, .2); }

.champion-card {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 215, 0, .12) 0%, transparent 55%),
    linear-gradient(180deg, rgba(56, 48, 104, .96) 0%, rgba(44, 40, 88, .98) 100%);
  border: 3px solid rgba(255, 215, 0, .65);
  box-shadow:
    0 0 28px rgba(255, 215, 0, .18),
    inset 0 0 48px rgba(255, 215, 0, .06);
}

.champion-trophy svg,
.champion-trophy .empty-icon {
  width: 3rem;
  height: 3rem;
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, .45));
}

.champion-label {
  font-family: 'VT323', ui-monospace, monospace;
  letter-spacing: .14em;
  color: rgba(253, 224, 71, .85);
}

.champion-score {
  font-family: ui-monospace, monospace;
  text-shadow: 0 0 14px rgba(255, 215, 0, .4);
}

.device-card {
  background: rgba(44, 42, 84, .75);
  border: 1px solid rgba(124, 58, 237, .32);
  border-radius: var(--arcade-radius);
}

.device-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--arcade-radius);
  background: rgba(36, 34, 72, .8);
  border: 2px solid rgba(124, 58, 237, .35);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Tables (match ranking list) ── */
.table-wrap {
  border: 2px solid rgba(124, 58, 237, .35);
  border-radius: var(--arcade-radius);
  background: rgba(36, 34, 72, .55);
}

thead {
  background: rgba(48, 44, 92, .85);
}

th {
  color: rgba(103, 232, 249, .92);
  font-family: ui-monospace, monospace;
  font-size: .75rem;
  letter-spacing: .12em;
  border-bottom: 2px solid rgba(103, 232, 249, .35);
}

td {
  border-bottom: 1px solid rgba(124, 58, 237, .22);
}

tbody tr:hover {
  background: rgba(124, 58, 237, .1);
}

.rank-badge {
  border-radius: var(--arcade-radius);
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1rem;
}

.score-mono {
  color: #22d3ee;
  text-shadow: 0 0 8px rgba(34, 211, 238, .3);
}

/* ── Forms & buttons ── */
.form-control {
  border-radius: var(--arcade-radius);
  border: 2px solid rgba(124, 58, 237, .35);
  background: rgba(36, 34, 72, .65);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .15);
}

.btn {
  border-radius: var(--arcade-radius);
  font-family: ui-monospace, monospace;
  font-size: .82rem;
  letter-spacing: .04em;
}

.btn-primary {
  border: 2px solid rgba(124, 58, 237, .6);
  box-shadow: 0 0 16px rgba(124, 58, 237, .25);
}

.btn-accent {
  border: 2px solid rgba(34, 211, 238, .4);
}

.btn-ghost {
  border: 2px solid rgba(124, 58, 237, .35);
}

.tab-btn {
  border-radius: var(--arcade-radius);
  font-family: ui-monospace, monospace;
}

/* ── Scan banner (players) ── */
.scan-banner {
  border-radius: var(--arcade-radius);
  border: 2px solid rgba(34, 211, 238, .35);
  background: linear-gradient(90deg, rgba(52, 48, 96, .9) 0%, rgba(44, 40, 84, .85) 100%);
}

.scan-banner.pending {
  border-color: rgba(245, 158, 11, .5);
}

.scan-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scan-icon-svg {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: var(--accent);
}

.scan-banner.pending .scan-icon-svg { color: var(--yellow); }

.import-zone {
  border-radius: var(--arcade-radius);
  border: 2px dashed rgba(124, 58, 237, .45);
}

/* ── Empty states ── */
.empty-state .empty-icon,
.empty-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto .75rem;
  display: block;
  color: rgba(167, 139, 250, .85);
  opacity: .75;
  filter: drop-shadow(0 0 10px rgba(124, 58, 237, .3));
}

.empty-state p { font-size: 1rem; color: #b8c5d6; }

/* ── Modal ── */
.modal {
  background: linear-gradient(180deg, rgba(52, 48, 100, .98) 0%, rgba(40, 38, 84, .99) 100%);
  border: 3px solid var(--arcade-border-accent);
  border-radius: var(--arcade-radius);
  box-shadow: 0 0 48px rgba(34, 211, 238, .2);
}

.modal-title {
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 1.35rem;
  letter-spacing: .1em;
  color: var(--arcade-gold);
}

/* ── Activity feed ── */
.activity-score {
  font-family: ui-monospace, monospace;
  color: #22d3ee;
}

.device-meta,
.uid-badge,
.mono {
  font-family: ui-monospace, monospace;
}

@media (prefers-reduced-motion: reduce) {
  .scan-banner::before,
  .scan-banner.pending .scan-icon-svg {
    animation: none !important;
  }
}
