/* ============================================
   登录/注册页面样式 - 禅意·极简大气 (Zen-Minimalism)
   设计理念：干净、简洁、专注于表单本身
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* 极简色彩 */
  --bg-page: #FBFBFB;
  --bg-card: #FFFFFF;
  --bg-elevated: #F5F5F7;
  
  /* 主色 - 纯黑 */
  --primary: #1D1D1F;
  --primary-light: #424245;
  --primary-glow: rgba(0, 0, 0, 0.06);
  
  /* 强调色 */
  --accent: #0071E3;
  
  /* 文字 */
  --text-primary: #1D1D1F;
  --text-secondary: #424245;
  --text-muted: #86868B;
  
  /* 边框 */
  --border: rgba(0, 0, 0, 0.06);
  --border-focus: rgba(0, 0, 0, 0.12);
  
  /* 其他 */
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 背景装饰 - 极简几何 */
.auth-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, #E8E8ED, #D1D1D6);
  top: -300px;
  right: -200px;
  animation: float1 30s ease-in-out infinite;
}

.shape-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #F5F5F7, #E5E5EA);
  bottom: -200px;
  left: -200px;
  animation: float2 35s ease-in-out infinite;
}

.shape-3 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #E8E8ED, #F5F5F7);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float3 25s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 20px) scale(1.05); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -15px) scale(1.03); }
}

@keyframes float3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* 卡片 */
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}

/* 头部 */
.auth-header {
  text-align: center;
  margin-bottom: 36px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 28px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: #1B1B1F;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: white;
  padding: 8px;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-header h1 {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

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

/* 表单 */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  font-size: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-wrapper input {
  width: 100%;
  height: 50px;
  padding: 0 18px 0 48px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg-elevated);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.input-wrapper input:focus {
  outline: none;
  background: var(--bg-card);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:has(input:focus) .input-icon {
  color: var(--primary);
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 提交按钮 */
.btn-submit {
  height: 50px;
  background: #1B1B1F;
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.btn-submit:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

.btn-submit:active {
  transform: scale(0.99);
}

/* 底部 */
.auth-footer {
  margin-top: 28px;
  text-align: center;
}

.auth-footer p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: var(--primary);
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted) !important;
  font-weight: 400 !important;
}

.back-home:hover {
  color: var(--primary) !important;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  border-left: 4px solid #34C759;
}

.toast.error {
  border-left: 4px solid #FF3B30;
}

/* 验证码 */
.captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.captcha-input {
  flex: 1;
}

.captcha-input input {
  padding-left: 18px;
}

.captcha-img {
  width: 130px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f5f7;
}

.captcha-img svg {
  width: 100%;
  height: 100%;
}

/* 响应式 */
@media (max-width: 480px) {
  .auth-card {
    padding: 36px 24px;
    border-radius: 12px;
  }
  
  .auth-header h1 {
    font-size: 22px;
  }
  
  .logo-icon {
    width: 40px;
    height: 40px;
    padding: 7px;
  }
  
  .logo-text {
    font-size: 18px;
  }
  
  .input-wrapper input {
    height: 48px;
  }
  
  .btn-submit {
    height: 48px;
  }
}

/* ==================== 夜间模式 ==================== */
[data-theme="dark"] body {
  background: #0F0F12;
}

[data-theme="dark"] .auth-card {
  background: #1E1E28;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

[data-theme="dark"] .auth-header h1 {
  color: #EEEEF0;
}

[data-theme="dark"] .auth-header p {
  color: #6B6B76;
}

[data-theme="dark"] .form-group label {
  color: #A0A0AB;
}

[data-theme="dark"] .input-wrapper {
  background: #252530;
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .input-wrapper input {
  color: #EEEEF0;
}

[data-theme="dark"] .input-wrapper input::placeholder {
  color: #6B6B76;
}

[data-theme="dark"] .input-icon {
  color: #6B6B76;
}

[data-theme="dark"] .auth-footer p,
[data-theme="dark"] .auth-footer a {
  color: #6B6B76;
}

[data-theme="dark"] .auth-footer a:hover {
  color: #FF6B35;
}

[data-theme="dark"] .back-home {
  color: #6B6B76;
}

[data-theme="dark"] .input-hint {
  color: #6B6B76;
}

[data-theme="dark"] .toast {
  background: #1E1E28;
  color: #EEEEF0;
}

[data-theme="dark"] .captcha-img {
  background: #252530;
}

[data-theme="dark"] .bg-shape {
  opacity: 0.3;
}
