:root {
  color-scheme: dark;
  --auth-text: rgba(255, 255, 255, 0.94);
  --auth-muted: rgba(255, 255, 255, 0.57);
  --auth-line: rgba(255, 255, 255, 0.14);
  --auth-line-focus: rgba(238, 67, 126, 0.7);
  --auth-accent: #d93570;
  --auth-accent-hover: #e54680;
  --auth-error: #ff7390;
  --auth-success: #a7e9c6;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #08050b;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-text);
  background: #08050b;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.auth-scene,
.auth-glass {
  position: fixed;
  inset: 0;
}

.auth-scene {
  --scene-bg-x: 0px;
  --scene-bg-y: 0px;
  --scene-character-x: 0px;
  --scene-character-y: 0px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0c0710;
}

.auth-scene__background {
  position: absolute;
  inset: -3%;
  width: 106%;
  height: 106%;
  object-fit: cover;
  object-position: center center;
  transform: translate3d(var(--scene-bg-x), var(--scene-bg-y), 0) scale(1.015);
  filter: saturate(0.92) brightness(0.72) contrast(1.04);
  animation: auth-background-breathe 15s ease-in-out infinite alternate;
  will-change: transform;
}

.auth-scene__light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 36%, rgba(255, 74, 143, 0.18), transparent 34%),
    radial-gradient(circle at 48% 72%, rgba(113, 45, 174, 0.14), transparent 40%),
    linear-gradient(90deg, rgba(5, 3, 8, 0.32), transparent 48%, rgba(8, 3, 10, 0.06));
  mix-blend-mode: screen;
  animation: auth-light-breathe 8s ease-in-out infinite alternate;
}

.auth-scene__character {
  position: absolute;
  z-index: 2;
  right: clamp(190px, 14vw, 300px);
  bottom: -80svh;
  width: min(1420px, 78vw);
  min-width: 1120px;
  transform: translate3d(
      var(--scene-character-x),
      var(--scene-character-y),
      0
    )
    rotate(-1.2deg);
  transform-origin: 56% 50%;
  animation: auth-character-breathe 6.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  will-change: transform;
}

.auth-scene__character img {
  width: 100%;
  height: auto;
  max-width: none;
}

.auth-scene__character-main {
  position: relative;
  z-index: 2;
  display: block;
  filter: saturate(0.94) brightness(0.88) contrast(1.05);
}

.auth-scene__character-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.34;
  filter: blur(26px) saturate(1.35) brightness(1.15);
  transform: scale(1.018);
  animation: auth-character-glow 6s ease-in-out infinite alternate;
}

.auth-scene__petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-scene__petals--back {
  z-index: 1;
}

.auth-scene__petals--front {
  z-index: 3;
}

.auth-petal {
  position: absolute;
  width: var(--petal-size, 34px);
  opacity: var(--petal-opacity, 0.52);
  filter:
    saturate(2.2)
    brightness(0.86)
    drop-shadow(0 0 9px rgba(222, 42, 98, 0.28));
  animation:
    auth-petal-float var(--petal-duration, 12s) ease-in-out var(--petal-delay, 0s) infinite alternate,
    auth-petal-turn calc(var(--petal-duration, 12s) * 1.4) linear var(--petal-delay, 0s) infinite;
  will-change: transform;
}

.auth-petal--one {
  --petal-size: 27px;
  --petal-duration: 13s;
  --petal-delay: -4s;
  top: 12%;
  left: 15%;
}

.auth-petal--two {
  --petal-size: 33px;
  --petal-duration: 16s;
  --petal-delay: -9s;
  top: 24%;
  left: 57%;
}

.auth-petal--three {
  --petal-size: 20px;
  --petal-duration: 12s;
  --petal-delay: -6s;
  top: 72%;
  left: 29%;
}

.auth-petal--four {
  --petal-size: 24px;
  --petal-duration: 15s;
  --petal-delay: -11s;
  top: 57%;
  left: 84%;
}

.auth-petal--five {
  --petal-size: 72px;
  --petal-opacity: 0.44;
  --petal-duration: 11s;
  --petal-delay: -3s;
  top: 14%;
  left: 43%;
  filter: blur(1.7px) saturate(2.4) brightness(0.82);
}

.auth-petal--six {
  --petal-size: 88px;
  --petal-opacity: 0.34;
  --petal-duration: 14s;
  --petal-delay: -8s;
  top: 68%;
  left: 8%;
  filter: blur(2.4px) saturate(2.2) brightness(0.8);
}

.auth-petal--seven {
  --petal-size: 56px;
  --petal-opacity: 0.38;
  --petal-duration: 12s;
  --petal-delay: -5s;
  top: 78%;
  left: 72%;
  filter: blur(1.4px) saturate(2.3) brightness(0.82);
}

