:root {
  --bg: #0b0f14;
  --ink: #dfe7ff;
  --muted: #94a7bd;
  --glass: rgba(255, 255, 255, 0.06);
  --glass2: rgba(255, 255, 255, 0.12);
  --cyan: #00eaff;
  --violet: #6b00ff;
  --magenta: #ff007a;
  --lime: #c1ff00;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 4px rgba(0, 234, 255, 0.35);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  overflow: hidden;
  letter-spacing: 0.2px;
}

.bg video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) brightness(0.7) saturate(1.22);
  z-index: -4;
}
.bg .vignette {
  position: fixed;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(
      160% 120% at 80% 20%,
      rgba(0, 234, 255, 0.15),
      transparent 40%
    ),
    radial-gradient(
      140% 160% at 20% 80%,
      rgba(255, 0, 122, 0.16),
      transparent 45%
    ),
    radial-gradient(
      100% 150% at 50% 50%,
      rgba(107, 0, 255, 0.18),
      transparent 55%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.85));
}
.bg .grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: radial-gradient(
      900px 900px at var(--mxpx, 50%) var(--mypx, 50%),
      rgba(0, 234, 255, 0.12),
      transparent 60%
    ),
    repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 90px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 90px
    );
  mask: radial-gradient(
    1200px 1200px at 50% 50%,
    rgba(0, 0, 0, 1),
    rgba(0, 0, 0, 0)
  );
}
.fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 20, 0.82),
    rgba(10, 14, 20, 0.25) 55%,
    transparent
  );
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 20;
  transform: translateY(-14px);
  opacity: 0;
  filter: blur(6px);
  animation: enter-down 0.8s 0.15s ease forwards;
}
.topbar::after {
  content: "";
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 234, 255, 0.6),
    rgba(255, 0, 122, 0.6),
    transparent
  );
  background-size: 200% 100%;
  animation: scan 8s linear infinite;
}
@keyframes scan {
  to {
    background-position: 200% 0;
  }
}

.brand {
  display: flex;
  gap: 8px;
  align-items: center;
}
.mark {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 12px rgba(0, 234, 255, 0.9);
  animation: breath 2.4s ease-in-out infinite;
}
@keyframes breath {
  50% {
    transform: scale(1.18);
  }
}
.title-wrap {
  position: relative;
  width: auto;
  height: 48px;
  display: inline-block;
  overflow: visible;
}
.brand .title-wrap svg {
  width: auto;
  top: -122px;
  height: 288px;
}
#shard-stage {
  position: absolute;
  inset: 0;
}
#shard-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity 0.9s ease 2.4s;
}
#shard-svg.done {
  opacity: 0;
}
.shard {
  fill: url(#shardGradient);
  opacity: 0.9;
}
.title-outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(6px) scale(1.01);
  filter: drop-shadow(0 10px 25px rgba(0, 234, 255, 0.35))
    drop-shadow(0 0 60px rgba(255, 0, 122, 0.18));
  transition: opacity 0.9s ease 0.8s,
    transform 1.1s cubic-bezier(0.19, 0.8, 0.25, 1);
}
.title-outline.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

nav ul {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  position: relative;
  color: #e9f3ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  opacity: 0.95;
  transform: translateY(-6px);
  filter: blur(3px);
  animation: enter-up 0.7s 0.45s ease forwards;
}
nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
}
nav a:hover::after {
  transform: scaleX(1);
}

