:root {
  --bg: #05070d;
  --panel: rgba(8, 13, 24, 0.78);
  --panel-strong: rgba(4, 9, 18, 0.9);
  --cyan: #00c4d4;
  --cyan-rgb: 0, 196, 212;
  --pink: #f4c430;
  --pink-rgb: 244, 196, 48;
  --red: #ff3347;
  --green: #39ff88;
  --yellow: #ffdf4a;
  --text: #e8f0ff;
  --muted: #7d8899;
  --blue: #277dcc;
  --blue-rgb: 39, 125, 204;
  --radius-lg: 28px;
  --radius-md: 18px;
  --space: 18px;
  --glow-cyan: 0 0 16px rgba(var(--cyan-rgb), 0.38), 0 0 38px rgba(var(--cyan-rgb), 0.16);
  --glow-pink: 0 0 16px rgba(var(--pink-rgb), 0.44), 0 0 42px rgba(var(--pink-rgb), 0.22);
  --glow-red: 0 0 18px rgba(255, 51, 71, 0.5), 0 0 44px rgba(255, 51, 71, 0.18);
  --line: rgba(163, 231, 255, 0.32);
  --font-ui: "Bahnschrift", "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --active-mode: var(--pink);
  --active-mode-soft: rgba(var(--pink-rgb), 0.34);
  --active-mode-deep: rgba(74, 48, 0, 0.82);
  --active-mode-glow: var(--glow-pink);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.login-body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-ui);
  overflow-x: hidden;
}

body.auth-body--free {
  --active-mode: var(--cyan);
  --active-mode-soft: rgba(var(--cyan-rgb), 0.34);
  --active-mode-deep: rgba(0, 54, 68, 0.84);
  --active-mode-glow: var(--glow-cyan);
}

body.auth-body--war {
  --active-mode: var(--pink);
  --active-mode-soft: rgba(var(--pink-rgb), 0.34);
  --active-mode-deep: rgba(74, 48, 0, 0.82);
  --active-mode-glow: var(--glow-pink);
}

body.login-body::before,
body.login-body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

body.login-body::before {
  opacity: 0.3;
  mix-blend-mode: screen;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 5px);
}

body.login-body::after {
  opacity: 0.08;
  background-image: radial-gradient(circle at 50% 50%, #fff 0 0.6px, transparent 0.8px);
  background-size: 5px 5px;
  animation: noiseDrift 2.8s steps(2) infinite;
}

.login-stage {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: 0;
  display: block;
  background:
    linear-gradient(180deg, rgba(2, 5, 11, 0.03), rgba(2, 4, 9, 0.18)),
    url("../../img/tapeta2.png") center / cover no-repeat,
    url("../../img/loginmenu.png") center / cover no-repeat,
    radial-gradient(circle at 50% 35%, rgba(var(--cyan-rgb), 0.12), transparent 36%),
    linear-gradient(120deg, #02040a 0%, #07111f 54%, #02030a 100%);
}

.login-stage::before,
.login-stage::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.login-stage::before {
  background:
    radial-gradient(circle at 12% 77%, rgba(0, 93, 255, 0.22), transparent 17%),
    radial-gradient(circle at 88% 73%, rgba(255, 51, 71, 0.22), transparent 15%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.28));
  animation: backgroundPulse 8s ease-in-out infinite alternate;
}

.city-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(5, 7, 13, 0), rgba(5, 7, 13, 0.08));
}

.city-skyline {
  position: absolute;
  left: -5vw;
  right: -5vw;
  bottom: 33vh;
  height: 42vh;
  opacity: 0;
  background:
    linear-gradient(90deg, transparent 0 3%, rgba(9, 16, 32, 0.9) 3% 7%, transparent 7% 10%, rgba(6, 13, 25, 0.95) 10% 15%, transparent 15% 19%, rgba(9, 14, 29, 0.96) 19% 25%, transparent 25% 29%, rgba(8, 13, 25, 0.96) 29% 35%, transparent 35% 38%, rgba(9, 17, 32, 0.94) 38% 45%, transparent 45% 49%, rgba(7, 12, 23, 0.94) 49% 57%, transparent 57% 61%, rgba(8, 16, 31, 0.95) 61% 67%, transparent 67% 70%, rgba(7, 13, 24, 0.97) 70% 78%, transparent 78% 82%, rgba(8, 16, 30, 0.95) 82% 90%, transparent 90% 100%);
  filter: drop-shadow(0 0 22px rgba(0, 245, 255, 0.14));
}

.neon-sign {
  position: fixed;
  z-index: -1;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 0.92;
  opacity: 0;
  transform: perspective(700px) rotateY(var(--tilt, 0deg));
}

.neon-sign span {
  display: block;
  margin-top: 6px;
  font-size: 0.4em;
}

.neon-sign--vultures {
  top: 25%;
  left: 20%;
  color: var(--pink);
  font-size: clamp(1.4rem, 2.2vw, 3rem);
  text-shadow: var(--glow-pink);
  --tilt: -13deg;
}

.neon-sign--blood {
  top: 24%;
  right: 13%;
  color: #ff5c42;
  font-size: clamp(1.2rem, 2vw, 2.7rem);
  text-shadow: var(--glow-red);
  --tilt: 9deg;
}

.neon-sign--iron {
  top: 36%;
  right: 16%;
  color: #78c7ff;
  font-size: clamp(1rem, 1.55vw, 2.2rem);
  text-shadow: var(--glow-cyan);
  --tilt: 8deg;
}

.neon-sign--raid {
  top: 47%;
  left: 16%;
  color: var(--red);
  font-size: clamp(0.9rem, 1.25vw, 1.6rem);
  text-shadow: var(--glow-red);
}

.neon-sign--trust {
  top: 17%;
  right: 44%;
  color: rgba(255, 223, 75, 0.72);
  font-size: clamp(0.8rem, 1vw, 1.3rem);
  text-shadow: 0 0 20px rgba(255, 223, 75, 0.34);
}

.police-light {
  position: fixed;
  bottom: 28%;
  width: 26vw;
  height: 14vh;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.16;
  mix-blend-mode: screen;
  animation: policeFlicker 1.8s ease-in-out infinite;
}

.police-light--left {
  left: 2%;
  background: radial-gradient(circle, rgba(36, 98, 255, 0.8), transparent 68%);
}

.police-light--right {
  right: 0;
  background: radial-gradient(circle, rgba(255, 30, 56, 0.76), transparent 68%);
  animation-delay: -0.9s;
}

.foreground-character {
  position: fixed;
  inset: 0;
  z-index: 31;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 8, 15, 0.22), rgba(2, 4, 10, 0.46)),
    url("../../img/tapeta2.png") center / cover no-repeat,
    url("../../img/loginmenu.png") center / cover no-repeat;
  filter: saturate(0.98) contrast(1.02) brightness(0.82);
  clip-path: polygon(
    50% 70.8%,
    48.9% 71.6%,
    48.4% 73.1%,
    47.5% 75.3%,
    47.1% 77.4%,
    46.7% 79.6%,
    46.2% 81.8%,
    45.9% 84%,
    44.6% 86.2%,
    43.1% 88.3%,
    42.3% 90.5%,
    42% 92.7%,
    41.6% 94.9%,
    41.3% 97.1%,
    40.9% 100%,
    58.1% 100%,
    58% 97.1%,
    57.9% 94.9%,
    57.4% 92.7%,
    56.9% 90.5%,
    56% 88.3%,
    54.1% 86.2%,
    53.6% 84%,
    53.6% 81.8%,
    53.2% 79.6%,
    52.7% 77.4%,
    52.4% 75.3%,
    51.8% 73.1%,
    51.1% 71.6%
  );
  -webkit-mask-image: linear-gradient(180deg, transparent 0 69.6%, #000 71.2%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0 69.6%, #000 71.2%, #000 100%);
}

.hud-panel,
.login-terminal,
.mode-card {
  color: var(--text);
  background: linear-gradient(145deg, rgba(8, 13, 24, 0.62), rgba(3, 7, 15, 0.42));
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), inset 0 0 34px rgba(0, 245, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.login-terminal,
.mode-dock {
  z-index: 30;
}

.hud-panel {
  position: relative;
  z-index: 3;
  border-radius: var(--radius-md);
  padding: 16px;
  overflow: hidden;
  clip-path: polygon(0 10px, 10px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px));
}

.hud-panel::before,
.login-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(255, 255, 255, 0.035) 7px);
  opacity: 0.32;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(160, 210, 255, 0.16);
}

.panel-heading h2,
.hud-panel > h2 {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 240, 255, 0.88);
}

.panel-icon {
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}

.panel-chevron {
  margin-left: auto;
  color: rgba(160, 210, 255, 0.76);
  background: transparent;
  border: 0;
  font: inherit;
}

.live-dot,
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 14px var(--red);
  animation: dotBlink 1s infinite;
}

.leaderboard-panel .panel-heading .live-dot {
  display: none;
}

.status-dot {
  margin-left: auto;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.leaderboard-panel {
  position: absolute;
  z-index: 5;
  right: 1.7vw;
  left: auto;
  top: 0.1vh;
  width: clamp(245px, 15.8vw, 318px);
  min-height: clamp(540px, 65vh, 750px);
  max-width: none;
  border-color: rgba(0, 196, 212, 0.38);
  background:
    linear-gradient(160deg, rgba(8, 16, 30, 0.84), rgba(3, 8, 18, 0.7)),
    radial-gradient(circle at 100% 0, rgba(0, 196, 212, 0.12), transparent 36%);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.46),
    0 0 22px rgba(0, 196, 212, 0.16),
    inset 0 0 28px rgba(0, 196, 212, 0.06);
}

.leaderboard-season {
  margin-left: auto;
  color: var(--yellow);
  font-weight: 900;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(255, 223, 75, 0.42);
}

.leaderboard-season__label {
  font-size: 0.55rem;
}

.leaderboard-season__value {
  font-size: 0.8rem;
}

