.main-container {
  display: flex;
  height: 100vh;
}

.left-panel {
  width: 61.8%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.right-panel {
  width: 38.2%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(12 7 26);
  backdrop-filter: blur(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-container {
  padding: 40px;
  border-radius: 20px;
  width: 100%;
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 4px 24px -1px rgba(0, 0, 0, 0.2),
    0 0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 0 20px 0 rgba(255, 255, 255, 0.05) inset;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform-style: preserve-3d;
  perspective: 1000px;
  animation: container-appear 0.6s ease-out;
}

@keyframes container-appear {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.auth-container::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 20px;
  background: linear-gradient(45deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
  z-index: -1;
}

.auth-header {
  margin-bottom: 2rem;
  text-align: center;
}

.auth-header h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff, #a8a8a8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: white;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border: none;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.auth-link {
  color: #6366f1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.auth-link:hover {
  color: #818cf8;
}

.mb-3 {
  margin-bottom: 1.5rem !important;
}

.text-center {
  text-align: center !important;
}

#vanta-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* body {
  background-color: transparent !important;
} */

.invisible {
  opacity: 0;
  visibility: hidden;
}

.fade-in {
  opacity: 1;
  visibility: visible;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.login-logo {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  animation: logoAppear 1s ease-out forwards;
}

.logo-text {
  color: white;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  display: inline-block;
}

.logo-text:hover {
  transform: translateY(-2px) scale(1.1);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.logo-heart {
  display: inline-block;
  font-size: 1.5rem;
  transform-origin: center;
  margin: 0 0.2rem;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }

  25% {
    transform: scale(1.1);
  }

  40% {
    transform: scale(1);
  }

  60% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes logoAppear {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 为每个字母添加独特的悬停效果 */
.logo-text:nth-child(1):hover {
  color: #64ffda;
}

.logo-text:nth-child(3):hover {
  color: #bd93f9;
}

.logo-text:nth-child(4):hover {
  color: #ff79c6;
}

/* 添加玻璃态效果 */
.login-logo::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  backdrop-filter: blur(5px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-logo:hover::before {
  opacity: 1;
}

/* 响应式设计 - 移动端和平板端适配 */
@media (max-width: 1024px) {
  .main-container {
    position: relative;
  }

  .left-panel {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
  }

  .right-panel {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2;
    background: transparent;
    backdrop-filter: none;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem;
    padding-right: 2rem;
  }

  .auth-container {
    /* max-width: 350px; */
    margin-right: 0;
    /* margin-left: auto; */
  }

  .login-logo {
    top: 1.5rem;
    left: 1.5rem;
    font-size: 1.5rem;
  }

  /* 注册链接改为橙色 */
  .auth-link {
    color: #35daff;
  }

  .auth-link:hover {
    color: #47dafb;
  }

  /* 其他文字元素 */
  .text-red-500 {
    color: #dc2626 !important;
  }

  .text-green-300 {
    color: #86efac !important;
  }

  /* 忘记密码链接也改为橙色 */
  .auth-link.small {
    color: #35daff;
  }

  .auth-link.small:hover {
    color: #47dafb;
  }

  /* Google登录按钮文字保持白色 */
  button[type="button"] span {
    color: white;
  }
}

@media (max-width: 768px) {
  .right-panel {
    justify-content: center;
    align-items: center;
    padding: 1rem;
  }

  .auth-container {
    max-width: 100%;
    width: calc(100% - 40px);
    margin: 0;
    padding: 40px 20px;
  }

  .login-logo {
    top: 1rem;
    left: 1rem;
    font-size: 1.3rem;
  }

  .auth-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 20px 10px;
    border-radius: 10px;
    width: calc(100% - 60px);
  }

  .auth-container form div {
    margin-bottom: 0.5rem;
  }

  .auth-container button {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .auth-container .text-center p {
    font-size: 0.8rem;
  }

  .login-logo {
    font-size: 1.2rem;
  }

  .auth-header {
    margin-bottom: 0.5rem;
  }

  .auth-header h2 {
    font-size: 1.3rem;
  }

  .auth-header p {
    font-size: 0.8rem;
  }

  .form-control {
    font-size: 0.8rem;
    padding: 0.6rem;
  }

  .btn-primary {
    padding: 0.6rem;
  }
}

/* 确保背景在所有尺寸下都能正确显示 */
@media (max-width: 1024px) {
  #vanta-background {
    width: 100vw !important;
    height: 100vh !important;
  }
}

/* iPad横屏特殊处理 */
@media (max-width: 1024px) and (min-width: 769px) and (orientation: landscape) {
  .right-panel {
    justify-content: flex-end;
    align-items: center;
    padding-right: 3rem;
  }

  .auth-container {
    max-width: 380px;
  }
}

/* 安全区域适配，适用于有刘海的设备 */
@media (max-width: 1024px) {
  .right-panel {
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(2rem, env(safe-area-inset-right));
  }

  .login-logo {
    top: max(1rem, calc(env(safe-area-inset-top) + 0.5rem));
    left: max(1rem, calc(env(safe-area-inset-left) + 0.5rem));
  }
}
