body {
  min-width: 320px;
  margin: 0;
}

.qy-login,
.qy-login *,
.qy-login *::before,
.qy-login *::after {
  box-sizing: border-box;
}

.qy-login {
  --login-ink: #f3f7ff;
  --login-muted: #b1c0d8;
  --login-button-ink: #07152b;
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding:
    max(20px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  color: var(--login-ink);
  background-color: #071126;
  font-family: var(--qy-font);
  overflow: clip;
}

.qy-login::before,
.qy-login::after {
  position: absolute;
  z-index: 0;
  inset: -4%;
  content: "";
  pointer-events: none;
}

.qy-login::before {
  background-image:
    linear-gradient(180deg, rgba(3, 10, 26, .28) 0%, rgba(3, 10, 26, .08) 45%, rgba(3, 10, 26, .46) 100%),
    url("login-background.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  animation: qy-login-background-drift 10s ease-in-out -1.2s infinite;
}

.qy-login::after {
  inset: -12%;
  background:
    radial-gradient(ellipse at 72% 32%, rgba(83, 151, 255, .2), transparent 42%),
    radial-gradient(ellipse at 25% 78%, rgba(59, 116, 224, .14), transparent 38%);
  opacity: .58;
  animation: qy-login-blue-breath 10s ease-in-out -1s infinite;
}

.qy-login__top {
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 1120px;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  margin-inline: auto;
}

.qy-login__home {
  color: var(--login-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.07em;
  text-decoration: none;
  text-shadow: 0 1px 16px rgba(1, 8, 24, .55);
}

.qy-login__theme {
  position: static;
  display: grid;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  color: var(--login-ink);
  background: rgba(7, 18, 41, .56);
  border: 1px solid rgba(190, 213, 255, .25);
  border-radius: 50%;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.qy-login__theme:hover {
  transform: translateY(-1px);
  background: rgba(19, 43, 82, .76);
  border-color: rgba(190, 213, 255, .48);
}

.qy-login__theme svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root[data-qy-theme="dark"] .qy-login__moon,
:root[data-qy-theme="light"] .qy-login__sun {
  display: none;
}

.qy-login__welcome {
  z-index: 1;
  display: flex;
  width: min(100%, 448px);
  flex: 1 0 auto;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  padding-block: clamp(28px, 8vh, 76px);
}

.qy-login__card {
  padding: 0;
  color: var(--login-ink);
  text-align: center;
  animation: qy-login-arrive .65s cubic-bezier(.2, .75, .25, 1) both;
}

.qy-login__welcome h1 {
  margin: 0;
  color: var(--login-ink);
  font-size: clamp(42px, 10vw, 58px);
  font-weight: 800;
  letter-spacing: -.075em;
  line-height: 1;
}

.qy-login__subtitle {
  max-width: 290px;
  margin: 16px auto 30px;
  color: var(--login-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
}

.qy-login__actions {
  display: grid;
  gap: 11px;
}

.qy-login__action {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.qy-login__action--primary {
  color: var(--login-button-ink);
  background: #91bdff;
  border-color: #91bdff;
  box-shadow: 0 8px 26px rgba(46, 124, 255, .22);
}

.qy-login__action--primary:hover {
  transform: translateY(-2px);
  background: #b2d1ff;
  border-color: #b2d1ff;
  box-shadow: 0 12px 30px rgba(46, 124, 255, .31);
}

.qy-login__action--secondary {
  color: var(--login-ink);
  background: rgba(13, 31, 62, .42);
  border-color: rgba(187, 210, 248, .25);
}

.qy-login__action--secondary:hover {
  transform: translateY(-2px);
  background: rgba(37, 69, 116, .52);
  border-color: rgba(187, 210, 248, .52);
}

.qy-login__action:active,
.qy-login__action--primary:active,
.qy-login__action--secondary:active {
  transform: translateY(0);
}

.qy-login__footer {
  z-index: 1;
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #c1cde0;
  font-size: 11px;
  font-weight: 600;
}

.qy-login__footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 6px 8px;
  color: inherit;
  text-decoration: none;
  transition: color .16s ease;
}

.qy-login__footer a:hover {
  color: #fff;
}

.qy-login__footer span {
  width: 3px;
  height: 3px;
  background: currentColor;
  border-radius: 50%;
  opacity: .7;
}

.qy-login__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

:root[data-qy-theme="light"] .qy-login {
  --login-ink: #f3f7ff;
  --login-muted: #c5d2e7;
  --login-button-ink: #07152b;
}

:root[data-qy-theme="light"] .qy-login__theme,
:root[data-qy-theme="light"] .qy-login__home {
  color: #eaf2ff;
}

:root[data-qy-theme="light"] .qy-login__action--secondary {
  color: #18345d;
  background: rgba(222, 234, 252, .65);
  border-color: rgba(35, 68, 118, .2);
}

:root[data-qy-theme="light"] .qy-login__action--secondary:hover {
  background: rgba(205, 224, 250, .92);
  border-color: rgba(35, 99, 181, .42);
}

:root[data-qy-theme="light"] .qy-login__footer {
  color: #f1f5fc;
  text-shadow: 0 1px 12px rgba(1, 8, 24, .72);
}

.qy-login :is(a, button):focus-visible {
  outline: 2px solid #a9cbff;
  outline-offset: 4px;
}

@keyframes qy-login-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes qy-login-background-drift {
  0%, 100% { transform: scale(1.06) translate3d(-2%, 1.4%, 0); }
  50% { transform: scale(1.13) translate3d(2%, -1.4%, 0); }
}

@keyframes qy-login-blue-breath {
  0%, 100% { opacity: .42; transform: translate3d(-1.8%, 1.3%, 0); }
  50% { opacity: .84; transform: scale(1.04) translate3d(1.8%, -1.3%, 0); }
}

@media (max-width: 640px) {
  .qy-login {
    padding-right: max(18px, env(safe-area-inset-right));
    padding-left: max(18px, env(safe-area-inset-left));
  }

  .qy-login::before {
    background-position: 100% center;
  }

  .qy-login__top {
    min-height: 40px;
  }

  .qy-login__home {
    font-size: 18px;
  }

  .qy-login__welcome {
    width: min(100%, 420px);
    justify-content: flex-end;
    padding-block: 0 clamp(72px, 11vh, 112px);
  }
}

@media (max-height: 620px) {
  .qy-login__welcome {
    padding-block: 16px;
  }

  .qy-login__subtitle {
    margin-block: 11px 18px;
  }

}

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

  .qy-login *,
  .qy-login *::before,
  .qy-login *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
