/* ============================================================
   HASH FOREVER — liquid glass edition
   ============================================================ */

:root {
  --bg: #151f2b;
  --bg-deep: #101822;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-2: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.26);
  --fg: #f3f8fe;
  --muted: #b3c1d4;
  --dim: #8291a6;
  --accent: #5cffbb;
  --accent-deep: #22cf8a;
  --accent-2: #7fe3ff;
  --pink: #ff6aa8;
  --red: #ff6b86;
  --amber: #ffd88a;
  --radius: 20px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --logo-size: clamp(2.3rem, 10.2vw, 7.4rem);
  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
  --glass-sheen: radial-gradient(130% 95% at 14% -25%, rgba(255, 255, 255, 0.26), transparent 58%);
  --glass-shadow: 0 34px 80px -36px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  background:
    radial-gradient(120% 90% at 50% -20%, #33485f 0%, #22303f 42%, var(--bg) 76%),
    var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* плёночное зерно поверх всего */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(70, 242, 166, 0.28);
  color: #fff;
}

/* ---------------------------------------------------------- фон */

.bg-orbs,
.bg-grid,
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-orbs {
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.6;
  will-change: transform;
}

.orb-1 {
  width: 46vw;
  height: 46vw;
  min-width: 380px;
  min-height: 380px;
  left: -12vw;
  top: -14vw;
  background: radial-gradient(circle at 50% 50%, rgba(70, 242, 166, 0.42), transparent 68%);
  animation: orb-a 30s ease-in-out infinite;
}

.orb-2 {
  width: 40vw;
  height: 40vw;
  min-width: 320px;
  min-height: 320px;
  right: -10vw;
  top: 4vh;
  background: radial-gradient(circle at 50% 50%, rgba(106, 212, 255, 0.34), transparent 68%);
  animation: orb-b 38s ease-in-out infinite;
}

.orb-3 {
  width: 54vw;
  height: 54vw;
  min-width: 420px;
  min-height: 420px;
  left: 26vw;
  bottom: -30vw;
  background: radial-gradient(circle at 50% 50%, rgba(255, 77, 149, 0.16), transparent 70%);
  animation: orb-c 44s ease-in-out infinite;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(circle at 50% 26%, #000 0%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 26%, #000 0%, transparent 74%);
  animation: grid-drift 70s linear infinite;
}

/* медленно плывущая «пыль» */
.bg-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.7) 1.1px, transparent 1.6px);
  background-size: 260px 260px;
  opacity: 0.16;
  animation: dust-drift 90s linear infinite;
}

.bg-glow {
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, 0.14), transparent 58%),
    radial-gradient(120% 110% at 50% 55%, transparent 44%, rgba(10, 16, 24, 0.42) 100%);
  animation: glow-breathe 16s ease-in-out infinite;
}