.lang {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8f2ff;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
  filter: blur(3px);
  animation: enter-up 0.7s 0.55s ease forwards;
}
.lang-menu {
  position: absolute;
  right: 0;
  top: 48px;
  background: rgba(12, 16, 22, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  display: none;
  min-width: 180px;
  box-shadow: var(--shadow);
}
.lang-menu button {
  all: unset;
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  cursor: pointer;
  color: #e8f2ff;
  font-weight: 700;
}
.lang-menu button:hover {
  background: linear-gradient(
    90deg,
    rgba(0, 234, 255, 0.08),
    rgba(255, 0, 122, 0.08)
  );
}

.scene {
  position: fixed;
  inset: 0;
  perspective: 1200px;
  pointer-events: none;
  /* ниже всех UI-элементов, но выше видео */
  z-index: -2;
}
.abs-layer {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.abs {
  position: absolute;
  width: 200px;
  height: 130px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
      135deg,
      rgba(0, 234, 255, 0.08),
      rgba(255, 0, 122, 0.08)
    ),
    linear-gradient(
      225deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.02)
    );
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 60px rgba(143, 209, 255, 0.15);
  backdrop-filter: blur(8px);
  /* входная анимация: плавное появление снизу с лёгким масштабом */
  opacity: 0;
  transform: translateZ(var(--z, 0px)) translateY(14px) scale(0.96)
    rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.8s cubic-bezier(0.18, 0.82, 0.19, 1), filter 0.6s ease;
  animation: abs-in 0.85s ease forwards;
}
.abs::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    rgba(0, 234, 255, 0),
    rgba(0, 234, 255, 0.25),
    rgba(255, 0, 122, 0) 60%
  );
  filter: blur(10px);
  opacity: 0.6;
  mix-blend-mode: screen;
}
.abs.flip {
  transform: translateZ(var(--z, 0px)) rotateY(180deg) rotateX(var(--rx, 0deg));
}
.abs.a {
  left: 8vw;
  top: 18vh;
  --z: -70px;
  animation-delay: 0.12s;
}
.abs.b {
  left: 72vw;
  top: 20vh;
  --z: -60px;
  animation-delay: 0.22s;
}
.abs.c {
  left: 12vw;
  bottom: 14vh;
  --z: -120px;
  animation-delay: 0.32s;
}
.abs.d {
  right: 10vw;
  bottom: 16vh;
  --z: -100px;
  animation-delay: 0.42s;
}
.abs.e {
  left: 42vw;
  top: 70vh;
  width: 240px;
  height: 140px;
  --z: -110px;
  animation-delay: 0.52s;
}

/* Remove five decorative rectangles entirely on registration page */
.scene .abs {
  display: none !important;
}

@keyframes abs-in {
  0% {
    opacity: 0;
    filter: blur(6px);
    transform: translateZ(var(--z, 0px)) translateY(18px) scale(0.94)
      rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  }
  60% {
    /* Disable moving circle/grid and canvas FX on small screens */
    @media (max-width: 549px) {
      .bg .grid,
      .fx {
        display: none !important;
      }
    }
    opacity: 1;
    filter: blur(0);
    transform: translateZ(var(--z, 0px)) translateY(-2px) scale(1.005)
      rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateZ(var(--z, 0px)) translateY(0) scale(1)
      rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  }
}

.auth {
  position: fixed;
  top: 52%;
  width: min(860px, 92vw);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: center;
}

@media (min-width: 1350px) {
  .auth {
    left: 36.1%;
    transform: translateX(-50%) translateY(-50%);
  }
}

@media (max-width: 1349.98px) {
  .auth {
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
  }
}
.auth .pitch {
  background: linear-gradient(
    180deg,
    rgba(12, 16, 22, 0.85),
    rgba(12, 16, 22, 0.65)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 22px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  filter: blur(10px);
  animation: card-in 0.8s 0.35s ease forwards;
}
.pitch .supt {
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  color: #b8c9ff;
  background: linear-gradient(
    90deg,
    rgba(0, 234, 255, 0.14),
    rgba(255, 0, 122, 0.14)
  );
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-block;
}
.pitch .ttl {
  margin: 14px 0 10px;
  font-family: "Russo One", system-ui;
  font-size: 32px;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #e9f3ff, #7ad5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pitch p {
  margin: 0;
  color: #d8e6ff;
  opacity: 0.95;
}
.pitch .stats {
  display: flex;
  gap: 16px;
  margin-top: 14px;
}
.pitch .stats .item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.pitch .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  box-shadow: 0 0 16px rgba(193, 255, 0, 0.6);
}

