.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: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: inset 2px 2px 5px rgba(15, 23, 42, 0.05), inset -2px -2px 5px rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

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

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

.code-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.code-row .input {
  flex: 1 1 220px;
  min-width: 0;
}

.code-btn {
  min-width: 116px;
  flex-shrink: 0;
  white-space: nowrap;
}

.form-tip {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.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%;
}





/* 动画定义 */
@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;
  }

  .code-row {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .code-row .input {
    flex: 0 1 160px;
    width: 160px;
  }

  .code-btn {
    width: auto;
    min-width: 104px;
    padding-left: 12px;
    padding-right: 12px;
  }
  
  .auth-title {
    font-size: 24px;
  }
  
  .auth-card:hover {
    transform: none;
  }
}

/* 加载动画 */
.auth-submit.loading {
  position: relative;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* 确保登录按钮文本居中 */
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
}

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