.leaderboard-list {
  list-style: none;
  margin: 16px 0 0;
  max-height: 386px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 6px 0 0;
  scrollbar-color: rgba(0, 196, 212, 0.7) rgba(3, 9, 18, 0.78);
  scrollbar-width: thin;
}

.leaderboard-list::-webkit-scrollbar {
  width: 5px;
}

.leaderboard-list::-webkit-scrollbar-track {
  background: rgba(3, 9, 18, 0.78);
  border-radius: 999px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(0, 196, 212, 0.9), rgba(0, 148, 176, 0.82));
  box-shadow: 0 0 10px rgba(0, 196, 212, 0.28);
}

.leaderboard-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(160, 210, 255, 0.11);
  border-radius: 9px;
  cursor: pointer;
  outline: 0;
  transition: transform 180ms ease, filter 180ms ease, background 180ms ease;
}

.leaderboard-item.is-leading {
  color: rgba(255, 228, 162, 0.96);
  text-shadow: 0 0 10px rgba(255, 213, 109, 0.36);
}

.leaderboard-item:hover,
.leaderboard-item:focus-visible,
.leaderboard-item.is-selected {
  border-bottom-color: rgba(0, 245, 255, 0.28);
  background: linear-gradient(90deg, rgba(0, 196, 212, 0.16), rgba(244, 196, 48, 0.08), transparent);
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.14), inset 0 0 18px rgba(0, 245, 255, 0.04);
}

.leaderboard-item.is-flashing {
  background: transparent;
  box-shadow: none;
  filter: none;
  transform: none;
}

.leaderboard-rank {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 0 !important;
  color: rgba(160, 172, 189, 0.92) !important;
  font-size: 0.82rem;
  font-weight: 1000;
  background: transparent !important;
  box-shadow: none !important;
}

.leaderboard-item.is-leading .leaderboard-rank,
.leaderboard-item:nth-child(1) .leaderboard-rank {
  color: #ffd56d !important;
}

.leaderboard-item:nth-child(2) .leaderboard-rank {
  color: #cfd4dc !important;
}

.leaderboard-item:nth-child(3) .leaderboard-rank {
  color: #c79a73 !important;
}

.leaderboard-item p {
  margin: 0;
  font-size: clamp(0.72rem, 0.72vw, 0.9rem);
  line-height: 1.28;
  min-width: 0;
}

.leaderboard-item strong {
  display: block;
  overflow: hidden;
  color: rgba(232, 240, 255, 0.94);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score {
  color: rgba(196, 239, 248, 0.9);
  font-size: 0.84rem;
  font-weight: 1000;
  text-shadow: 0 0 10px rgba(0, 196, 212, 0.24);
  white-space: nowrap;
}

.leaderboard-item:nth-child(-n + 3) .leaderboard-score {
  text-shadow: 0 0 10px rgba(255, 213, 109, 0.18);
}

.leaderboard-item:nth-child(1) .leaderboard-score {
  color: #ffd56d;
  text-shadow: 0 0 12px rgba(255, 213, 109, 0.34);
}

.leaderboard-item:nth-child(2) .leaderboard-score {
  color: #d8e2ef;
  text-shadow: 0 0 10px rgba(216, 226, 239, 0.2);
}

.leaderboard-item:nth-child(3) .leaderboard-score {
  color: #c79a73;
  text-shadow: 0 0 10px rgba(199, 154, 115, 0.18);
}

.leaderboard-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--cyan) 45%, rgba(255, 255, 255, 0.14));
}

.leaderboard-summary span {
  color: rgba(140, 179, 198, 0.88);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 196, 212, 0.18);
}

.leaderboard-summary strong {
  color: #ffd56d;
  font-size: 1.14rem;
  text-shadow: 0 0 14px rgba(255, 213, 109, 0.28);
}

@media (max-width: 760px) {
  .leaderboard-summary {
    margin-top: 8px;
    padding-top: 8px;
  }

  .leaderboard-summary strong {
    font-size: 0.94rem;
  }
}

.login-leaderboard-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 22px;
}

.login-leaderboard-overlay[hidden] {
  display: none;
}

.login-leaderboard-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(0, 245, 255, 0.2), transparent 32%),
    radial-gradient(circle at 88% 24%, rgba(244, 196, 48, 0.18), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(255, 51, 71, 0.12), transparent 34%),
    rgba(1, 4, 10, 0.82);
  backdrop-filter: blur(15px) saturate(1.25);
  -webkit-backdrop-filter: blur(15px) saturate(1.25);
}

.login-leaderboard-detail {
  position: relative;
  isolation: isolate;
  z-index: 1;
  width: min(690px, calc(100vw - 32px));
  max-height: calc(100dvh - 44px);
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(0, 245, 255, 0.5);
  border-radius: 22px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 22%),
    radial-gradient(circle at 0 0, rgba(0, 245, 255, 0.24), transparent 34%),
    radial-gradient(circle at 100% 12%, rgba(244, 196, 48, 0.18), transparent 34%),
    radial-gradient(circle at 78% 88%, rgba(255, 51, 71, 0.12), transparent 30%),
    linear-gradient(145deg, rgba(9, 15, 29, 0.9), rgba(2, 6, 14, 0.94));
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.72),
    0 0 48px rgba(0, 245, 255, 0.26),
    0 0 86px rgba(244, 196, 48, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 42px rgba(0, 245, 255, 0.07);
  animation: loginLeaderboardIn 180ms ease-out both;
}

.login-leaderboard-detail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(0, 245, 255, 0.22), transparent 18%, transparent 82%, rgba(244, 196, 48, 0.2)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.038) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, transparent 0 94%, rgba(0, 245, 255, 0.18) 94% 94.5%, transparent 94.5%);
  opacity: 0.62;
  mix-blend-mode: screen;
}

.login-leaderboard-detail::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(244, 196, 48, 0.18);
  border-radius: 16px;
  box-shadow:
    inset 0 0 18px rgba(0, 245, 255, 0.08),
    0 0 18px rgba(244, 196, 48, 0.14);
}

.login-leaderboard-detail > * {
  position: relative;
  z-index: 1;
}

.login-leaderboard-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 245, 255, 0.56);
  border-radius: 10px;
  color: var(--cyan);
  background:
    linear-gradient(135deg, rgba(0, 245, 255, 0.18), rgba(244, 196, 48, 0.08)),
    rgba(3, 9, 18, 0.82);
  font: 900 1rem var(--font-ui);
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.22), inset 0 0 16px rgba(0, 245, 255, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.login-leaderboard-close:hover,
.login-leaderboard-close:focus-visible {
  border-color: var(--pink);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(244, 196, 48, 0.34), inset 0 0 18px rgba(244, 196, 48, 0.1);
}

.login-leaderboard-identity {
  position: relative;
  margin-top: 0;
  padding: 14px 16px 13px;
  border: 1px solid rgba(0, 245, 255, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(0, 245, 255, 0.09), transparent 38%),
    radial-gradient(circle at 100% 0, rgba(244, 196, 48, 0.12), transparent 42%),
    rgba(3, 9, 18, 0.56);
  box-shadow: inset 0 0 22px rgba(0, 245, 255, 0.04);
  overflow: hidden;
}

.login-leaderboard-identity::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  background: linear-gradient(var(--cyan), var(--pink));
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.8);
}

.login-leaderboard-identity::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 245, 255, 0.58), transparent 48%, rgba(244, 196, 48, 0.42));
}

.login-leaderboard-kicker {
  display: block;
  color: var(--cyan);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: var(--glow-cyan);
}

.login-leaderboard-detail h2 {
  margin: 6px 0 3px;
  color: var(--text);
  font-size: clamp(1.52rem, 3.6vw, 2.35rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(232, 240, 255, 0.36), 0 0 32px rgba(244, 196, 48, 0.18);
}

.login-leaderboard-meta,
.login-leaderboard-status,
.login-leaderboard-toast {
  margin: 0;
  color: rgba(232, 240, 255, 0.74);
  line-height: 1.45;
}

.login-leaderboard-meta {
  color: rgba(232, 240, 255, 0.7);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.login-leaderboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.login-leaderboard-stat {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 52%),
    rgba(3, 9, 18, 0.66);
  box-shadow: inset 0 0 18px rgba(0, 245, 255, 0.045), 0 10px 22px rgba(0, 0, 0, 0.2);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.login-leaderboard-stat:hover {
  border-color: rgba(0, 245, 255, 0.46);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.16), inset 0 0 18px rgba(0, 245, 255, 0.06);
}

.login-leaderboard-stat span {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-leaderboard-stat strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-leaderboard-stat[data-stat="rank"] strong,
.login-leaderboard-stat[data-stat="empire-score"] strong {
  color: var(--yellow);
  text-shadow: 0 0 14px rgba(255, 223, 75, 0.44);
}

.login-leaderboard-stat[data-stat="distrikty"] strong {
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}

.login-leaderboard-status {
  position: relative;
  margin-top: 11px;
  padding: 27px 13px 11px;
  border: 1px solid rgba(244, 196, 48, 0.28);
  border-radius: 14px;
  color: rgba(232, 240, 255, 0.82);
  font-size: 0.88rem;
  background:
    linear-gradient(135deg, rgba(244, 196, 48, 0.13), transparent 54%),
    rgba(3, 9, 18, 0.6);
  box-shadow: inset 0 0 24px rgba(244, 196, 48, 0.055), 0 0 20px rgba(244, 196, 48, 0.08);
}

.login-leaderboard-status::before {
  content: "STATUS REPORT";
  position: absolute;
  top: 9px;
  left: 13px;
  color: var(--pink);
  font: 1000 0.56rem var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: var(--glow-pink);
}

.login-leaderboard-status::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 13px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(57, 255, 136, 0.7);
}

.login-leaderboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.login-leaderboard-actions button {
  min-height: 35px;
  border: 1px solid rgba(0, 245, 255, 0.32);
  border-radius: 10px;
  color: rgba(232, 240, 255, 0.88);
  background:
    linear-gradient(135deg, rgba(0, 245, 255, 0.13), rgba(244, 196, 48, 0.06)),
    rgba(3, 9, 18, 0.72);
  padding: 0 12px;
  font: 900 0.62rem var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 0 16px rgba(0, 245, 255, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, color 160ms ease;
}

.login-leaderboard-actions button:hover,
.login-leaderboard-actions button:focus-visible {
  border-color: var(--pink);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(244, 196, 48, 0.3), inset 0 0 18px rgba(244, 196, 48, 0.07);
}

.login-leaderboard-actions button:nth-child(3) {
  border-color: rgba(255, 51, 71, 0.42);
  color: #ffd8dd;
  background:
    linear-gradient(135deg, rgba(255, 51, 71, 0.18), rgba(244, 196, 48, 0.08)),
    rgba(3, 9, 18, 0.76);
}

.login-leaderboard-toast {
  position: absolute;
  right: 20px;
  bottom: 14px;
  left: 20px;
  z-index: 3;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 223, 75, 0.42);
  border-radius: 10px;
  color: var(--yellow);
  background: rgba(35, 25, 7, 0.72);
  font-size: 0.82rem;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255, 223, 75, 0.48);
  box-shadow: 0 0 18px rgba(255, 223, 75, 0.16);
  animation: loginToastIn 180ms ease-out both;
}

