@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #fffaf0;
  margin: 0;
}

/* Sección principal centrada */
.login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 85vh;
  position: relative;
  padding-top: 40px;
  animation: fadeIn 1s ease-in;
}

/* Contenedor principal */
.login-container {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  width: 900px;
  max-width: 95%;
  min-height: 520px;
  transition: all 0.5s ease-in-out;
}

/* Formularios */
.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  transition: all 0.6s ease-in-out;
}

.sign-in-container {
  left: 0;
  width: 50%;
  z-index: 2;
}

.sign-up-container {
  left: 0;
  width: 50%;
  opacity: 0;
  z-index: 1;
}

.login-container.right-panel-active .sign-in-container {
  transform: translateX(100%);
}

.login-container.right-panel-active .sign-up-container {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
}

form {
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 50px;
  height: 100%;
  text-align: center;
}

form h1 {
  font-weight: 700;
  margin-bottom: 10px;
  color: #000;
}

form span {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}

form input {
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 15px;
  margin: 8px 0;
  width: 100%;
}

form input::placeholder {
  color: #ccc;
}

form a {
  color: #bfa14a;
  font-size: 14px;
  text-decoration: none;
  margin: 15px 0;
}

form button {
  border-radius: 20px;
  border: none;
  background-color: #bfa14a;
  color: white;
  font-weight: bold;
  padding: 12px 45px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: 0.3s;
  cursor: pointer;
}

form button:hover {
  background-color: #000;
  color: #bfa14a;
}

/* Panel dorado */
.overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out;
  z-index: 100;
}

.login-container.right-panel-active .overlay-container {
  transform: translateX(-100%);
}

.overlay {
  background: linear-gradient(to right, #000, #bfa14a);
  color: #fff;
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

.login-container.right-panel-active .overlay {
  transform: translateX(50%);
}

.overlay-panel {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  text-align: center;
  top: 0;
  height: 100%;
  width: 50%;
  transition: transform 0.6s ease-in-out;
}

.overlay-panel h1 {
  color: #fff;
}

.overlay-panel p {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.5px;
  margin: 20px 0 30px;
}

.overlay-left {
  transform: translateX(-20%);
}

.login-container.right-panel-active .overlay-left {
  transform: translateX(0);
}

.overlay-right {
  right: 0;
  transform: translateX(0);
}

.login-container.right-panel-active .overlay-right {
  transform: translateX(20%);
}

button.ghost {
  background-color: transparent;
  border: 1px solid #fff;
  color: #fff;
  transition: 0.3s;
}

button.ghost:hover {
  background-color: #fff;
  color: #bfa14a;
}

/* Botón volver */
.back-home {
  position: absolute;
  bottom: 30px;
  left: 30px;
  color: #000;
  background: #fff4cc;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #bfa14a;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.back-home:hover {
  background: #bfa14a;
  color: white;
}

/* Fade de entrada */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .login-container {
    width: 95%;
    min-height: 600px;
  }

  form {
    padding: 0 25px;
  }

  .overlay-panel {
    padding: 0 20px;
  }

  .back-home {
    bottom: 10px;
    left: 10px;
    font-size: 14px;
    padding: 6px 12px;
  }
}
