/**
 * 忘记密码组件样式
 * 可在 login.html、邀请登录页面、分享登录页面等多个页面中复用
 * 
 * 使用方法：
 * <link rel="stylesheet" href="./forgot-password.css" />
 */

/* 忘记密码弹窗 */
.forgot-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.forgot-modal-overlay.show {
  display: flex;
}

.forgot-modal {
  width: 420px;
  max-width: 90vw;
  background: rgba(13, 31, 58, 0.95);
  border: 1px solid rgba(0, 188, 212, 0.2);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 188, 212, 0.1);
  overflow: hidden;
}

.forgot-modal-header {
  padding: 24px 28px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #e8edf5;
}

.forgot-modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.forgot-modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e8edf5;
}

.forgot-modal-body {
  padding: 0 28px 24px;
}

.forgot-modal-body .form-group {
  margin-bottom: 16px;
}

.forgot-modal-body label {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.forgot-modal-body .input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.forgot-modal-body .input-wrap input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #e8edf5;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.forgot-modal-body .input-wrap input:focus {
  border-color: rgba(0, 188, 212, 0.3);
}

.forgot-modal-body .input-wrap input::placeholder {
  color: #4a6078;
}

.forgot-modal-body .input-wrap input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}

.forgot-modal-body .input-wrap .icon {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

.forgot-modal-body .input-wrap input.has-icon {
  padding-left: 36px;
}

.forgot-modal-body .code-row {
  display: flex;
  gap: 8px;
}

.forgot-modal-body .code-row .input-wrap {
  flex: 1;
}

.forgot-modal-body .send-code-btn {
  padding: 10px 14px;
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.3s;
}

.forgot-modal-body .send-code-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.25);
}

.forgot-modal-body .send-code-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.forgot-modal-body .forgot-error {
  background: rgba(255, 23, 68, 0.06);
  border: 1px solid rgba(255, 23, 68, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  color: #ff8a80;
  display: none;
  margin-bottom: 12px;
}

.forgot-modal-body .forgot-error.show {
  display: block;
}

.forgot-modal-body .forgot-success {
  background: rgba(0, 230, 118, 0.06);
  border: 1px solid rgba(0, 230, 118, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.75rem;
  color: #69f0ae;
  display: none;
  margin-bottom: 12px;
}

.forgot-modal-body .forgot-success.show {
  display: block;
}

.forgot-modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  gap: 10px;
}

.forgot-modal-footer button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  font-family: inherit;
}

.forgot-modal-footer .cancel-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.forgot-modal-footer .cancel-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e8edf5;
}

.forgot-modal-footer .submit-btn {
  background: linear-gradient(135deg, #00bcd4, #0097a7);
  border: none;
  color: #fff;
}

.forgot-modal-footer .submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 188, 212, 0.25);
}

.forgot-modal-footer .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}