@keyframes loginLeaderboardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (max-width: 620px) {
  .login-leaderboard-overlay {
    padding: 10px;
  }

  .login-leaderboard-detail {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 12px;
    border-radius: 16px;
  }

  .login-leaderboard-detail::after {
    inset: 8px;
    border-radius: 12px;
  }

  .login-leaderboard-close {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
  }

  .login-leaderboard-identity {
    margin-top: 7px;
    padding: 10px 12px 9px;
    border-radius: 12px;
  }

  .login-leaderboard-kicker {
    font-size: 0.52rem;
  }

  .login-leaderboard-detail h2 {
    margin-top: 4px;
    font-size: clamp(1.1rem, 6.6vw, 1.58rem);
  }

  .login-leaderboard-meta {
    font-size: 0.7rem;
    line-height: 1.28;
  }

  .login-leaderboard-stats {
    gap: 6px;
    margin-top: 7px;
  }

  .login-leaderboard-stat {
    min-height: 45px;
    padding: 6px 7px;
    border-radius: 9px;
  }

  .login-leaderboard-stat span {
    font-size: 0.45rem;
    letter-spacing: 0.07em;
  }

  .login-leaderboard-stat strong {
    font-size: 0.68rem;
  }

  .login-leaderboard-status {
    padding: 22px 10px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    line-height: 1.32;
  }

  .login-leaderboard-status::before {
    top: 7px;
    left: 10px;
    font-size: 0.48rem;
  }

  .login-leaderboard-status::after {
    top: 9px;
    right: 10px;
    width: 6px;
    height: 6px;
  }

  .login-leaderboard-actions button {
    flex: 1 1 86px;
    min-height: 30px;
    padding: 0 7px;
    border-radius: 8px;
    font-size: 0.5rem;
    letter-spacing: 0.07em;
  }

  .login-leaderboard-toast {
    right: 12px;
    bottom: 10px;
    left: 12px;
    padding: 7px 8px;
    font-size: 0.68rem;
  }
}

.panel-link-button {
  display: none;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  color: rgba(232, 240, 255, 0.72);
  background: transparent;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.active-events {
  position: absolute;
  z-index: 5;
  left: 1vw;
  bottom: 1.1vh;
  width: clamp(300px, 18.4vw, 390px);
  max-width: none;
  padding: 14px;
  border-color: rgba(0, 196, 212, 0.34);
  background:
    linear-gradient(135deg, rgba(0, 196, 212, 0.08), transparent 28% 70%, rgba(244, 196, 48, 0.06)),
    linear-gradient(180deg, rgba(10, 18, 31, 0.84), rgba(2, 7, 16, 0.76)),
    rgba(1, 4, 10, 0.8);
  box-shadow:
    0 0 0 1px rgba(0, 196, 212, 0.08),
    0 0 24px rgba(0, 196, 212, 0.16),
    0 18px 52px rgba(0, 0, 0, 0.54),
    inset 0 0 30px rgba(0, 196, 212, 0.045);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}

.active-events::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(0, 196, 212, 0.34) 48%, transparent 84%) top / 100% 1px no-repeat,
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 7px);
  transform: translateY(-100%);
}

.active-events.is-switching::after {
  animation: loginEventsScan 680ms ease-out;
}

.active-events__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(0, 196, 212, 0.18);
}

.active-events__header h2 {
  margin: 0;
  color: rgba(232, 240, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(0, 196, 212, 0.24);
}

.active-events__header::after {
  content: "CITY FEED";
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid rgba(244, 196, 48, 0.24);
  border-radius: 999px;
  color: rgba(244, 196, 48, 0.92);
  background: rgba(26, 19, 5, 0.34);
  font-size: 0.52rem;
  font-weight: 1000;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(244, 196, 48, 0.18);
}

.active-events__header span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(57, 255, 136, 0.22);
  border-radius: 999px;
  color: var(--green);
  background: rgba(2, 15, 10, 0.54);
  font-size: 0.52rem;
  font-weight: 1000;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(57, 255, 136, 0.5);
  white-space: nowrap;
}

.active-events__header span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(57, 255, 136, 0.78);
  animation: dotBlink 1.2s infinite;
}

.active-events__feed {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.event-card {
  --event-tone: var(--cyan);
  --event-rgb: 0, 245, 255;
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 66px;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(var(--event-rgb), 0.2);
  border-radius: 10px;
  color: var(--event-tone);
  background:
    linear-gradient(90deg, rgba(var(--event-rgb), 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.05)),
    rgba(2, 8, 16, 0.6);
  box-shadow:
    inset 0 0 16px rgba(var(--event-rgb), 0.045),
    0 8px 18px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  animation: loginEventCardIn 460ms ease both;
  animation-delay: var(--event-delay, 0ms);
}

.event-card::before {
  content: "";
  position: absolute;
  inset: 11px auto 11px 0;
  width: 2px;
  border-radius: 999px;
  background: var(--event-tone);
  box-shadow: 0 0 12px rgba(var(--event-rgb), 0.46);
}

.event-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.36;
  background:
    linear-gradient(90deg, transparent, rgba(var(--event-rgb), 0.22), transparent) 0 0 / 180% 100% no-repeat;
  transform: translateX(-60%);
}

.active-events.is-switching .event-card::after {
  animation: loginEventSweep 700ms ease-out;
}

.event-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(var(--event-rgb), 0.28);
  background:
    linear-gradient(180deg, rgba(var(--event-rgb), 0.14), rgba(var(--event-rgb), 0.07)),
    rgba(4, 10, 18, 0.74);
  box-shadow:
    inset 0 0 14px rgba(var(--event-rgb), 0.1),
    0 0 14px rgba(var(--event-rgb), 0.12);
  color: rgba(245, 250, 255, 0.92);
  font-weight: 1000;
  font-size: 0.84rem;
  text-shadow: 0 0 10px rgba(var(--event-rgb), 0.34);
}

.event-card h3 {
  margin: 0 0 3px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.73rem;
  line-height: 1.08;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(var(--event-rgb), 0.22);
}