.card {
  background: linear-gradient(
    180deg,
    rgba(12, 16, 22, 0.88),
    rgba(12, 16, 22, 0.7)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 22px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  filter: blur(10px);
  animation: card-in 0.8s 0.45s ease forwards;
}
.tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 6px;
  margin-bottom: 14px;
}
.tabs button {
  all: unset;
  cursor: pointer;
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cfe6ff;
  transition: all 0.25s;
}
.tabs button[aria-selected="true"] {
  background: linear-gradient(
    135deg,
    rgba(0, 234, 255, 0.16),
    rgba(255, 0, 122, 0.16)
  );
  box-shadow: inset 0 0 0 1px rgba(143, 209, 255, 0.45);
}
form {
  display: grid;
  gap: 10px;
}
.grp {
  display: grid;
  gap: 6px;
}
label {
  font-size: 12px;
  color: #b7c6df;
  font-weight: 700;
}
.inp {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  transition: border 0.2s, box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
}
.inp:focus-within {
  border-color: rgba(143, 209, 255, 0.6);
  box-shadow: var(--ring);
}
input {
  all: unset;
  color: #eaf3ff;
  width: 100%;
  padding: 10px 12px;
}
.row {
  display: grid;
  grid-template-columns: 1fr 0.6fr;
  gap: 10px;
}
.btn {
  --mxpx: 50%;
  --mypx: 50%;
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(
    135deg,
    rgba(0, 234, 255, 0.14),
    rgba(255, 0, 122, 0.14)
  );
  font-weight: 900;
  color: #eaf3ff;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.4px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(
    400px 200px at var(--mxpx) var(--mypx),
    rgba(255, 255, 255, 0.22),
    transparent 60%
  );
  transition: opacity 0.25s;
  pointer-events: none;
}
.btn::after {
  content: "";
  position: absolute;
  left: -120%;
  top: 0;
  height: 100%;
  width: 120%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  transform: skewX(-20deg);
  transition: transform 0.6s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:hover::before {
  opacity: 1;
}
.btn:hover::after {
  transform: translateX(240%) skewX(-20deg);
}
.note {
  font-size: 12px;
  color: #9fb3c6;
  line-height: 1.4;
}
.note strong {
  color: #eaf3ff;
}
.captcha {
  display: flex;
  gap: 10px;
  align-items: center;
}
.cap-box {
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  width: 120px;
  height: 40px;
  overflow: hidden;
}
canvas#cap {
  display: block;
}
.muted {
  font-size: 11px;
  color: #8aa0b3;
}
.links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}
.ghost {
  background: rgba(255, 255, 255, 0.06);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sound {
  position: fixed;
  bottom: 22px;
  right: 26px;
}
.sound .btn {
  padding: 10px 14px;
}

.scene-hint {
  position: fixed;
  left: 26px;
  bottom: 22px;
  font-size: 12px;
  color: #a8b8cc;
  opacity: 0.75;
}

@keyframes enter-up {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}
@keyframes enter-down {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}
@keyframes card-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (max-width: 940px) {
  .auth {
    position: relative;
    left: unset;
    transform: unset;
    width: unset;
    display: grid;
    gap: 5px;
    align-items: center;

    grid-template-columns: 1fr;
    top: unset;
  }
  nav {
    display: none;
  }
}
@media (max-width: 999px) {
  body {
    overflow: auto;
  }

  .auth {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
  }
}

/* ========= CORE VARS / RESET (нужны топбару и футеру) ========= */
:root {
  --bg: #0b0f14;
  --ink: #c9d6ff;
  --ink-strong: #ffffff;
  --muted: #8aa0b3;
  --glass: rgba(255, 255, 255, 0.06);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 0, 0, 0.3);
  --cyan: #00eaff;
  --violet: #6b00ff;
  --ringCyan: 0 0 16px rgba(0, 234, 255, 0.6), 0 0 48px rgba(0, 234, 255, 0.35);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ========= HEADER: TOPBAR ========= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 20, 0.82),
    rgba(10, 14, 20, 0.28) 55%,
    transparent
  );
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 40;
  transform: translateY(-14px);
  opacity: 0;
  filter: blur(6px);
  animation: enter-down 0.9s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.topbar::after {
  content: "";
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 234, 255, 0.55),
    rgba(255, 0, 122, 0.55),
    transparent
  );
  background-size: 200% 100%;
  animation: bar-scan 8s linear infinite;
}
.top-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: nowrap;
  margin: auto 0;
}

