/* ---------- Auth Page Structure ---------- */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--background);
  position: relative;
  overflow-x: hidden;
  padding-bottom: 40px;
}

/* ---------- Background Glow Orbs ---------- */
.auth-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
}

.auth-glow-1 {
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, #ff7b7b, #c41e0e);
  top: -80px;
  left: -80px;
  animation: float-glow 8s ease-in-out infinite alternate;
}

.auth-glow-2 {
  width: 380px;
  height: 380px;
  background: linear-gradient(135deg, #f0ede6, #ffd5d5);
  bottom: 10%;
  right: -120px;
  animation: float-glow 12s ease-in-out infinite alternate-reverse;
}

.auth-glow-3 {
  width: 220px;
  height: 220px;
  background: linear-gradient(135deg, #ffb3b3, #ffffff);
  top: 45%;
  left: 15%;
  animation: float-glow 10s ease-in-out infinite alternate;
}

/* ---------- Main Container ---------- */
.auth-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ---------- Top Bar / Back Button ---------- */
.auth-top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.auth-back-btn:hover {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-3px);
}

/* ---------- Hero Header ---------- */
.auth-hero {
  flex-shrink: 0;
  padding: 16px 16px 24px;
  text-align: center;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--primary), #ff4d4d);
  color: white;
  border-radius: 18px;
  font-size: 32px;
  margin-bottom: 16px;
  box-shadow: 0 10px 25px rgba(196, 30, 14, 0.35);
}

.auth-logo span {
  font-family: "Noto Serif SC", "Songti SC", "STSong", SimSun, serif;
  font-weight: 700;
}

.auth-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Segmented Tabs ---------- */
.auth-tabs {
  margin-bottom: 20px;
}

.auth-tabs-inner {
  display: flex;
  background: rgba(232, 229, 222, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  color: var(--muted-foreground);
  text-align: center;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.auth-tab:hover {
  color: var(--foreground);
}

.auth-tab.active {
  background: #ffffff;
  color: var(--foreground);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ---------- Glassmorphism Card & Form ---------- */
.auth-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 7px;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 30, 14, 0.15);
}

.form-input::placeholder {
  color: #a39e93;
}

.form-error {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ef4444;
  font-size: 12px;
  font-weight: 500;
  margin-top: 6px;
}

.error-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.auth-submit-btn {
  margin-top: 6px;
  width: 100%;
  padding: 15px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #e62817);
  box-shadow: 0 8px 20px rgba(196, 30, 14, 0.3);
  color: #fff;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(196, 30, 14, 0.4);
  opacity: 1;
}

.auth-submit-btn:active {
  transform: scale(0.98);
}

.auth-demo-note {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  margin-top: 22px;
}

.auth-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.auth-link:hover {
  color: #9c170b;
}

/* ---------- Floating Decorations ---------- */
.auth-floating-deco {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.auth-floating-deco .hanzi {
  position: absolute;
  color: rgba(196, 30, 14, 0.04);
  font-weight: 800;
}