/* assets/css/login.css */
/* 统一登录/注册/找回密码页面样式 */

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --error: #ef4444;
  --success: #10b981;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 0.75rem;
  --transition: all 0.2s ease-in-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* 通用容器 */
.login-container,
.register-container {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

/* 登录页头部 */
.login-header {
  background: var(--primary);
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.login-header h2,
.register-header h2 {
  font-weight: 600;
  font-size: 1.5rem;
}

/* 注册页头部 */
.register-header {
  background: var(--primary);
  color: white;
  padding: 1.75rem;
  text-align: center;
}

/* 内容区域 */
.login-body,
.register-body {
  padding: 1.75rem;
}

/* 提示信息框 */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
}

.alert {
  background: var(--error);
  color: white;
}

.alert-success {
  background: var(--success);
  color: white;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 表单组 */
.form-group {
  margin-bottom: 1rem;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* 按钮通用样式 */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f3f4f6;
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-link {
  background: none;
  color: var(--primary);
}

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

/* 验证码和短信验证码行 */
.verification-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.verification-row input {
  flex: 1;
}

.verification-row button {
  white-space: nowrap;
  padding: 0.75rem 0.75rem;
  min-width: 90px;
}

/* 倒计时提示 */
.countdown {
  display: block;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* 表单操作按钮 */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

/* 表单页脚 */
.form-footer {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.875rem;
}

.form-footer a {
  color: var(--primary);
  text-decoration: none;
}

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

/* 响应式适配 */
@media (max-width: 480px) {
  .form-actions,
  .verification-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .btn,
  .verification-row button {
    width: 100%;
  }
}