/* ========= BURGER ========= */
.burger-wrap {
  position: relative;
}
.burger-btn {
  --bg-grad: linear-gradient(
    135deg,
    rgba(0, 234, 255, 0.14),
    rgba(255, 0, 122, 0.14)
  );
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--bg-grad);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.burger-btn:hover {
  box-shadow: 0 0 0 4px rgba(0, 234, 255, 0.28), 0 10px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}
.burger-lines {
  width: 20px;
  height: 14px;
  position: relative;
}
.burger-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: radial-gradient(
      circle at 0% 0%,
      #fff 0%,
      rgba(255, 255, 255, 0) 70%
    ),
    #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 24px rgba(0, 234, 255, 0.6);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    top 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}
.burger-lines span:nth-child(1) {
  top: 0;
}
.burger-lines span:nth-child(2) {
  top: 6px;
}
.burger-lines span:nth-child(3) {
  top: 12px;
}
.burger-btn.active .burger-lines span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}
.burger-btn.active .burger-lines span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.burger-btn.active .burger-lines span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.burger-menu {
  position: absolute;
  top: 52px;
  left: 0;
  min-width: 200px;
  width: 220px;
  max-width: 70vw;
  background: rgba(12, 16, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 12px 0;
  backdrop-filter: blur(12px);
  display: none;
  flex-direction: column;
  transform-origin: top left;
  z-index: 200;
  animation: menu-in 0.35s cubic-bezier(0.16, 0.82, 0.2, 1) forwards;
}
.burger-menu.open {
  display: flex;
}
.burger-menu a {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  padding: 10px 16px;
  color: #e8f2ff;
  position: relative;
}
.burger-menu a:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}
.burger-menu a:hover {
  background: linear-gradient(
    90deg,
    rgba(0, 234, 255, 0.07),
    rgba(255, 0, 122, 0.07)
  );
}

/* ========= BRAND / TITLE ========= */
.brand-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: auto 0;
  margin-left: 20px;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mark {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 12px rgba(0, 234, 255, 0.9);
  animation: breath 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
.game-name {
  display: flex;
  flex-wrap: nowrap;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--ink-strong);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.6),
    0 0 40px rgba(0, 234, 255, 0.4), 0 0 60px rgba(255, 0, 122, 0.3);
  position: relative;
  overflow: hidden;
}
.letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  filter: blur(6px);
  animation: letter-reveal 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.game-name.pulse .letter {
  animation: letter-reveal 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
    pulse-still 2.8s ease-in-out infinite 0.6s;
}