.auth-glass {
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9, 5, 12, 0.24), rgba(9, 5, 12, 0.39)),
    rgba(15, 8, 18, 0.12);
  backdrop-filter: blur(8px) saturate(0.84);
  -webkit-backdrop-filter: blur(8px) saturate(0.84);
}

.auth-stage {
  position: relative;
  z-index: 5;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 72px 20px 112px;
}

.auth-panel {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(25, 17, 28, 0.74), rgba(11, 8, 14, 0.78)),
    rgba(9, 6, 12, 0.72);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.4),
    inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(1.04);
  -webkit-backdrop-filter: blur(22px) saturate(1.04);
}

.auth-panel--apply {
  width: min(480px, 100%);
  padding-block: 28px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-form--apply {
  gap: 13px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field > span:first-child {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 500;
}

.auth-field__control {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: 11px;
  background: rgba(6, 4, 9, 0.46);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.auth-field__control:focus-within {
  border-color: var(--auth-line-focus);
  background: rgba(10, 6, 13, 0.64);
  box-shadow: 0 0 0 3px rgba(217, 53, 112, 0.11);
}

.auth-field__control input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 15px;
  border: 0;
  outline: 0;
  color: var(--auth-text);
  background: transparent;
  caret-color: #f25a93;
  font-size: 14px;
}

.auth-field__control input:-webkit-autofill,
.auth-field__control input:-webkit-autofill:hover,
.auth-field__control input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--auth-text);
  box-shadow: 0 0 0 1000px #100b13 inset;
  transition: background-color 9999s ease-out;
}

.auth-password-toggle {
  align-self: stretch;
  min-width: 58px;
  padding: 0 15px;
  border: 0;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  transition: color 150ms ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  color: rgba(255, 255, 255, 0.9);
  outline: none;
}

.auth-password-reset {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.auth-password-reset > p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 12px;
}

.auth-status {
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-status:empty {
  min-height: 0;
}

.auth-status[data-type="error"] {
  color: var(--auth-error);
}

.auth-status[data-type="success"] {
  color: var(--auth-success);
}

.auth-submit {
  display: grid;
  width: 100%;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  color: white;
  background: var(--auth-accent);
  box-shadow: 0 10px 28px rgba(119, 18, 59, 0.24);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition:
    transform 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.auth-submit:hover {
  background: var(--auth-accent-hover);
  box-shadow: 0 12px 32px rgba(119, 18, 59, 0.34);
  transform: translateY(-1px);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:focus-visible,
.auth-switch:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.auth-switch {
  display: block;
  width: fit-content;
  margin: 20px auto 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  text-decoration: none;
  transition: color 150ms ease;
}

.auth-switch:hover {
  color: white;
}

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  font-size: 11px;
  line-height: 1.55;
}

.auth-consent input {
  width: 14px;
  height: 14px;
  margin: 1px 0 0;
  accent-color: var(--auth-accent);
}

.auth-verification {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(217, 53, 112, 0.22);
  border-radius: 11px;
  background:
    linear-gradient(115deg, rgba(217, 53, 112, 0.065), transparent 48%),
    rgba(7, 5, 10, 0.44);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.035),
    0 8px 24px rgba(0, 0, 0, 0.12);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.auth-verification::before {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 18px;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 90, 147, 0.72), transparent);
  content: "";
  opacity: 0.58;
}

.auth-verification__summary {
  display: grid;
  min-height: 52px;
  align-items: center;
  padding: 0 14px;
  column-gap: 11px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.auth-verification__emblem {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(242, 90, 147, 0.34);
  border-radius: 9px;
  color: #f26a9e;
  background: rgba(217, 53, 112, 0.08);
  box-shadow: inset 0 0 12px rgba(217, 53, 112, 0.08);
}

.auth-verification__emblem::before {
  width: 13px;
  height: 15px;
  background: currentColor;
  clip-path: polygon(50% 0, 94% 17%, 88% 68%, 50% 100%, 12% 68%, 6% 17%);
  content: "";
  opacity: 0.88;
}

.auth-verification__emblem::after {
  position: absolute;
  width: 4px;
  height: 7px;
  margin-top: -2px;
  border-right: 1.5px solid #160b13;
  border-bottom: 1.5px solid #160b13;
  content: "";
  transform: rotate(45deg);
}

.auth-verification__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.auth-verification__copy strong {
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.auth-verification__copy small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.44);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-verification__badge {
  display: inline-flex;
  min-width: 52px;
  height: 23px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242, 90, 147, 0.22);
  border-radius: 999px;
  color: rgba(255, 187, 211, 0.78);
  background: rgba(217, 53, 112, 0.07);
  font-size: 10px;
  white-space: nowrap;
}

.auth-verification[data-state="checking"] .auth-verification__emblem {
  animation: auth-verification-pulse 1.8s ease-in-out infinite;
}