/* ---------------------------------------------------------- шапка */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px clamp(16px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(26px) saturate(185%);
  -webkit-backdrop-filter: blur(26px) saturate(185%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px -28px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
}

.brand-hash {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  border: 1px solid rgba(70, 242, 166, 0.4);
  background: linear-gradient(180deg, rgba(70, 242, 166, 0.22), rgba(70, 242, 166, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px -8px rgba(70, 242, 166, 0.7);
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0;
}

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

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

.nav-link {
  position: relative;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.nav-link:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-link.is-active {
  color: var(--accent);
  background: linear-gradient(180deg, rgba(70, 242, 166, 0.18), rgba(70, 242, 166, 0.06));
  border-color: rgba(70, 242, 166, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 22px -14px rgba(70, 242, 166, 0.9);
}

/* ---------------------------------------------------------- главная */

.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100svh - 62px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 8vh, 90px) 20px 80px;
  text-align: center;
}

.kicker {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  animation: rise 0.7s 0.05s ease backwards;
}

.logo-wrap {
  position: relative;
  display: inline-block;
  font-size: var(--logo-size);
  isolation: isolate;
  animation: rise 0.85s 0.12s ease backwards;
}

.logo-wrap::after {
  content: "";
  position: absolute;
  right: -0.42em;
  top: 50%;
  width: 0.07em;
  height: 0.72em;
  margin-top: -0.36em;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(70, 242, 166, 0.85);
  animation: caret 1.05s steps(1, end) infinite;
}

.logo-wrap::before {
  content: "";
  position: absolute;
  inset: -0.25em -0.35em;
  z-index: -1;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.14) 50%, transparent 65%);
  transform: translateX(-130%);
  opacity: 0;
  pointer-events: none;
}

.logo-wrap:hover::before {
  animation: sweep 0.95s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.logo {
  position: relative;
  margin: 0;
  font-size: 1em;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  transition: text-shadow 0.35s ease, transform 0.35s ease;
}

.logo em {
  font-style: normal;
  background: linear-gradient(180deg, #f2fff9 0%, #7dffcb 38%, #3ce9a5 68%, #c8ffe9 100%);
  background-size: 100% 240%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: logo-flow 7s ease-in-out infinite;
}

.logo::before,
.logo::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  color: var(--accent-2);
}

.logo::after {
  color: var(--pink);
}

.logo-wrap:hover .logo {
  text-shadow: 0 0 56px rgba(70, 242, 166, 0.45), 0 0 3px rgba(255, 255, 255, 0.4);
}

.logo-wrap:hover .logo::before {
  opacity: 0.85;
  animation: glitch-a 0.62s steps(2, end) infinite;
}

.logo-wrap:hover .logo::after {
  opacity: 0.8;
  animation: glitch-b 0.54s steps(2, end) infinite;
}

.hero-sub {
  max-width: 36ch;
  margin: 26px 0 0;
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--muted);
  animation: rise 0.7s 0.22s ease backwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
  animation: rise 0.7s 0.32s ease backwards;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 14px 30px -24px #000;
  font-size: 13px;
  color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  animation: rise 0.7s 0.42s ease backwards;
}

a.status-pill:hover {
  border-color: rgba(255, 255, 255, 0.26);
  color: var(--fg);
  transform: translateY(-1px);
}

.status-pill .dot,
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim);
  flex: none;
}

.status-pill[data-state="online"] .dot {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(70, 242, 166, 0.9);
  animation: pulse 2.2s ease-out infinite;
}

.status-pill[data-state="offline"] .dot {
  background: var(--red);
}

.status-pill[data-state="loading"] .dot {
  background: var(--amber);
  animation: blink-soft 1.2s ease-in-out infinite;
}

/* ---------------------------------------------------------- кнопки */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.28s ease, background 0.22s ease, color 0.2s ease,
    border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible,
.nav-link:focus-visible,
.quick button:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  color: #04160e;
  background: linear-gradient(180deg, #8bffcb 0%, #46f2a6 42%, #22c983 100%);
  box-shadow: 0 14px 36px -14px rgba(70, 242, 166, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 8px rgba(0, 90, 55, 0.28);
}

/* «жидкий» блик */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: -60% -30%;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, 0.65) 50%, transparent 68%);
  transform: translateX(-125%);
  opacity: 0;
  transition: transform 0.75s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.2s ease;
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px -16px rgba(70, 242, 166, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 8px rgba(0, 90, 55, 0.3);
}

.btn-primary:hover::before {
  transform: translateX(125%);
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  transform: translateY(-1px);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.ico {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------------------------------------------------------- футер */

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 16px 30px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.footer .sep {
  opacity: 0.5;
}

.footer-nick {
  text-transform: none;
  letter-spacing: 0.06em;
  font-size: 12.5px;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(70, 242, 166, 0.45);
}

/* ---------------------------------------------------------- модалка */

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 12, 0.62);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  animation: fade-in 0.25s ease backwards;
}

.modal-card {
  position: relative;
  width: min(660px, 100%);
  max-height: min(88vh, 820px);
  overflow-y: auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background:
    var(--glass-sheen),
    linear-gradient(180deg, rgba(54, 72, 92, 0.94), rgba(23, 33, 45, 0.96));
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 60px 130px -40px #000, inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -40px 80px -50px rgba(70, 242, 166, 0.25);
  animation: card-in 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.15) backwards;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.modal-close:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(90deg);
}

.compile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 0 10px;
}

.compile[hidden] {
  display: none;
}

.compile h2,
.guide h2 {
  margin: 26px 0 8px;
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 750;
  letter-spacing: -0.01em;
}

.compile-sub {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.win-spinner {
  position: relative;
  width: 86px;
  height: 86px;
}

.win-spinner i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(70, 242, 166, 0.7);
  animation: win-dot 1.35s linear infinite;
}

