:root {
  --bg: #0b0f14;
  --ink: #dde7ff;
  --muted: #8aa0b3;
  --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.6), 0 0 120px rgba(0, 0, 0, 0.4);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --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;
  overflow: hidden;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
}

.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%;
  pointer-events: none;
  z-index: -2;
  background: radial-gradient(
      160% 120% at 80% 20%,
      rgba(0, 234, 255, 0.16),
      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.9));
}
.bg .grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  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 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.25) 55%,
    transparent
  );
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 30;
  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;
  min-width: 0;
}
.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;
  flex-wrap: wrap;
  gap: 14px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Центрируем Основное меню по центру шапки */
.topbar nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
nav a {
  position: relative;
  color: #e9f3ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  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: 10px;
  right: 10px;
  bottom: 4px;
  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);
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.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);
  z-index: 50;
}
.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)
  );
}

.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: radial-gradient(
      circle at 10% 10%,
      rgba(0, 234, 255, 0.3) 0%,
      rgba(0, 0, 0, 0) 60%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(255, 0, 122, 0.2) 0%,
      rgba(0, 0, 0, 0) 60%
    ),
    rgba(15, 20, 30, 0.5);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 120px rgba(0, 234, 255, 0.25),
    inset 0 0 40px rgba(143, 209, 255, 0.3);
  backdrop-filter: blur(8px);
  /* входная анимация: плавное появление снизу с лёгким масштабом */
  opacity: 0;
  transform: translateZ(var(--z, 0px)) translateY(16px) 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.9s ease forwards;
}
.abs::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(0, 234, 255, 0),
    rgba(0, 234, 255, 0.4),
    rgba(255, 0, 122, 0) 60%
  );
  filter: blur(14px);
  opacity: 0.6;
  mix-blend-mode: screen;
}
.abs.flip {
  transform: translateZ(var(--z, 0px)) rotateY(180deg) rotateX(var(--rx, 0deg));
}
.abs.a {
  left: 6vw;
  top: 18vh;
  --z: -70px;
  animation-delay: 0.12s;
}
.abs.b {
  left: 72vw;
  top: 20vh;
  --z: -60px;
  animation-delay: 0.22s;
}
.abs.c {
  left: 10vw;
  bottom: 16vh;
  --z: -120px;
  animation-delay: 0.32s;
}
.abs.d {
  right: 10vw;
  bottom: 18vh;
  --z: -100px;
  animation-delay: 0.42s;
}
.abs.e {
  left: 40vw;
  top: 72vh;
  width: 240px;
  height: 140px;
  --z: -110px;
  animation-delay: 0.52s;
}

/* Remove five decorative rectangles entirely */
.scene .abs {
  display: none !important;
}

@keyframes abs-in {
  0% {
    opacity: 0;
    filter: blur(6px);
    transform: translateZ(var(--z, 0px)) translateY(22px) scale(0.94)
      rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  }
  60% {
    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));
  }
}

.layout {
  position: fixed;
  inset: 0;
  padding: 92px 20px 80px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 420px);
  gap: 24px;
  align-items: center;
  justify-content: center;
  max-width: 1400px;
  margin: 0 auto;
  pointer-events: none;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding-top: 120px;
    padding-bottom: 110px;
    overflow-x: hidden;
    overflow-y: hidden;
  }
}