.event-card p {
  margin: 0;
  color: rgba(171, 188, 208, 0.82);
  font-size: 0.655rem;
  line-height: 1.32;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.event-card time {
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(var(--event-rgb), 0.24);
  border-radius: 999px;
  color: rgba(226, 241, 248, 0.9);
  background:
    linear-gradient(180deg, rgba(0, 196, 212, 0.08), rgba(0, 0, 0, 0)),
    rgba(1, 5, 12, 0.62);
  box-shadow: inset 0 0 12px rgba(var(--event-rgb), 0.06);
  font-weight: 900;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.event-card[data-tone="raid"],
.event-card--raid { --event-tone: var(--red); --event-rgb: 255, 51, 71; }
.event-card[data-tone="toxic"],
.event-card--toxic { --event-tone: #e3b85c; --event-rgb: 227, 184, 92; }
.event-card[data-tone="war"],
.event-card--war { --event-tone: var(--pink); --event-rgb: 244, 196, 48; }
.event-card[data-tone="market"] { --event-tone: var(--yellow); --event-rgb: 255, 223, 75; }
.event-card[data-tone="hack"] { --event-tone: var(--cyan); --event-rgb: 0, 245, 255; }
.event-card[data-tone="supply"] { --event-tone: #9bd0ff; --event-rgb: 155, 208, 255; }
.event-card[data-tone="alert"] { --event-tone: var(--red); --event-rgb: 255, 51, 71; }
.event-card[data-tone="race"] { --event-tone: #b9ff7a; --event-rgb: 185, 255, 122; }
.event-card[data-tone="blackout"] { --event-tone: #8d9cff; --event-rgb: 141, 156, 255; }
.event-card[data-tone="intel"] { --event-tone: #7af5ff; --event-rgb: 122, 245, 255; }
.event-card[data-tone="bounty"] { --event-tone: #ff7f9f; --event-rgb: 255, 127, 159; }
.event-card[data-tone="social"] { --event-tone: #ffb15f; --event-rgb: 255, 177, 95; }

@keyframes loginEventCardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes loginEventSweep {
  0% { transform: translateX(-80%); }
  100% { transform: translateX(80%); }
}

@keyframes loginEventsScan {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }
  24% {
    opacity: 0.44;
  }
  100% {
    opacity: 0;
    transform: translateY(100%);
  }
}

.login-terminal {
  position: relative;
  position: absolute;
  z-index: 30;
  left: 50%;
  top: 0.2vh;
  transform: translateX(-50%);
  width: clamp(540px, 33.2vw, 675px);
  min-height: auto;
  padding: 8px 22px 8px;
  border-radius: var(--radius-lg);
  text-align: center;
  overflow: hidden;
  clip-path: polygon(24px 0, calc(100% - 24px) 0, 100% 24px, 100% calc(100% - 32px), calc(100% - 44px) 100%, 44px 100%, 0 calc(100% - 32px), 0 24px);
  box-shadow:
    0 0 0 1px rgba(var(--pink-rgb), 0.32),
    0 0 30px rgba(var(--cyan-rgb), 0.28),
    0 0 56px rgba(var(--pink-rgb), 0.2),
    inset 0 0 40px rgba(var(--cyan-rgb), 0.06);
  animation: terminalGlow 3.2s ease-in-out infinite alternate;
}

@media (min-width: 1181px) {
  .login-stage {
    background-position:
      center,
      center 12%,
      center 12%,
      center,
      center;
  }

  .login-terminal {
    top: 50%;
    transform: translate(-50%, -30%);
  }
}

.terminal-frame {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(var(--cyan-rgb), 0.34);
  border-radius: 20px;
  pointer-events: none;
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 22px), calc(100% - 30px) 100%, 30px 100%, 0 calc(100% - 22px), 0 16px);
}

.terminal-frame::before,
.terminal-frame::after {
  content: none;
  display: none;
}

.terminal-frame::before { left: -1px; }
.terminal-frame::after { right: -1px; }

.terminal-crown {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--yellow);
  font-size: 4.35rem;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(31, 21, 8, 0.85);
}

.terminal-kicker {
  margin: 0 0 4px;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.terminal-title h1 {
  margin: 0;
  line-height: 0.8;
  text-transform: uppercase;
}

.terminal-title h1 span {
  display: block;
  color: #f2f6ff;
  font-size: clamp(3.4rem, 5.2vw, 6.4rem);
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 #8393aa, 0 0 24px rgba(232, 240, 255, 0.52);
}

.terminal-title h1 strong {
  display: block;
  margin-top: 2px;
  color: var(--pink);
  font-size: clamp(2.6rem, 4.4vw, 5.2rem);
  font-style: italic;
  font-weight: 1000;
  letter-spacing: 0.01em;
  text-shadow: var(--glow-pink), 0 3px 0 rgba(20, 0, 20, 0.9);
  transform: rotate(-4deg);
}

.terminal-tagline {
  display: block;
  margin: 10px 0 11px;
  padding-left: 0;
  border-left: 0;
  color: rgba(226, 236, 255, 0.78);
  font-size: clamp(0.52rem, 0.6vw, 0.64rem);
  font-weight: 750;
  letter-spacing: 0.115em;
  line-height: 1.48;
  text-align: center;
  text-transform: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.68);
  opacity: 0.94;
}

.terminal-tabs {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 auto 12px;
  max-width: 440px;
}

.terminal-tab {
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  border-radius: 12px;
  padding: 9px 10px;
  color: rgba(232, 240, 255, 0.7);
  background: rgba(2, 8, 15, 0.52);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.terminal-tab.is-active {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}

.terminal-form {
  display: grid;
  gap: 5px;
  max-width: 435px;
  margin: 0 auto;
}

.terminal-form.hidden,
.hidden {
  display: none !important;
}

.field-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(var(--cyan-rgb), 0.22);
  border-radius: 9px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 10px),
    linear-gradient(180deg, rgba(var(--cyan-rgb), 0.04), transparent 34%),
    rgba(0, 4, 10, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 18px rgba(var(--cyan-rgb), 0.04),
    0 0 0 1px rgba(var(--cyan-rgb), 0.04),
    0 0 16px rgba(var(--cyan-rgb), 0.07);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.field-shell:focus-within {
  border-color: var(--cyan);
  box-shadow:
    0 0 0 1px rgba(var(--cyan-rgb), 0.13),
    0 0 16px rgba(var(--cyan-rgb), 0.14),
    inset 0 0 18px rgba(var(--cyan-rgb), 0.06);
}

.field-shell::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(114, 224, 255, 0.08);
  pointer-events: none;
  clip-path: inherit;
}

.field-icon {
  width: 36px;
  padding-left: 7px;
  color: rgba(183, 213, 235, 0.74);
  font-size: 0.8rem;
  text-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.22);
}

.field-shell input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-family: "Bahnschrift", "Segoe UI", "Arial", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-shell input::placeholder {
  color: rgba(125, 136, 153, 0.7);
  letter-spacing: 0.08em;
}

#login-username,
#login-password {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

#login-username::placeholder,
#login-password::placeholder {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.password-eye {
  width: 34px;
  height: 34px;
  border: 0;
  color: rgba(214, 230, 255, 0.7);
  background: transparent;
  font-size: 0.86rem;
  text-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.16);
}

.enter-city-button {
  position: relative;
  margin-top: 2px;
  min-height: 52px;
  border: 1px solid color-mix(in srgb, var(--active-mode) 68%, #ffffff 16%);
  border-radius: 10px;
  color: #f4fbff;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 11px),
    linear-gradient(180deg, color-mix(in srgb, var(--active-mode) 18%, rgba(255, 255, 255, 0.02)), transparent 38%),
    linear-gradient(90deg, color-mix(in srgb, var(--active-mode) 92%, transparent), var(--active-mode-deep)),
    radial-gradient(circle at 50% 120%, rgba(255, 223, 75, 0.72), transparent 34%);
  font-family: "Bahnschrift", "Segoe UI", "Arial", sans-serif;
  font-size: clamp(0.8rem, 0.92vw, 0.98rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.28),
    0 0 18px var(--active-mode-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 26px color-mix(in srgb, var(--active-mode) 18%, transparent),
    0 0 0 1px color-mix(in srgb, var(--active-mode) 12%, transparent),
    var(--active-mode-glow);
  cursor: pointer;
  overflow: hidden;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

.enter-city-button::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-130%) skewX(-24deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: buttonSweep 3.2s ease-in-out infinite;
}

.enter-city-button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 14%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.1) 3px 4px);
  mix-blend-mode: screen;
  opacity: 0.5;
}

.enter-city-button:hover,
.enter-city-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 28px var(--active-mode), 0 0 70px var(--active-mode-soft);
}

.enter-city-button.is-loading {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(2, 8, 15, 0.86);
  box-shadow: var(--glow-cyan);
}

.terminal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 490px;
  margin: 7px auto 0;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 223, 75, 0.24);
}

.terminal-link {
  --link-accent: var(--cyan);
  position: relative;
  border: 1px solid color-mix(in srgb, var(--link-accent) 24%, transparent);
  padding: 0.25rem 0.48rem 0.3rem;
  color: color-mix(in srgb, var(--link-accent) 72%, white);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, color-mix(in srgb, var(--link-accent) 10%, transparent), transparent 40%),
    rgba(3, 8, 17, 0.58);
  font-family: "Bahnschrift", "Segoe UI", "Arial", sans-serif;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow:
    0 0 8px color-mix(in srgb, var(--link-accent) 28%, transparent),
    0 0 16px color-mix(in srgb, var(--link-accent) 12%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 14px color-mix(in srgb, var(--link-accent) 8%, transparent),
    0 0 0 1px color-mix(in srgb, var(--link-accent) 6%, transparent);
  cursor: pointer;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

.terminal-link[data-tab-link="register"] {
  --link-accent: var(--pink);
}

.terminal-link[data-forgot-password] {
  --link-accent: var(--cyan);
}

.terminal-link:hover,
.terminal-link:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 0 16px color-mix(in srgb, var(--link-accent) 22%, transparent),
    inset 0 0 18px color-mix(in srgb, var(--link-accent) 10%, transparent);
}

.guest-access {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 7px;
  max-width: 490px;
  margin: 5px auto 0;
  padding-top: 3px;
  border-top: 1px solid rgba(0, 245, 255, 0.14);
}

.guest-access input,
.guest-access button {
  min-width: 0;
  border: 1px solid rgba(0, 245, 255, 0.34);
  border-radius: 10px;
  color: rgba(232, 240, 255, 0.84);
  background: rgba(0, 5, 12, 0.56);
  padding: 4px 7px;
  font: 700 0.68rem var(--font-ui);
  box-shadow: inset 0 0 14px rgba(0, 245, 255, 0.04);
}

.guest-access button {
  color: var(--yellow);
  border-color: rgba(255, 223, 75, 0.52);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-shadow: 0 0 12px rgba(255, 223, 75, 0.5);
  cursor: pointer;
}

.guest-access button:hover,
.guest-access button:focus-visible {
  color: #ffe6a6;
  box-shadow: 0 0 16px rgba(255, 223, 75, 0.38), inset 0 0 14px rgba(255, 223, 75, 0.08);
}

.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 490px);
  max-width: 100%;
  margin: 9px auto 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 82, 110, 0.34);
  border-radius: 14px;
  color: rgba(255, 232, 238, 0.95);
  background:
    linear-gradient(135deg, rgba(92, 10, 20, 0.78), rgba(6, 10, 18, 0.78)),
    radial-gradient(circle at 0% 0%, rgba(255, 51, 71, 0.2), transparent 42%);
  backdrop-filter: blur(14px) saturate(130%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.035),
    0 14px 32px rgba(0, 0, 0, 0.32),
    0 0 24px rgba(255, 51, 71, 0.18);
  font-weight: 900;
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  line-height: 1.28;
  text-transform: uppercase;
  text-align: left;
  text-shadow: 0 0 10px rgba(255, 51, 71, 0.46);
}

.auth-error::before {
  content: "!";
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(255, 223, 75, 0.36);
  border-radius: 50%;
  color: var(--yellow);
  background: rgba(5, 8, 15, 0.72);
  font-size: 0.72rem;
  box-shadow: 0 0 14px rgba(255, 51, 71, 0.2);
}

.server-status {
  position: absolute;
  z-index: 5;
  right: 1.7vw;
  top: 0.1vh;
  width: clamp(235px, 14.4vw, 310px);
  padding: 14px 14px 16px;
  font-family: var(--font-ui);
  background:
    linear-gradient(180deg, rgba(6, 14, 28, 0.94), rgba(2, 7, 16, 0.88)),
    linear-gradient(135deg, rgba(var(--cyan-rgb), 0.055), transparent 38%, rgba(var(--pink-rgb), 0.045) 100%);
  border-color: rgba(var(--cyan-rgb), 0.28);
  box-shadow:
    inset 0 1px 0 rgba(160, 240, 255, 0.08),
    inset 0 0 44px rgba(var(--cyan-rgb), 0.035),
    0 0 0 1px rgba(var(--cyan-rgb), 0.055),
    var(--glow-cyan),
    0 24px 64px rgba(0, 0, 0, 0.52);
  transition: box-shadow 420ms ease, border-color 420ms ease;
}

