* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Salsa', cursive;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.contenedor {
  display: grid;
  place-content: center;
  min-height: 100vh;
  padding: 20px;
}

.main {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #98ade9;
  width: 480px;
  max-width: 95vw;
  height: 580px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 45px;
  font-size: 17px;
}

.div_label {
  color: #333;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
}

.div_label-l {
  color: #333;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 7px;
  font-size: 0.9rem;
}

#chk {
  display: none;
}

/* ========== LOGIN ========== */
.login {
  position: relative;
  width: 100%;
  height: 378px;
}

.login label {
  margin: 20% 0 3%;
}

label {
  color: #fff;
  font-size: 30px;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: .5s ease-in-out;
  user-select: none;
}

/* Indicador de flecha en las etiquetas */
label::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.4s ease;
  margin-left: 6px;
  opacity: 0.7;
}

.register label::after {
  transform: rotate(-135deg);
}

#chk:checked ~ .register label::after {
  transform: rotate(45deg);
}

#chk:checked ~ .login label::after {
  transform: rotate(-135deg);
}

/* Icono de click en las etiquetas */
label i.bx {
  font-size: 20px;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

label:hover i.bx {
  opacity: 1;
  transform: scale(1.2);
}

.input {
  border: 2px solid transparent;
  outline: none;
  width: 100%;
  height: 40px;
  padding: 8px 14px;
  background-color: rgb(247, 243, 243);
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.input:focus {
  border-color: rgb(23, 111, 211);
  box-shadow: 0 0 0 3px rgba(23, 111, 211, 0.15);
}

/* ========== REGISTER ========== */
.register {
  background: #eee;
  border-radius: 60% / 10%;
  transform: translateY(13%);
  transition: .8s ease-in-out;
}

.register label {
  color: #98ade9;
  transform: scale(0.6);
}

/* Ocultar campos del registro cuando está en vista login */
.register .form .div_label,
.register .form .input,
.register .form button {
  opacity: 0;
  transition: opacity 0.4s ease 0s;
}

#chk:checked ~ .register .form .div_label,
#chk:checked ~ .register .form .input,
#chk:checked ~ .register .form button {
  opacity: 1;
  transition: opacity 0.4s ease 0.4s;
}

#chk:checked ~ .register {
  transform: translateY(-63%);
}

#chk:checked ~ .register label {
  transform: scale(1);
  margin: 0% 0px 0%;
}

#chk:checked ~ .login label {
  transform: scale(.6);
  margin: 5% 0 5%;
}

/* ========== BOTONES ========== */
.form button {
  width: 85%;
  height: 44px;
  margin: 14px auto 8%;
  color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2);
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
  letter-spacing: 0.5px;
}

.form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  background: linear-gradient(135deg, #764ba2, #667eea);
}

.form button:active {
  transform: translateY(0);
}

.avatar {
  height: 50px;
  width: 50px;
  background-color: rgb(23, 111, 211);
  border-radius: 50%;
  align-self: center;
  padding: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#file {
  display: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 520px) {
  .main {
    width: 100%;
    height: 560px;
  }
  .form {
    padding: 25px 30px;
  }
  label {
    font-size: 26px;
  }
}