/* ========================================
   用户认证页面样式 - 2026 Version
   Auth Pages Styles (Login/Register)
======================================== */

:root {
  --auth-primary: #2B6DE8;
  --auth-primary-light: #5B8DEF;
  --auth-primary-dark: #1E5AC7;
  --auth-accent: #FF6A00;
  --auth-success: #52c41a;
  --auth-error: #ff4d4f;
  --auth-text: #1a1a2e;
  --auth-text-secondary: #5a6689;
  --auth-text-muted: #8c94a8;
  --auth-bg: #f7f9fc;
  --auth-border: #e8ecf3;
  --auth-white: #ffffff;
}

/* ========== Hero Section ========== */
.auth-hero {
  position: relative;
  padding: 120px 0 80px;
  margin-top: 20px;
  background: linear-gradient(135deg, #2B6DE8 0%, #6366F1 50%, #8B5CF6 100%);
  overflow: hidden;
}

.auth-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.auth-hero .hero-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.auth-hero .hero-circle-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  animation: floatSlow 10s ease-in-out infinite;
}

.auth-hero .hero-circle-2 {
  width: 300px;
  height: 300px;
  bottom: -80px;
  left: -80px;
  animation: floatSlow 12s ease-in-out infinite reverse;
}

.auth-hero .hero-circle-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  left: 20%;
  animation: floatSlow 8s ease-in-out infinite;
}

.auth-hero .hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.02); }
}

.auth-hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.auth-hero-content {
  flex: 1;
}

.auth-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.auth-hero-title {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.2;
}

.auth-hero-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,0.9);
  margin: 0 0 28px;
  line-height: 1.8;
}

.auth-hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  font-size: 14px;
  color: #fff;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
}

.auth-hero-illustration {
  flex-shrink: 0;
  width: 320px;
  height: 260px;
}

.auth-hero-illustration svg {
  width: 100%;
  height: 100%;
}

/* ========== Main Content ========== */
.auth-main {
  background: var(--auth-bg);
  padding: 60px 0 80px;
}

.auth-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Auth Card ========== */
.auth-card {
  background: var(--auth-white);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-top: -80px;
  position: relative;
  z-index: 10;
}

.auth-card-header {
  padding: 32px 40px;
  border-bottom: 1px solid var(--auth-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-card-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--auth-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-card-title svg {
  width: 28px;
  height: 28px;
  color: var(--auth-primary);
}

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

.auth-header-links a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
}

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

.auth-card-body {
  padding: 50px 80px 60px;
}

/* ========== Form Styles ========== */
.auth-form {
  width: 100%;
}

.auth-form-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.5s ease forwards;
}

/* Left spacer for symmetry */
.auth-spacer {
  width: 180px;
  flex-shrink: 0;
}

.auth-form-group:nth-child(1) { animation-delay: 0.05s; }
.auth-form-group:nth-child(2) { animation-delay: 0.1s; }
.auth-form-group:nth-child(3) { animation-delay: 0.15s; }
.auth-form-group:nth-child(4) { animation-delay: 0.2s; }
.auth-form-group:nth-child(5) { animation-delay: 0.25s; }
.auth-form-group:nth-child(6) { animation-delay: 0.3s; }
.auth-form-group:nth-child(7) { animation-delay: 0.35s; }

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

.auth-input-box {
  display: flex;
  align-items: stretch;
  width: 480px;
  flex-shrink: 0;
  border: 1px solid var(--auth-border);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--auth-white);
}

.auth-input-box:focus-within {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(43, 109, 232, 0.08);
}

.auth-input-box.has-error {
  border-color: var(--auth-error);
  animation: shake 0.4s ease;
}

.auth-input-box.has-error:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.08);
}

.auth-input-box.has-success {
  border-color: var(--auth-success);
}

.auth-input-box.has-success:focus-within {
  box-shadow: 0 0 0 3px rgba(82, 196, 26, 0.08);
}

.auth-input-box.has-success .auth-form-label {
  color: var(--auth-success);
  background: #f6ffed;
  border-right-color: var(--auth-success);
}

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

.auth-form-label {
  flex-shrink: 0;
  width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--auth-text);
  background: #fafafa;
  border-right: 1px solid var(--auth-border);
  transition: all 0.3s;
}

.auth-input-box:focus-within .auth-form-label {
  color: var(--auth-primary);
  background: #f0f5ff;
  border-right-color: var(--auth-primary);
}

.auth-input {
  flex: 1;
  height: 50px;
  padding: 0 16px;
  border: none;
  font-size: 15px;
  color: var(--auth-text);
  background: transparent;
  outline: none;
  transition: all 0.3s;
}

.auth-input::placeholder {
  color: #bfbfbf;
  transition: color 0.3s;
}

.auth-input:focus::placeholder {
  color: #d9d9d9;
}