.server-status > * {
  position: relative;
  z-index: 1;
}

.server-status::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(114, 224, 255, 0.12);
  clip-path: polygon(0 12px, 12px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px));
  pointer-events: none;
  opacity: 0.95;
}

.server-status::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(180deg, transparent 0 18%, rgba(var(--cyan-rgb), 0.18) 19%, transparent 20% 46%, rgba(var(--pink-rgb), 0.14) 47%, transparent 48%),
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(var(--cyan-rgb), 0.085) 12px, transparent 13px 24px);
  mix-blend-mode: screen;
}

.server-status__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  background:
    linear-gradient(180deg, rgba(var(--cyan-rgb), 0.055), transparent 22%),
    repeating-linear-gradient(0deg, transparent 0 21px, rgba(var(--cyan-rgb), 0.035) 21px 22px),
    repeating-linear-gradient(90deg, transparent 0 21px, rgba(var(--pink-rgb), 0.035) 21px 22px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.84), transparent 100%);
}

.server-status.is-updating {
  border-color: rgba(var(--cyan-rgb), 0.52);
  box-shadow:
    0 0 24px rgba(var(--cyan-rgb), 0.42),
    0 0 54px rgba(var(--pink-rgb), 0.12),
    0 18px 48px rgba(0, 0, 0, 0.42);
}

.server-status.is-updating::after {
  animation: serverDecodeOverlay 1.35s steps(4, end) both;
}

.server-main {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px 0 14px;
}

.server-main__meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.server-main__meta small {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(133, 197, 227, 0.72);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.server-main strong {
  display: block;
  width: auto;
  max-width: 100%;
  padding: 0.42rem 0.78rem 0.46rem;
  border: 1px solid rgba(var(--cyan-rgb), 0.18);
  border-left: 3px solid rgba(var(--cyan-rgb), 0.58);
  background:
    repeating-linear-gradient(90deg, rgba(var(--cyan-rgb), 0.055) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, rgba(var(--cyan-rgb), 0.055), rgba(var(--cyan-rgb), 0.01) 46%, rgba(var(--pink-rgb), 0.032) 100%),
    linear-gradient(90deg, rgba(var(--cyan-rgb), 0.085), rgba(var(--cyan-rgb), 0.022) 42%, transparent 100%),
    rgba(255, 255, 255, 0.02);
  font-size: clamp(1rem, 1.15vw, 1.24rem);
  font-family: "Bahnschrift", "Consolas", "Segoe UI", monospace;
  font-weight: 900;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #cfffff;
  text-shadow:
    0 0 8px rgba(var(--cyan-rgb), 0.22),
    0 0 18px rgba(var(--cyan-rgb), 0.09);
  box-shadow:
    inset 0 0 18px rgba(var(--cyan-rgb), 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px rgba(var(--cyan-rgb), 0.055);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.server-main strong::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 18%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.16) 3px 4px);
  mix-blend-mode: screen;
  opacity: 0.45;
}

.server-state-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5ch;
  padding: 0.2rem 0.42rem 0.24rem;
  text-align: center;
  font-family: inherit;
  font-weight: 900;
  font-size: 0.56rem;
  line-height: 1;
  letter-spacing: 0.16em;
  color: #7effb4;
  border: 1px solid rgba(57, 255, 136, 0.3);
  background: linear-gradient(180deg, rgba(15, 49, 30, 0.86), rgba(6, 23, 15, 0.92));
  box-shadow: inset 0 0 14px rgba(57, 255, 136, 0.14), 0 0 14px rgba(57, 255, 136, 0.1);
  white-space: nowrap;
}

.server-status .panel-heading {
  flex-wrap: nowrap;
  gap: 7px;
}

.server-status .panel-heading h2 {
  flex: 0 0 auto;
}

.server-status__headline {
  display: none;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
  color: rgba(133, 197, 227, 0.78);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

.server-status__headline .server-state-inline {
  min-width: auto;
  padding: 0.24rem 0.44rem 0.26rem;
  font-size: 0.54rem;
  letter-spacing: 0.08em;
}

.server-status .panel-heading .status-dot {
  flex: 0 0 auto;
}

.server-state-inline,
.metric strong {
  color: var(--green);
  font-weight: 1000;
  text-shadow: 0 0 14px rgba(57, 255, 136, 0.5);
}

.server-players {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 11px;
  color: rgba(232, 240, 255, 0.8);
  border: 1px solid rgba(93, 191, 233, 0.18);
  background:
    linear-gradient(90deg, rgba(var(--cyan-rgb), 0.07), rgba(var(--pink-rgb), 0.04)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 9px);
  box-shadow:
    inset 0 0 20px rgba(var(--cyan-rgb), 0.035),
    0 0 0 1px rgba(var(--cyan-rgb), 0.03);
}

.server-players__label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin-left: -4px;
  margin-right: auto;
  padding: 0.16rem 0.34rem 0.2rem;
  color: rgba(186, 235, 255, 0.82);
  border: 1px solid rgba(var(--cyan-rgb), 0.14);
  background: rgba(var(--cyan-rgb), 0.045);
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.12);
}

.server-players strong {
  display: inline-block;
  width: auto;
  padding-left: 10px;
  border-left: 1px solid rgba(var(--cyan-rgb), 0.12);
  color: var(--yellow);
  font-family: "Bahnschrift", "Consolas", "Segoe UI", monospace;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(255, 223, 75, 0.28),
    0 0 16px rgba(255, 223, 75, 0.1);
  white-space: nowrap;
}

.metric {
  --metric-accent: var(--red);
  --metric-accent-soft: rgba(255, 51, 71, 0.18);
  --metric-circle-size: 76px;
  margin-top: 18px;
  padding: 7px 10px 12px;
  display: grid;
  grid-template-rows: 22px auto;
  align-items: start;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, color-mix(in srgb, var(--metric-accent) 10%, transparent), transparent 70%),
    rgba(5, 10, 20, 0.48);
  border: 1px solid color-mix(in srgb, var(--metric-accent) 28%, rgba(111, 184, 216, 0.16));
  box-shadow:
    inset 0 0 22px color-mix(in srgb, var(--metric-accent) 12%, transparent),
    0 0 0 1px color-mix(in srgb, var(--metric-accent) 8%, transparent);
}

.server-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.server-metrics .metric {
  margin-top: 0;
}

.metric span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.16rem 0.36rem 0.2rem;
  color: rgba(232, 240, 255, 0.74);
  border: 1px solid color-mix(in srgb, var(--metric-accent) 20%, transparent);
  background: color-mix(in srgb, var(--metric-accent) 10%, transparent);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 10px color-mix(in srgb, var(--metric-accent) 24%, transparent);
}

.metric .metric-label {
  width: fit-content;
  min-height: 18px;
  justify-self: start;
  align-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--metric-accent) 68%, rgba(232, 240, 255, 0.74));
  font-size: 0.48rem;
  letter-spacing: 0.105em;
  line-height: 1;
  text-shadow: 0 0 8px color-mix(in srgb, var(--metric-accent) 24%, transparent);
}

.metric strong {
  display: block;
  min-height: 1.25em;
  width: auto;
  margin: 9px 0 12px;
  padding-left: 8px;
  border-left: 1px solid color-mix(in srgb, var(--metric-accent) 24%, transparent);
  font-family: "Bahnschrift", "Consolas", "Segoe UI", monospace;
  color: var(--metric-accent);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow:
    0 0 8px color-mix(in srgb, var(--metric-accent) 28%, transparent),
    0 0 16px color-mix(in srgb, var(--metric-accent) 10%, transparent);
  white-space: nowrap;
}

.metric--heat strong,
.metric--districts strong {
  display: none;
}

.metric--heat {
  --metric-accent: #b10f3a;
}

.metric--districts {
  --metric-accent: var(--cyan);
}

.server-status[data-server-mode="war"] .metric--districts {
  --metric-accent: var(--pink);
}

.metric-circle {
  --value: 0;
  width: var(--metric-circle-size);
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  align-self: start;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(3, 9, 18, 0.96) 0 58%, transparent 59% 100%),
    conic-gradient(var(--metric-accent) calc(var(--value) * 1%), rgba(125, 136, 153, 0.18) 0);
  box-shadow:
    inset 0 0 26px color-mix(in srgb, var(--metric-accent) 22%, transparent),
    0 0 0 1px color-mix(in srgb, var(--metric-accent) 10%, transparent),
    0 0 26px color-mix(in srgb, var(--metric-accent) 16%, transparent);
  position: relative;
}

.metric-circle::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(232, 240, 255, 0.08);
}

.metric-circle::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  opacity: 0.8;
}

.metric-circle__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1px;
  justify-items: center;
  text-align: center;
  padding: 0.18rem 0.24rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    rgba(4, 9, 18, 0.28);
  border: 1px solid color-mix(in srgb, var(--metric-accent) 18%, transparent);
  box-shadow:
    inset 0 0 14px color-mix(in srgb, var(--metric-accent) 10%, transparent),
    0 0 14px color-mix(in srgb, var(--metric-accent) 8%, transparent);
}

.metric-circle__inner b {
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--metric-accent) 76%, white);
  text-shadow:
    0 0 10px color-mix(in srgb, var(--metric-accent) 28%, transparent),
    0 0 20px color-mix(in srgb, var(--metric-accent) 12%, transparent);
}

.metric-circle__inner small {
  font-family: inherit;
  color: color-mix(in srgb, var(--metric-accent) 42%, white);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 8px color-mix(in srgb, var(--metric-accent) 14%, transparent);
}

