:root {
  --auth-text: #f7f7f8;
  --auth-muted: rgba(235, 237, 242, 0.48);
  --auth-glass: rgba(19, 19, 20, 0.68);
}

html,
body {
  min-height: 100%;
  background: #000;
}

body.vone-auth-shell {
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--auth-text);
  background: #000;
}

.auth-signal-canvas,
.auth-signal-vignette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.auth-signal-canvas {
  z-index: 0;
  opacity: 0.88;
}

.auth-signal-vignette {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 20%, rgba(0, 0, 0, 0.12) 48%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.26), transparent 26%, transparent 72%, rgba(0, 0, 0, 0.46));
}

.auth-brand {
  position: fixed;
  z-index: 5;
  top: max(28px, env(safe-area-inset-top, 0px));
  left: max(34px, env(safe-area-inset-left, 0px));
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 760;
  letter-spacing: -0.035em;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.78);
}

.auth-brand img {
  width: 58px;
  height: 68px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.72));
}

.vone-auth-shell .screen {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  grid-template: 1fr / minmax(0, 1fr);
  place-items: center;
  padding: max(118px, calc(env(safe-area-inset-top, 0px) + 94px)) 24px max(54px, env(safe-area-inset-bottom, 0px));
  background: transparent;
}

.vone-auth-shell .hero {
  display: none;
}

.vone-auth-shell .card {
  position: relative;
  isolation: isolate;
  width: min(100%, 640px);
  min-height: 0;
  margin: 0;
  padding: clamp(34px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 54px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.015) 44%, rgba(0, 0, 0, 0.18)),
    var(--auth-glass);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.19),
    inset 0 -1px 0 rgba(255, 255, 255, 0.035),
    0 36px 100px rgba(0, 0, 0, 0.62),
    0 0 86px rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(30px) saturate(132%);
  backdrop-filter: blur(30px) saturate(132%);
}

.vone-auth-shell .card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1px;
  width: auto;
  aspect-ratio: auto;
  border-radius: inherit;
  background:
    radial-gradient(120% 72% at 12% 0%, rgba(255, 255, 255, 0.14), transparent 46%),
    radial-gradient(70% 60% at 84% 100%, rgba(255, 255, 255, 0.055), transparent 68%);
  filter: none;
  opacity: 1;
  transform: none;
}

.vone-auth-shell .card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 11%;
  z-index: 1;
  width: 48%;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.74), transparent);
  opacity: 0.65;
  transform: none;
}

.vone-auth-shell .inner {
  width: 100%;
  max-width: 100%;
  gap: 18px;
}

.auth-kicker {
  width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-self: center;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 34px rgba(0, 0, 0, 0.24);
  color: rgba(240, 242, 246, 0.68);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0.18em;
}

.vone-auth-shell h2 {
  margin-top: 10px;
  color: #fff;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.56);
}

.vone-auth-shell .copy {
  color: var(--auth-muted);
  font-size: clamp(17px, 2vw, 21px);
}

.telegram-auth {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  margin-top: 10px;
  padding: 14px 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 25px;
  color: #fff;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 20px 42px rgba(0, 0, 0, 0.24);
  text-decoration: none;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 780;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.telegram-auth:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.34);
  background-color: rgba(255, 255, 255, 0.06);
}

.telegram-auth-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, #38b8f2, #168ad0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 10px 28px rgba(26, 153, 216, 0.24);
}

.telegram-auth-icon svg {
  width: 27px;
  height: 27px;
  fill: #fff;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 2px 0 -2px;
  color: rgba(235, 237, 242, 0.48);
  font-size: 16px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18));
}

.auth-divider::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent);
}

.vone-auth-shell form {
  gap: 14px;
  margin-top: 0;
}

.vone-auth-shell .field-label {
  margin: 2px 0 -4px;
  color: rgba(247, 247, 248, 0.72);
  font-size: 16px;
  font-weight: 650;
}

.vone-auth-shell input,
.vone-auth-shell .otp-entry.is-ready .otp-slots {
  height: 70px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.29);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vone-auth-shell input {
  color: #fff;
  font-size: 19px;
}

.vone-auth-shell input::placeholder {
  color: rgba(235, 237, 242, 0.34);
}

.vone-auth-shell input:focus {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 4px rgba(255, 255, 255, 0.045);
}

.vone-auth-shell .btn {
  min-height: 72px;
  border-radius: 22px;
  color: #070708;
  background: #f8f8f9;
  box-shadow:
    inset 0 1px 0 #fff,
    0 16px 38px rgba(255, 255, 255, 0.13),
    0 20px 54px rgba(0, 0, 0, 0.34);
  font-size: 20px;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.vone-auth-shell .btn:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 20px 50px rgba(255, 255, 255, 0.17), 0 24px 60px rgba(0, 0, 0, 0.42);
}

.vone-auth-shell .btn:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.vone-auth-shell .secondary {
  color: rgba(247, 247, 248, 0.7);
}

.vone-auth-shell .notice {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(247, 247, 248, 0.84);
}

.vone-auth-shell .card.is-verified {
  border-color: rgba(125, 238, 173, 0.26);
  background-color: rgba(8, 17, 13, 0.78);
}

@media (max-width: 700px) {
  .auth-brand {
    top: max(16px, env(safe-area-inset-top, 0px));
    left: max(18px, env(safe-area-inset-left, 0px));
    min-height: 52px;
    gap: 10px;
    font-size: 22px;
  }

  .auth-brand img {
    width: 44px;
    height: 52px;
  }

  .vone-auth-shell .screen {
    align-items: start;
    padding: max(94px, calc(env(safe-area-inset-top, 0px) + 76px)) 14px max(24px, env(safe-area-inset-bottom, 0px));
  }

  .vone-auth-shell .card {
    padding: 30px 20px 26px;
    border-radius: 34px;
  }

  .auth-kicker {
    min-height: 38px;
    padding-inline: 15px;
    font-size: 11px;
  }

  .vone-auth-shell h2 {
    margin-top: 4px;
    font-size: clamp(36px, 12vw, 48px);
  }

  .telegram-auth {
    min-height: 70px;
    gap: 12px;
    padding-inline: 16px;
    border-radius: 22px;
    font-size: 16px;
  }

  .telegram-auth-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .auth-divider {
    gap: 10px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .telegram-auth,
  .vone-auth-shell .btn {
    transition: none;
  }
}
