.auth-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.auth-modal-overlay.active {
  display: flex;
}

.auth-modal-box {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: authModalSlideIn 0.3s ease;
}

@keyframes authModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

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

.auth-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.auth-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.auth-modal-header {
  padding: 30px 30px 20px;
  text-align: center;
}

.auth-modal-logo {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
}

.auth-modal-logo span:first-child {
  color: #4da6ff;
}

.auth-modal-logo span:last-child {
  color: #ffcc00;
}

.auth-modal-title {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.auth-modal-subtitle {
  font-size: 14px;
  color: #666;
}

.auth-modal-subtitle a {
  color: #4da6ff;
  text-decoration: none;
  cursor: pointer;
}

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

.auth-modal-body {
  padding: 0 30px 30px;
}

.auth-form-panel {
  display: none;
}

.auth-form-panel.is-active {
  display: block;
}

.auth-form-group {
  margin-bottom: 16px;
}

.auth-form-input {
  width: 100%;
  padding: 14px 16px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  color: #333;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}

.auth-form-input::placeholder {
  color: #999;
}

.auth-form-input:focus {
  border-color: #4da6ff;
  background: #fff;
}

.auth-form-input-group {
  display: flex;
  gap: 10px;
}

.auth-form-input-group .auth-form-input {
  flex: 1;
}

.auth-form-input-group .auth-code-btn {
  flex-shrink: 0;
  padding: 0 16px;
  background: linear-gradient(135deg, #4da6ff, #667eea);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.auth-form-input-group .auth-code-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.auth-form-input-group .auth-code-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-password-wrapper {
  position: relative;
}

.auth-password-wrapper .auth-form-input {
  padding-right: 45px;
}

.auth-password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 5px;
  font-size: 16px;
}

.auth-password-toggle:hover {
  color: #666;
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 14px;
}

.auth-form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  cursor: pointer;
}

.auth-form-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #4da6ff;
}

.auth-form-link {
  color: #4da6ff;
  text-decoration: none;
  cursor: pointer;
}

.auth-form-link:hover {
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4da6ff, #667eea);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 5px 20px rgba(77, 166, 255, 0.3);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-submit-btn i {
  font-size: 14px;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 25px 0;
  color: #999;
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

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

.auth-social-login {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.auth-social-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.2s;
}

.auth-social-btn.wechat {
  background: #07c160;
  color: #fff;
}

.auth-social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.auth-agreement {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #888;
  line-height: 1.6;
}

.auth-agreement a {
  color: #4da6ff;
  text-decoration: none;
}

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

.auth-agreement-compact {
  margin-top: 15px;
}

.auth-clickable-link {
  cursor: pointer;
}

.auth-alert {
  padding: 12px 15px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  display: none;
}

.auth-alert.show {
  display: block;
}

.auth-alert.error {
  background: #fef2f2;
  color: #dc3545;
  border: 1px solid #fecaca;
}

.auth-alert.success {
  background: #f0fdf4;
  color: #28a745;
  border: 1px solid #bbf7d0;
}

.auth-alert.info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

body.body-no-scroll {
  overflow: hidden;
}

@media (max-width: 480px) {
  .auth-modal-box {
    width: 95%;
    max-width: none;
    margin: 10px;
    border-radius: 12px;
  }

  .auth-modal-header {
    padding: 25px 20px 15px;
  }

  .auth-modal-body {
    padding: 0 20px 25px;
  }

  .auth-modal-logo {
    font-size: 24px;
  }

  .auth-modal-title {
    font-size: 20px;
  }

  .auth-form-input {
    padding: 12px 14px;
    font-size: 14px;
  }

  .auth-submit-btn {
    padding: 12px;
    font-size: 15px;
  }
}
