﻿/* ===== 登录/注册页共享样式 ===== */

/* 背景装饰 */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--auth-bg, linear-gradient(135deg, #f0f2ff 0%, #fdf0e6 50%, #f0f5ff 100%));
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .auth-page {
  background: linear-gradient(135deg, #0f0f1a 0%, #16162a 50%, #0a0a1e 100%);
}

/* 装饰图形 */
.bg-shape {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.bg-shape-1 {
  width: 500px; height: 500px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(90,124,249,0.12) 0%, transparent 70%);
}
.bg-shape-2 {
  width: 350px; height: 350px;
  bottom: -100px; left: -80px;
  background: radial-gradient(circle, rgba(249,115,90,0.1) 0%, transparent 70%);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}
.bg-shape-3 {
  width: 200px; height: 200px;
  top: 40%; left: 60%;
  background: radial-gradient(circle, rgba(90,124,249,0.06) 0%, transparent 70%);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}
.bg-shape-4 {
  width: 120px; height: 120px;
  bottom: 25%; right: 15%;
  background: radial-gradient(circle, rgba(249,115,90,0.08) 0%, transparent 70%);
  border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
}
[data-theme="dark"] .bg-shape-1 { background: radial-gradient(circle, rgba(109,140,255,0.1) 0%, transparent 70%); }
[data-theme="dark"] .bg-shape-2 { background: radial-gradient(circle, rgba(249,115,90,0.08) 0%, transparent 70%); }
[data-theme="dark"] .bg-shape-3 { background: radial-gradient(circle, rgba(109,140,255,0.05) 0%, transparent 70%); }
[data-theme="dark"] .bg-shape-4 { background: radial-gradient(circle, rgba(249,115,90,0.06) 0%, transparent 70%); }

/* 浮动装饰圆点 */
.float-dot {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: floatUpDown 4s ease-in-out infinite;
}
.dot-1 { width: 6px; height: 6px; background: var(--primary); opacity: 0.18; bottom: 22%; left: 8%; animation-delay: 0s; }
.dot-2 { width: 5px; height: 5px; background: #f9735a; opacity: 0.14; top: 18%; right: 15%; animation-delay: 1.5s; }
.dot-3 { width: 4px; height: 4px; background: var(--primary); opacity: 0.12; top: 60%; left: 55%; animation-delay: 3s; }

@keyframes floatUpDown {
  0%, 100% { transform: translateY(0); opacity: 0.15; }
  50% { transform: translateY(-18px); opacity: 0.3; }
}

/* 角落品牌标识 */
.bg-corner-logo {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  font-size: 120px;
  line-height: 1;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -4px;
}
.bg-corner-logo.tl {
  top: -20px; left: -10px;
  transform: rotate(-8deg);
}
.bg-corner-logo.br {
  bottom: -30px; right: -10px;
  transform: rotate(12deg);
}

/* 卡片主体 */
.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  background-image: var(--auth-card-inner, linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 100%));
  border-radius: 18px;
  padding: 38px 36px 32px;
  animation: cardEnter .55s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
  box-shadow: 0 4px 24px rgba(90,124,249,0.06), 0 12px 48px rgba(0,0,0,0.04);
}
[data-theme="dark"] .auth-card {
  background-image: linear-gradient(180deg, rgba(26,26,46,0.6) 0%, transparent 100%);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 12px 48px rgba(0,0,0,0.15);
}
.auth-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(90,124,249,0.1), 0 20px 64px rgba(0,0,0,0.06);
}
[data-theme="dark"] .auth-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 20px 64px rgba(0,0,0,0.2);
}
.auth-card.fade-out {
  animation: cardExit .3s ease forwards;
}

/* 顶部装饰条 */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #f9735a, var(--primary));
  border-radius: 0 0 3px 3px;
  opacity: 0.6;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(30px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cardExit {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-20px) scale(.96); }
}

