/* 登录模态框样式 */
.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 表单输入框焦点状态 */
input:focus {
  outline: none;
}

/* 用户菜单动画 */
#userMenu {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 错误提示动画 */
#errorMessage {
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* 按钮悬停效果增强 */
button:hover {
  transition: all 0.2s ease;
}

/* 输入框占位符样式 */
input::placeholder {
  color: #9ca3af;
}

/* 用户菜单样式增强 */
#userMenu {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

#userMenu button:hover {
  background-color: rgba(55, 65, 81, 0.5);
}

/* 登录按钮状态 */
.login-loading {
  position: relative;
  pointer-events: none;
}

.login-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 640px) {
  #loginModal > div {
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  #userMenu {
    right: 1rem;
    left: 1rem;
    width: auto;
  }
}