.server-status .is-typing {
  position: relative;
}

.server-status .is-typing::after {
  content: "_";
  position: absolute;
  left: calc(100% + 2px);
  color: currentColor;
  text-shadow: inherit;
  animation: serverCursorBlink 520ms steps(2, end) infinite;
}

.mode-dock {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: clamp(8px, 2.2vh, 34px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: clamp(720px, 48vw, 920px);
}

.mode-card {
  position: relative;
  isolation: isolate;
  min-height: 178px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}

.mode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  transform: translateX(-130%) skewX(-24deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transition: transform 520ms ease;
}

.mode-card > * {
  position: relative;
  z-index: 1;
}

.mode-card:hover,
.mode-card:focus-visible,
.mode-card.is-active {
  transform: none;
}

.mode-card:hover::before,
.mode-card:focus-visible::before,
.mode-card.is-active::before {
  transform: translateX(-130%) skewX(-24deg);
}

.mode-card--free {
  border-color: rgba(0, 245, 255, 0.42);
  background:
    radial-gradient(circle at 16% 10%, rgba(0, 128, 170, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(4, 20, 37, 0.88), rgba(2, 8, 19, 0.94));
  box-shadow: var(--glow-cyan), 0 18px 40px rgba(0, 0, 0, 0.4);
}

.mode-card--free:hover,
.mode-card--free:focus-visible,
.mode-card--free.is-active {
  border-color: rgba(0, 245, 255, 0.82);
  box-shadow: 0 0 28px rgba(0, 245, 255, 0.65), 0 0 70px rgba(0, 245, 255, 0.28), 0 18px 40px rgba(0, 0, 0, 0.4);
}

.mode-card--war {
  border-color: rgba(244, 196, 48, 0.48);
  background:
    radial-gradient(circle at 86% 12%, rgba(140, 106, 24, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(42, 28, 8, 0.9), rgba(18, 12, 5, 0.95));
  box-shadow: var(--glow-pink), 0 18px 40px rgba(0, 0, 0, 0.4);
}

.mode-card--war:hover,
.mode-card--war:focus-visible,
.mode-card--war.is-active {
  border-color: rgba(244, 196, 48, 0.84);
  box-shadow: 0 0 28px rgba(244, 196, 48, 0.58), 0 0 70px rgba(244, 196, 48, 0.28), 0 18px 40px rgba(0, 0, 0, 0.4);
}

.mode-content {
  display: block;
  width: 100%;
  min-width: 0;
}

.mode-card--war .mode-content {
  margin-left: auto;
  text-align: right;
}

.mode-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  font-size: 2.35rem;
}

.mode-icon > span {
  display: block;
  transform: rotate(-45deg);
}

.mode-icon > .mode-icon__pill {
  transform: rotate(-55deg);
}

.mode-icon > .mode-icon__bullet {
  transform: rotate(-55deg);
}

.mode-icon__pill {
  position: relative;
  width: 28px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(0, 245, 255, 0.2) 0 49%, rgba(255, 255, 255, 0.06) 49% 51%, rgba(0, 245, 255, 0.34) 51% 100%),
    rgba(0, 196, 212, 0.12);
  box-shadow:
    inset 0 0 10px rgba(0, 245, 255, 0.18),
    0 0 16px rgba(0, 245, 255, 0.18);
}

.mode-icon__pill::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  width: 1px;
  height: calc(100% - 4px);
  background: rgba(232, 240, 255, 0.4);
  transform: translateX(-50%);
}

.mode-icon__bullet {
  position: relative;
  width: 24px;
  height: 11px;
  border-radius: 999px 70% 70% 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(90deg, rgba(122, 84, 16, 0.72), rgba(244, 196, 48, 0.98) 62%, rgba(255, 224, 148, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 235, 252, 0.2),
    inset 9px 0 8px rgba(24, 4, 34, 0.34),
    0 0 16px rgba(244, 196, 48, 0.48);
}

.mode-icon__bullet::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  bottom: 2px;
  width: 6px;
  border-radius: 999px;
  background: rgba(20, 4, 28, 0.34);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.16);
}

.mode-icon__bullet::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid rgba(244, 196, 48, 0.96);
  filter: drop-shadow(0 0 8px rgba(244, 196, 48, 0.46));
  transform: translateY(-50%);
}

.mode-card--free .mode-icon,
.mode-card--free strong { color: var(--cyan); }
.mode-card--war .mode-icon,
.mode-card--war strong { color: var(--pink); }

.mode-card strong,
.mode-card small,
.mode-card em {
  display: block;
}

.mode-card strong {
  font-size: 1.9rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-shadow: 0 0 14px currentColor;
}

.mode-card small {
  margin-top: 4px;
  color: rgba(232, 240, 255, 0.82);
  font-size: 1.08rem;
}

.mode-card em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
}

.premium-badge {
  position: absolute;
  right: 16px;
  top: 12px;
  padding: 2px 5px;
  border: 1px solid var(--yellow);
  border-radius: 5px;
  color: var(--yellow);
  font-size: 0.5rem;
  font-weight: 900;
  box-shadow: 0 0 8px rgba(255, 223, 75, 0.28);
  transition: background-color 160ms ease, box-shadow 160ms ease, text-shadow 160ms ease;
}

.mode-card--war:hover .premium-badge,
.mode-card--war:focus-visible .premium-badge {
  background: rgba(255, 223, 75, 0.12);
  box-shadow: 0 0 14px rgba(255, 223, 75, 0.76), 0 0 32px rgba(255, 223, 75, 0.42);
  text-shadow: 0 0 12px rgba(255, 231, 167, 0.92);
}

.login-footer {
  position: fixed;
  right: 24px;
  bottom: 18px;
  z-index: 10;
  display: flex;
  gap: 18px;
}

.login-footer a,
.login-footer button {
  border: 0;
  color: color-mix(in srgb, var(--active-mode) 74%, rgba(232, 240, 255, 0.7));
  background: transparent;
  font: 800 0.8rem var(--font-ui);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px var(--active-mode-soft);
  transition: color 160ms ease, text-shadow 160ms ease;
}

@media (min-width: 761px) {
  .login-footer a,
  .login-footer button {
    font-size: 0.92rem;
  }
}

.login-footer a:hover,
.login-footer button:hover {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.84), 0 0 24px var(--active-mode), 0 0 44px var(--active-mode-soft);
}

.login-about-overlay {
  position: fixed;
  inset: 0;
  z-index: 48;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}

.login-about-overlay[hidden] {
  display: none;
}

.login-about-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 16%, rgba(244, 196, 48, 0.16), transparent 30%),
    radial-gradient(circle at 15% 82%, rgba(0, 196, 212, 0.12), transparent 32%),
    rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(13px) saturate(1.15);
  -webkit-backdrop-filter: blur(13px) saturate(1.15);
}

.login-about-dialog {
  position: relative;
  isolation: isolate;
  width: min(860px, calc(100vw - 28px));
  max-height: min(82dvh, 820px);
  overflow: hidden;
  border: 1px solid rgba(244, 196, 48, 0.44);
  border-radius: 18px;
  color: rgba(232, 240, 255, 0.9);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 18% 0, rgba(244, 196, 48, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(4, 7, 13, 0.72), rgba(1, 3, 8, 0.82));
  box-shadow:
    0 30px 92px rgba(0, 0, 0, 0.78),
    0 0 42px rgba(244, 196, 48, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 34px rgba(244, 196, 48, 0.06);
  outline: none;
}

.login-about-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(244, 196, 48, 0.22), transparent 18%, transparent 82%, rgba(0, 196, 212, 0.14)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 8px);
  opacity: 0.7;
  mix-blend-mode: screen;
}

.login-about-dialog--empty {
  max-height: min(42dvh, 360px);
}

.login-about-dialog--empty .login-about-copy {
  min-height: 120px;
}

.login-about-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(244, 196, 48, 0.78);
  border-radius: 8px;
  color: #f4c430;
  background: rgba(5, 7, 12, 0.82);
  font: 1000 1.05rem var(--font-ui);
  cursor: pointer;
  box-shadow: 0 0 18px rgba(244, 196, 48, 0.28), inset 0 0 14px rgba(244, 196, 48, 0.08);
}

.login-about-close:hover,
.login-about-close:focus-visible {
  color: #fff7ce;
  border-color: #ffe083;
  box-shadow: 0 0 24px rgba(244, 196, 48, 0.5), inset 0 0 18px rgba(244, 196, 48, 0.12);
}

.login-about-header,
.login-about-copy {
  position: relative;
  z-index: 1;
}

.login-about-header {
  padding: 22px 72px 12px 28px;
  border-bottom: 1px solid rgba(244, 196, 48, 0.2);
  background: linear-gradient(90deg, rgba(244, 196, 48, 0.1), transparent);
}

.login-about-header h2 {
  margin: 0;
  color: #f4c430;
  font-size: clamp(1.55rem, 3.8vw, 2.85rem);
  font-weight: 1000;
  line-height: 0.9;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(244, 196, 48, 0.45), 0 0 42px rgba(244, 196, 48, 0.18);
}

.login-about-copy {
  max-height: calc(min(82dvh, 820px) - 118px);
  overflow-y: auto;
  padding: 22px 28px 30px;
  scrollbar-color: rgba(244, 196, 48, 0.7) rgba(4, 8, 16, 0.72);
  scrollbar-width: thin;
}

.login-about-copy::-webkit-scrollbar {
  width: 8px;
}

.login-about-copy::-webkit-scrollbar-track {
  background: rgba(4, 8, 16, 0.72);
}

.login-about-copy::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(#f4c430, #00c4d4);
}

.login-about-copy p {
  margin: 0 0 1rem;
  color: rgba(232, 240, 255, 0.82);
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  font-weight: 650;
  line-height: 1.68;
}

.login-about-copy strong {
  color: #f4c430;
  letter-spacing: 0.04em;
  text-shadow: 0 0 16px rgba(244, 196, 48, 0.32);
}

.login-about-gold {
  color: #f4c430;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(244, 196, 48, 0.36);
}

