/* =====================================================
   登录 / 注册页 简约现代风
   ===================================================== */

:root {
  --primary: #059669;
  --primary-light: #34d399;
  --gradient: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;
  --border: #e5e7eb;
  --bg: #f8fafc;
  --surface: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro Display",
               "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

[v-cloak] { display: none !important; }

/* 页面容器 */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* 顶部 Hero - 简约白色 + 动画装饰 */
.auth-hero {
  background: #ffffff;
  padding: 40px 24px 50px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

/* 浮动装饰圆 */
.auth-hero .deco-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.auth-hero .deco-circle-1 {
  width: 120px; height: 120px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(52,211,153,0.04));
  top: -40px; right: -30px;
  animation: float 6s ease-in-out infinite;
}
.auth-hero .deco-circle-2 {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, rgba(52,211,153,0.06), rgba(110,231,183,0.03));
  bottom: 20px; left: -20px;
  animation: float 8s ease-in-out infinite 1s;
}
.auth-hero .deco-circle-3 {
  width: 40px; height: 40px;
  background: rgba(16,185,129,0.1);
  top: 60%; right: 15%;
  animation: pulse 4s ease-in-out infinite;
}

/* 浮动动画 */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* 粒子装饰 */
.auth-hero .particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-hero .particle {
  position: absolute;
  width: 4px; height: 4px;
  background: rgba(16,185,129,0.2);
  border-radius: 50%;
  animation: particle-float 10s linear infinite;
}
.auth-hero .particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 8s; }
.auth-hero .particle:nth-child(2) { left: 30%; top: 60%; animation-delay: 2s; animation-duration: 12s; }
.auth-hero .particle:nth-child(3) { left: 70%; top: 30%; animation-delay: 4s; animation-duration: 10s; }
.auth-hero .particle:nth-child(4) { left: 85%; top: 70%; animation-delay: 1s; animation-duration: 9s; }
.auth-hero .particle:nth-child(5) { left: 50%; top: 80%; animation-delay: 3s; animation-duration: 11s; }

@keyframes particle-float {
  0% { transform: translateY(100px) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

.auth-hero-content {
  position: relative;
  z-index: 1;
  max-width: 400px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: color 0.2s ease;
  text-decoration: none;
  font-weight: 500;
}
.back-link:hover { color: var(--primary); }
.back-link i { font-size: 12px; }

.auth-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-hero-brand .logo {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--gradient);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(5,150,105,0.2);
}
.auth-hero-brand .name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.auth-hero-brand .slogan {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 卡片区域 */
.auth-card-wrap {
  flex: 1;
  margin-top: -20px;
  position: relative;
  z-index: 2;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 32px 24px;
  min-height: calc(100vh - 180px);
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.auth-card .sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* 头像上传 */
.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.avatar-preview {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}
.avatar-preview:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}
.avatar-preview img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.avatar-preview .avatar-placeholder {
  font-size: 24px;
  color: var(--primary);
}
.avatar-preview .avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.avatar-preview:hover .avatar-overlay {
  opacity: 1;
}
.avatar-preview .avatar-overlay i {
  color: #fff;
  font-size: 18px;
}
.avatar-upload-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* 表单 */
.auth-card .el-form-item {
  margin-bottom: 16px;
}
.auth-card .el-input__inner {
  height: 50px !important;
  border-radius: var(--radius-md) !important;
  font-size: 15px !important;
  padding-left: 44px !important;
  border: 1px solid var(--border) !important;
  background: var(--bg) !important;
  transition: all 0.2s ease !important;
}
.auth-card .el-input__inner:focus {
  border-color: var(--primary) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(5,150,105,0.08) !important;
}
.auth-card .el-input__prefix {
  left: 14px !important;
  color: var(--text-soft);
  font-size: 16px;
}

/* 提交按钮 */
.auth-submit {
  height: 50px !important;
  width: 100% !important;
  border-radius: var(--radius-md) !important;
  background: var(--gradient) !important;
  border: none !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(5,150,105,0.2) !important;
  margin-top: 8px !important;
  letter-spacing: 0.5px !important;
  transition: all 0.2s ease !important;
}
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(5,150,105,0.3) !important;
}
.auth-submit:active {
  transform: translateY(0);
}

/* 切换链接 */
.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--primary);
  font-weight: 700;
  margin-left: 4px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.auth-switch a:hover {
  color: var(--primary-light);
}

/* Element UI 覆盖 */
.el-button--primary {
  background: var(--gradient) !important;
  border-color: transparent !important;
  font-weight: 600 !important;
  border-radius: var(--radius-md) !important;
}
.el-message {
  border-radius: var(--radius-md) !important;
}

/* 响应式 */
@media (min-width: 768px) {
  body {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdf4 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 0;
  }
  .auth-page {
    min-height: auto;
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: #fff;
  }
  .auth-hero {
    padding: 32px 28px 40px;
    border-bottom: none;
  }
  .auth-card {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    min-height: auto;
    box-shadow: none;
  }
}