/* 卡片头部 */
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.auth-header .auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-header .auth-logo img {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
.auth-header .auth-logo span {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.auth-header .theme-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  flex-shrink: 0;
}
.auth-header .theme-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* 标题 */
.auth-title-wrap { margin-bottom: 28px; }
.auth-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--primary) 0%, #f9735a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* 表单 */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.input-group {
  position: relative;
}
.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
  transition: color .25s ease;
  z-index: 1;
}
.input-group:focus-within .input-icon {
  color: var(--primary);
}
.input-group input[type="text"],
.input-group input[type="password"],
.input-group input[type="email"] {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all .28s ease;
}
.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light), inset 0 1px 4px rgba(0,0,0,0.02);
  transform: scale(1.005);
}
[data-theme="dark"] .input-group input:focus {
  box-shadow: 0 0 0 4px rgba(90,124,249,0.12), inset 0 1px 4px rgba(0,0,0,0.1);
}
.input-group input::placeholder { color: var(--text-muted); }

/* 密码显隐 */
.input-group .input-wrap {
  position: relative;
}
.input-group .input-wrap input {
  padding-right: 44px;
}
.input-group .pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border: none; border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .22s ease;
  z-index: 1;
}
.input-group .pwd-toggle:hover {
  color: var(--primary);
  background: var(--primary-light);
}
.input-group .pwd-toggle svg { width: 17px; height: 17px; }

/* 表单选项 */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 13px;
}
.form-options .remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-secondary);
}
.form-options .remember-me input {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-options .forgot-pwd {
  color: var(--primary);
  font-size: 13px;
}
.form-options .forgot-pwd:hover { text-decoration: underline; }

/* 按钮 */
.submit-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #4a6ce9 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .28s ease;
  position: relative;
  overflow: hidden;
}
.submit-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(90,124,249,0.3);
}
.submit-btn:active { transform: scale(.97); }
[data-theme="dark"] .submit-btn:hover {
  box-shadow: 0 6px 20px rgba(90,124,249,0.2);
}

/* 切换链接 */
.switch-link {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.switch-link a {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: color .2s ease;
}
.switch-link a:hover { text-decoration: underline; color: var(--primary-hover); }

/* 第三方登录 */
.social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color) 50%, transparent);
}
.social-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.social-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .28s ease;
}
.social-btn:hover {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary) 0%, #f9735a 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(90,124,249,0.2);
}
.social-btn .google-icon {
  font-size: 16px;
  font-weight: 700;
  font-family: serif;
}
.social-btn.placeholder {
  font-size: 20px;
  font-weight: 300;
  color: var(--text-muted);
}

/* 品牌标语 */
.brand-slogan {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.5;
  letter-spacing: 0.5px;
}

/* 移动端 */
@media (max-width: 480px) {
  .auth-page { padding: 20px 16px; }
  .auth-card { padding: 28px 22px 24px; border-radius: 14px; }
  .auth-title { font-size: 22px; }
  .bg-shape-1 { width: 300px; height: 300px; top: -100px; right: -80px; }
  .bg-shape-2 { width: 200px; height: 200px; bottom: -60px; left: -50px; }
  .bg-shape-3, .bg-shape-4, .bg-corner-logo, .float-dot { display: none; }
}

/* ===== 成功弹窗 ===== */
.success-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s ease;
}
.success-overlay.active {
  display: flex;
  opacity: 1;
}
.success-overlay.closing {
  opacity: 0;
  pointer-events: none;
}
.success-modal {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 36px 32px 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  animation: modalIn .35s cubic-bezier(.22,1,.36,1);
}
[data-theme="dark"] .success-modal {
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}
@keyframes modalIn {
  from { transform: scale(.88) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.success-modal .success-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(90,124,249,0.12), rgba(249,115,90,0.12));
  color: var(--primary);
  animation: iconPop .4s cubic-bezier(.22,1,.36,1) .15s both;
}
@keyframes iconPop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
.success-modal h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.success-modal p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}
.success-modal .submit-btn {
  max-width: 200px;
  margin: 0 auto;
}
