:root {
  color-scheme: dark;
  --auth-bg: #050b16;
  --auth-panel: rgba(8, 17, 32, 0.82);
  --auth-text: #f5f8ff;
  --auth-muted: #9fb0c9;
  --auth-border: rgba(143, 177, 232, 0.34);
  --auth-border-strong: rgba(164, 194, 255, 0.56);
  --auth-shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

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

body.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 50% 50%, rgba(42, 110, 224, 0.32), transparent 33%),
    radial-gradient(circle at 22% 52%, rgba(66, 147, 255, 0.22), transparent 28%),
    radial-gradient(circle at 74% 50%, rgba(30, 87, 175, 0.18), transparent 30%),
    linear-gradient(135deg, #020610 0%, #061121 52%, #030814 100%);
  color: var(--auth-text);
  font-family: "Segoe UI", "Manrope", "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.auth-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(91, 140, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 140, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at center, transparent 0 17%, rgba(100, 151, 255, 0.22) 17.15% 17.35%, transparent 17.55% 25%, rgba(100, 151, 255, 0.15) 25.15% 25.32%, transparent 25.52% 34%, rgba(100, 151, 255, 0.12) 34.12% 34.25%, transparent 34.5%);
  background-size: 34px 34px, 34px 34px, 1200px 1200px;
  background-position: center, center, center;
  opacity: 0.72;
}

.auth-background::before,
.auth-background::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(92vw, 960px);
  aspect-ratio: 1;
  border: 1px solid rgba(91, 140, 255, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 90px rgba(58, 128, 255, 0.18) inset;
}

.auth-background::after {
  width: min(78vw, 720px);
  border-color: rgba(91, 140, 255, 0.11);
  box-shadow: none;
}

.auth-shell {
  width: min(100%, 548px);
  position: relative;
  z-index: 1;
}

.auth-card {
  position: relative;
  overflow: hidden;
  padding: 56px 50px 46px;
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(15, 31, 57, 0.92), rgba(5, 13, 27, 0.94)),
    var(--auth-panel);
  box-shadow:
    0 34px 110px var(--auth-shadow),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 0 80px rgba(51, 118, 230, 0.13) inset;
  backdrop-filter: blur(20px);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: -40% -22% auto;
  height: 280px;
  background: radial-gradient(ellipse at center, rgba(91, 140, 255, 0.28), transparent 68%);
  opacity: 0.9;
}

.auth-card::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 102px;
  width: 210px;
  aspect-ratio: 1;
  border: 1px solid rgba(119, 163, 255, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 42px rgba(119, 163, 255, 0.045),
    0 0 0 84px rgba(119, 163, 255, 0.026);
}

.auth-mark,
.auth-title,
.auth-subtitle,
.auth-actions,
.auth-note,
.auth-message-text,
.auth-link {
  position: relative;
  z-index: 1;
}

.auth-mark {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin: 0 auto 22px;
  border-radius: 36px;
  color: #f4f8ff;
  font-size: 58px;
  font-weight: 900;
  letter-spacing: -5px;
  line-height: 1;
  text-shadow: 0 10px 34px rgba(59, 135, 255, 0.62);
  background:
    linear-gradient(145deg, rgba(91, 140, 255, 0.95), rgba(46, 100, 208, 0.9) 48%, rgba(6, 14, 29, 0.88) 49%),
    #102449;
  border: 1px solid rgba(171, 202, 255, 0.44);
  box-shadow:
    0 18px 50px rgba(22, 96, 221, 0.28),
    0 0 0 8px rgba(80, 139, 255, 0.06);
}

.auth-title {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: -2.1px;
  text-align: center;
  font-weight: 750;
}

.auth-subtitle {
  margin: 14px auto 34px;
  max-width: 360px;
  color: var(--auth-muted);
  font-size: 18px;
  line-height: 1.45;
  text-align: center;
}

.auth-actions {
  display: grid;
  gap: 16px;
}

.provider-button {
  min-height: 74px;
  display: grid;
  grid-template-columns: 54px 1fr 24px;
  align-items: center;
  gap: 18px;
  padding: 14px 22px 14px 16px;
  border: 1px solid rgba(158, 188, 240, 0.34);
  border-radius: 18px;
  color: var(--auth-text);
  background: linear-gradient(180deg, rgba(18, 34, 60, 0.92), rgba(8, 18, 35, 0.96));
  text-decoration: none;
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -0.35px;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.provider-button:hover,
.provider-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--auth-border-strong);
  outline: none;
  background: linear-gradient(180deg, rgba(26, 48, 83, 0.98), rgba(10, 23, 43, 0.98));
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.28),
    0 0 0 4px rgba(91, 140, 255, 0.12);
}

.provider-button:active {
  transform: translateY(0);
}

.provider-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.provider-icon svg {
  width: 27px;
  height: 27px;
  display: block;
}

.provider-icon-yandex {
  color: #fff;
  background: radial-gradient(circle at 34% 28%, #ff6d55, #fb3e1c 58%, #c61e0b 100%);
}

.provider-icon-vk {
  background: linear-gradient(145deg, #31a1ff, #0077ff 56%, #005bd6);
}

.provider-arrow {
  color: #7d90ad;
  font-size: 26px;
  line-height: 1;
  justify-self: end;
}

.auth-note {
  margin: 28px 0 0;
  color: #71829c;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.auth-message .auth-card {
  padding: 44px;
}

.auth-message .auth-title {
  font-size: clamp(30px, 4vw, 42px);
}

.auth-message-text {
  margin: 18px 0 28px;
  color: var(--auth-muted);
  font-size: 17px;
  line-height: 1.55;
  text-align: center;
}

.auth-link {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--auth-text);
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.94), rgba(62, 117, 232, 0.88));
  text-decoration: none;
  font-weight: 750;
}

@media (max-width: 560px) {
  body.auth-page {
    padding: 18px;
  }

  .auth-card {
    padding: 36px 22px 28px;
    border-radius: 24px;
  }

  .auth-mark {
    width: 104px;
    height: 104px;
    border-radius: 28px;
    font-size: 47px;
  }

  .provider-button {
    min-height: 66px;
    grid-template-columns: 48px 1fr 18px;
    gap: 14px;
    padding: 12px 16px 12px 12px;
    font-size: 18px;
  }

  .provider-icon {
    width: 46px;
    height: 46px;
  }
}