.win-spinner i:nth-child(1) {
  transform: rotate(0deg) translateY(-33px);
  animation-delay: -0s;
}
.win-spinner i:nth-child(2) {
  transform: rotate(45deg) translateY(-33px);
  animation-delay: -0.17s;
}
.win-spinner i:nth-child(3) {
  transform: rotate(90deg) translateY(-33px);
  animation-delay: -0.34s;
}
.win-spinner i:nth-child(4) {
  transform: rotate(135deg) translateY(-33px);
  animation-delay: -0.51s;
}
.win-spinner i:nth-child(5) {
  transform: rotate(180deg) translateY(-33px);
  animation-delay: -0.67s;
}
.win-spinner i:nth-child(6) {
  transform: rotate(225deg) translateY(-33px);
  animation-delay: -0.84s;
}
.win-spinner i:nth-child(7) {
  transform: rotate(270deg) translateY(-33px);
  animation-delay: -1.01s;
}
.win-spinner i:nth-child(8) {
  transform: rotate(315deg) translateY(-33px);
  animation-delay: -1.18s;
}

.dots {
  display: inline-block;
  min-width: 1.6ch;
  text-align: left;
  color: var(--accent);
}

.progress {
  width: min(320px, 82%);
  height: 3px;
  margin-top: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 16px rgba(70, 242, 166, 0.75);
}

.progress.is-running span {
  width: 100%;
  transition: width 5s linear;
}

/* инструкция */

.guide[hidden] {
  display: none;
}

.guide {
  animation: fade-up 0.35s ease backwards;
}

.guide-lead {
  margin: 6px 0 22px;
  font-size: 14px;
  color: var(--muted);
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 12px;
  margin: 0 0 26px;
  padding: 0;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.steps li:hover {
  border-color: rgba(70, 242, 166, 0.28);
  background: linear-gradient(180deg, rgba(70, 242, 166, 0.09), rgba(255, 255, 255, 0.02));
  transform: translateY(-1px);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(70, 242, 166, 0.24), rgba(70, 242, 166, 0.08));
  border: 1px solid rgba(70, 242, 166, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.steps h3 {
  margin: 3px 0 4px;
  font-size: 15px;
  font-weight: 650;
}

.steps p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.steps code,
.inline-code {
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--mono);
  font-size: 0.88em;
  color: #c8f7e0;
  word-break: break-word;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-warn {
  display: flex;
  gap: 10px;
  margin: 0 0 22px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 212, 121, 0.3);
  background: linear-gradient(180deg, rgba(255, 212, 121, 0.12), rgba(255, 212, 121, 0.05));
  font-size: 13px;
  color: #ffe6b8;
}

/* ---------------------------------------------------------- внутренние страницы */

.page-main {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) 20px 70px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  animation: rise 0.6s ease backwards;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.updated {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: 0.06em;
}

/* ---------------------------------------------------------- пинг */

.ping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.ping-card {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: var(--glass-sheen), var(--glass-bg);
  background-size: 220% 220%, auto;
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  animation: glass-shift 14s ease-in-out infinite;
  transition: border-color 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

.ping-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(90% 70% at 18% 0%, rgba(255, 255, 255, 0.16), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.ping-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-3px);
  box-shadow: 0 40px 80px -36px #000, inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.ping-card:hover::after {
  opacity: 1;
}

.ping-card.is-online {
  border-color: rgba(70, 242, 166, 0.28);
}

.ping-card.is-online::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), rgba(70, 242, 166, 0));
  box-shadow: 0 0 20px rgba(70, 242, 166, 0.6);
}

.ping-top {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.ping-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  object-fit: cover;
  image-rendering: pixelated;
  flex: none;
}

.ping-icon-fallback {
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--dim);
}

.ping-title {
  min-width: 0;
  flex: 1;
}

.ping-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ping-addr {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
  word-break: break-all;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: var(--muted);
  flex: none;
}

.badge .dot {
  width: 7px;
  height: 7px;
}

.badge.online {
  color: var(--accent);
  border-color: rgba(70, 242, 166, 0.36);
  background: linear-gradient(180deg, rgba(70, 242, 166, 0.2), rgba(70, 242, 166, 0.06));
}