/* ========= CENTER NAV BUTTONS ========= */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.top-link {
  --mxpx: 50%;
  --mypx: 50%;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #eaf3ff;
  background: rgba(12, 16, 22, 0.65);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), var(--ringCyan);
  position: relative;
  overflow: hidden;
  transform: translateY(-6px);
  filter: blur(3px);
  animation: enter-up 0.8s 0.5s ease forwards;
}
.top-link.secondary {
  background: rgba(12, 16, 22, 0.8);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.top-link::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(
    400px 200px at var(--mxpx) var(--mypx),
    rgba(255, 255, 255, 0.22),
    transparent 60%
  );
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.top-link::after {
  content: "";
  position: absolute;
  left: -120%;
  top: 0;
  height: 100%;
  width: 120%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  transform: skewX(-20deg);
  transition: transform 0.6s ease;
}
.top-link:hover::before {
  opacity: 1;
}
.top-link:hover::after {
  transform: translateX(240%) skewX(-20deg);
}

/* ========= RIGHT PANEL: BALANCE / LANG / PROFILE ========= */
.top-right {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-left: auto;
}

.balance-card {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 0 40px rgba(0, 234, 255, 0.4);
  color: #fff;
  min-width: max-content;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  background-image: radial-gradient(
      circle at 10% 10%,
      rgba(0, 234, 255, 0.18) 0%,
      transparent 60%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(255, 0, 122, 0.18) 0%,
      transparent 60%
    );
}
.balance-card .label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1.4;
  letter-spacing: 0.08em;
}
.balance-card .value {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
}
.balance-card.auth-on {
  display: block;
}

.lang {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8f2ff;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
  filter: blur(3px);
  animation: enter-up 0.8s 0.6s ease forwards;
}
.lang-menu {
  position: absolute;
  right: 0;
  top: 48px;
  background: rgba(12, 16, 22, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  display: none;
  min-width: 180px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  z-index: 200;
}
.lang-menu button {
  all: unset;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  cursor: pointer;
  color: #e8f2ff;
  font-weight: 700;
}
.lang-menu button:hover {
  background: linear-gradient(
    90deg,
    rgba(0, 234, 255, 0.08),
    rgba(255, 0, 122, 0.08)
  );
}

.profile {
  position: relative;
}
.profile-btn {
  min-width: auto; /* было width: 44px; */
  height: 41px;
  padding: 0 8px; /* чтобы было место под ник и стрелку */
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  display: inline-flex; /* вместо просто flex — чтобы подстраивалась по контенту */
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transform: translateY(-6px);
  filter: blur(3px);
  animation: enter-up 0.8s 0.65s ease forwards;
  position: relative;
  overflow: hidden;
  gap: 6px; /* промежуток между ником и стрелкой */
  width: auto;
}
.profile-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px 200px at var(--mxpx, 50%) var(--mypx, 50%),
    rgba(255, 255, 255, 0.22),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.profile-btn:hover::after {
  opacity: 1;
}

.profile-menu {
  position: absolute;
  right: 0;
  top: 52px;
  min-width: 220px;
  background: rgba(12, 16, 22, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 12px 0;
  display: none;
  flex-direction: column;
  z-index: 200;
  animation: menu-in 0.35s cubic-bezier(0.16, 0.82, 0.2, 1) forwards;
}
.profile-menu.open {
  display: flex;
}
.profile-menu .acc-type {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  padding: 8px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-menu .list {
  display: flex;
  flex-direction: column;
  padding-top: 6px;
}
.profile-menu .list a {
  all: unset;
  display: block;
  cursor: pointer;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: #e8f2ff;
}
.profile-menu .list a:hover {
  background: linear-gradient(
    90deg,
    rgba(0, 234, 255, 0.07),
    rgba(255, 0, 122, 0.07)
  );
}

/* userline (авторизованный блок) */
.profile-menu .acc-userline {
  margin: 6px 0 4px;
  font-size: 13px;
  line-height: 1.25;
  color: #dbe0ff;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.profile-menu .acc-userline .nick {
  font-weight: 600;
}
.profile-menu .acc-userline .acc {
  opacity: 0.85;
}
.profile-menu .acc-userline .sep {
  opacity: 0.6;
  margin: 0 0.25em;
}

/* ========= FOOTER ========= */
.footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
  background: linear-gradient(180deg, transparent, rgba(5, 9, 15, 0.92));
  border-top: 1px solid rgba(143, 209, 255, 0.3);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 5;
}
@media (max-width: 600px) {
  .footer-bar {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
}

.footer-left {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 40px;
}
.discord-pill {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 16, 22, 0.78);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 10px;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
  color: #eaf3ff;
  min-width: max-content;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}
.discord-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 234, 255, 0.3);
}
.discord-pill:active {
  transform: translateY(0);
}

