/* ertwerwed.uk — página de acesso (implementação própria, estilo referência) */

*,
*::before,
*::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(70% 50% at 15% 10%, rgba(8, 120, 255, .45), transparent 60%),
    radial-gradient(60% 45% at 90% 25%, rgba(120, 60, 255, .35), transparent 60%),
    radial-gradient(70% 50% at 50% 100%, rgba(0, 170, 255, .30), transparent 60%),
    linear-gradient(160deg, #020b24 0%, #051540 50%, #020b24 100%);
  background-attachment: fixed;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- fundo decorativo ---- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  animation: drift 14s ease-in-out infinite;
}

.orb--a { width: 320px; height: 320px; background: #0878ff; top: -80px;  left: -90px; }
.orb--b { width: 280px; height: 280px; background: #7a3cff; bottom: -60px; right: -80px; animation-delay: -5s; }
.orb--c { width: 200px; height: 200px; background: #00c8ff; top: 45%; left: 60%; opacity: .3; animation-delay: -9s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(30px, -40px) scale(1.15); }
}

.backdrop::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

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

.wrap {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
}

.stage {
  position: relative;
  padding: 2px;
  border-radius: 20px;
  background: linear-gradient(135deg, #2a94ff, #7a3cff 50%, #00c8ff);
  box-shadow:
    0 0 0 1px rgba(90, 170, 255, .35),
    0 0 28px rgba(8, 120, 255, .55),
    0 0 70px rgba(122, 60, 255, .35),
    0 20px 60px rgba(0, 0, 0, .45);
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) 1 both;
}

.stage::before {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  border-radius: 26px;
  pointer-events: none;
  background: linear-gradient(120deg, #0878ff, #7a3cff, #00c8ff, #ff4fd8, #0878ff);
  background-size: 300% 300%;
  filter: blur(18px);
  opacity: .55;
  animation: edgeflow 7s linear infinite, edgepulse 3s ease-in-out infinite;
}

@keyframes edgeflow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@keyframes edgepulse { 0%, 100% { opacity: .35; } 50% { opacity: .8; } }
@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.stage__media { display: block; border-radius: 18px; overflow: hidden; background: #020b24; }
.stage__media img { display: block; width: 100%; height: auto; border-radius: 18px; }

/* ---- промокод ---- */

.promo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  margin: 26px auto 0;
  padding: 16px 20px 16px 16px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, .35), 0 0 30px rgba(255, 190, 40, .18);
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) .25s 1 both;
}

.promo__icon {
  flex: none;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ffe27a, #ff9d1c 70%);
  box-shadow: 0 6px 20px rgba(255, 160, 20, .55), inset 0 2px 0 rgba(255, 255, 255, .5);
  transform: rotate(-8deg);
  transform-origin: 50% 80%;
  animation: wobble 2.6s ease-in-out infinite;
}

.promo__icon svg { width: 44px; height: 44px; }

@keyframes wobble {
  0%, 60%, 100% { transform: rotate(-8deg) scale(1); }
  70%           { transform: rotate(8deg) scale(1.08); }
  80%           { transform: rotate(-8deg) scale(1.08); }
  90%           { transform: rotate(6deg) scale(1.04); }
}

.promo__body { flex: 1; min-width: 0; }

.promo__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, .85);
}

.code {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #ffd76a;
  cursor: pointer;
  border: 2px dashed #ffc83d;
  border-radius: 12px;
  background: rgba(255, 200, 61, .12);
  text-shadow: 0 0 14px rgba(255, 200, 61, .6);
}

.code::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent);
  transform: skewX(-20deg);
  animation: shine 3.4s ease-in-out infinite;
}

.code__hint {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #ffc83d;
  color: #3a2400;
  text-shadow: none;
  white-space: nowrap;
}

.code:active { transform: scale(.98); }
.code.is-done .code__hint { background: #3ddc84; }

/* ---- кнопка ---- */

.cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  padding: 18px 52px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a8cff, #0660e0);
  box-shadow: 0 8px 28px rgba(8, 120, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .2s;
  animation: pulse 2s ease-in-out infinite;
}

.cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  animation: shine 3s ease-in-out infinite;
}

.cta svg { width: 22px; height: 22px; transition: transform .2s; }
.cta:hover { transform: translateY(-2px) scale(1.03); }
.cta:hover svg { transform: translateX(4px); }
.cta:active { transform: scale(.97); }

@keyframes shine { 0%, 60% { left: -80%; } 100% { left: 130%; } }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(8, 120, 255, .55), 0 0 0 0 rgba(8, 120, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .35); }
  50%      { box-shadow: 0 8px 28px rgba(8, 120, 255, .55), 0 0 0 16px rgba(8, 120, 255, 0), inset 0 1px 0 rgba(255, 255, 255, .35); }
}

:where(.code, .cta):focus-visible {
  outline: 3px solid #ffd76a;
  outline-offset: 3px;
}

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

@media (max-width: 600px) {
  body { align-items: flex-start; }
  .wrap { padding-left: 12px; padding-right: 12px; }
  .stage { border-radius: 16px; }
  .stage::before { inset: -4px; border-radius: 22px; filter: blur(14px); }
  .stage__media, .stage__media img { border-radius: 14px; }
  .promo { margin-top: 20px; padding: 14px; gap: 12px; }
  .promo__icon { width: 58px; height: 58px; }
  .promo__icon svg { width: 34px; height: 34px; }
  .promo__title { font-size: 13px; }
  .code { font-size: 21px; letter-spacing: 2px; padding: 10px 11px; }
  .cta { display: flex; width: 100%; margin-top: 20px; padding: 19px 20px; font-size: 18px; border-radius: 12px; }
  .orb { filter: blur(45px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
