.auth-wrapper {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.back-link {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 10;
  color: rgba(180, 210, 255, 0.5);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
  pointer-events: auto;
}

.back-link:hover {
  color: rgba(180, 210, 255, 0.9);
}

.auth-card {
  width: min(420px, 90vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 200, 255, 0.25);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(90, 140, 255, 0.12);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.8s ease;
}

.auth-card.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  color: rgba(250, 245, 255, 0.95);
  text-align: center;
  margin-bottom: 32px;
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(140, 100, 255, 0.4);
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(180, 210, 255, 0.6);
  letter-spacing: 0.05em;
}

.input-group input {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  color: #e8f6ff;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(120, 200, 255, 0.2);
  border-radius: 10px;
  outline: none;
  transition: all 0.3s ease;
}

.input-group input::placeholder {
  color: rgba(180, 210, 255, 0.3);
}

.input-group input:focus {
  border-color: rgba(140, 180, 255, 0.6);
  box-shadow: 0 0 12px rgba(100, 160, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.password-wrap {
  position: relative;
}

.toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  padding: 4px;
  font-family: inherit;
  font-size: 13px;
  color: rgba(180, 210, 255, 0.4);
  background: none;
  border: none;
  cursor: pointer;
  transform: translateY(-50%);
}

.toggle-pwd:hover {
  color: rgba(180, 210, 255, 0.8);
}

.auth-btn {
  position: relative;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #e8f6ff;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(120, 200, 255, 0.35);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(90, 160, 255, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.4s ease;
}

.auth-btn:hover {
  box-shadow: 0 0 30px rgba(110, 180, 255, 0.4);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-btn .btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #e8f6ff;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

.auth-btn.loading .btn-spinner {
  opacity: 1;
}

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

.auth-switch {
  margin-top: 20px;
  font-size: 13px;
  color: rgba(180, 210, 255, 0.45);
  text-align: center;
}

.auth-switch a {
  color: rgba(160, 200, 255, 0.7);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s;
}

.auth-switch a:hover {
  color: rgba(200, 220, 255, 0.95);
  text-shadow: 0 0 10px rgba(140, 180, 255, 0.4);
}

.auth-error {
  min-height: 18px;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 120, 140, 0.9);
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 80, 100, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
}

.auth-error.show {
  opacity: 1;
}

.form-section {
  display: none;
}

.form-section.active {
  display: block;
  animation: formFadeIn 0.4s ease;
}

/* 邀请码输入框特殊样式 */
#regInvite {
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

#regInvite::placeholder {
  letter-spacing: 0.05em;
}

/* 卡片滚动条 */
.auth-card::-webkit-scrollbar {
  width: 4px;
}

.auth-card::-webkit-scrollbar-thumb {
  background: rgba(120, 200, 255, 0.25);
  border-radius: 2px;
}

@keyframes formFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body > .site-footer {
  position: fixed;
  z-index: 5;
}