.badge.online .dot {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(70, 242, 166, 0.9);
  animation: pulse 2.2s ease-out infinite;
}

.badge.offline {
  color: var(--red);
  border-color: rgba(255, 92, 122, 0.3);
  background: rgba(255, 92, 122, 0.1);
}

.badge.offline .dot {
  background: var(--red);
}

.ping-motd {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-family: var(--mono);
  font-size: 12.5px;
  color: #d7e2f0;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 38px;
}

.motd-ok {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 0 24px rgba(92, 255, 187, 0.6);
  animation: motd-glow 3.2s ease-in-out infinite;
}

.motd-sub {
  color: var(--dim);
  font-size: 11.5px;
  font-weight: 400;
  text-shadow: none;
  animation: none;
}

.ping-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.stat {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.stat strong {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ping-error {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--red);
  font-family: var(--mono);
}

.skeleton {
  height: 210px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.09) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.ping-note {
  margin-top: 22px;
  font-size: 13px;
  color: var(--dim);
}

/* ---------------------------------------------------------- авторизация */

.auth {
  display: grid;
  place-items: center;
  min-height: calc(100svh - 220px);
}

.auth[hidden] {
  display: none;
}

.auth-card {
  width: min(390px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: var(--glass-sheen), linear-gradient(180deg, rgba(50, 67, 87, 0.92), rgba(20, 29, 40, 0.95));
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  box-shadow: 0 50px 110px -40px #000, inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -40px 70px -50px rgba(70, 242, 166, 0.22);
  overflow: hidden;
  animation: card-in 0.32s ease backwards;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.term-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2b3340;
}

.term-bar i:nth-child(1) {
  background: #ff5f57;
}
.term-bar i:nth-child(2) {
  background: #ffbd2e;
}
.term-bar i:nth-child(3) {
  background: #28c840;
}

.term-bar span {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.auth-body {
  padding: 26px 24px 24px;
}

.auth-body h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-hint {
  margin: 0 0 22px;
  font-size: 12.5px;
  color: var(--dim);
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus {
  outline: none;
  border-color: rgba(70, 242, 166, 0.55);
  box-shadow: 0 0 0 3px rgba(70, 242, 166, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--red);
  min-height: 20px;
}

.captcha {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 14px;
}

.captcha-img {
  flex: 1;
  width: 100%;
  height: auto;
  max-width: 220px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0d1520;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  image-rendering: pixelated;
  cursor: pointer;
}

.auth-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: var(--dim);
}

/* ---------------------------------------------------------- консоли */

.consoles[hidden] {
  display: none;
}

.consoles-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.consoles-head h1 {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.consoles-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.who {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

.consoles-sub {
  margin: 6px 0 0;
}

body.modal-open {
  overflow: hidden;
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.console {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: var(--glass-sheen), linear-gradient(180deg, rgba(36, 49, 64, 0.86), rgba(16, 23, 32, 0.9));
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  box-shadow: 0 34px 70px -34px #000, inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.console-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

.console-head .dot {
  width: 8px;
  height: 8px;
}

.console[data-state="online"] .console-head .dot {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(70, 242, 166, 0.9);
  animation: pulse 2.2s ease-out infinite;
}

.console[data-state="connecting"] .console-head .dot {
  background: var(--amber);
  animation: blink-soft 1s ease-in-out infinite;
}

.console[data-state="offline"] .console-head .dot {
  background: var(--red);
}

.console-title {
  font-size: 13.5px;
  font-weight: 650;
}

.console-addr {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

.console-state {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.04em;
}

.console[data-state="online"] .console-state {
  color: var(--accent);
}

.console[data-state="offline"] .console-state {
  color: var(--red);
}

.icon-btn {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  font-size: 11.5px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.icon-btn:hover {
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.console-out {
  height: 340px;
  overflow-y: auto;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.18);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.console-out::-webkit-scrollbar {
  width: 8px;
}

.console-out::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.line {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 2px;
  animation: line-in 0.18s ease backwards;
}

.line-cmd {
  color: var(--accent);
}

.line-cmd::before {
  content: "> ";
  color: rgba(70, 242, 166, 0.55);
}

.line-out {
  color: #cfdae8;
}

.line-sys {
  color: var(--dim);
  font-style: italic;
}

.line-err {
  color: var(--red);
}

.console-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.24);
}

.prompt {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
}

.console-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  border: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 13px;
}

.console-form input:focus {
  outline: none;
}

.console-form button {
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid rgba(70, 242, 166, 0.34);
  background: linear-gradient(180deg, rgba(70, 242, 166, 0.22), rgba(70, 242, 166, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.console-form button:hover {
  background: linear-gradient(180deg, rgba(70, 242, 166, 0.32), rgba(70, 242, 166, 0.14));
  border-color: rgba(70, 242, 166, 0.55);
  transform: translateY(-1px);
}

.console-form button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 12px;
}

.quick button {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s, transform 0.15s;
}

.quick button:hover {
  color: var(--accent);
  border-color: rgba(70, 242, 166, 0.4);
  background: rgba(70, 242, 166, 0.12);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------- моды */

.mods-search {
  width: min(260px, 60vw);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  color: var(--fg);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mods-search::placeholder {
  color: var(--dim);
}

.mods-search:focus {
  border-color: rgba(92, 255, 187, 0.5);
  box-shadow: 0 0 0 3px rgba(92, 255, 187, 0.14);
}

.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.mod-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: var(--glass-sheen), var(--glass-bg);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mod-card:hover {
  transform: translateY(-2px);
  border-color: rgba(92, 255, 187, 0.3);
}

.mod-icon {
  width: 64px;
  height: 64px;
  flex: none;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  object-fit: contain;
  image-rendering: auto;
}

.mod-body {
  min-width: 0;
  flex: 1;
}

.mod-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.mod-top h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.mod-version {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(92, 255, 187, 0.3);
  background: rgba(92, 255, 187, 0.1);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  white-space: nowrap;
}

.mod-desc {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-meta {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
}

/* ---------------------------------------------------------- адрес сервера */

.server-addr {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 16px 34px -26px #000;
  animation: rise 0.7s 0.5s ease backwards;
}

.server-addr .addr-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.server-addr code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg);
  letter-spacing: 0.01em;
}

.copy-btn {
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid rgba(92, 255, 187, 0.32);
  background: rgba(92, 255, 187, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.copy-btn:hover {
  background: rgba(92, 255, 187, 0.2);
  border-color: rgba(92, 255, 187, 0.5);
  transform: translateY(-1px);
}

.copy-btn.is-done {
  background: rgba(92, 255, 187, 0.28);
  color: #062015;
}

/* ---------------------------------------------------------- тема */

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

/* ---------------------------------------------------------- консоль: фильтр */

.console-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 0;
}

.console-filter {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11.5px;
  outline: none;
}

.console-filter::placeholder {
  color: var(--dim);
}

.console-filter:focus {
  border-color: rgba(92, 255, 187, 0.4);
}

.line.is-hidden {
  display: none;
}

/* ---------------------------------------------------------- аптайм */

.uptime {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.uptime-label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.uptime-bars {
  display: flex;
  flex: 1;
  gap: 2px;
  height: 16px;
  min-width: 0;
}

.uptime-bars i {
  flex: 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.uptime-bars i.up {
  background: var(--accent);
  opacity: 0.75;
}

.uptime-bars i.down {
  background: var(--red);
}

.uptime-bars i.unknown {
  background: rgba(255, 255, 255, 0.08);
}

.uptime-value {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg);
  white-space: nowrap;
}

/* ---------------------------------------------------------- 404 */

.notfound {
  display: grid;
  place-items: center;
  min-height: 70svh;
  text-align: center;
}

.notfound h1 {
  margin: 0;
  font-size: clamp(64px, 16vw, 140px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(180deg, #fff, #46f2a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.notfound p {
  margin: 10px 0 26px;
  color: var(--muted);
}

/* ---------------------------------------------------------- анимации */

@keyframes dust-drift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 260px 520px;
  }
}

@keyframes glow-breathe {
  0%,
  100% {
    opacity: 0.82;
  }
  50% {
    opacity: 1;
  }
}

@keyframes logo-flow {
  0%,
  100% {
    background-position: 50% 0%;
  }
  50% {
    background-position: 50% 100%;
  }
}

@keyframes glass-shift {
  0%,
  100% {
    background-position: 0% 0%, 0 0;
  }
  50% {
    background-position: 90% 65%, 0 0;
  }
}

@keyframes motd-glow {
  0%,
  100% {
    text-shadow: 0 0 20px rgba(92, 255, 187, 0.45);
  }
  50% {
    text-shadow: 0 0 34px rgba(92, 255, 187, 0.85);
  }
}

@keyframes caret {  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes sweep {
  0% {
    transform: translateX(-130%);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    transform: translateX(130%);
    opacity: 0;
  }
}

@keyframes glitch-a {
  0% {
    clip-path: inset(0 0 82% 0);
    transform: translate(-3px, -2px);
  }
  20% {
    clip-path: inset(12% 0 58% 0);
    transform: translate(4px, 1px);
  }
  40% {
    clip-path: inset(38% 0 30% 0);
    transform: translate(-2px, 2px);
  }
  60% {
    clip-path: inset(64% 0 14% 0);
    transform: translate(3px, -1px);
  }
  80% {
    clip-path: inset(22% 0 52% 0);
    transform: translate(-4px, 1px);
  }
  100% {
    clip-path: inset(0 0 82% 0);
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-b {
  0% {
    clip-path: inset(72% 0 6% 0);
    transform: translate(3px, 2px);
  }
  25% {
    clip-path: inset(48% 0 34% 0);
    transform: translate(-4px, -1px);
  }
  50% {
    clip-path: inset(18% 0 66% 0);
    transform: translate(2px, 1px);
  }
  75% {
    clip-path: inset(64% 0 20% 0);
    transform: translate(-3px, 2px);
  }
  100% {
    clip-path: inset(72% 0 6% 0);
    transform: translate(4px, -2px);
  }
}

@keyframes orb-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(9vw, 6vh, 0) scale(1.12);
  }
  66% {
    transform: translate3d(3vw, 12vh, 0) scale(0.94);
  }
}

@keyframes orb-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  40% {
    transform: translate3d(-10vw, 9vh, 0) scale(1.14);
  }
  70% {
    transform: translate3d(-4vw, -6vh, 0) scale(0.92);
  }
}

@keyframes orb-c {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  45% {
    transform: translate3d(-8vw, -10vh, 0) scale(1.1);
  }
  75% {
    transform: translate3d(6vw, -4vh, 0) scale(0.95);
  }
}

@keyframes grid-drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 68px 68px, 68px 68px;
  }
}

@keyframes win-dot {
  0% {
    opacity: 1;
  }
  70% {
    opacity: 0.14;
  }
  100% {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(70, 242, 166, 0.55);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(70, 242, 166, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(70, 242, 166, 0);
  }
}

@keyframes blink-soft {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ---------------------------------------------------------- адаптив */

@media (max-width: 860px) {
  .console-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .console-out {
    height: 260px;
  }

  .orb {
    filter: blur(56px);
    opacity: 0.5;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 12px 14px;
  }

  .brand {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .nav-link {
    padding: 7px 12px;
    font-size: 13px;
  }

  .hero {
    padding-top: 30px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .steps li {
    grid-template-columns: 26px 1fr;
    padding: 12px;
  }

  .steps li::before {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 12px;
  }
}

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

  .progress.is-running span {
    transition: width 5s linear;
  }
}

/* ============================================================
   СВЕТЛАЯ ТЕМА
   ============================================================ */

[data-theme="light"] {
  --bg: #e8eef7;
  --bg-deep: #dde6f1;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-2: rgba(255, 255, 255, 0.9);
  --line: rgba(16, 32, 48, 0.12);
  --line-strong: rgba(16, 32, 48, 0.2);
  --fg: #14202b;
  --muted: #4d5b6c;
  --dim: #6f7d8e;
  --accent: #0f9f6e;
  --accent-deep: #0b7d56;
  --accent-2: #0f7fa8;
  --pink: #c2367a;
  --red: #cf3a56;
  --amber: #a9761b;
  --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.66));
  --glass-sheen: radial-gradient(130% 95% at 14% -25%, rgba(255, 255, 255, 1), transparent 60%);
  --glass-shadow: 0 26px 60px -34px rgba(18, 40, 64, 0.32), inset 0 1px 0 #fff;
}

[data-theme="light"] body {
  background:
    radial-gradient(120% 90% at 50% -20%, #ffffff 0%, #e9f0f9 42%, #dfe8f2 78%),
    #e8eef7;
}

[data-theme="light"] body::after {
  opacity: 0.02;
}

[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(20, 40, 60, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 40, 60, 0.07) 1px, transparent 1px);
}

[data-theme="light"] .bg-grid::after {
  opacity: 0.22;
  background-image: radial-gradient(circle, rgba(20, 40, 60, 0.4) 1px, transparent 1.5px);
}

[data-theme="light"] .bg-glow {
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, 0.95), transparent 60%),
    radial-gradient(120% 110% at 50% 55%, transparent 45%, rgba(188, 204, 222, 0.55) 100%);
}

[data-theme="light"] .orb {
  opacity: 0.3;
}

[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.74));
  border-bottom: 1px solid rgba(16, 32, 48, 0.12);
  box-shadow: 0 16px 30px -26px rgba(18, 40, 64, 0.45), inset 0 1px 0 #fff;
}

[data-theme="light"] .brand-tail {
  color: var(--dim);
}

[data-theme="light"] .nav-link:hover {
  background: rgba(16, 32, 48, 0.06);
  border-color: rgba(16, 32, 48, 0.14);
  box-shadow: none;
}

[data-theme="light"] .theme-toggle,
[data-theme="light"] .icon-btn,
[data-theme="light"] .quick button,
[data-theme="light"] .badge {
  border-color: rgba(16, 32, 48, 0.16);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
}

[data-theme="light"] .status-pill,
[data-theme="light"] .server-addr {
  border-color: rgba(16, 32, 48, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7));
  box-shadow: inset 0 1px 0 #fff, 0 14px 26px -22px rgba(18, 40, 64, 0.4);
}

[data-theme="light"] .btn-ghost {
  border-color: rgba(16, 32, 48, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7));
  box-shadow: inset 0 1px 0 #fff;
  color: var(--muted);
}

[data-theme="light"] .btn-ghost:hover {
  color: var(--fg);
  border-color: rgba(16, 32, 48, 0.28);
  background: #fff;
}

[data-theme="light"] .ping-card,
[data-theme="light"] .mod-card,
[data-theme="light"] .console,
[data-theme="light"] .auth-card,
[data-theme="light"] .modal-card {
  border-color: rgba(16, 32, 48, 0.12);
}

[data-theme="light"] .stat,
[data-theme="light"] .steps li {
  border-color: rgba(16, 32, 48, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
  box-shadow: inset 0 1px 0 #fff;
}

[data-theme="light"] .ping-motd,
[data-theme="light"] .console-out,
[data-theme="light"] .console-form,
[data-theme="light"] .console-filter,
[data-theme="light"] .field input {
  border-color: rgba(16, 32, 48, 0.12);
  background: rgba(16, 32, 48, 0.04);
  color: var(--fg);
}

[data-theme="light"] .field input:focus {
  background: #fff;
}

[data-theme="light"] .console-head,
[data-theme="light"] .term-bar {
  background: rgba(16, 32, 48, 0.04);
  border-color: rgba(16, 32, 48, 0.1);
}

[data-theme="light"] .line-out {
  color: #24303d;
}

[data-theme="light"] .line-sys {
  color: var(--dim);
}

[data-theme="light"] .modal-backdrop {
  background: rgba(18, 34, 52, 0.35);
}

[data-theme="light"] .term-bar i {
  filter: saturate(0.8);
}

[data-theme="light"] .guide-warn {
  border-color: rgba(169, 118, 27, 0.35);
  background: rgba(255, 226, 160, 0.55);
  color: #6b4a0d;
}

[data-theme="light"] .steps code,
[data-theme="light"] .inline-code {
  border-color: rgba(16, 32, 48, 0.14);
  background: rgba(16, 32, 48, 0.06);
  color: #14583f;
}

[data-theme="light"] .mod-icon {
  border-color: rgba(16, 32, 48, 0.12);
  background: rgba(255, 255, 255, 0.75);
}

[data-theme="light"] .progress {
  background: rgba(16, 32, 48, 0.12);
}

[data-theme="light"] .ping-card::after {
  background: radial-gradient(90% 70% at 18% 0%, rgba(255, 255, 255, 0.9), transparent 62%);
}

[data-theme="light"] .footer {
  color: var(--dim);
}