.auth-input:disabled,
.auth-input[readonly] {
  background: #f5f5f5;
  color: var(--auth-text-secondary);
}

/* Input suffix icons (password toggle, check icon, strength) */
.auth-input-suffix {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 12px;
  flex-shrink: 0;
}

.auth-toggle-password {
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #999;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-toggle-password:hover {
  color: var(--auth-primary);
}

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

.auth-check-icon {
  width: 20px;
  height: 20px;
  color: var(--auth-success);
  display: none;
}

.auth-input-box.has-success .auth-check-icon {
  display: block;
}

.auth-password-strength {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 3px;
  display: none;
}

.auth-password-strength.show {
  display: inline-block;
}

.auth-password-strength.weak {
  color: #ff4d4f;
  background: #fff2f0;
}

.auth-password-strength.medium {
  color: #faad14;
  background: #fffbe6;
}

.auth-password-strength.strong {
  color: #52c41a;
  background: #f6ffed;
}

/* SMS Button inside input box */
.auth-sms-btn {
  flex-shrink: 0;
  height: 50px;
  padding: 0 24px;
  background: var(--auth-primary);
  border: none;
  border-left: 1px solid var(--auth-border);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  border-radius: 0 5px 5px 0;
}

.auth-sms-btn:hover:not(:disabled) {
  background: var(--auth-primary-dark);
}

.auth-sms-btn:disabled {
  background: #d9d9d9;
  color: #999;
  cursor: not-allowed;
}

/* Right Side Tip */
.auth-tip {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.auth-tip-content {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  background: #e6f4ff;
  border: 1px solid #91caff;
  border-radius: 4px;
  font-size: 13px;
  color: #1677ff;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tip-content::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  border: 7px solid transparent;
  border-right-color: #91caff;
  border-left: none;
}

.auth-tip-content::after {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: #e6f4ff;
  border-left: none;
}

.auth-tip-content.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.auth-tip-content.error {
  color: var(--auth-error);
  border-color: #ffccc7;
  background: #fff2f0;
}

.auth-tip-content.error::before {
  border-right-color: #ffccc7;
}

.auth-tip-content.error::after {
  border-right-color: #fff2f0;
}

.auth-tip-content.success {
  color: var(--auth-success);
  border-color: #b7eb8f;
  background: #f6ffed;
}

.auth-tip-content.success::before {
  border-right-color: #b7eb8f;
}

.auth-tip-content.success::after {
  border-right-color: #f6ffed;
}

/* ========== Agreement ========== */
.auth-agreement {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px 0;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.5s ease forwards;
  animation-delay: 0.4s;
}

.auth-checkbox {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--auth-primary);
  cursor: pointer;
  margin-right: 10px;
  transition: transform 0.2s;
}

.auth-checkbox:hover {
  transform: scale(1.1);
}

.auth-agreement-text {
  font-size: 14px;
  color: var(--auth-text-secondary);
  line-height: 1.6;
}

.auth-agreement-text a {
  color: var(--auth-primary);
  text-decoration: none;
  transition: color 0.3s;
}

.auth-agreement-text a:hover {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

/* ========== Submit Button ========== */
.auth-btn-wrap {
  display: flex;
  justify-content: center;
}

.auth-submit-btn {
  width: 480px;
  height: 52px;
  background: var(--auth-primary);
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.5s ease forwards;
  animation-delay: 0.45s;
  position: relative;
  overflow: hidden;
}

.auth-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}

.auth-submit-btn:hover:not(:disabled)::before {
  left: 100%;
}

.auth-submit-btn:hover:not(:disabled) {
  background: var(--auth-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 109, 232, 0.35);
}

.auth-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit-btn:disabled,
.auth-submit-btn.disabled {
  background: #d1d5db;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.auth-submit-btn.disabled::before {
  display: none;
}

/* ========== Card Footer ========== */
.auth-card-footer {
  padding: 20px 40px;
  background: var(--auth-bg);
  border-top: 1px solid var(--auth-border);
  text-align: center;
}

.auth-footer-text {
  font-size: 14px;
  color: var(--auth-text-secondary);
  margin: 0;
}

.auth-footer-text a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
}

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

/* ========== Features ========== */
.auth-features {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
}

.auth-feature {
  text-align: center;
}

.auth-feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, rgba(43, 109, 232, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--auth-primary);
}

.auth-feature-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--auth-text);
  margin: 0;
}

/* ========== Forget Password Page Specific ========== */
.auth-steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.auth-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--auth-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--auth-text-muted);
  transition: all 0.3s;
}

.auth-step.active {
  background: var(--auth-primary);
  color: #fff;
  transform: scale(1.1);
}

.auth-step.done {
  background: var(--auth-success);
  color: #fff;
}

