/* Figma: web-登录 / web-注册 — Frame 2131455577 */
@import url("glass-card.css");

html.auth-html {
  background: #100f0f;
}

html.auth-html body.auth-page {
  margin: 0;
  min-height: 100%;
  background: #100f0f;
  color: rgba(255, 255, 255, 0.8);
}

.auth-page {
  --auth-bg: #100f0f;
  --auth-card: var(--glass-bg-panel);
  --auth-accent: #4cffd8;
  --auth-enter-text: #001d15;
  --auth-input-bg: #1a1e21;
  --auth-input-border: rgba(255, 255, 255, 0.1);
  --auth-muted: rgba(255, 255, 255, 0.5);
  --auth-link-accent: #bfeae0;
  --auth-card-border-base: var(--glass-border-base);
  --auth-card-border-grad: var(--glass-border-grad);
  --auth-btn-border-grad: linear-gradient(90deg, #3b232b 0%, #899d74 50%, #706ba4 87.5%, #947093 100%);
  --auth-enter-grad: linear-gradient(90deg, #cbfcf2 0%, #4bffd9 50%, #76ef7d 100%);
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--auth-bg);
  color: rgba(255, 255, 255, 0.8);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after { box-sizing: border-box; }

.auth-page a {
  color: inherit;
  text-decoration: none;
}

.auth-page a:hover { text-decoration: underline; }

.auth-canvas {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  position: relative;
  width: 600px;
  max-width: 100%;
  min-height: 486px;
  border: 1px solid var(--auth-card-border-base);
  border-radius: 30px;
  background: var(--auth-card);
  overflow: hidden;
  isolation: isolate;
}

.auth-page--login .auth-card {
  min-height: 486px;
}

.auth-page--register .auth-card {
  min-height: 650px;
}

.auth-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 440px;
  max-width: 100%;
  margin: 0 auto;
  padding: 52px 0;
}

.auth-title {
  margin: 0;
  width: 100%;
  color: var(--auth-accent);
  font-size: 30px;
  font-weight: 600;
  line-height: 42px;
  text-align: center;
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.auth-fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.auth-input-wrap {
  width: 100%;
}

.auth-input-row {
  position: relative;
  width: 100%;
}

.auth-input {
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--auth-input-border);
  border-radius: 100px;
  background: var(--auth-input-bg);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 20px;
  outline: none;
  appearance: none;
}

.auth-input::placeholder {
  color: var(--auth-muted);
  opacity: 1;
}

.auth-input-wrap .auth-input::placeholder {
  color: transparent;
}

.auth-input-ph {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}

.auth-ph-label {
  color: rgba(255, 255, 255, 0.8);
}

.auth-ph-hint {
  color: var(--auth-muted);
}

.auth-input-ph--plain {
  color: rgba(255, 255, 255, 0.8);
}

.auth-input-wrap:focus-within .auth-input-ph,
.auth-input-wrap:has(.auth-input:not(:placeholder-shown)) .auth-input-ph {
  opacity: 0;
}

.auth-input:focus {
  border-color: rgba(76, 255, 216, 0.45);
}

.auth-input-wrap.is-invalid .auth-input {
  border-color: #ff5a36;
}

.auth-input-wrap.is-invalid .auth-input:focus {
  border-color: #ff5a36;
}

.auth-field-error {
  margin: 6px 16px 0;
  color: #ff5a36;
  font-size: 13px;
  line-height: 18px;
}

.auth-field-error:empty {
  display: none;
}

.auth-field-password .auth-input {
  padding-right: 48px;
}

.auth-input-row--suffix .auth-input {
  padding-right: 48px;
}

.auth-reroll-nickname {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0.9;
}

.auth-reroll-nickname:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}

.auth-toggle-pw {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.85;
  color: #ffffff;
}

.auth-toggle-pw::before {
  content: "";
  display: block;
  width: 20px;
  height: 18px;
  margin: 0 auto;
  background: url("/assets/icons/auth/eye-hide.svg") center / contain no-repeat;
}

.auth-toggle-pw.is-visible::before {
  background-image: url("/assets/icons/auth/eye-show.svg");
}

.auth-toggle-pw:hover { opacity: 1; }

.auth-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 300px;
}

.auth-error {
  width: 100%;
  color: #ff5a36;
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}