.login-about-lead {
  padding-left: 16px;
  border-left: 2px solid rgba(244, 196, 48, 0.78);
  color: rgba(255, 247, 206, 0.92) !important;
  font-size: clamp(1.02rem, 1.32vw, 1.22rem) !important;
}

.login-about-final {
  margin-top: 1.4rem !important;
  padding: 18px;
  border: 1px solid rgba(244, 196, 48, 0.34);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(244, 196, 48, 0.12), rgba(0, 196, 212, 0.06));
  text-transform: uppercase;
}

.access-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--cyan-rgb), 0.12), transparent 42%),
    rgba(1, 4, 10, 0.74);
  backdrop-filter: blur(14px) saturate(128%);
}

.access-overlay[hidden] {
  display: none;
}

.access-overlay div {
  --access-accent: var(--cyan);
  --access-accent-rgb: var(--cyan-rgb);
  width: min(520px, 100%);
  min-width: 0;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid color-mix(in srgb, var(--access-accent) 56%, rgba(255, 255, 255, 0.12));
  border-radius: 24px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(8, 14, 26, 0.9), rgba(3, 7, 14, 0.82)),
    radial-gradient(circle at 50% 0%, rgba(var(--access-accent-rgb), 0.22), transparent 44%),
    radial-gradient(circle at 50% 112%, rgba(var(--access-accent-rgb), 0.18), transparent 36%);
  backdrop-filter: blur(18px) saturate(138%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 0 34px rgba(var(--access-accent-rgb), 0.08),
    0 24px 80px rgba(0, 0, 0, 0.56),
    0 0 42px rgba(var(--access-accent-rgb), 0.32);
}

.access-overlay[data-mode="war"] {
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--pink-rgb), 0.13), transparent 42%),
    rgba(1, 4, 10, 0.74);
}

.access-overlay[data-mode="war"] div {
  --access-accent: var(--pink);
  --access-accent-rgb: var(--pink-rgb);
}

.access-overlay span,
.access-overlay strong {
  display: block;
  color: color-mix(in srgb, var(--access-accent) 84%, #ffffff 12%);
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-shadow:
    0 0 14px rgba(var(--access-accent-rgb), 0.48),
    0 0 30px rgba(var(--access-accent-rgb), 0.22);
}

.access-overlay span {
  margin-bottom: 10px;
  font-size: 0.72rem;
}

.access-overlay strong {
  color: #f8fbff;
  font-size: clamp(1.28rem, 3.7vw, 1.78rem);
  line-height: 1.08;
}

@keyframes backgroundPulse {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

@keyframes terminalGlow {
  from { box-shadow: 0 0 0 1px rgba(var(--pink-rgb), 0.22), 0 0 28px rgba(var(--cyan-rgb), 0.22), 0 0 52px rgba(var(--pink-rgb), 0.16), inset 0 0 40px rgba(var(--cyan-rgb), 0.05); }
  to { box-shadow: 0 0 0 1px rgba(var(--cyan-rgb), 0.26), 0 0 36px rgba(var(--cyan-rgb), 0.3), 0 0 68px rgba(var(--pink-rgb), 0.24), inset 0 0 46px rgba(var(--pink-rgb), 0.055); }
}

@keyframes crownPulse {
  from {
    opacity: 0.82;
    transform: translateX(-50%) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1.04);
  }
}

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

@keyframes buttonSweep {
  0%, 42% { transform: translateX(-130%) skewX(-24deg); }
  58%, 100% { transform: translateX(130%) skewX(-24deg); }
}

@keyframes policeFlicker {
  0%, 100% { opacity: 0.24; transform: scaleX(0.9); }
  45% { opacity: 0.6; transform: scaleX(1.05); }
}

@keyframes markerPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.72; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes serverProgressSweep {
  0%,
  35% { transform: translateX(-115%); }
  70%,
  100% { transform: translateX(115%); }
}

@keyframes serverDecodeOverlay {
  0% {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
  }
  18% {
    opacity: 0.9;
    clip-path: inset(0 0 64% 0);
  }
  42% {
    opacity: 0.48;
    clip-path: inset(28% 0 34% 0);
  }
  68% {
    opacity: 0.72;
    clip-path: inset(58% 0 12% 0);
  }
  100% {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
  }
}

@keyframes serverCursorBlink {
  0%,
  45% { opacity: 1; }
  46%,
  100% { opacity: 0; }
}

@keyframes serverHeatWave {
  from { background-position: 0 0; }
  to { background-position: 220% 0; }
}

@keyframes serverSparkDash {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -24; }
}

@keyframes serverLineBlink {
  0%,
  100% { opacity: 0.72; }
  50% { opacity: 1; }
}

@keyframes noiseDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(3px, -2px); }
}

