:root {
  --cyan: #22d3ee;
  --mint: #5eead4;
  --fuchsia: #e879f9;
  --violet: #a78bfa;
  --ink: #020617;
  --card: rgba(15, 23, 42, 0.55);
  --text-bright: #f8fafc;
  --text-muted: rgba(226, 232, 240, 0.78);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  background: var(--ink);
  color: var(--text-bright);
  overflow-x: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(34, 211, 238, 0.16), transparent 55%),
    radial-gradient(ellipse 85% 60% at 100% 50%, rgba(232, 121, 249, 0.1), transparent 50%),
    radial-gradient(ellipse 80% 55% at 0% 100%, rgba(94, 234, 212, 0.08), transparent 50%),
    var(--ink);
  pointer-events: none;
  z-index: 0;
}

.noise {
  position: fixed;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 45%, black 25%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
  will-change: transform;
  animation: float 18s ease-in-out infinite;
}

.orb--1 {
  width: min(55vw, 380px);
  height: min(55vw, 380px);
  background: radial-gradient(circle, var(--fuchsia) 0%, transparent 72%);
  top: max(-12%, calc(var(--safe-top) - 40px));
  right: -8%;
  animation-delay: -4s;
}

.orb--2 {
  width: min(65vw, 440px);
  height: min(65vw, 440px);
  background: radial-gradient(circle, var(--cyan) 0%, transparent 72%);
  bottom: max(-22%, calc(-1 * var(--safe-bottom) - 20px));
  left: -14%;
  animation-delay: -9s;
}

.orb--3 {
  width: 42vmin;
  height: 42vmin;
  background: radial-gradient(circle, var(--violet) 0%, transparent 68%);
  top: 42%;
  left: 48%;
  transform: translate(-50%, -50%);
  animation: orbPulse 14s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2%, -3%) scale(1.03); }
  66% { transform: translate(-2%, 2%) scale(0.98); }
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.32; filter: blur(72px); }
  50% { opacity: 0.46; filter: blur(82px); }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .badge-dot, .cta { animation: none !important; }
  .cta { transition: none; }
}

.wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(1.25rem + var(--safe-top))
    clamp(1rem, 5vw, 2rem)
    calc(1.5rem + var(--safe-bottom));
}

.card {
  width: min(100%, 440px);
  padding: clamp(1.65rem, 7vw, 2.65rem) clamp(1.35rem, 6vw, 2.35rem);
  border-radius: clamp(22px, 6vw, 28px);
  text-align: center;
  background: var(--card);
  backdrop-filter: blur(26px) saturate(175%);
  -webkit-backdrop-filter: blur(26px) saturate(175%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.06),
    0 4px 6px rgba(0, 0, 0, 0.15),
    0 32px 64px -20px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(94, 234, 212, 0.5),
    rgba(34, 211, 238, 0.2) 30%,
    rgba(232, 121, 249, 0.35) 70%,
    rgba(167, 139, 250, 0.45)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

.card-inner { position: relative; z-index: 1; }

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.95rem;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.85);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 100px;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.12);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 14px var(--cyan);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}

.logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0;
  font-size: 1.55rem;
  line-height: 1;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(94, 234, 212, 0.2), rgba(167, 139, 250, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.9rem, 6.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  background: linear-gradient(110deg, #fff 0%, #d5f4ff 38%, #fae8ff 72%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 20px rgba(34, 211, 238, 0.2));
}

.sub {
  margin: 0 auto 1.35rem;
  max-width: 34ch;
  font-size: clamp(0.95rem, 3.8vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.62;
  color: var(--text-muted);
}

.vpn-notice {
  position: relative;
  margin: 0 0 1.5rem;
  padding: 1rem 1.1rem 1.05rem 1.25rem;
  text-align: center;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(34, 211, 238, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 10px 36px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(34, 211, 238, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.vpn-notice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 5px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(180deg, var(--cyan), var(--mint), var(--fuchsia));
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.55);
}

.vpn-notice__label {
  margin: 0 0 0.5rem;
  padding: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.vpn-notice__text {
  margin: 0;
  padding: 0;
  font-size: clamp(0.88rem, 3.4vw, 0.975rem);
  font-weight: 500;
  line-height: 1.6;
  color: rgba(248, 250, 252, 0.9);
  letter-spacing: 0.01em;
}

.vpn-notice--fallback {
  margin-bottom: 0;
  padding: 0.95rem 1rem 1rem 1.2rem;
}

.vpn-notice--fallback .vpn-notice__text {
  max-width: 32ch;
  margin-inline: auto;
}

button.bot-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 220px;
  margin: 0.35rem 0 0;
  padding: 0.55rem 1rem;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  font-size: clamp(0.95rem, 3.6vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: #5eead4;
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(94, 234, 212, 0.4);
  border-radius: 12px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 20px rgba(34, 211, 238, 0.15);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

button.bot-chip:hover {
  color: #99f6e4;
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(94, 234, 212, 0.6);
}

button.bot-chip:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

button.bot-chip.is-copied {
  color: #f0fdfa;
  background: rgba(94, 234, 212, 0.15);
  border-color: var(--mint);
}

button.bot-chip--inline {
  display: inline-flex;
  width: auto;
  max-width: none;
  margin: 0.15rem 0 0.1rem;
  padding: 0.28rem 0.6rem;
  font-size: 0.95em;
  vertical-align: middle;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0.25rem;
}

.block-info {
  margin-top: 0.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.block-info__lead {
  margin: 0 auto 1rem;
  max-width: 36ch;
  font-size: clamp(0.88rem, 3.4vw, 0.95rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: center;
}

.block-info .open-steps {
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.block-info .vpn-notice {
  margin-bottom: 0;
}

.block-info .open-steps {
  margin-bottom: 1rem;
}

.btn-copy {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 0.72rem 1.25rem;
  margin: 0;
  font-family: inherit;
  font-size: clamp(0.9rem, 3.5vw, 0.9375rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  color: rgba(226, 232, 240, 0.88);
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.btn-copy__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  line-height: 0;
}

.btn-copy__icon svg {
  display: block;
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
  overflow: visible;
}

.btn-copy__label {
  flex: 0 1 auto;
  white-space: nowrap;
}

.btn-copy:hover {
  color: var(--text-bright);
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(34, 211, 238, 0.32);
  transform: translateY(-1px);
}

.btn-copy:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.btn-copy:active {
  transform: translateY(0);
}

.btn-copy.is-copied {
  color: var(--mint);
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.08);
}

.btn-copy.is-copied .btn-copy__icon svg {
  opacity: 1;
}

.cta {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  padding: 0.9rem 1.5rem;
  font-family: inherit;
  font-size: clamp(1rem, 4vw, 1.0625rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #0c1222;
  text-decoration: none;
  border-radius: 16px;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #99f6e4 0%, #67e8f9 35%, #a78bfa 65%, #f0abfc 100%);
  background-size: 200% 200%;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 -1px 0 rgba(15, 23, 42, 0.12) inset,
    0 6px 28px rgba(34, 211, 238, 0.4),
    0 14px 40px rgba(167, 139, 250, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.35s ease;
  -webkit-tap-highlight-color: transparent;
  animation: ctaGlow 6s ease-in-out infinite;
}

@keyframes ctaGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cta:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 8px 36px rgba(34, 211, 238, 0.5),
    0 18px 48px rgba(232, 121, 249, 0.28);
}

.cta:active { transform: translateY(0); }

.cta svg {
  display: block;
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  flex: 0 0 22px;
  flex-shrink: 0;
}

/* ——— Мобильные телефоны ——— */
@media (max-width: 479px) {
  .wrap {
    align-items: flex-start;
    padding-top: calc(0.85rem + var(--safe-top));
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
    padding-bottom: calc(1.25rem + var(--safe-bottom));
  }

  .card {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem 1.15rem 1.35rem;
    border-radius: 20px;
  }

  .card-inner {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .sub {
    max-width: none;
    padding-inline: 0.15rem;
  }

  .vpn-notice {
    margin-bottom: 1.25rem;
    padding: 0.9rem 0.85rem 0.9rem 1.15rem;
  }

  .vpn-notice__text {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .vpn-notice--fallback .vpn-notice__text {
    max-width: none;
  }

  button.bot-chip--inline {
    display: flex;
    width: 100%;
    max-width: 220px;
    margin: 0.5rem auto 0;
  }

  .actions {
    gap: 0.6rem;
  }

  .cta,
  .btn-copy {
    width: 100%;
    max-width: 100%;
    min-height: 50px;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .btn-copy__label {
    white-space: normal;
    text-align: center;
  }

  h1 {
    font-size: clamp(1.65rem, 8vw, 2rem);
  }

}

@media (min-width: 480px) {
  .actions {
    align-items: center;
  }

  .cta,
  .btn-copy {
    width: auto;
    min-width: 260px;
    margin-inline: auto;
  }

  .btn-copy__label {
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .card { padding-inline: 1rem; }
  .vpn-notice { padding: 0.85rem 0.8rem 0.85rem 1.1rem; }
  .badge { letter-spacing: 0.14em; font-size: 0.625rem; }
}

/* ——— Страница перехода (go.php) ——— */
.page-open .open-title {
  font-size: clamp(1.5rem, 5.5vw, 2rem);
  margin-bottom: 0.65rem;
  background: linear-gradient(110deg, #fff 0%, #d5f4ff 50%, #fae8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-open .open-sub {
  max-width: 38ch;
  margin-bottom: 1.1rem;
}

.open-steps {
  margin: 0 0 1.1rem;
  padding: 0 0 0 1.15rem;
  text-align: left;
  font-size: clamp(0.88rem, 3.4vw, 0.95rem);
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.88);
}

.open-steps li {
  margin-bottom: 0.45rem;
}

.open-steps li:last-child {
  margin-bottom: 0;
}

.open-steps__hint {
  color: var(--muted);
  font-size: 0.9em;
}

.open-warning {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: clamp(0.85rem, 3.2vw, 0.92rem);
  line-height: 1.5;
  color: rgba(248, 250, 252, 0.9);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 12px;
}

.open-warning strong {
  color: #fde68a;
  font-weight: 600;
}

.page-open .cta {
  animation: none;
  border: none;
  width: 100%;
}

.open-fallback {
  margin-top: 1.15rem;
  margin-bottom: 0;
}

.open-fallback--active {
  border-color: rgba(232, 121, 249, 0.55);
  box-shadow: 0 0 40px rgba(232, 121, 249, 0.12);
}

.open-fallback--pulse {
  animation: fallbackPulse 2s ease-in-out 3;
}

@keyframes fallbackPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(34, 211, 238, 0); }
  50% { box-shadow: 0 0 28px rgba(34, 211, 238, 0.25); }
}

.open-back {
  display: inline-block;
  margin-top: 1.15rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.open-back:hover {
  color: var(--cyan);
}
