:root {
  color-scheme: dark;
  font: 16px/1.4 "Segoe UI", system-ui, sans-serif;
  color: #fff;
  background: #07091b;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }

.screen {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: radial-gradient(ellipse at 90% 25%, #4c032f 0, transparent 52%),
              linear-gradient(90deg, #07091b 0%, #09091e 38%, #200623 83%, #130623 100%);
}

.light-field {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 23%;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 25%);
}

.light-field::before, .light-field::after {
  content: "";
  position: absolute;
  inset: 0;
}

.light-field::before {
  background: linear-gradient(114deg, #3c117163, #a1073ca3 45%, #90158f8c 72%, #da15337d),
              #26042b;
  mask-image: repeating-linear-gradient(90deg, #000 0 4px, transparent 4px 13px),
              repeating-linear-gradient(0deg, #000 0 5px, transparent 5px 13px),
              radial-gradient(ellipse 19% 58% at 24% 58%, #000 12%, transparent 100%),
              radial-gradient(ellipse 28% 72% at 69% 52%, #000 3%, transparent 100%);
  mask-composite: intersect, intersect, add;
}

.light-field::after {
  background: radial-gradient(ellipse at 97% 41%, #ff175842, transparent 35%),
              linear-gradient(0deg, #07091b50, transparent 30%);
}

.beam {
  position: absolute;
  top: 0;
  left: var(--x);
  width: var(--w);
  height: var(--h);
  background: linear-gradient(to bottom, transparent, var(--tone) 74%, var(--core));
  opacity: var(--opacity);
  animation: fall var(--duration) linear var(--delay) infinite;
  will-change: transform;
}

.beam::after {
  content: "";
  position: absolute;
  inset: 55% 0 0;
  border-right: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  box-shadow: 1px 4px 12px -5px var(--core);
}

.beam[data-color="red"] { --tone: #bd0638; --core: #ff073e; --edge: #ff6a82; }
.beam[data-color="pink"] { --tone: #930557; --core: #ef087e; --edge: #ff8bdd; }
.beam[data-color="blue"] { --tone: #21119a; --core: #3335df; --edge: #7276f3; }
.beam[data-color="violet"] { --tone: #570e9d; --core: #811aca; --edge: #a658f1; }

@keyframes fall {
  from { transform: translateY(-103%); }
  to { transform: translateY(calc(100svh + 3%)); }
}

.frame {
  position: absolute;
  z-index: 2;
  inset: clamp(6px, .9vw, 16px);
  border: 1px solid #ff3159;
  box-shadow: inset 0 0 10px #ff17494d, 0 0 10px #ff174946;
  pointer-events: none;
}

.frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid #d5174bba;
}

.frame::after {
  content: "";
  position: absolute;
  top: -1px;
  right: 0;
  width: 31%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff254b 56%, #ffd9e3 78%, #ff4063);
  box-shadow: 0 0 12px 2px #ff204580;
}

.login {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  margin-inline-start: clamp(24px, 4.8vw, 92px);
  padding-block: clamp(44px, 11.1svh, 130px) clamp(22px, 2vw, 38px);
}

.wordmark {
  position: relative;
  display: block;
  width: clamp(195px, 20.5vw, 350px);
  aspect-ratio: 405 / 100;
  margin: 0 0 clamp(34px, 7svh, 85px) -12px;
  overflow: hidden;
  mix-blend-mode: lighten;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent),
              linear-gradient(transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect;
}

.wordmark img { display: block; width: 100%; height: auto; }

.sign-in { width: clamp(205px, 12.4vw, 235px); margin-block-start: auto; }
h1 { margin: 0 0 14px; font-size: 1.25rem; font-weight: 650; letter-spacing: -.025em; }
form { display: grid; gap: 9px; }
label { display: block; margin-bottom: 3px; font-size: .8rem; font-weight: 650; }
.field { position: relative; }

input {
  display: block;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #be2a50;
  border-radius: 7px;
  color: #fff;
  background: #101124;
  font: inherit;
  font-size: .875rem;
  caret-color: #ff7b9b;
}

.field input:focus {
  outline: 1px solid #ff6383;
  outline-offset: 1px;
  box-shadow: 0 0 15px #ff1b5299, inset 0 0 9px #ff1b5233;
}

#otp { letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.hint { margin: 5px 0 0; font-size: .69rem; color: #e5d8e5; }
.hint span { white-space: nowrap; }

.trace {
  position: absolute;
  top: 37px;
  left: 100%;
  width: min(45vw, 850px);
  height: 2px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #ff89a9, #ff0c4c 22%, #e8084d57 71%, transparent);
  filter: drop-shadow(0 0 4px #ff1447);
  transition: opacity .2s ease;
}

.field:focus-within .trace, form:not(:focus-within) .field:first-child .trace { opacity: 1; }
form:not(:focus-within) .field:first-child input { border-color: #ff3967; box-shadow: 0 0 9px #ff0a4754; }

button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid #ffb7cb; outline-offset: 3px; }

.submit {
  margin-top: 3px;
  min-height: 34px;
  border: 1px solid #d4224a;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(90deg, #99082d, #be103c);
  font-size: .875rem;
  font-weight: 650;
}

.submit:hover { background: linear-gradient(90deg, #ac0a32, #ce1647); }

.page-footer {
  position: absolute;
  right: clamp(18px, 2vw, 35px);
  bottom: clamp(18px, 2vw, 35px);
}

.credit { margin: 0; color: #fff; font-size: .6875rem; white-space: nowrap; }

@media (max-width: 600px) {
  .light-field { left: 14%; opacity: .48; mask-image: linear-gradient(90deg, transparent, #000 45%); }
  .login { margin-inline-start: 9vw; padding-block: max(40px, 9svh) 12px; }
  .wordmark { margin-inline-start: -7px; }
  .sign-in { width: min(74vw, 245px); }
  input, .submit { min-height: 44px; }
  input { font-size: 1rem; }
  .page-footer { position: static; align-self: flex-end; padding: 0 18px 18px; }
  .trace { display: none; }
}

@media (max-width: 330px) { .wordmark { width: 175px; } }
@media (prefers-reduced-motion: reduce) {
  .beam { animation: none; transform: translateY(var(--rest-position)); }
  .trace { transition: none; }
}

.problem {
  margin: 0 0 3px;
  padding: 7px 8px;
  border: 1px solid #e26988;
  border-radius: 7px;
  background: #411529;
  color: #fff;
  font-size: .8rem;
}
