/* 移动端优化样式 */
:root {
  --primary-color: #3b82f6;
  --primary-gradient: linear-gradient(135deg, #3b82f6, #1d4ed8);
  --secondary-color: #8b5cf6;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* 移动端优化 */
@media (max-width: 768px) {
  body {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
  }
  
  .container-wrapper {
    max-width: 100%;
    padding: 16px;
  }
  
  .full-bg {
    display: none; /* 在移动端隐藏大背景图 */
  }
}

/* 卡片式设计 */
.mobile-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0;
  margin: 0 auto 24px;
  border: none;
  position: relative;
  overflow: hidden;
}

/* 卡片头部美化 */
.card-header {
  background: var(--primary-gradient);
  padding: 32px 24px 24px;
  color: white;
  text-align: center;
  position: relative;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6, #10b981);
}

.avatar-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  padding: 4px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  color: white;
}

.card-subtitle {
  font-size: 14px;
  opacity: 0.9;
  margin: 0;
}

/* 卡片主体 */
.card-body {
  padding: 32px 24px;
}

/* 输入框美化 */
.input-group-mobile {
  position: relative;
  margin-bottom: 20px;
}

.input-group-mobile .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  z-index: 2;
  font-size: 18px;
}

.input-field {
  width: 100%;
  padding: 18px 18px 18px 52px;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-md);
  font-size: 16px;
  transition: all 0.3s ease;
  background: var(--bg-light);
  color: var(--text-primary);
}

.input-field:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: white;
}

.input-field::placeholder {
  color: #9ca3af;
}

/* 按钮美化 */
.btn-mobile {
  display: block;
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 8px 0;
  position: relative;
  overflow: hidden;
}

.btn-primary-mobile {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary-mobile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary-mobile {
  background: var(--bg-light);
  color: var(--text-primary);
  border: 2px solid #e5e7eb;
}

.btn-secondary-mobile:hover {
  background: white;
  border-color: var(--primary-color);
}

.btn-danger-mobile {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* 验证码区域美化 */
.captcha-container {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0;
  text-align: center;
}

.captcha-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 社交登录按钮 */
.social-login {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}

.social-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
  cursor: pointer;
}

.social-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.social-btn.qq {
  border-color: #00b2ff;
  color: #00b2ff;
}

.social-btn.wx {
  border-color: #07c160;
  color: #07c160;
}

/* 链接按钮 */
.link-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

.link-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.link-btn.primary {
  background: var(--bg-light);
  color: var(--text-primary);
}

.link-btn.primary:hover {
  background: #e5e7eb;
}

.link-btn.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.link-btn.danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

/* 加载动画美化 */
.loading-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
}

.loading-dots div {
  width: 12px;
  height: 12px;
  margin: 0 6px;
  border-radius: 50%;
  background: var(--primary-color);
  animation: loading 1.4s ease-in-out infinite;
}

.loading-dots div:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots div:nth-child(3) {
  animation-delay: 0.4s;
}

.loading-dots div:nth-child(4) {
  animation-delay: 0.6s;
}

@keyframes loading {
  0%, 100% {
    transform: scale(0);
    opacity: 0.3;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 响应式调整 */
@media (min-width: 768px) {
  .container-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 24px;
  }
  
  .mobile-card {
    margin: 40px auto;
  }
}

/* 表单分割线 */
.form-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.form-divider span {
  padding: 0 16px;
}

/* 返回按钮 */
.back-home {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 100;
  background: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.back-home:hover {
  transform: scale(1.1);
  color: var(--primary-color);
}