.auth-verification[data-state="interactive"] {
  border-color: rgba(245, 177, 91, 0.35);
  background:
    linear-gradient(115deg, rgba(245, 177, 91, 0.07), transparent 48%),
    rgba(7, 5, 10, 0.48);
}

.auth-verification[data-state="interactive"] .auth-verification__emblem {
  border-color: rgba(245, 177, 91, 0.42);
  color: #e9b66d;
  background: rgba(245, 177, 91, 0.08);
}

.auth-verification[data-state="interactive"] .auth-verification__badge {
  border-color: rgba(245, 177, 91, 0.28);
  color: rgba(255, 214, 157, 0.86);
  background: rgba(245, 177, 91, 0.08);
}

.auth-verification[data-state="verified"] {
  border-color: rgba(69, 211, 151, 0.3);
  background:
    linear-gradient(115deg, rgba(69, 211, 151, 0.07), transparent 48%),
    rgba(7, 5, 10, 0.44);
}

.auth-verification[data-state="verified"]::before {
  background: linear-gradient(90deg, transparent, rgba(69, 211, 151, 0.68), transparent);
}

.auth-verification[data-state="verified"] .auth-verification__emblem {
  border-color: rgba(69, 211, 151, 0.4);
  color: #56d9a1;
  background: rgba(69, 211, 151, 0.08);
}

.auth-verification[data-state="verified"] .auth-verification__badge {
  border-color: rgba(69, 211, 151, 0.27);
  color: rgba(137, 235, 193, 0.88);
  background: rgba(69, 211, 151, 0.075);
}

.auth-verification[data-state="error"] {
  border-color: rgba(255, 95, 121, 0.32);
}

.auth-verification[data-state="error"] .auth-verification__emblem {
  border-color: rgba(255, 95, 121, 0.4);
  color: #ff6f87;
  background: rgba(255, 95, 121, 0.08);
}

.auth-verification[data-state="error"] .auth-verification__badge {
  border-color: rgba(255, 95, 121, 0.27);
  color: rgba(255, 151, 168, 0.9);
  background: rgba(255, 95, 121, 0.075);
}

.auth-turnstile {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 180ms ease,
    opacity 160ms ease,
    padding 180ms ease;
}

.auth-verification.is-interactive .auth-turnstile {
  max-height: 82px;
  padding: 0 8px 10px;
  opacity: 1;
}

.auth-turnstile iframe {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

@keyframes auth-verification-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 12px rgba(217, 53, 112, 0.08),
      0 0 0 0 rgba(217, 53, 112, 0);
  }
  50% {
    box-shadow:
      inset 0 0 14px rgba(217, 53, 112, 0.13),
      0 0 0 3px rgba(217, 53, 112, 0.055);
  }
}

.auth-honeypot {
  position: fixed !important;
  top: -200vh !important;
  left: -200vw !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.auth-context-note {
  position: absolute;
  right: 20px;
  bottom: 25px;
  left: 20px;
  max-width: 840px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  line-height: 1.75;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.72);
}

.auth-context-note span {
  display: block;
}

.auth-context-note span + span {
  margin-top: 5px;
}

.auth-maintenance .auth-stage {
  padding-bottom: 72px;
}

.auth-maintenance .auth-panel {
  text-align: center;
}

.auth-maintenance__title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
}

.auth-maintenance__copy {
  margin: 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.75;
}

@keyframes auth-background-breathe {
  from {
    transform: translate3d(
        var(--scene-bg-x),
        var(--scene-bg-y),
        0
      )
      scale(1.015);
  }
  to {
    transform: translate3d(
        var(--scene-bg-x),
        calc(var(--scene-bg-y) - 4px),
        0
      )
      scale(1.03);
  }
}

@keyframes auth-light-breathe {
  from {
    opacity: 0.68;
  }
  to {
    opacity: 1;
  }
}

@keyframes auth-character-breathe {
  0%,
  100% {
    margin-bottom: 0;
  }
  50% {
    margin-bottom: 5px;
  }
}

@keyframes auth-character-glow {
  from {
    opacity: 0.24;
    transform: scale(1.012);
  }
  to {
    opacity: 0.4;
    transform: scale(1.024);
  }
}

@keyframes auth-petal-float {
  from {
    margin: 0;
  }
  to {
    margin: -24px 0 0 34px;
  }
}