.auth-step-line {
  width: 40px;
  height: 2px;
  background: var(--auth-border);
  transition: background 0.3s;
}

.auth-step.done + .auth-step-line,
.auth-step-line:has(+ .auth-step.active),
.auth-step-line:has(+ .auth-step.done) {
  background: var(--auth-success);
}

.auth-step-desc {
  text-align: center;
  font-size: 15px;
  color: var(--auth-text-secondary);
  margin-bottom: 24px;
}

.auth-recover-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}

.auth-recover-option {
  width: 100%;
}

.auth-recover-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--auth-white);
  border: 2px solid var(--auth-border);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--auth-text);
  cursor: pointer;
  transition: all 0.3s;
}

.auth-recover-btn svg {
  width: 24px;
  height: 24px;
  color: var(--auth-primary);
  transition: color 0.3s;
}

.auth-recover-btn:hover:not(.disabled) {
  border-color: var(--auth-primary);
  background: #f0f5ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 109, 232, 0.15);
}

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

.auth-verify-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #e6f4ff 0%, #f0f5ff 100%);
  border: 1px solid #91caff;
  border-radius: 10px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--auth-text);
}

.auth-verify-info svg {
  width: 24px;
  height: 24px;
  color: var(--auth-primary);
  flex-shrink: 0;
}

.auth-verify-info strong {
  color: var(--auth-primary);
  font-weight: 600;
  letter-spacing: 1px;
}

.auth-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 40px;
}

/* ========== Login Page Specific ========== */
.auth-links-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 28px;
  padding: 0 180px;
}

.auth-link-primary {
  color: var(--auth-primary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.auth-link-primary:hover {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

.auth-link-muted {
  color: var(--auth-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.auth-link-muted:hover {
  color: var(--auth-primary);
}

.auth-switch-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  background: var(--auth-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.auth-switch-btn:hover {
  border-color: var(--auth-primary);
  background: #f0f5ff;
}

.auth-switch-btn img {
  width: 24px;
  height: 24px;
}

/* OAuth Section */
.auth-oauth {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--auth-border);
}

.auth-oauth-divider {
  text-align: center;
  position: relative;
  margin-bottom: 20px;
}

.auth-oauth-divider span {
  background: var(--auth-white);
  padding: 0 16px;
  font-size: 13px;
  color: var(--auth-text-muted);
  position: relative;
  z-index: 1;
}

.auth-oauth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--auth-border);
}

.auth-oauth-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.auth-oauth-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  border: 1px solid var(--auth-border);
  background: var(--auth-white);
}

.auth-oauth-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.auth-oauth-btn img {
  width: 28px;
  height: 28px;
}

/* WeChat QR Code */
.auth-wx-qrcode {
  text-align: center;
  padding: 20px 0;
}

.auth-wx-loading {
  padding: 60px 0;
  color: var(--auth-text-muted);
}

.auth-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--auth-border);
  border-top-color: var(--auth-primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

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

.auth-wx-img {
  display: none;
}

.auth-wx-img img {
  width: 220px;
  height: 220px;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
}

.auth-wx-tip {
  margin-top: 16px;
  font-size: 14px;
  color: var(--auth-text-secondary);
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
  .auth-spacer,
  .auth-tip {
    display: none;
  }
  
  .auth-input-box {
    flex: 1;
    width: auto;
  }
  
  .auth-submit-btn {
    width: 100%;
  }
  
  .auth-links-row {
    padding: 0;
  }
}

@media (max-width: 768px) {
  .auth-hero {
    padding: 80px 0 50px;
  }
  
  .auth-hero .container {
    flex-direction: column;
    text-align: center;
  }
  
  .auth-hero-content {
    order: 1;
  }
  
  .auth-hero-illustration {
    display: none;
  }
  
  .auth-hero-features {
    justify-content: center;
  }
  
  .auth-hero-title {
    font-size: 28px;
  }
  
  .auth-main {
    padding: 40px 0 60px;
  }
  
  .auth-card {
    margin-top: -60px;
    border-radius: 12px;
  }
  
  .auth-card-header {
    padding: 24px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .auth-card-body {
    padding: 30px 24px 36px;
  }
  
  .auth-card-footer {
    padding: 18px 24px;
  }
  
  .auth-form-label {
    width: 80px;
    font-size: 13px;
  }
  
  .auth-input {
    height: 46px;
    font-size: 14px;
  }
  
  .auth-sms-btn {
    height: 46px;
    padding: 0 14px;
    font-size: 13px;
  }
  
  .auth-submit-btn {
    width: 100%;
    height: 48px;
    font-size: 16px;
  }
  
  .auth-features {
    gap: 20px;
  }
  
  .auth-feature-icon {
    width: 44px;
    height: 44px;
  }
  
  .auth-feature-title {
    font-size: 13px;
  }
}