.legal-wrap {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: #6c7a8a;
  min-width: max-content;
}

.footer-right {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}
@media (max-width: 600px) {
  .footer-right {
    align-items: flex-start;
  }
}

/* блок с посещалкой/заметкой справа */
.note-line {
  display: block;
}
@media (min-width: 701px) {
  .note-line {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .note-line .visitor_bottom {
    float: none;
    display: inline-flex;
    align-items: center;
    margin: 0;
  }
  .note-line .note-mini {
    text-align: right;
  }
}
.visitor_bottom {
  margin-top: 17px;
  float: right;
  display: inline-block;
  bottom: 0;
  right: 0;
}
.note-mini {
  font-size: 10px;
  font-weight: 600;
  color: #8aa0b3;
  line-height: 1.4;
  max-width: 260px;
  text-align: right;
}
@media (max-width: 600px) {
  .note-mini {
    text-align: left;
  }
}

/* ========= ANIMATIONS (используются в хедере/кнопках) ========= */
@keyframes bar-scan {
  to {
    background-position: 200% 0;
  }
}
@keyframes enter-up {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}
@keyframes enter-down {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}
@keyframes menu-in {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(-8px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}
@keyframes breath {
  50% {
    transform: scale(1.18);
  }
}
@keyframes letter-reveal {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
@keyframes pulse-still {
  0%,
  100% {
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.6),
      0 0 40px rgba(0, 234, 255, 0.4), 0 0 60px rgba(255, 0, 122, 0.3);
    transform: translateY(0) scale(1);
  }
  50% {
    text-shadow: 0 0 24px rgba(255, 255, 255, 0.9),
      0 0 60px rgba(0, 234, 255, 0.7), 0 0 80px rgba(255, 0, 122, 0.5);
    transform: translateY(-1px) scale(1.03);
  }
}

/* ========= RESPONSIVE (только то, что затрагивает ваш код) ========= */
@media (max-width: 1200px) {
  .main-nav {
    display: none;
  }
}
@media (max-width: 920px) {
  .footer-left {
    display: inline;
    align-items: center;
    gap: 12px 16px;
    margin-top: 0;
  }
  .footer-right {
    position: absolute;
    right: 1px;
    bottom: 1px;
  }
  .top-left {
    gap: 0;
  }
  .topbar {
    gap: 0;
  }
}
@media (max-width: 700px) {
  /* шапка прилипает, упрощаем кнопки */
  .topbar {
    position: sticky;
    top: 0;
    padding: 12px 14px;
    z-index: 40;
    backdrop-filter: blur(8px);
  }
  .main-nav {
    display: none !important;
  }
  .lang-btn,
  .profile-btn {
    transform: none;
    filter: none;
  }
  .lang-menu {
    top: 44px;
  }

  /* футер в поток на всю ширину */
  .footer-bar {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: calc(100% - 24px);
    margin: 8px auto 16px;
    gap: 12px 14px;
  }
  .footer-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 0;
  }
  .footer-right {
    align-items: flex-start;
    position: static;
  }
  .note-mini {
    max-width: 100%;
    text-align: left;
  }
}
@media (max-width: 549px) {
  .bg .grid,
  .fx {
    display: none !important;
  }
  .row {
    grid-template-columns: 1fr;
  }
}
/* Блик на кнопке обновления кода: справа налево */
#btnCode::after {
  left: auto;
  right: -120%;
  transform: skewX(20deg);
}

#btnCode:hover::after {
  transform: translateX(-240%) skewX(20deg);
}

@media (max-height: 900px) and (min-width: 1000px) {
  .note {
    font-size: 10px;
    line-height: 1;
  }
  .card {
    padding: 12px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  form {
    gap: 6px;
  }
  .auth {
    top: 355px;
  }
  .tabs {
    padding: 0px;
    margin-bottom: 3px;
  }
}