.auth-error:empty {
  display: none;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  height: 54px;
  margin: 0;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: 18px;
  line-height: 25px;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.auth-btn:hover { opacity: 0.92; }

.auth-btn-primary {
  background-image: var(--auth-enter-grad), var(--auth-btn-border-grad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: var(--auth-enter-text);
}

.auth-hint-link {
  margin: 0;
  width: 100%;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.auth-hint-link a,
.auth-hint-accent {
  color: var(--auth-link-accent);
  text-decoration: none;
}

.auth-hint-link a:hover,
.auth-hint-accent:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-hint-link--muted a {
  color: var(--auth-muted);
}

.auth-promo-link {
  display: block;
  width: 100%;
  max-width: 284px;
  margin: 0;
  color: var(--auth-link-accent);
  font-size: 20px;
  line-height: 22px;
  text-align: center;
  text-decoration: none;
}

.auth-promo-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-page--login .auth-form {
  gap: 36px;
}

@media (max-width: 640px) {
  .auth-card {
    min-height: 0;
    border-radius: 24px;
  }

  .auth-card-inner {
    gap: 28px;
    padding: 40px 16px;
  }

  .auth-title {
    font-size: 24px;
    line-height: 34px;
  }

  .auth-fields {
    gap: 20px;
  }

  .auth-form {
    gap: 28px;
  }

  .auth-btn {
    height: 48px;
    font-size: 16px;
    line-height: 22px;
  }

  .auth-glow--bar {
    right: 20px;
  }
}

/* Login dialog / register dialog overlay (v1.2.1). Keep full-page .auth-page rules above. */
body.auth-open { overflow: hidden; }

.auth-overlay {
  --auth-bg: #100f0f;
  --auth-card: var(--glass-bg-panel);
  --auth-accent: #4cffd8;
  --auth-enter-text: #001d15;
  --auth-input-bg: #1a1e21;
  --auth-input-border: rgba(255, 255, 255, 0.1);
  --auth-muted: rgba(255, 255, 255, 0.5);
  --auth-link-accent: #bfeae0;
  --auth-card-border-base: var(--glass-border-base);
  --auth-card-border-grad: var(--glass-border-grad);
  --auth-btn-border-grad: linear-gradient(90deg, #3b232b 0%, #899d74 50%, #706ba4 87.5%, #947093 100%);
  --auth-enter-grad: linear-gradient(90deg, #cbfcf2 0%, #4bffd9 50%, #76ef7d 100%);
  --auth-overlay-shift: min(12vh, 96px);
  --auth-overlay-pad-top: max(12px, env(safe-area-inset-top, 0px));
  --auth-overlay-pad-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--auth-overlay-pad-top) 16px var(--auth-overlay-pad-bottom);
  overflow: auto;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.8);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

.auth-overlay[hidden] { display: none !important; }

.auth-overlay *,
.auth-overlay *::before,
.auth-overlay *::after { box-sizing: border-box; }

.auth-overlay a {
  color: inherit;
  text-decoration: none;
}

.auth-overlay a:hover { text-decoration: underline; }

.auth-overlay .auth-hint-link a,
.auth-overlay a.auth-hint-accent,
.auth-overlay a.auth-promo-link {
  color: var(--auth-link-accent);
}

.auth-overlay .auth-card {
  display: flex;
  flex-direction: column;
  margin-top: var(--auth-overlay-shift);
  min-height: 0;
  max-height: calc(100svh - var(--auth-overlay-shift) - var(--auth-overlay-pad-top) - var(--auth-overlay-pad-bottom));
  max-height: calc(100dvh - var(--auth-overlay-shift) - var(--auth-overlay-pad-top) - var(--auth-overlay-pad-bottom));
}

.auth-overlay .auth-view {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.auth-view { position: relative; z-index: 1; }
.auth-view[hidden] { display: none !important; }

.auth-back,
.auth-close {
  position: absolute;
  top: 32px;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 4;
}

.auth-back { left: 32px; background: transparent; }
.auth-close { right: 32px; background: transparent; }
.auth-back[hidden] { display: none !important; }

.auth-back img,
.auth-close img {
  display: block;
  width: 24px;
  height: 24px;
}

.auth-overlay .auth-glow {
  background: none;
  filter: none;
  border-radius: 0;
}

.auth-overlay .auth-glow img {
  position: absolute;
  display: block;
  max-width: none;
}

.auth-overlay .auth-glow--mint {
  inset: auto;
  top: -84px;
  left: -78px;
  width: 186px;
  height: 160px;
}

.auth-overlay .auth-glow--mint img {
  inset: -18.7% -16.13%;
}

.auth-overlay .auth-glow--teal {
  inset: auto;
  top: -53px;
  left: -36px;
  width: 321px;
  height: 83px;
}

.auth-overlay .auth-glow--teal img {
  inset: -33.73% -8.72%;
}

.auth-overlay .auth-glow--bar {
  inset: auto;
  top: -55px;
  right: -17px;
  width: 169px;
  height: 267px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none;
}

.auth-overlay .auth-glow--bar img {
  position: relative;
  width: 120px;
  height: 362px;
  transform: rotate(28.47deg);
}

@media (max-width: 640px) {
  .auth-back,
  .auth-close { top: 16px; }
  .auth-back { left: 16px; }
  .auth-close { right: 16px; }
}