.infoCard {
  background: rgba(12, 16, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 20px 24px;
  min-width: 0;
  pointer-events: auto;

  transform: translateY(14px) scale(0.98);
  opacity: 0;
  filter: blur(10px);
  animation: card-in 0.8s 0.3s ease forwards;
}

.tagline {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 900;
  color: #b8c9ff;
  letter-spacing: 0.18em;
  background: linear-gradient(
    90deg,
    rgba(0, 234, 255, 0.14),
    rgba(255, 0, 122, 0.14)
  );
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.mainTitle {
  font-family: "Russo One", system-ui;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 4px;
  font-weight: 400;
  margin: 14px 0 8px;
  background: linear-gradient(90deg, #e9f3ff, #7ad5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desc {
  color: #d8e6ff;
  font-size: 14px;
  line-height: 1.5;
  max-width: 46ch;
}

.statsRow {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #eaf3ff;
  font-weight: 800;
  font-size: 13px;
}
.statItem {
  display: flex;
  align-items: center;
  gap: 8px;
}
.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);
}

.dlCard {
  background: rgba(12, 16, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 20px 24px;
  min-width: 0;
  pointer-events: auto;

  transform: translateY(14px) scale(0.98);
  opacity: 0;
  filter: blur(10px);
  animation: card-in 0.8s 0.38s ease forwards;
}

.dlHeader {
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #b8c9ff;
  text-transform: uppercase;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  row-gap: 8px;
  column-gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dlGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 450px) {
  .dlGrid {
    grid-template-columns: 1fr 1fr;
  }
}

.dlOption {
  position: relative;
  background: radial-gradient(
      circle at 10% 10%,
      rgba(0, 234, 255, 0.15) 0%,
      rgba(0, 0, 0, 0) 60%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(255, 0, 122, 0.12) 0%,
      rgba(0, 0, 0, 0) 60%
    ),
    rgba(18, 24, 32, 0.5);
  border: 1px solid rgba(143, 209, 255, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 234, 255, 0.25),
    inset 0 0 40px rgba(143, 209, 255, 0.22);
  padding: 14px 14px 48px;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  transition: transform 0.3s cubic-bezier(0.18, 0.82, 0.19, 1),
    box-shadow 0.3s ease;
}
.dlOption:hover {
  transform: translateY(-4px) rotateX(6deg) rotateY(-6deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 80px rgba(0, 234, 255, 0.4),
    0 0 120px rgba(255, 0, 122, 0.3);
}

.dlHeadRow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding-bottom: 15px;
}
.dlIcon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.4) 0%,
      rgba(0, 0, 0, 0) 60%
    ),
    linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 234, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #0b0f14;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
}
.dlTextGroup {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dlName {
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.langTag {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(0, 234, 255, 0.15);
  border: 1px solid rgba(0, 234, 255, 0.5);
  color: #aef9ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.dlDesc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 600;
  max-width: 32ch;
}

.dlAction {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
  color: #eaf3ff;
  letter-spacing: 0.03em;
}
@media (max-width: 700px) {
  .dlHeadRow {
    padding-bottom: 30px;
  }
  .dlAction {
    /* Stack size text and button vertically on narrow screens */
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .dlAction .dlBtn {
    align-self: stretch;
    width: 100%;
    flex: 0 0 auto; /* allow natural height */
  }
  .dlAction > div:first-child {
    width: 100%;
    white-space: normal; /* allow wrapping if needed */
  }
  body {
    overflow-y: visible;
  }
}
.dlAction > div:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dlBtn {
  --mxpx: 50%;
  --mypx: 50%;
  position: relative;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(0, 234, 255, 0.16),
    rgba(255, 0, 122, 0.16)
  );
  border: 1px solid rgba(143, 209, 255, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), var(--ringCyan);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  color: #eaf3ff;
  cursor: pointer;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  /* фиксированная ширина, чтобы текст слева не сжимал кнопку */
  min-width: 140px;
  flex: 0 0 140px;
  text-align: center;
  /* привлекающая внимание анимация */
  animation: pulse-glow 2.8s ease-in-out infinite 1.4s;
}
.dlBtn::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;
}
.dlBtn::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;
}
.dlBtn:hover::before {
  opacity: 1;
}
.dlBtn:hover::after {
  transform: translateX(240%) skewX(-20deg);
}
.dlBtn:active {
  transform: scale(0.97);
}

/* более активный пульс для главного варианта (лаунчер) */
.dlOption[data-kind="launcher"] .dlBtn {
  animation: pulse-glow-strong 2.2s ease-in-out infinite 0.8s;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), var(--ringCyan);
    transform: translateZ(0) scale(1);
  }
  50% {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 234, 255, 0.7),
      0 0 36px rgba(255, 0, 122, 0.5);
    transform: translateZ(0) scale(1.03);
  }
}
@keyframes pulse-glow-strong {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), var(--ringCyan);
    transform: translateZ(0) scale(1);
  }
  35% {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 0 24px rgba(0, 234, 255, 0.8),
      0 0 46px rgba(255, 0, 122, 0.55);
    transform: translateZ(0) scale(1.05);
  }
  60% {
    transform: translateZ(0) scale(1.01);
  }
}

