.auth-card {
  width: min(440px, 100%);
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(238, 242, 255, 0.8));
  box-shadow: 20px 20px 40px rgba(15, 23, 42, 0.12), -20px -20px 40px rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease;
}

.auth-card:hover {
  box-shadow: 24px 24px 48px rgba(15, 23, 42, 0.15), -24px -24px 48px rgba(255, 255, 255, 0.95);
  transform: translateY(-5px);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(400px 200px at 16% 0%, rgba(79, 70, 229, 0.1), transparent 72%),
              radial-gradient(300px 150px at 84% 100%, rgba(236, 72, 153, 0.1), transparent 72%);
}

.auth-title {
  font-size: 28px;
  margin-bottom: 8px;
  letter-spacing: -0.35px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeIn 0.8s ease;
}

.auth-subtitle {
  margin-bottom: 24px;
  animation: fadeIn 0.8s ease 0.2s both;
}

.auth-alert {
  margin-bottom: 16px;
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.62), inset -2px -2px 4px rgba(15, 23, 42, 0.03);
  animation: fadeIn 0.8s ease 0.3s both;
}

.auth-card .form-group {
  gap: 8px;
  animation: fadeIn 0.8s ease 0.4s both;
}

.auth-card .form-group label {
  font-weight: 700;
  letter-spacing: 0.1px;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.auth-card .form-group:focus-within label {
  color: var(--primary);
}

.auth-card .input {
  background: linear-gradient(160deg, rgba(241, 244, 255, 0.8), rgba(255, 255, 255, 0.76));
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: inset 3px 3px 8px rgba(15, 23, 42, 0.06), inset -3px -3px 8px rgba(255, 255, 255, 0.86);
  transition: all 0.3s ease;
}

.auth-card .input:focus {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 3px 3px 8px rgba(15, 23, 42, 0.05), inset -3px -3px 8px rgba(255, 255, 255, 0.9), 0 0 0 3px rgba(79, 70, 229, 0.16);
  transform: translateY(-1px);
}

.auth-card .input::placeholder {
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.auth-card .input:focus::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.password-field {
  position: relative;
}

.password-field .input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(248, 250, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.65);
  cursor: pointer;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 12px;
  box-shadow: 4px 4px 10px rgba(15, 23, 42, 0.08), -4px -4px 10px rgba(255, 255, 255, 0.86);
  transition: all 0.3s ease;
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  transform: translateY(-50%) translateY(-2px);
  box-shadow: 6px 6px 12px rgba(15, 23, 42, 0.1), -6px -6px 12px rgba(255, 255, 255, 0.9);
}

.password-toggle:active {
  box-shadow: inset 3px 3px 8px rgba(15, 23, 42, 0.12), inset -3px -3px 8px rgba(255, 255, 255, 0.9);
  transform: translateY(-50%);
}

.auth-submit {
  width: 100%;
  height: 48px;
  box-shadow: 12px 12px 24px rgba(15, 23, 42, 0.16), -12px -12px 24px rgba(255, 255, 255, 0.82);
  transition: all 0.3s ease;
  animation: fadeIn 0.8s ease 0.6s both;
  position: relative;
  overflow: hidden;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 16px 16px 32px rgba(15, 23, 42, 0.18), -16px -16px 32px rgba(255, 255, 255, 0.85);
}

.auth-submit:active {
  transform: translateY(0);
  box-shadow: inset 4px 4px 10px rgba(15, 23, 42, 0.18), inset -4px -4px 10px rgba(255, 255, 255, 0.3);
}

.auth-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.auth-submit:hover::before {
  left: 100%;
}

.auth-foot {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  animation: fadeIn 0.8s ease 0.7s both;
}

.auth-foot a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 650;
  transition: all 0.3s ease;
  position: relative;
}

.auth-foot a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

.auth-foot a:hover::after {
  width: 100%;
}

/* 品牌徽章动画 */
.brand-badge {
  animation: bounceIn 0.8s ease;
  position: relative;
  overflow: hidden;
}

.brand-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.6s ease;
}

.brand-badge:hover::before {
  left: 100%;
}

/* 登录页面背景效果 */
body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* 背景装饰元素 */
body::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(79, 70, 229, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  z-index: -1;
}

/* 表单验证样式 */
.help-error {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s ease;
}

.input:invalid:focus + .help-error {
  opacity: 1;
  transform: translateY(0);
}

/* 输入框图标 */
.input-wrapper {
  position: relative;
}

.input-wrapper::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.input-wrapper.username::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
}

.input-wrapper.password::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
}

.input-wrapper input {
  padding-left: 44px;
}

/* 动画定义 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(5%, 5%) rotate(1deg);
  }
  50% {
    transform: translate(0, 10%) rotate(0deg);
  }
  75% {
    transform: translate(-5%, 5%) rotate(-1deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .auth-card {
    width: min(90%, 440px);
    margin: 0 auto;
  }
  
  .auth-title {
    font-size: 24px;
  }
  
  .auth-card:hover {
    transform: none;
  }
}

/* 加载动画 */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
