:root {
  --auth-bg: #f3f6fb;
  --auth-surface: rgba(255, 255, 255, 0.88);
  --auth-panel: #ffffff;
  --auth-line: #d8e0ec;
  --auth-text: #172033;
  --auth-muted: #627086;
  --auth-gold: #ffd000;
  --auth-gold-deep: #b88900;
  --auth-green: #0f9f5c;
  --auth-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--auth-text);
  background:
    radial-gradient(circle at top left, rgba(255, 208, 0, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.12), transparent 24%),
    linear-gradient(135deg, #edf2f8 0%, #f8fafc 100%);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

body.auth-loading {
  overflow: hidden;
}

.auth-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-areas:
    "mark"
    "name";
  grid-template-rows: 136px auto;
  justify-items: center;
  align-content: center;
  row-gap: 18px;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 46% 42%, rgba(15, 159, 92, 0.13), transparent 22%),
    radial-gradient(circle at 56% 58%, rgba(255, 208, 0, 0.16), transparent 24%),
    linear-gradient(135deg, #f7fafc 0%, #eef4fb 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.auth-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1px),
    linear-gradient(45deg, transparent calc(50% - 1px), rgba(15, 23, 42, 0.045) 50%, transparent calc(50% + 1px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), rgba(15, 23, 42, 0.045) 50%, transparent calc(50% + 1px));
  background-size: 96px 96px;
}

.auth-loader-orbit {
  grid-area: mark;
  align-self: center;
  justify-self: center;
  position: relative;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  border: 1px solid rgba(15, 159, 92, 0.24);
  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.5),
    0 24px 70px rgba(15, 23, 42, 0.14);
  animation: auth-loader-spin 1.45s linear infinite;
}

.auth-loader-orbit span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--auth-green);
  box-shadow: 0 0 18px rgba(15, 159, 92, 0.58);
}

.auth-loader-orbit span:nth-child(1) {
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
}

.auth-loader-orbit span:nth-child(2) {
  right: 9px;
  bottom: 18px;
  background: var(--auth-gold);
  box-shadow: 0 0 18px rgba(255, 208, 0, 0.58);
}

.auth-loader-orbit span:nth-child(3) {
  left: 9px;
  bottom: 18px;
}

.auth-loader-icon {
  grid-area: mark;
  align-self: center;
  justify-self: center;
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(15, 23, 42, 0.12));
}

.auth-loader-name {
  grid-area: name;
  position: relative;
  z-index: 1;
  font-size: 30px;
  font-weight: 900;
}

.auth-loader-progress {
  --loader-progress: 0%;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 56px;
  pointer-events: none;
}

.auth-loader-percent {
  position: absolute;
  left: clamp(44px, var(--loader-progress), calc(100% - 44px));
  bottom: 24px;
  width: 88px;
  text-align: center;
  color: var(--auth-text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  transform: translateX(-50%);
  transition: left 80ms linear;
}

.auth-loader-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  height: 14px;
  background: rgba(216, 224, 236, 0.82);
}

.auth-loader-bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--auth-green), var(--auth-gold));
  box-shadow: 0 0 18px rgba(15, 159, 92, 0.26);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 80ms linear;
}

body.auth-ready .auth-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 460px);
  gap: 28px;
  align-items: stretch;
  padding: 32px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.auth-loading .auth-shell {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
}

.auth-hero,
.auth-panel {
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  box-shadow: var(--auth-shadow);
}

.auth-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  padding: 40px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.96)),
    linear-gradient(135deg, rgba(255, 208, 0, 0.12), rgba(15, 159, 92, 0.08));
  backdrop-filter: blur(6px);
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px),
    linear-gradient(45deg, transparent calc(50% - 1px), rgba(15, 23, 42, 0.06) 50%, transparent calc(50% + 1px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), rgba(15, 23, 42, 0.06) 50%, transparent calc(50% + 1px)),
    radial-gradient(circle at 22% 24%, rgba(15, 159, 92, 0.08), transparent 20%),
    radial-gradient(circle at 74% 76%, rgba(255, 208, 0, 0.08), transparent 24%);
  background-size: 102px 102px, 102px 102px, 102px 102px, 102px 102px, auto, auto;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08) 32%, rgba(255, 255, 255, 0.22) 100%),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 26%),
    radial-gradient(circle at 80% 80%, rgba(255, 208, 0, 0.08), transparent 28%);
}