.howto {
  margin-top: 20px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
  color: #cfdcff;
}
.how-block {
  margin-bottom: 14px;
}
.how-head {
  font-weight: 900;
  font-size: 13px;
  line-height: 1.4;
  color: #7dffa7;
  text-shadow: 0 0 8px rgba(125, 255, 167, 0.5);
}
.how-en {
  color: #ffe966;
  text-shadow: 0 0 8px rgba(255, 233, 102, 0.4);
}

.bottomRow {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  /* родитель уже фиксирован и служит контейнером для absolute-детей */
}
@media (max-width: 600px) {
  .bottomRow {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
}
/* Allow full-page vertical scroll and non-fixed layout on tablets/phones */
@media (max-width: 1000px) {
  html,
  body {
    height: auto;
  }
  body {
    overflow-y: auto;
  }
  .layout {
    position: static;
    inset: auto;
    overflow: visible; /* do not clip content */
    pointer-events: auto; /* enable interactions */
  }
  .bottomRow {
    position: static;
  }
  .bt-left {
    position: static;
  }
  .bt-right {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "cta"
      "note"
      "sound";
    align-items: start;
    row-gap: 8px;
  }
  .note-mini {
    text-align: left;
  }
}

.bt-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5ef;
  pointer-events: auto;
  flex-wrap: wrap;
  /* выравниваем по линии note-mini */
  position: absolute;
  left: 0;
  bottom: 0;
}
.discord-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  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-weight: 700;
  font-size: 12px;
  color: #eaf3ff;
}
.legal {
  font-size: 11px;
  color: #8aa0b3;
  line-height: 1.4;
}

.bt-right {
  /* закрепляем блок в правом нижнем углу, чтобы совпадал по линии с левым */
  position: absolute;
  right: 0;
  bottom: 0;
  /* сетка: верхний ряд — CTA на всю ширину, нижний — заметка слева и звук справа */
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "cta cta"
    "note sound";
  column-gap: 12px;
  row-gap: 8px;
  align-items: end;
  pointer-events: auto;
  min-width: 0;
  max-width: calc(100vw - 40px);
}
@media (max-width: 600px) {
  .bt-right {
    align-items: flex-start;
  }
}
.ctaRow {
  grid-area: cta;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
@media (max-width: 600px) {
  .ctaRow {
    justify-content: flex-start;
  }
}
.btnNav {
  --mxpx: 50%;
  --mypx: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #eaf3ff;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  padding: 8px 12px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  overflow: hidden;
  min-width: max-content;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}
.btnNav.primary {
  background: linear-gradient(
    135deg,
    rgba(0, 234, 255, 0.16),
    rgba(255, 0, 122, 0.16)
  );
  border: 1px solid rgba(143, 209, 255, 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), var(--ringCyan);
}
.btnNav::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;
}
.btnNav::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;
}
.btnNav:hover::before {
  opacity: 1;
}
.btnNav:hover::after {
  transform: translateX(240%) skewX(-20deg);
}
.btnNav:active {
  transform: scale(0.97);
}

.note-mini {
  grid-area: note;
  font-size: 10px;
  font-weight: 600;
  color: #8aa0b3;
  line-height: 1.4;
  max-width: 260px;
  text-align: right;
  min-width: 0; /* позволяем сжиматься внутри сетки */
  margin: 0;
}
@media (max-width: 600px) {
  /* на мобильных возвращаем потоковую верстку */
  .bt-left {
    position: static;
  }
  .bt-right {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "cta"
      "note"
      "sound";
    align-items: start;
    row-gap: 8px;
  }
  .note-mini {
    text-align: left;
  }
}

.sound {
  grid-area: sound;
  justify-self: end;
  /* старт мягкого появления из-под линии */
  transform: translateY(12px);
  opacity: 0;
  filter: blur(8px);
  animation: enter-up 0.8s 0.9s ease forwards;
  pointer-events: auto;
  display: none;
}

