:root {
  --night-1: #01050e;
  --night-2: #020813;
  --night-3: #040f20;
  --text: #eaf1ff;
  --muted: #99b0d6;
  --line: rgba(153, 178, 224, 0.28);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Montserrat", sans-serif;
  color: #101625;
  background: #f2f4f9;
  overflow: hidden;
}

.auth-layout {
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
}

.showcase {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 16% -8%, rgba(80, 118, 196, 0.3), transparent 35%),
    radial-gradient(circle at 88% 0%, rgba(59, 96, 169, 0.2), transparent 30%),
    radial-gradient(circle at 50% 120%, rgba(28, 63, 126, 0.34), transparent 43%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 54%, var(--night-3) 100%);
  color: var(--text);
}

.night-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  width: var(--size);
  height: var(--size);
  top: var(--top);
  left: var(--left);
}

.star::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 0 9px rgba(255, 255, 255, 0.86),
    0 0 20px rgba(146, 195, 255, 0.35);
  animation: twinkle var(--blink) ease-in-out infinite alternate;
}

.star::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(191, 217, 255, 0.58) 0%, rgba(191, 217, 255, 0) 72%);
  filter: blur(2.5px);
  opacity: 0.8;
  animation: twinkle var(--blink) ease-in-out infinite alternate-reverse;
}

.drift {
  animation: drift-star var(--drift) ease-in-out infinite;
}

.s1 { --top: 9%; --left: 8%; --size: 2px; --drift: 26s; --dx: 30px; --dy: -18px; --blink: 2s; }
.s2 { --top: 14%; --left: 30%; --size: 3px; --drift: 30s; --dx: -26px; --dy: 16px; --blink: 2.7s; }
.s3 { --top: 23%; --left: 44%; --size: 2px; --drift: 24s; --dx: 24px; --dy: -14px; --blink: 1.8s; }
.s4 { --top: 11%; --left: 66%; --size: 2px; --drift: 32s; --dx: -28px; --dy: 19px; --blink: 2.4s; }
.s5 { --top: 20%; --left: 84%; --size: 3px; --drift: 28s; --dx: 20px; --dy: -16px; --blink: 2.2s; }
.s6 { --top: 38%; --left: 14%; --size: 2px; --drift: 25s; --dx: -23px; --dy: 15px; --blink: 2.6s; }
.s7 { --top: 46%; --left: 35%; --size: 2px; --drift: 34s; --dx: 27px; --dy: -16px; --blink: 2.4s; }
.s8 { --top: 31%; --left: 57%; --size: 3px; --drift: 27s; --dx: -22px; --dy: 13px; --blink: 2s; }
.s9 { --top: 62%; --left: 73%; --size: 2px; --drift: 33s; --dx: 24px; --dy: -14px; --blink: 2.8s; }
.s10 { --top: 78%; --left: 20%; --size: 2px; --drift: 29s; --dx: 26px; --dy: -15px; --blink: 2.3s; }

.aurora {
  position: absolute;
  border-radius: 999px;
  filter: blur(74px);
  pointer-events: none;
}

.a1 {
  width: 340px;
  height: 340px;
  top: -90px;
  left: -90px;
  background: rgba(74, 118, 210, 0.32);
}

.a2 {
  width: 320px;
  height: 320px;
  right: -70px;
  bottom: -120px;
  background: rgba(64, 106, 181, 0.3);
}

.showcase-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.2rem);
  display: grid;
  gap: 0.9rem;
  justify-items: start;
  text-align: left;
}

.kicker {
  margin: 0;
  color: #b8caec;
  letter-spacing: 0.16em;
  font-weight: 600;
  font-size: 0.82rem;
}

.showcase h1 {
  margin: 0;
  font-family: "Montserrat Alternates", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4.7rem);
  line-height: 0.95;
  color: #f4f8ff;
}

.lead {
  margin: 0;
  color: #cfdbf5;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.6;
  max-width: 510px;
}

.showcase ul {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  justify-items: start;
}