@keyframes auth-petal-turn {
  from {
    rotate: -22deg;
  }
  to {
    rotate: 338deg;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .auth-scene__background {
    object-position: 56% center;
  }

  .auth-scene__character {
    right: 0;
    bottom: -70svh;
    width: min(1120px, 92vw);
    min-width: 860px;
  }
}

@media (min-width: 901px) and (max-width: 1040px) {
  .auth-scene__character {
    right: -4vw;
    bottom: -66svh;
    width: min(1040px, 98vw);
    min-width: 780px;
  }
}

@media (min-width: 901px) and (max-width: 1040px) and (min-height: 1000px) {
  .auth-scene__background {
    object-position: 58% center;
  }

  .auth-scene__character {
    right: 6vw;
    bottom: -7svh;
    width: 108vw;
    min-width: 0;
    animation: none;
    transform: rotate(-1.2deg);
    will-change: auto;
  }
}

@media (min-width: 901px) and (max-width: 1180px) and (max-height: 680px) {
  .auth-scene__background {
    object-position: 55% center;
  }

  .auth-scene__character {
    right: 13vw;
    bottom: -72svh;
    width: min(840px, 82vw);
    min-width: 660px;
  }
}

@media (min-width: 1181px) and (max-width: 1320px) and (max-height: 850px) {
  .auth-scene__character {
    right: clamp(112px, 9vw, 150px);
    bottom: -82svh;
  }
}

@media (min-width: 1800px) and (max-width: 2100px) and (min-height: 960px) and (max-height: 1120px) {
  .auth-scene__character {
    bottom: -76svh;
  }
}

@media (max-width: 900px) {
  .auth-scene__background {
    object-position: 60% center;
  }

  .auth-scene__character {
    right: -34vw;
    bottom: -6svh;
    width: 118vw;
    min-width: 0;
    animation: none;
    transform: rotate(-1.2deg);
    will-change: auto;
  }

  .auth-scene__character-glow {
    display: none;
  }

  .auth-glass {
    backdrop-filter: blur(9px) saturate(0.8);
    -webkit-backdrop-filter: blur(9px) saturate(0.8);
  }
}

@media (min-width: 700px) and (max-width: 900px) {
  .auth-scene__background {
    object-position: 58% center;
  }

  .auth-scene__character {
    right: 12vw;
    bottom: -7svh;
    width: 108vw;
  }
}

@media (min-width: 521px) and (max-width: 699px) and (max-height: 820px) {
  .auth-scene__background {
    object-position: 58% center;
  }

  .auth-scene__character {
    right: 8vw;
    bottom: -7svh;
    width: 112vw;
  }
}

@media (max-width: 699px) {
  .auth-scene__character {
    -webkit-mask-image:
      radial-gradient(ellipse 52% 42% at 30% 62%, transparent 0%, transparent 48%, rgba(0, 0, 0, 0.42) 64%, #000 88%);
    mask-image:
      radial-gradient(ellipse 52% 42% at 30% 62%, transparent 0%, transparent 48%, rgba(0, 0, 0, 0.42) 64%, #000 88%);
  }
}

@media (max-width: 620px) {
  .auth-stage {
    padding: 38px 16px 122px;
  }

  .auth-panel,
  .auth-panel--apply {
    padding: 24px 20px;
    border-radius: 17px;
  }

  .auth-panel--apply {
    padding-block: 22px;
  }

  .auth-form {
    gap: 15px;
  }

  .auth-form--apply {
    gap: 11px;
  }

  .auth-field__control {
    height: 46px;
  }

  .auth-context-note {
    bottom: 18px;
    font-size: 10px;
    line-height: 1.65;
  }
}

@media (max-width: 520px) {
  .auth-scene__character {
    right: 6vw;
    bottom: -6svh;
    width: 148vw;
    -webkit-mask-image:
      radial-gradient(ellipse 50% 48% at 27% 66%, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.42) 65%, #000 90%);
    mask-image:
      radial-gradient(ellipse 50% 48% at 27% 66%, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.42) 65%, #000 90%);
  }
}

@media (min-width: 830px) and (max-width: 880px) and (min-height: 1180px) and (max-height: 1320px) {
  .auth-scene__character {
    right: 12vw !important;
    bottom: -7svh;
    width: 108vw;
    transform: rotate(-1.2deg) !important;
  }
}

@media (min-width: 660px) and (max-width: 699px) and (min-height: 980px) and (max-height: 1100px) {
  .auth-scene__background {
    object-position: 58% center;
  }

  .auth-scene__character {
    right: 18vw !important;
    bottom: -6svh;
    width: 118vw;
    transform: rotate(-1.2deg) !important;
  }
}

@media (max-height: 760px) and (min-width: 621px) {
  .auth-stage {
    padding-top: 34px;
    padding-bottom: 92px;
  }

  .auth-panel {
    padding: 26px 30px;
  }

  .auth-panel--apply {
    padding-block: 20px;
  }

  .auth-form--apply {
    gap: 9px;
  }

  .auth-panel--apply .auth-field__control {
    height: 43px;
  }

  .auth-context-note {
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-scene__background,
  .auth-scene__character,
  .auth-scene__character-glow,
  .auth-scene__light,
  .auth-petal {
    animation: none !important;
  }
}