@media (max-width: 1180px) {
  .login-stage {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: auto auto auto auto;
    padding: 24px;
  }

  .login-terminal {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    grid-column: 1 / -1;
    grid-row: 1;
    width: min(720px, 100%);
  }

  .leaderboard-panel,
  .active-events,
  .server-status {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .mode-dock {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .foreground-character {
    display: none;
  }
}

@media (min-width: 1181px) and (max-height: 860px) {
  .login-stage {
    background-position:
      center,
      center 10%,
      center 10%,
      center,
      center;
  }

  .login-terminal {
    top: 50%;
    width: clamp(490px, 31vw, 610px);
    min-height: auto;
    padding: 7px 16px 7px;
  }

  .terminal-title h1 span {
    font-size: clamp(3.5rem, 4.9vw, 5.4rem);
  }

  .terminal-title h1 strong {
    font-size: clamp(2.7rem, 4.4vw, 4.6rem);
  }

  .terminal-tagline {
    margin: 10px 0 10px;
    font-size: 0.58rem;
    line-height: 1.42;
  }

  .terminal-form {
    max-width: 390px;
    gap: 5px;
  }

  .field-shell {
    min-height: 33px;
  }

  .field-shell input {
    font-size: 0.72rem;
  }

  .enter-city-button {
    min-height: 48px;
    font-size: 0.88rem;
  }

  .terminal-actions {
    margin-top: 8px;
    padding-top: 4px;
    gap: 7px 12px;
  }

  .terminal-link {
    font-size: 0.58rem;
  }

  .mode-dock {
    bottom: 1.2vh;
    width: clamp(650px, 44vw, 820px);
    gap: 18px;
  }

  .mode-card {
    min-height: 138px;
    padding: 16px;
  }

  .mode-icon {
    width: 72px;
    height: 72px;
    font-size: 1.75rem;
  }

  .mode-card strong {
    font-size: 1.48rem;
  }

  .mode-card small {
    font-size: 0.9rem;
  }

  .mode-card em {
    font-size: 0.76rem;
  }

  .leaderboard-panel {
    top: 0.6vh;
    width: clamp(230px, 14.6vw, 286px);
    min-height: clamp(420px, 58vh, 550px);
    padding: 13px;
  }

  .leaderboard-list {
    max-height: 302px;
  }

  .leaderboard-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 6px 0;
  }

  .leaderboard-rank {
    width: 31px;
    height: 31px;
    font-size: 0.68rem;
  }

  .leaderboard-item p {
    font-size: 0.69rem;
  }

  .leaderboard-score {
    font-size: 0.72rem;
  }

  .active-events {
    bottom: 2vh;
    width: clamp(285px, 17.6vw, 350px);
    padding: 12px;
  }

  .event-card {
    grid-template-columns: 37px 1fr auto;
    gap: 8px;
    padding: 7px 8px;
  }

  .event-symbol {
    width: 31px;
    height: 31px;
  }

  .event-card h3 {
    font-size: 0.72rem;
  }

  .event-card p,
  .event-card time {
    font-size: 0.64rem;
  }

  .server-status {
    top: 0.1vh;
    width: clamp(220px, 13vw, 280px);
    padding: 13px;
  }

  .server-main {
    padding: 12px 0;
  }

  .metric {
    margin-top: 12px;
  }

  .server-metrics {
    gap: 10px;
  }

  .metric strong {
    font-size: 1.08rem;
  }

}

@media (min-width: 1181px) and (max-height: 700px) {
  .login-terminal {
    top: 66%;
    min-height: auto;
    padding: 6px 14px 6px;
  }

  .terminal-title h1 span {
    font-size: clamp(3rem, 4.2vw, 4.6rem);
  }

  .terminal-title h1 strong {
    font-size: clamp(2.35rem, 3.8vw, 3.9rem);
  }

  .terminal-tagline {
    margin: 8px 0 9px;
    font-size: 0.5rem;
  }

  .field-shell {
    min-height: 33px;
  }

  .enter-city-button {
    min-height: 42px;
    font-size: 0.84rem;
  }

  .terminal-actions {
    margin-top: 6px;
    padding-top: 4px;
    gap: 8px 14px;
    justify-content: flex-end;
  }

  .terminal-link {
    font-size: 0.56rem;
  }

  .mode-card {
    min-height: 116px;
  }

  .active-events {
    bottom: 2vh;
  }

}

@media (max-width: 760px) {
  html,
  body.login-body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .login-stage {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    min-height: auto;
    padding: 2px 14px 64px;
    overflow-x: hidden;
    background:
      linear-gradient(180deg, rgba(2, 5, 11, 0.03), rgba(2, 4, 9, 0.18)),
      url("../../img/tapetamobil.png") center top / cover no-repeat,
      radial-gradient(circle at 50% 35%, rgba(var(--cyan-rgb), 0.12), transparent 36%),
      linear-gradient(120deg, #02040a 0%, #07111f 54%, #02030a 100%);
    background-position: 44% top;
    background-position-y: -2vh;
  }

  .login-terminal {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    margin-top: 280px;
    padding: 16px 18px 16px;
    clip-path: none;
  }

  .mode-dock {
    order: 2;
    margin-top: 12px;
    width: 100%;
    gap: 9px;
    align-self: center;
  }

  .leaderboard-panel {
    order: 3;
    min-height: 0;
    margin-top: 20px;
    padding: 12px;
  }

  .leaderboard-list {
    max-height: 224px;
    overflow-y: auto;
  }

  .leaderboard-item strong,
  .leaderboard-item small {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .leaderboard-summary {
    margin-top: 10px;
    padding-top: 10px;
  }

  .server-status {
    order: 4;
    margin-top: 28px;
  }

  .server-status .panel-heading {
    gap: 6px;
    padding-bottom: 10px;
  }

  .server-status .panel-heading .panel-icon {
    flex: 0 0 auto;
  }

  .server-status .panel-heading h2 {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .server-status__headline {
    display: inline-flex;
    gap: 4px;
    max-width: min(48vw, 178px);
    font-size: 0.48rem;
    letter-spacing: 0.08em;
  }

  .server-status__headline .server-state-inline {
    max-width: 82px;
    overflow: hidden;
    padding: 0.2rem 0.34rem 0.22rem;
    font-size: 0.46rem;
    text-overflow: ellipsis;
  }

  .server-main__meta small {
    display: none;
  }

  .server-status .panel-heading .status-dot {
    margin-left: 0;
  }

  .active-events {
    display: none;
  }

  .terminal-title h1 span {
    font-size: clamp(2.85rem, 15vw, 4.2rem);
  }

  .terminal-title h1 strong {
    font-size: clamp(2.45rem, 13.5vw, 3.55rem);
  }

  .terminal-tagline {
    margin: 10px 0 12px;
    padding-left: 0;
    font-size: 0.58rem;
    letter-spacing: 0.075em;
    line-height: 1.42;
  }

  .terminal-tabs,
  .mode-dock,
  .guest-access {
    grid-template-columns: 1fr;
  }

  #login-form .field-shell,
  #register-form .field-shell {
    min-height: 42px;
  }

  #login-form .field-icon,
  #register-form .field-icon {
    width: 36px;
    padding-left: 9px;
    font-size: 0.82rem;
  }

  #login-form .field-shell input,
  #register-form .field-shell input {
    font-size: 0.84rem;
  }

  #login-username,
  #login-password,
  #login-username::placeholder,
  #login-password::placeholder {
    font-size: 0.72rem;
  }

  #login-form .password-eye {
    width: 36px;
    height: 36px;
    font-size: 0.92rem;
  }

  .enter-city-button {
    min-height: 66px;
    font-size: 1.06rem;
  }

  #login-form .enter-city-button,
  #register-form .enter-city-button {
    justify-self: center;
    width: min(92%, 320px);
    min-height: 56px;
    border-color: color-mix(in srgb, var(--active-mode) 34%, rgba(255, 255, 255, 0.08));
    background:
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 12px),
      linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 42%),
      linear-gradient(135deg, color-mix(in srgb, var(--active-mode-deep) 54%, #030712 46%), #040812 54%, #02040a),
      radial-gradient(circle at 50% 116%, color-mix(in srgb, var(--active-mode) 34%, transparent), transparent 36%);
    font-size: 0.94rem;
    letter-spacing: 0.12em;
    text-shadow: 0 0 10px color-mix(in srgb, var(--active-mode) 34%, transparent);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      inset 0 0 20px color-mix(in srgb, var(--active-mode) 12%, transparent),
      0 0 0 1px rgba(255, 255, 255, 0.035),
      0 12px 28px rgba(0, 0, 0, 0.38),
      0 0 18px color-mix(in srgb, var(--active-mode) 18%, transparent);
  }

  .terminal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .terminal-link {
    width: 100%;
    min-width: 0;
    padding-inline: 0.42rem;
    font-size: 0.58rem;
    letter-spacing: 0.07em;
    white-space: nowrap;
  }

  .mode-card {
    min-height: 104px;
    gap: 12px;
    padding: 12px 13px;
    border-radius: 13px;
  }

  .mode-icon {
    width: 50px;
    height: 50px;
    font-size: 1.36rem;
  }

  .mode-card strong {
    font-size: 1.18rem;
  }

  .mode-card small {
    margin-top: 2px;
    font-size: 0.76rem;
  }

  .mode-card em {
    margin-top: 3px;
    font-size: 0.64rem;
  }

  .mode-card--free {
    border-color: rgba(0, 196, 212, 0.3);
    background:
      radial-gradient(circle at 16% 10%, rgba(0, 98, 132, 0.16), transparent 36%),
      linear-gradient(145deg, rgba(3, 16, 31, 0.94), rgba(1, 6, 16, 0.98));
    box-shadow:
      0 0 14px rgba(0, 196, 212, 0.16),
      0 12px 26px rgba(0, 0, 0, 0.42),
      inset 0 0 20px rgba(0, 196, 212, 0.035);
  }

  .mode-card--war {
    border-color: rgba(244, 196, 48, 0.34);
    background:
      radial-gradient(circle at 86% 12%, rgba(110, 80, 18, 0.2), transparent 38%),
      linear-gradient(145deg, rgba(36, 24, 7, 0.95), rgba(16, 10, 4, 0.98));
    box-shadow:
      0 0 14px rgba(244, 196, 48, 0.18),
      0 12px 26px rgba(0, 0, 0, 0.42),
      inset 0 0 20px rgba(244, 196, 48, 0.04);
  }

  .mode-card--free .mode-icon {
    order: -1;
  }

  .mode-card--war .mode-content {
    text-align: left;
  }


  .server-status,
  .leaderboard-panel,
  .active-events {
    max-width: none;
  }

  .server-players__label {
    margin-left: 0;
    font-size: 0.5rem;
  }

  .server-players strong {
    font-size: 0.72rem;
  }

  .login-footer {
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: rgba(2, 6, 13, 0.82);
    backdrop-filter: blur(12px);
  }

  .neon-sign {
    display: none;
  }
}

@media (max-width: 640px) {
  .metric {
    --metric-circle-size: 84px;
  }

  .metric--heat .metric-label,
  .metric--districts .metric-label {
    font-size: 0;
  }

  .metric--heat .metric-label::after,
  .metric--districts .metric-label::after {
    content: attr(data-mobile-label);
    font-size: 0.52rem;
    line-height: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Modern glass pass for login info dialogs. */
body.auth-body--login .login-about-overlay {
  z-index: 80;
  padding: clamp(12px, 3vw, 32px);
}

body.auth-body--login .login-about-backdrop {
  background:
    linear-gradient(180deg, rgba(1, 5, 12, 0.48), rgba(1, 5, 12, 0.72)),
    rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(9px) saturate(1.28);
  -webkit-backdrop-filter: blur(9px) saturate(1.28);
}

body.auth-body--login .login-about-dialog {
  width: min(920px, calc(100vw - 28px));
  max-height: min(84dvh, 820px);
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.14), transparent 34%),
    radial-gradient(circle at 100% 18%, rgba(244, 114, 182, 0.12), transparent 32%),
    rgba(4, 9, 18, 0.54);
  color: rgba(241, 245, 249, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 28px 86px rgba(0, 0, 0, 0.54),
    0 0 38px rgba(34, 211, 238, 0.12);
  backdrop-filter: blur(26px) saturate(1.42);
  -webkit-backdrop-filter: blur(26px) saturate(1.42);
}

body.auth-body--login .login-about-dialog::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 24%, transparent 76%, rgba(255, 255, 255, 0.055)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 12px);
  opacity: 0.34;
  mix-blend-mode: screen;
}

body.auth-body--login .login-about-header {
  padding: 24px 76px 16px 28px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.12);
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.12), transparent 54%),
    rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(14px) saturate(1.24);
  -webkit-backdrop-filter: blur(14px) saturate(1.24);
}

body.auth-body--login .login-about-header h2 {
  color: #f8fafc;
  font-size: clamp(1.45rem, 3.2vw, 2.55rem);
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-shadow:
    0 0 18px rgba(34, 211, 238, 0.28),
    0 0 32px rgba(244, 114, 182, 0.12);
}

body.auth-body--login .login-about-close {
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-color: rgba(226, 232, 240, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.025)),
    rgba(2, 6, 13, 0.42);
  color: #f8fafc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
}

body.auth-body--login .login-about-close:hover,
body.auth-body--login .login-about-close:focus-visible {
  border-color: rgba(165, 243, 252, 0.62);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 18px rgba(34, 211, 238, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.3);
}

body.auth-body--login .login-about-copy {
  max-height: calc(min(84dvh, 820px) - 96px);
  padding: 22px 28px 30px;
  scrollbar-color: rgba(148, 163, 184, 0.72) rgba(2, 6, 13, 0.42);
}

body.auth-body--login .login-about-copy::-webkit-scrollbar-track {
  background: rgba(2, 6, 13, 0.42);
}

body.auth-body--login .login-about-copy::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.86), rgba(34, 211, 238, 0.64));
}

body.auth-body--login .login-about-copy p {
  color: rgba(226, 232, 240, 0.82);
  font-size: clamp(0.92rem, 1.05vw, 1.02rem);
  font-weight: 560;
  line-height: 1.62;
}

body.auth-body--login .login-about-copy strong,
body.auth-body--login .login-about-gold {
  color: #f8fafc;
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.2);
}

body.auth-body--login .login-about-lead {
  margin-bottom: 1.15rem;
  padding: 14px 16px;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-left: 3px solid rgba(34, 211, 238, 0.68);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.11), rgba(244, 114, 182, 0.07)),
    rgba(255, 255, 255, 0.045);
  color: rgba(248, 250, 252, 0.94) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

body.auth-body--login .login-about-final {
  border-color: rgba(34, 211, 238, 0.26);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(244, 114, 182, 0.08)),
    rgba(255, 255, 255, 0.04);
  color: #f8fafc;
  text-transform: none;
}

@media (max-width: 640px) {
  body.auth-body--login .login-about-overlay {
    padding: 10px;
  }

  body.auth-body--login .login-about-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
  }

  body.auth-body--login .login-about-header {
    padding: 18px 62px 12px 18px;
  }

  body.auth-body--login .login-about-copy {
    max-height: calc(100dvh - 104px);
    padding: 16px 18px 22px;
  }
}

