* {
  box-sizing: border-box;
}

:root {
  --image-url: url("bg-2.png");

  --btn-top: 70.6%;
  --btn-width: clamp(220px, 27vw, 560px);
  --btn-height: clamp(44px, 6.2vh, 86px);

  --note-size: clamp(11px, 1vw, 18px);
  --note-bottom: max(14px, env(safe-area-inset-bottom));
  --note-left: max(14px, env(safe-area-inset-left));
  --note-right: max(14px, env(safe-area-inset-right));
}

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

body {
  min-height: 100dvh;
  overflow: hidden;
  font-family: Inter, "Montserrat", "Segoe UI", Arial, sans-serif;
  background: #070815;
  color: #fff;
}

.gate {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.hero-shell {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-backdrop {
  display: none;
}

.hero-stage {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;

  background-image: var(--image-url);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

/* Горизонтальные экраны */
@media (orientation: landscape) {
  :root {
    --image-url: url("bg-2.png");
    --btn-top: 70.6%;
    --btn-width: clamp(220px, 27vw, 560px);
    --btn-height: clamp(44px, 6.2vh, 86px);
  }

  .hero-stage {
    background-position: center center;
  }
}

/* Планшеты и обычные телефоны в портрете */
@media (orientation: portrait) and (min-aspect-ratio: 2 / 3) {
  :root {
    --image-url: url("bg-3.png");
    --btn-top: 70.8%;
    --btn-width: clamp(220px, 44vw, 430px);
    --btn-height: clamp(44px, 4.8vh, 72px);
  }

  .hero-stage {
    background-position: center center;
  }
}

/* Узкие телефоны */
@media (orientation: portrait) and (max-aspect-ratio: 2 / 3) {
  :root {
    --image-url: url("bg-4.png");
    --btn-top: 70.8%;
    --btn-width: clamp(220px, 58vw, 390px);
    --btn-height: clamp(44px, 4.2vh, 64px);
  }

  .hero-stage {
    background-position: center center;
  }
}

/* Очень широкие мониторы */
@media (min-aspect-ratio: 21 / 9) {
  .hero-stage {
    background-position: center center;
  }

  :root {
    --btn-top: 71%;
  }
}

/* Низкие экраны */
@media (max-height: 620px) and (orientation: landscape) {
  :root {
    --btn-top: 72%;
    --btn-height: 44px;
  }
}

.enter-btn,
.fallback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 44px);
  padding: 0 1.15em;
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(180deg, #f06f9b 0%, #e25284 100%);
  box-shadow:
    0 0 0 1px rgba(255, 190, 210, 0.22) inset,
    0 14px 35px rgba(9, 5, 24, 0.47),
    0 0 28px rgba(236, 83, 137, 0.25);
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.22);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.enter-btn {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: var(--btn-top);
  width: var(--btn-width);
  height: var(--btn-height);
  min-height: 44px;
  transform: translate(-50%, -50%);
  font-size: clamp(12px, 1.2vw, 25px);
  letter-spacing: clamp(4px, 0.8vw, 16px);
  line-height: 1;
}

.enter-btn::before,
.fallback-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
}

.enter-btn:hover,
.fallback-btn:hover {
  filter: brightness(1.05);
}

.enter-btn:active {
  transform: translate(-50%, -50%) translateY(1px);
}

.fallback-btn:active {
  transform: translateY(1px);
}

.spark {
  font-size: clamp(17px, 1.25vw, 26px);
  letter-spacing: 0;
  transform: translateY(-1px);
  color: #fff8fb;
}

.hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: calc(var(--btn-top) + 5.7%);
  width: min(80vw, 420px);
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(12px, 1vw, 21px);
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

.corner-note {
  position: fixed;
  z-index: 4;
  bottom: var(--note-bottom);
  color: rgba(255, 245, 250, 0.85);
  font-size: var(--note-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.corner-note--left {
  left: var(--note-left);
}

.corner-note--right {
  right: var(--note-right);
}

.fallback-panel,
.noscript-panel {
  display: none;
  width: min(92vw, 560px);
  padding: 24px;
  border-radius: 18px;
  background: rgba(10, 12, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.fallback-title {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(24px, 2.2vw, 34px);
  letter-spacing: 0.04em;
}

.fallback-text {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.fallback-link {
  color: #ff8eb5;
}

.fallback-btn {
  position: relative;
  min-height: 48px;
  padding: 0 26px;
  font-size: 14px;
  letter-spacing: 0.12em;
}

/* Режим для поисковиков и подозрительных ботов */
html.is-search-bot body,
html.is-suspicious-bot body {
  overflow: auto;
}

html.is-search-bot .gate,
html.is-suspicious-bot .gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

html.is-search-bot .hero-shell,
html.is-suspicious-bot .hero-shell {
  width: min(92vw, 720px);
  height: auto;
}

html.is-search-bot .hero-stage,
html.is-suspicious-bot .hero-stage {
  width: auto;
  height: auto;
  min-height: 0;
  background: none;
}

html.is-search-bot .enter-btn,
html.is-search-bot .hint,
html.is-search-bot .corner-note,
html.is-suspicious-bot .enter-btn,
html.is-suspicious-bot .hint,
html.is-suspicious-bot .corner-note {
  display: none;
}

html.is-search-bot .fallback-panel,
html.is-suspicious-bot .fallback-panel,
html.no-js .noscript-panel {
  display: block;
}

html.is-search-bot .fallback-text--suspicious,
html.is-suspicious-bot .fallback-text--search {
  display: none;
}

html.is-search-bot .fallback-btn {
  display: none;
}

/* Мобильная подстройка кнопки */
@media (max-width: 960px) {
  .enter-btn {
    letter-spacing: clamp(3px, 0.7vw, 8px);
    gap: clamp(10px, 2vw, 18px);
  }

  .hint {
    white-space: normal;
  }
}

@media (max-width: 700px) {
  .enter-btn {
    width: min(84vw, var(--btn-width));
    min-height: 46px;
    font-size: clamp(12px, 3.5vw, 17px);
    letter-spacing: 0.14em;
  }

  .corner-note {
    font-size: clamp(11px, 2.9vw, 14px);
  }
}

@media (max-width: 420px) {
  .enter-btn {
    width: min(88vw, var(--btn-width));
    gap: 12px;
    padding-inline: 14px;
    font-size: 12px;
    letter-spacing: 0.11em;
  }

  .spark {
    font-size: 15px;
  }

  .hint {
    font-size: 12px;
  }
}