/* ===== 文件：auth.css ===== */

.auth-page {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f3ff 100%);
  display: flex;
  flex-direction: column;
}

.auth-header {
  position: relative;
  z-index: 10;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 80px;
  margin-top: 64px;
}

.auth-container {
  max-width: 1000px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.auth-brand {
  background: linear-gradient(135deg, #165DFF 0%, #4080ff 100%);
  padding: 60px 40px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  animation: brandPulse 6s ease-in-out infinite;
}

@keyframes brandPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.brand-content {
  position: relative;
  z-index: 1;
}

.brand-slogan {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 24px;
}

.brand-value {
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.95;
  margin-bottom: 28px;
}

.brand-positioning {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  backdrop-filter: blur(10px);
  margin-bottom: auto;
}

.brand-notice {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.7;
}

.auth-form-area {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-title {
  font-size: 26px;
  font-weight: 700;
  color: #1d2129;
  margin-bottom: 8px;
}

.form-subtitle {
  font-size: 14px;
  color: #86909c;
  margin-bottom: 32px;
}

.tab-switcher {
  display: flex;
  gap: 4px;
  background: #f2f3f5;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 28px;
}

.tab-item {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #86909c;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
}

.tab-item.active {
  background: #fff;
  color: #165DFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #4e5969;
  margin-bottom: 8px;
}

.input-with-action {
  position: relative;
  display: flex;
  gap: 12px;
}

.input-with-action input {
  flex: 1;
}

.captcha-wrapper {
  position: relative;
}

.captcha-img {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #e5e5e5;
}

.btn-send-code {
  white-space: nowrap;
  padding: 12px 20px;
  min-width: 120px;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  cursor: pointer;
  accent-color: #165DFF;
}

.checkbox-group label {
  font-size: 13px;
  color: #86909c;
  line-height: 1.6;
  cursor: pointer;
}

.checkbox-group a {
  color: #165DFF;
}

.form-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f2f3f5;
  font-size: 14px;
  color: #86909c;
}

.form-footer a {
  color: #165DFF;
  font-weight: 500;
}

.form-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 13px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #165DFF;
}

.forgot-link {
  color: #165DFF;
  cursor: pointer;
}

.form-notice {
  margin-top: 20px;
  padding: 14px 16px;
  background: #fff7e8;
  border-radius: 6px;
  font-size: 12px;
  color: #996b00;
  line-height: 1.7;
  text-align: center;
}

.form-warm-tip {
  margin-top: 12px;
  padding: 12px 16px;
  background: #f0f7ff;
  border: 1px solid #d6e4ff;
  border-radius: 6px;
  font-size: 12px;
  color: #4e5969;
  line-height: 1.7;
}

.warm-tip-title {
  font-weight: 600;
  color: #165DFF;
  margin-bottom: 6px;
  font-size: 13px;
}

.warm-tip-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.warm-tip-list li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 4px;
}

.warm-tip-list li:last-child {
  margin-bottom: 0;
}

.warm-tip-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #165DFF;
  font-weight: bold;
}

.tip-warn {
  color: #e65c00;
  font-weight: 600;
}

.steps-container {
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.steps-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 36px;
  gap: 8px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #c9cdd4;
  font-weight: 500;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e5e5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.step-item.active .step-number,
.step-item.completed .step-number {
  background: #165DFF;
}

.step-item.active {
  color: #165DFF;
}

.step-item.completed {
  color: #00B42A;
}

.step-line {
  width: 60px;
  height: 2px;
  background: #e5e5e5;
}

.step-line.completed {
  background: #00B42A;
}

.step-content {
  display: none;
}

.step-content.active {
  display: block;
}

.success-state {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: #e8ffea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 36px;
  height: 36px;
  fill: #00B42A;
}

.success-state h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1d2129;
  margin-bottom: 12px;
}

.success-state p {
  font-size: 14px;
  color: #86909c;
  margin-bottom: 28px;
}

.auth-page .site-footer {
  margin-top: 0;
  background: transparent;
  padding: 24px 0;
}

@media (max-width: 768px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 16px;
  }

  .auth-brand {
    padding: 40px 28px;
  }

  .brand-slogan {
    font-size: 22px;
  }

  .auth-form-area {
    padding: 36px 28px;
  }

  .form-title {
    font-size: 22px;
  }

  .btn-send-code {
    min-width: 100px;
    padding: 12px 16px;
    font-size: 13px;
  }

  .auth-main {
    padding: 24px 16px 60px;
    margin-top: 56px;
  }

  .auth-brand {
    display: none;
  }

  .auth-form-area {
    padding: 28px 20px;
  }

  .form-title {
    font-size: 20px;
  }

  .form-warm-tip {
    padding: 10px 12px;
    margin-top: 10px;
  }

  .warm-tip-title {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .warm-tip-list li {
    padding-left: 12px;
  }
}

.agreement-link {
  color: #165DFF;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.agreement-link:hover {
  color: #4080ff;
  text-decoration: underline;
}

.agreement-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agreement-modal:not([style*="display: none"]) .modal-overlay {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-container {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
  z-index: 1;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e6eb;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1d2129;
  margin: 0;
}

.modal-body {
  flex: 1;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.modal-body iframe {
  width: 100%;
  height: 55vh;
  border: none;
  position: relative;
  z-index: 1;
}

.iframe-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #86909c;
  font-size: 14px;
  z-index: 0;
  pointer-events: none;
}

.modal-body iframe:not([src="about:blank"]) ~ .iframe-loading {
  display: none;
}

.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid #e5e6eb;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-footer .btn {
  height: 44px;
  font-size: 15px;
  font-weight: 600;
  min-width: 200px;
  max-width: 300px;
  transition: all 0.25s ease;
  border-radius: 8px;
}

.modal-footer .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 93, 255, 0.35);
  background: #1470e6;
}

.modal-footer .btn:focus {
  outline: 3px solid rgba(22, 93, 255, 0.4);
  outline-offset: 2px;
}

.modal-footer .btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(22, 93, 255, 0.25);
}

@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    max-height: 85vh;
    -webkit-overflow-scrolling: touch;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-title {
    font-size: 16px;
  }

  .modal-body {
    -webkit-overflow-scrolling: touch;
  }

  .modal-body iframe {
    height: 58vh;
  }

  .modal-footer {
    padding: 12px 20px 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .modal-footer .btn {
    height: 40px;
    font-size: 14px;
    min-width: 160px;
    max-width: 260px;
  }
}