/* ========================================
   登录/注册页面样式
   ======================================== */

.auth-container {
  min-height: 100vh;
  display: flex;
  position: relative;
  z-index: 1;
}

/* 左侧品牌区 */
.auth-brand {
  flex: 1;
  max-width: 55%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='1' fill='rgba(255,255,255,0.08)'/%3E%3C/svg%3E");
  background-size: 60px 60px;
}

.brand-content {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 48px;
}

.brand-logo .logo-icon {
  width: 52px;
  height: 52px;
}

.brand-logo .logo-title {
  color: white;
  font-size: 22px;
}

.brand-logo .logo-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.brand-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 42px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.brand-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 48px;
}

.brand-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 48px;
}

.brand-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.bf-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bf-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.bf-content p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.brand-stats {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-stat {
  display: flex;
  flex-direction: column;
}

.brand-stat .stat-value {
  font-family: 'Noto Serif SC', serif;
  font-size: 32px;
  font-weight: 700;
  color: white;
}

.brand-stat .stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* 右侧表单区 */
.auth-form-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--egg-white);
}

.auth-nav {
  padding: 24px 40px;
}

.auth-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition-base);
}

.auth-home:hover {
  color: var(--deep-brown);
}

.auth-home svg {
  width: 18px;
  height: 18px;
}

.auth-form-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 60px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.auth-header {
  margin-bottom: 40px;
}

.auth-header h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--deep-brown);
  margin-bottom: 12px;
}

.auth-header p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* 表单样式 */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-form .form-group {
  margin-bottom: 0;
}

.auth-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--deep-brown);
  margin-bottom: 10px;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="tel"],
.auth-form input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--warm-beige);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  color: var(--deep-brown);
  background: white;
  transition: all var(--transition-base);
  outline: none;
}

.auth-form input::placeholder {
  color: var(--text-muted);
}

.auth-form input:focus {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

/* 密码输入框 */
.password-input {
  position: relative;
}

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

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--transition-base);
}

.password-toggle:hover {
  color: var(--deep-brown);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* 验证码输入 */
.input-with-code {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--warm-beige);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-base);
}

.input-with-code:focus-within {
  border-color: var(--primary-gold);
}

.input-with-code .country-code {
  padding: 14px 16px;
  background: var(--soft-gray);
  font-size: 15px;
  font-weight: 600;
  color: var(--deep-brown);
  border-right: 1px solid var(--warm-beige);
}

.input-with-code input {
  flex: 1;
  border: none;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
}

.input-with-btn {
  display: flex;
  gap: 12px;
}

.input-with-btn input {
  flex: 1;
}

.code-btn {
  padding: 14px 20px;
  background: rgba(212, 175, 55, 0.1);
  border: 1.5px solid var(--primary-gold);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-gold-dark);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-base);
}

.code-btn:hover {
  background: rgba(212, 175, 55, 0.15);
}

.code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 密码强度 */
.password-strength {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--warm-beige);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: all var(--transition-base);
}

.strength-fill.weak {
  width: 33%;
  background: var(--error);
}

.strength-fill.medium {
  width: 66%;
  background: #F59E0B;
}

.strength-fill.strong {
  width: 100%;
  background: var(--success);
}

.strength-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* 表单选项 */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-gold);
  cursor: pointer;
}

.checkbox-wrapper a {
  color: var(--primary-gold-dark);
}

.forgot-link {
  font-size: 14px;
  color: var(--primary-gold-dark);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  color: var(--primary-gold);
}

/* 按钮加载状态 */
.btn-primary .btn-loading {
  display: none;
}

.btn-primary.loading .btn-text {
  display: none;
}

.btn-primary.loading .btn-loading {
  display: inline;
}

/* 分割线 */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 32px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--warm-beige);
}

.auth-divider span {
  padding: 0 16px;
}

/* 社交登录 */
.social-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: white;
  border: 1.5px solid var(--warm-beige);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--deep-brown);
  cursor: pointer;
  transition: all var(--transition-base);
}

.social-btn:hover {
  border-color: var(--primary-gold);
  background: rgba(212, 175, 55, 0.05);
  transform: translateY(-2px);
}

.social-btn svg {
  width: 20px;
  height: 20px;
}

/* 页脚 */
.auth-footer {
  text-align: center;
  margin-top: 32px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary-gold-dark);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  color: var(--primary-gold);
}

/* Toast 提示 */
.toast-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.toast-overlay.show {
  opacity: 1;
  visibility: visible;
}

.toast {
  background: white;
  padding: 40px;
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-2xl);
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.toast-overlay.show .toast {
  transform: scale(1);
}

.toast-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--success) 0%, #34D399 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.toast-icon svg {
  width: 36px;
  height: 36px;
  stroke: white;
}

.toast h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px;
  color: var(--deep-brown);
  margin-bottom: 8px;
}

.toast p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 背景装饰 */
.bg-egg-shape {
  position: fixed;
  width: 400px;
  height: 500px;
  background: radial-gradient(ellipse at 30% 30%, rgba(255, 255, 255, 0.6) 0%, transparent 60%);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  top: 50%;
  left: 30%;
  transform: translateY(-50%) rotate(-15deg);
  opacity: 0.4;
  animation: pulse 8s ease-in-out infinite;
  z-index: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: translateY(-50%) rotate(-15deg) scale(1); }
  50% { opacity: 0.5; transform: translateY(-50%) rotate(-12deg) scale(1.05); }
}

/* 响应式 */
@media (max-width: 1024px) {
  .auth-brand {
    max-width: 45%;
    padding: 40px;
  }

  .brand-title {
    font-size: 32px;
  }

  .brand-features {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .auth-container {
    flex-direction: column;
  }

  .auth-brand {
    max-width: 100%;
    padding: 40px 24px;
  }

  .brand-content {
    text-align: center;
  }

  .brand-logo {
    justify-content: center;
  }

  .brand-features {
    display: none;
  }

  .brand-stats {
    justify-content: center;
  }

  .auth-form-wrapper {
    padding: 40px 24px;
  }

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