/* Login and authentication styles */

/* Login and mode select overlay styling */
#login-overlay,
#mode-select-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000; /* Higher than other overlays */
  perspective: 1000px;
}

#login-box,
#mode-select-box {
  position: relative;
  width: 400px;
  padding: 20px 30px;
  border-radius: 15px;
  background: linear-gradient(135deg, #3a1c71 0%, #5e60ce 50%, #4895ef 100%);
  color: white;
  box-shadow: 0 15px 25px rgba(78, 42, 155, 0.4);
  transform-style: preserve-3d;
}

/* Mode selection button container */
.mode-button-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

/* Mode selection buttons */
.mode-select-button {
  width: 280px;
  margin: 0 auto;
  display: block;
  padding: 16px;
  background: #6c63ff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.mode-select-button:hover {
  background: #7d76ff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

/* Close button for login box */
#login-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

#login-close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.login-title {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
}

.login-form-group {
  margin-bottom: 20px;
}

.login-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 400;
  text-align: center;
}

.login-form-group input {
  width: 280px;
  margin: 0 auto;
  display: block;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  box-sizing: border-box;
}

.login-form-group input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.8);
}

#login-submit {
  width: 280px;
  margin: 0 auto;
  display: block;
  padding: 12px;
  background: #6c63ff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

#login-submit:hover {
  background: #7d76ff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

#login-submit:disabled {
  background: #cccccc;
  color: #666666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#login-error {
  color: #ff8a80;
  background: rgba(255, 0, 0, 0.1);
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 20px;
  text-align: center;
  display: none;
}

/* Login animation keyframes - with more WOOSH factor */
@keyframes loginSpinIn {
  0% {
    opacity: 0;
    transform: translateX(-120%) scale(0.7);
    filter: blur(8px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  60% {
    opacity: 1;
    transform: translateX(5%) scale(1.05);
    filter: blur(0px);
    box-shadow: 0 20px 50px rgba(58, 28, 113, 0.6);
  }
  80% {
    transform: translateX(-2%);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
    box-shadow: 0 15px 25px rgba(78, 42, 155, 0.4);
  }
}

@keyframes loginSpinOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0px);
    box-shadow: 0 15px 25px rgba(78, 42, 155, 0.4);
  }
  30% {
    opacity: 1;
    transform: translateX(5%) scale(1.05);
    box-shadow: 0 20px 50px rgba(58, 28, 113, 0.6);
  }
  100% {
    opacity: 0;
    transform: translateX(120%) scale(0.7);
    filter: blur(8px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
}

.login-animated-in {
  animation: loginSpinIn 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

.login-animated-out {
  animation: loginSpinOut 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}