.showcase li {
  color: #c2d1f0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.auth-panel {
  background: #f2f4f9;
  padding: clamp(0.7rem, 1.8vw, 1.2rem);
  display: grid;
  align-content: center;
  gap: 0.85rem;
}

.auth-top {
  width: min(400px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  color: #0f1828;
  font-family: "Montserrat Alternates", sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
}

.back {
  text-decoration: none;
  color: #63708a;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.auth-card {
  width: min(400px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.35rem);
  border-radius: 1.15rem;
  background: #ffffff;
  border: 1px solid #dce2ee;
  box-shadow: 0 14px 30px rgba(17, 26, 43, 0.1);
  display: grid;
  gap: 0.72rem;
}

.card-kicker {
  margin: 0;
  color: #73809a;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-family: "Montserrat Alternates", sans-serif;
  color: #0f1828;
}

.card-text {
  margin: 0;
  color: #4f5d78;
  line-height: 1.4;
  font-size: 0.96rem;
}

.auth-form {
  display: grid;
  gap: 0.62rem;
}

.auth-form label {
  display: grid;
  gap: 0.32rem;
  color: #5c6882;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  border-radius: 0.78rem;
  border: 1px solid #cfd6e3;
  background: #f8f9fc;
  color: #152238;
  font-size: 0.96rem;
  padding: 0.72rem 0.9rem;
  font-family: "Montserrat", sans-serif;
}

.auth-form input:focus {
  outline: none;
  border-color: #7a9ee4;
  box-shadow: 0 0 0 3px rgba(122, 158, 228, 0.16);
}

.btn {
  border: none;
  border-radius: 0.78rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.7rem 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: #4d78d6;
  color: #f4f8ff;
  box-shadow: 0 10px 22px rgba(45, 78, 153, 0.28);
}

.btn-primary:hover {
  background: #5a86e6;
}

.btn-secondary {
  background: #eef2fb;
  color: #2c426e;
}

.btn-secondary:hover {
  background: #e2e9f8;
}

.divider {
  margin: 0.2rem 0 0;
  text-align: center;
  color: #70809e;
  font-size: 0.84rem;
}

.socials {
  display: grid;
  gap: 0.45rem;
}

.btn-social {
  border: 1px solid #d2d9e6;
  background: #ffffff;
  color: #1c2942;
  border-radius: 0.72rem;
  padding: 0.66rem 0.85rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-social:hover {
  background: #f4f7fc;
}

.vk {
  border-color: #b8c9ee;
}

.ya {
  border-color: #f0c7bf;
}

.gg {
  border-color: #c9d5ea;
}

.btn-tester {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  margin-top: 0.2rem;
  border: 1px dashed #9eb0cf;
  background: #f8faff;
  color: #354668;
  border-radius: 0.72rem;
  padding: 0.62rem 0.85rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.btn-tester:hover {
  background: #edf3ff;
}

.unavailable-msg {
  margin: 0.12rem 0 0;
  min-height: 1.2em;
  color: #c24949;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.unavailable-msg.visible {
  opacity: 1;
}

@keyframes twinkle {
  from {
    opacity: 0.3;
    transform: scale(0.72);
  }

  to {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes drift-star {
  0% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(var(--dx), var(--dy), 0);
  }

  100% {
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 1024px) {
  body {
    overflow: auto;
  }

  .auth-layout {
    height: auto;
    overflow: visible;
    grid-template-columns: 1fr;
  }

  .showcase {
    order: 2;
    min-height: 44vh;
  }

  .auth-panel {
    order: 1;
  }

  .showcase-inner {
    margin: 2.2rem auto;
  }
}

@media (max-width: 640px) {
  .auth-panel {
    padding: 0.9rem;
  }

  .showcase {
    min-height: 38vh;
  }

  .auth-card {
    border-radius: 1rem;
    padding: 1.1rem;
  }

  .auth-form input,
  .btn,
  .btn-social,
  .btn-tester {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .star,
  .star::before,
  .star::after {
    animation: none;
  }
}