@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: 900px) {
  .sound {
    display: block;
  }
}
/* ========= 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 {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transform: translateY(-6px);
  filter: blur(3px);
  animation: enter-up 0.8s 0.65s ease forwards;
}
.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;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  margin-top: 40px;
}
@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 {
    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);
    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: 800px) {
  .cmd-layout {
    padding-left: 4px;
    padding-right: 4px;
  }
}
@media (max-width: 400px) {
  .cmd-layout {
    display: block;
  }
  .stage-caption {
    display: block;
  }
}
@media (max-width: 1200px) {
  .footer-bar {
    backdrop-filter: blur(10px);
  }
}
@media (max-width: 900px) {
  .footer-bar {
    position: fixed;
    left: 0px;
    right: 0px;
    bottom: -1px;
    display: flex;
    flex-wrap: wrap-reverse;
    gap: 16px 20px;
    z-index: 30;
    padding: 0.5rem;
  }
}

@media (max-width: 360px) {
  .footer-bar {
    display: inline;
  }
}

/* Disable moving circle/grid and canvas FX on small screens */
@media (max-width: 549px) {
  .bg .grid,
  .fx {
    display: none !important;
  }
}

/* ===== LOGIN MODAL — PIXEL MATCH ===== */

.btn {
  --pad: 12px 18px;
  --ring: rgba(0, 234, 255, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: var(--pad);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(
    135deg,
    rgba(0, 234, 255, 0.12),
    rgba(255, 0, 122, 0.12)
  );
  color: #eaf3ff;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.4px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), var(--ringCyan);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  min-width: max-content;

  background: rgba(12, 16, 22, 0.65);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(
    400px 200px at var(--mxpx, 50%) var(--mypx, 50%),
    rgba(255, 255, 255, 0.22),
    transparent 60%
  );
  transition: opacity 0.25s ease;
  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 ease;
}
.btn:hover::before {
  opacity: 1;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:hover::after {
  transform: translateX(240%) skewX(-20deg);
}
.btn.ghost {
  background: rgba(12, 16, 22, 0.8);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.btn.thin {
  padding: 10px 14px;
  font-weight: 700;
  opacity: 0.95;
  justify-content: center;
}
#downloadBtn {
  min-width: 220px;
  text-align: center;
  animation: pulse-glow 2.6s ease-in-out infinite 1.2s;
}
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), var(--ringCyan);
    transform: translateY(0) scale(1);
  }
  50% {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 18px rgba(0, 234, 255, 0.7),
      0 0 36px rgba(255, 0, 122, 0.5), var(--ringCyan);
    transform: translateY(-1px) scale(1.03);
  }
}

/* Контейнер и анимация */
.mdo {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s, visibility 0.25s;
}
.mdo.open {
  visibility: visible;
  opacity: 1;
}
.mdo__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}
/* компактная ширина как на референсе */
.mdo__dialog {
  position: relative;
  width: clamp(320px, 90vw, 420px);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.25s;
}
.mdo.open .mdo__dialog {
  transform: translateY(0) scale(1);
}

/* Карточка */
#login-modal .card {
  padding: 20px 18px 22px;
  border-radius: 18px;
  background: radial-gradient(
      120% 120% at -20% -20%,
      rgba(59, 234, 253, 0.18) 0%,
      rgba(59, 234, 253, 0) 60%
    ),
    radial-gradient(
      120% 120% at 120% 0%,
      rgba(176, 92, 255, 0.16) 0%,
      rgba(176, 92, 255, 0) 58%
    ),
    linear-gradient(180deg, rgba(12, 16, 22, 0.95), rgba(12, 16, 22, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

/* Верхняя «плашка» ВХОД */
#login-modal .tabs {
  margin-bottom: 14px;
}
#login-modal .tabs button {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(90deg, #474747d5 0%, #3b3b3d98 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Сетка формы: 2 колонки, при этом поля тянутся на всю ширину */
#login-modal form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#login-modal .grp,
#login-modal #mdoErrors,
#login-modal #mdoSmall,
#login-modal #mdoSpinner {
  grid-column: 1 / -1;
}