.auth-fireflies {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.auth-fireflies i {
  display: block;
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(242, 206, 92, 0.96);
  box-shadow:
    0 0 0 1px rgba(255, 248, 212, 0.72),
    0 0 12px rgba(255, 224, 122, 0.92),
    0 0 26px rgba(15, 159, 92, 0.44),
    0 0 38px rgba(15, 159, 92, 0.22);
  opacity: 0;
  mix-blend-mode: normal;
  animation: auth-firefly-rise 9.2s linear infinite;
}

.auth-fireflies i:nth-child(2n) {
  background: rgba(95, 200, 156, 0.96);
  box-shadow:
    0 0 0 1px rgba(225, 255, 238, 0.7),
    0 0 12px rgba(129, 232, 178, 0.92),
    0 0 26px rgba(255, 208, 0, 0.4),
    0 0 38px rgba(255, 208, 0, 0.2);
}

.auth-fireflies i:nth-child(1) { left: 16%; top: 84%; animation-delay: -0.8s; }
.auth-fireflies i:nth-child(2) { left: 22%; top: 74%; animation-delay: -4.4s; }
.auth-fireflies i:nth-child(3) { left: 28%; top: 88%; animation-delay: -2.3s; }
.auth-fireflies i:nth-child(4) { left: 35%; top: 69%; animation-delay: -7.8s; }
.auth-fireflies i:nth-child(5) { left: 42%; top: 82%; animation-delay: -5.9s; }
.auth-fireflies i:nth-child(6) { left: 48%; top: 63%; animation-delay: -8.7s; }
.auth-fireflies i:nth-child(7) { left: 54%; top: 78%; animation-delay: -1.4s; }
.auth-fireflies i:nth-child(8) { left: 60%; top: 68%; animation-delay: -6.7s; }
.auth-fireflies i:nth-child(9) { left: 66%; top: 83%; animation-delay: -3.1s; }
.auth-fireflies i:nth-child(10) { left: 72%; top: 58%; animation-delay: -7.1s; }
.auth-fireflies i:nth-child(11) { left: 77%; top: 86%; animation-delay: -5.2s; }
.auth-fireflies i:nth-child(12) { left: 82%; top: 72%; animation-delay: -8.9s; }
.auth-fireflies i:nth-child(13) { left: 24%; top: 61%; animation-delay: -1.9s; }
.auth-fireflies i:nth-child(14) { left: 31%; top: 79%; animation-delay: -6.2s; }
.auth-fireflies i:nth-child(15) { left: 46%; top: 90%; animation-delay: -4.8s; }
.auth-fireflies i:nth-child(16) { left: 58%; top: 88%; animation-delay: -2.7s; }
.auth-fireflies i:nth-child(17) { left: 69%; top: 76%; animation-delay: -8.1s; }
.auth-fireflies i:nth-child(18) { left: 74%; top: 92%; animation-delay: -0.5s; }
.auth-fireflies i:nth-child(19) { left: 86%; top: 64%; animation-delay: -7.4s; }
.auth-fireflies i:nth-child(20) { left: 90%; top: 88%; animation-delay: -3.6s; }

@keyframes auth-firefly-rise {
  0% {
    transform: translate3d(0, 34px, 0) scale(0.55);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  76% {
    opacity: 0.86;
  }
  100% {
    transform: translate3d(18px, -180px, 0) scale(1.12);
    opacity: 0;
  }
}

@keyframes auth-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-particle-model {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 360ms ease;
}

.auth-brand {
  position: relative;
  z-index: 4;
  display: grid;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 520px);
  padding: 0 122px;
  text-align: center;
  transform: translateY(-18px);
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease;
}

.auth-brand-icon {
  position: absolute;
  left: 50px;
  top: 50%;
  width: 90px;
  height: 90px;
  transform: translateY(-50%);
  object-fit: contain;
}

.auth-brand h1 {
  margin: 0;
  font-size: 52px;
}

.auth-brand p {
  margin: 6px 0 0;
  color: var(--auth-muted);
  font-size: 18px;
}

.auth-points {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-point-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(216, 224, 236, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition:
    transform 320ms ease,
    border-color 320ms ease,
    box-shadow 320ms ease,
    background-color 320ms ease;
}

.auth-point-card:hover {
  transform: translateY(-2px);
}

.auth-point-card.active {
  border-color: rgba(15, 159, 92, 0.38);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 208, 0, 0.14);
}

.auth-points i {
  color: var(--auth-green);
  font-size: 30px;
  line-height: 1;
}

.auth-points span {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.auth-points p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-feature-detail {
  position: absolute;
  left: 64px;
  bottom: 56px;
  z-index: 4;
  width: min(320px, 34%);
  text-align: left;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 320ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-feature-detail.visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-feature-kicker {
  color: rgba(98, 112, 134, 0.8);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.auth-feature-detail h3 {
  margin: 10px 0 0;
  font-size: 28px;
  line-height: 1.15;
}

.auth-feature-detail p {
  margin: 12px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.75;
}

.auth-hero.auth-hero--feature-active .auth-brand {
  transform: translate(168px, -18px);
}

.auth-hero.auth-hero--feature-active .auth-points {
  transform: translateX(168px);
}

.auth-login-music {
  display: none;
}

.auth-music-toggle {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(216, 224, 236, 0.92);
  border-radius: 999px;
  color: var(--auth-green);
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition:
    color 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    transform 220ms ease;
}

.auth-music-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 159, 92, 0.34);
  background: rgba(255, 255, 255, 0.96);
}

.auth-music-toggle.muted {
  color: var(--auth-muted);
  background: rgba(248, 250, 252, 0.9);
}

.auth-music-toggle i {
  font-size: 17px;
  line-height: 1;
}

.auth-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 28px;
  background:
    radial-gradient(circle at 84% 10%, rgba(255, 208, 0, 0.14), transparent 24%),
    radial-gradient(circle at 14% 28%, rgba(15, 159, 92, 0.08), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.auth-panel > * {
  position: relative;
  z-index: 1;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background: #f2f5fa;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.04),
    0 14px 30px rgba(15, 23, 42, 0.07);
}

.auth-tab {
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--auth-muted);
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tab.active {
  color: #111827;
  background: #ffffff;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-form {
  display: none;
  gap: 16px;
}

.auth-form.active {
  display: grid;
}

.auth-title h2 {
  margin: 0;
  font-size: 24px;
}

.auth-title p {
  margin: 8px 0 0;
  color: var(--auth-muted);
  line-height: 1.7;
}

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

.auth-field span {
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-field input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--auth-line);
  border-radius: 6px;
  color: var(--auth-text);
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  font-size: 14px;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.8);
}

.auth-field input:focus {
  outline: 0;
  border-color: #e2b200;
  box-shadow: 0 0 0 4px rgba(255, 208, 0, 0.18);
}

.auth-submit {
  height: 46px;
  border: 0;
  border-radius: 6px;
  color: #111827;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 45%),
    linear-gradient(135deg, #ffe056, #ffd000);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    0 14px 30px rgba(184, 137, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.auth-message {
  min-height: 24px;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-message.error {
  color: #c81e1e;
}

.auth-message.success {
  color: var(--auth-green);
}

@media (max-width: 1100px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .auth-points {
    grid-template-columns: 1fr;
  }

  .auth-feature-detail {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .auth-hero.auth-hero--feature-active .auth-brand,
  .auth-hero.auth-hero--feature-active .auth-points {
    transform: none;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .auth-shell {
    min-height: 100dvh;
    gap: 14px;
    padding: 12px;
  }

  .auth-hero,
  .auth-panel {
    padding: 18px;
  }

  .auth-brand {
    display: grid;
    justify-content: center;
    min-width: min(100%, 360px);
    padding: 0 62px;
    text-align: center;
    transform: none;
  }

  .auth-brand-icon {
    left: 12px;
    width: 48px;
    height: 48px;
  }

  .auth-brand h1 {
    font-size: 38px;
    line-height: 1.05;
  }

  .auth-brand p {
    font-size: 15px;
  }

  .auth-points {
    gap: 10px;
    width: 100%;
  }

  .auth-particle-model {
    opacity: 0.35;
  }

  .auth-fireflies i {
    width: 5px;
    height: 5px;
  }

  .auth-point-card {
    min-height: 86px;
    gap: 8px;
    padding: 14px;
  }

  .auth-music-toggle {
    right: 16px;
    bottom: 16px;
    width: 38px;
    height: 38px;
  }

  .auth-points i {
    font-size: 26px;
  }

  .auth-points span {
    font-size: 14px;
  }

  .auth-tabs {
    gap: 6px;
  }

  .auth-feature-detail h3 {
    font-size: 22px;
  }

  .auth-title h2 {
    font-size: 21px;
  }

  .auth-field input,
  .auth-submit {
    height: 44px;
  }
}

@media (max-width: 380px) {
  .auth-brand h1 {
    font-size: 32px;
  }

  .auth-hero,
  .auth-panel {
    padding: 14px;
  }
}