/* Поля */
#login-modal .grp {
  margin: 0;
}
#login-modal .grp label {
  display: block;
  margin: 4px 0 6px 2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}
#login-modal .inp {
  display: flex;
  align-items: center;
  gap: 8px;
}
#login-modal input[type="username"],
#login-modal input[type="password"] {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  color: #fff;
  outline: none;
}
#login-modal input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
#login-modal input:focus {
  border-color: rgba(59, 234, 253, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 234, 253, 0.15);
}

/* Кнопка-глаз */
#login-modal #mdoToggle.ghost {
  min-width: 42px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

/* Раскладываем кнопки как на референсе:
   1) «Войти» — на всю ширину
   2) «Создать аккаунт» слева, «Забыли пароль?» справа */
#login-modal .row {
  display: contents;
} /* даём детям участвовать в сетке формы */
#login-modal .links {
  display: contents;
}

#login-modal #mdoSubmit {
  grid-column: 1 / -1;
}
#login-modal #mdoCreate {
  grid-column: 1 / 2;
}
#login-modal #mdoForgot {
  grid-column: 2 / 3;
}

#login-modal .btn {
  height: 44px;
  border-radius: 12px;
  font-weight: 700;
  line-height: 1;
}
#login-modal .btn:not(.ghost) {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  justify-content: center;
}
#login-modal .btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  justify-content: center;
  text-align: center;
}

/* Ошибки/спиннер */
#login-modal .form-error-summary {
  display: none;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 68, 68, 0.12);
  border: 1px solid rgba(255, 68, 68, 0.35);
  color: #fff;
}
#login-modal .spinner {
  color: rgba(255, 255, 255, 0.8);
}

/* Адаптив: на очень узких экранах нижние 2 кнопки складываем в столбик */
@media (max-width: 380px) {
  #login-modal form {
    grid-template-columns: 1fr;
  }
  #login-modal #mdoCreate,
  #login-modal #mdoForgot {
    grid-column: 1 / -1;
  }
}

/* Небольшой «отскок» при открытии — как в референсе */
@media (prefers-reduced-motion: no-preference) {
  .mdo.open .mdo__dialog {
    animation: mdoPop 0.22s ease-out;
  }
  @keyframes mdoPop {
    from {
      transform: translateY(10px) scale(0.97);
    }
    to {
      transform: translateY(0) scale(1);
    }
  }
}
/* --- FIX: применять стили ко всем текстовым полям в модалке --- */
#login-modal .inp input,
#login-modal input[type="text"],
#login-modal input[type="password"],
#login-modal input[type="email"],
#login-modal input[type="search"],
#login-modal input:not([type]) {
  /* покрывает <input> без type (логин) */
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  color: #fff;
  outline: none;
  box-sizing: border-box;
  appearance: none;
}

/* одно правило на фокус — для любых текстовых полей */
#login-modal .inp input:focus,
#login-modal input[type="text"]:focus,
#login-modal input[type="password"]:focus,
#login-modal input:not([type]):focus {
  border-color: rgba(59, 234, 253, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 234, 253, 0.15);
}

/* автозаполнение браузера, чтобы не желтило фон */
#login-modal .inp input:-webkit-autofill {
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.06) inset;
}

/* кнопка-глаз — держим высоту/радиус как у инпута */
#login-modal #mdoToggle.ghost {
  height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* плейсхолдеры единые */
#login-modal input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

/* new profile pill */
.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 .nick {
  display: inline-flex;
  align-items: center;
  max-width: 160px; /* чтобы очень длинный ник не ломал верстку */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-btn .nick-arrow {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-left: 2px solid rgba(255, 255, 255, 0.85);
  border-bottom: 2px solid rgba(255, 255, 255, 0.85);
  transform: rotate(-45deg) translateY(0px); /* маленький уголок, смотрящий вниз */
  opacity: 0.9;
  padding-right: 6px;
}
.profile-btn .nick {
  display: inline-block;
  cursor: pointer;
}
