@import url("https://fonts.googleapis.com/css?family=Montserrat:400,800");

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #1a1a1d, #2d2a4a);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: var(--font-body);
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.bg {
  animation: slide 7s ease-in-out infinite alternate;
  background-image: linear-gradient(-60deg, #1a1a2e 50%, #2f195f 50%);
  bottom: 0;
  left: -50%;
  opacity: 0.5;
  position: fixed;
  right: -50%;
  top: 0;
  z-index: -1;
}

.bg2 {
  animation-direction: alternate-reverse;
  animation-duration: 8s;
}

.bg3 {
  animation-duration: 9s;
}

@keyframes slide {
  0% {
    transform: translateX(-25%);
  }
  100% {
    transform: translateX(25%);
  }
}

h1,
p,
span,
a {
  color: #f0f0f0;
  margin-bottom: 8px;
}

a:hover {
  color: #b36dff;
}

h1 {
  font-weight: bold;
}

p {
  font-size: 14px;
  font-weight: 100;
  line-height: 20px;
  letter-spacing: 0.5px;
  margin: 20px 0 30px;
}

span {
  font-size: 12px;
}

a {
  font-size: 14px;
  text-decoration: none;
  margin: 15px 0;
}

#backButton {
  transform: scale(1.2);
  border-radius: 20px;
  border: 1px solid #9d44ff;
  background-color: #9d44ff;
  color: hsl(0, 0%, 100%);
  font-size: 25px;
  font-weight: bold;
  padding: 12px 20px;
  transition: transform 80ms ease-in;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); 
  transition: all 0.15s ease-in-out;
  margin-bottom: 20px; 
  cursor: pointer;
  position: fixed;
  z-index: 9999;
  top: 50px;
  left: 50px;
  transform: translateX(0);
  transition: transform 0.2s ease, background-color 0.15s ease, box-shadow 0.15s ease;

}

#backButton:hover {
  background-color: #b36dff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border-color: #ffffff;
  transform: translateX(-5px);
}

#backButton:active {
  transform: scale(0.95);
}

#backButton:focus {
  outline: none;
}

button {
  transform: scale(1.2);
  border-radius: 20px;
  border: 1px solid #9d44ff;
  background-color: #9d44ff;
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  padding: 12px 45px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 80ms ease-in;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease-in-out;
}

button:hover {
  background-color: #b36dff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  border-color: #ffffff;
}

button:active {
  transform: scale(0.95);
}

button:focus {
  outline: none;
}

button.ghost {
  background-color: transparent;
  border-color: #ffffff;
}

button.ghost:hover {
  background-color: #b36dff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

form {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 50px;
  height: 100%;
  text-align: center;
  color: #ffffff;
}

input,
select.form-control {
  background-color: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  padding: 12px 15px;
  margin: 8px 0;
  margin-bottom: 10px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  appearance: none;
  font-family: var(--font-body);
  font-size: 16px;
}

input::placeholder,
select.form-control {
  color: rgba(255, 255, 255, 0.8);
}

input:focus,
select.form-control:focus {
  outline: none;
  border: 2px solid #9d44ff inside;
  box-shadow: 0 0 0 3px rgba(157, 68, 255, 0.15);
}

select.form-control {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D'10'%20height%3D'10'%20viewBox%3D'0%200%2010%2010'%20fill%3D'none'%20xmlns%3D'http%3A//www.w3.org/2000/svg'%3E%3Cpath%20d%3D'M1%203l4%204%204-4'%20stroke%3D'%23ffffff'%20stroke-width%3D'1.5'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}

select.form-control option {
  background-color: #59595b;
  color: #fff;
}

.form-group {
  width: 100%;
}

.checkbox-group {
  margin: 12px 0;
  margin-top: 0;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #e0e0e0;
  user-select: none;
  position: relative;
}

.checkbox-group input[type="checkbox"] {
  transform: scale(0.8);
  transform-origin: center;
  appearance: none;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(157, 68, 255, 0.5);
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  position: relative;
  display: inline-block;
  transition: all 0.2s ease-in-out;
}

.checkbox-group input[type="checkbox"]:hover {
  transition: 0.2s ease-in-out;
  box-shadow: 0 0 0 3px rgba(157, 68, 255, 0.3);
}

.checkbox-group input[type="checkbox"]:checked {
  background-color: #9d44ff;
  border-color: #9d44ff;
}

.checkbox-group input[type="checkbox"]::after {
  content: "✓";
  color: white;
  font-weight: bold;
  font-size: 14px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  display: none;
}

.checkbox-group input[type="checkbox"]:checked::after {
  display: block;
}

.checkbox-group label {
  line-height: 1.4;
  cursor: pointer;
}

.container {
  background-color: transparent;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
  width: 1000px;
  height: 600px;
  max-width: 100%;
  min-height: 480px;
}

.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  transition: all 0.6s ease-in-out;
}

.sign-in-container {
  left: 1px;
  width: 50%;
  z-index: 2;
}

.container.right-panel-active .sign-in-container {
  transform: translateX(100%);
}

.sign-up-container {
  left: -1px;
  width: 50%;
  opacity: 0;
  z-index: 1;
}

.sign-up-container,
.sign-in-container {
  overflow: hidden;
}

.sign-up-container form {
  border-radius: 0px;
}

.sign-in-container form {
  border-radius: 0px;
}

.container.right-panel-active .sign-up-container {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  animation: show 0.6s;
}

.container:not(.right-panel-active) .sign-up-container {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.container.right-panel-active .sign-in-container {
  display: none;
  opacity: 0;
  pointer-events: none;
}

@keyframes show {
  0%,
  49.99% {
    opacity: 0;
    z-index: 1;
  }

  50%,
  100% {
    opacity: 1;
    z-index: 5;
  }
}

.overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 0.6s ease-in-out;
  z-index: 100;
}

.container.right-panel-active .overlay-container {
  transform: translateX(-100%);
}

.overlay {
  background: #7b5cff;
  background: -webkit-linear-gradient(to right, #b36dff, #5b2894);
  background: linear-gradient(to right, #b36dff, #5b2894);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 0 0;
  color: #ffffff;
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

.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%;
  transform: translateX(0);
  transition: transform 0.6s ease-in-out;
}

.overlay-left {
  transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
  transform: translateX(0);
}

.overlay-right {
  right: 0;
  transform: translateX(0);
}

.container.right-panel-active .overlay-right {
  transform: translateX(20%);
}
@media screen and (max-width: 768px) {
  body {
    margin: 0;
    padding: 10px;
    min-height: 100vh;
    height: auto;
  }

  #backButton {
    top: 20px;
    left: 20px;
    font-size: 20px;
    padding: 10px 15px;
    transform: scale(1);
  }

  .container {
    width: 100%;
    height: 75vh;
    min-height: 520px;
    max-height: 650px;
    border-radius: 16px;
    margin: 0;
  }

  .sign-in-container {
    width: 65%;
    left: 0;
  }

  .overlay-container {
    left: 65%;
    width: 35%;
  }

  .container.right-panel-active .sign-in-container {
    transform: translateX(-100%);
    width: 35%;
    display: block;
    opacity: 1;
  }

  .container.right-panel-active .sign-up-container {
    transform: translateX(0);
    width: 65%;
    left: 35%;
    display: block;
    opacity: 1;
  }

  .container.right-panel-active .overlay-container {
    transform: translateX(-100%);
    left: 0;
    width: 35%;
  }

  .container:not(.right-panel-active) .sign-up-container {
    display: block;
    opacity: 0.3;
  }

  .container.right-panel-active .sign-in-container {
    display: block;
    opacity: 0.3;
  }

  form {
    padding: 20px 25px;
    border-radius: 16px;
  }

  h1 {
    font-size: 24px;
    margin-bottom: 15px;
  }

  p {
    font-size: 13px;
    margin: 15px 0 20px;
    line-height: 18px;
  }

  input,
  select.form-control {
    padding: 14px 16px;
    font-size: 16px;
    margin: 6px 0;
  }

  button {
    padding: 14px 30px;
    font-size: 11px;
    transform: scale(1);
    margin: 10px 0;
  }

  button:hover {
    transform: scale(1.02);
  }

  button:active {
    transform: scale(0.98);
  }

  .checkbox-group {
    font-size: 11px;
    margin: 10px 0;
  }

  .overlay {
    width: 200%;
  }

  .overlay-panel {
    padding: 20px 15px;
  }

  .overlay-panel h1 {
    font-size: 20px;
  }

  .overlay-panel p {
    font-size: 12px;
    line-height: 16px;
    margin: 10px 0 15px;
  }

  .overlay-panel button {
    padding: 12px 25px;
    font-size: 10px;
  }

  .overlay-left {
    transform: translateX(0);
    display: flex;
  }

  .container.right-panel-active .overlay-left {
    transform: translateX(0);
    display: flex;
  }

  .overlay-right {
    transform: translateX(0);
    display: flex;
  }

  .container.right-panel-active .overlay-right {
    transform: translateX(0);
    display: flex;
  }

  .container.right-panel-active .overlay {
    transform: translateX(0);
    left: 0;
    width: 100%;
  }
  
  .container.right-panel-active .overlay-left {
    transform: translateX(0);
    width: 100%;
    display: flex;
    opacity: 1;
  }
  
  .container.right-panel-active .overlay-right {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  .container {
    height: 70vh;
    min-height: 480px;
    max-height: 580px;
  }

  form {
    padding: 15px 20px;
  }

  h1 {
    font-size: 22px;
  }

  input,
  select.form-control {
    padding: 12px 14px;
    font-size: 16px;
  }

  button {
    padding: 12px 25px;
    font-size: 10px;
  }

  .overlay-panel {
    padding: 15px 10px;
  }

  .overlay-panel h1 {
    font-size: 18px;
  }

  .overlay-panel p {
    font-size: 11px;
  }

  #backButton {
    top: 15px;
    left: 15px;
    font-size: 18px;
    padding: 8px 12px;
  }
}



#forgotPasswordForm{
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
}

/* Contenitore principale della modale (overlay e modale stessa) */
.custom-modal{
  position: fixed; /* Si posiziona rispetto al viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Sfondo semi-trasparente */
  display: flex; /* Centra il contenuto */
  justify-content: center;
  align-items: center;
  z-index: 1050; /* Sopra tutto il resto */
  opacity: 0; /* Nascosta di default */
  visibility: hidden; /* Nascosta di default */
  transition: opacity 0.3s ease, visibility 0.3s ease; /* Animazione */
}

/* Classe per mostrare la modale */
.custom-modal.show {
  opacity: 1;
  visibility: visible;
}

.verify-modal, .reset-password{
  visibility: hidden; /* Nascosta di default */
  position: fixed; /* Si posiziona rispetto al viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Sfondo semi-trasparente */
  display: flex; /* Centra il contenuto */
  justify-content: center;
  align-items: center;
  z-index: 1050; /* Sopra tutto il resto */
  opacity: 0; /* Nascosta di default */
  transition: opacity 0.3s ease, visibility 0.3s ease; /* Animazione */
}

.verify-modal.show, .reset-password.show{
  opacity: 1;
  visibility: visible;
}


/* Contenitore del dialogo della modale (per il centraggio e larghezza) */
.custom-modal-dialog {
  background-color: white; /* Sfondo del contenuto della modale */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  width: 90%; /* Larghezza massima su schermi piccoli */
  max-width: 500px; /* Larghezza massima su schermi grandi */
  transform: translateY(-50px); /* Parte leggermente più in alto per l'animazione */
  transition: transform 0.3s ease; /* Animazione */
}

/* Animazione di entrata */
.custom-modal.show .custom-modal-dialog {
  transform: translateY(0);
}

.verify-modal.show .custom-modal-dialog, .reset-password.show .custom-modal-dialog{
  transform: translateY(0);
}

/* Contenuto della modale */
.custom-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Intestazione della modale */
.custom-modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-modal-title {
  margin: 0;
  font-size: 1.25rem; /* Dimensione del titolo */
  font-weight: 500;
  line-height: 1.5;
  color: #6c757d;
}

/* Bottone di chiusura (la 'x') */
.custom-close-btn {
  box-shadow:none;
  background-color: transparent;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
  color: #000;
  opacity: 0.5;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.3s ease;
}

.custom-close-btn:hover{
  background-color: transparent;
  box-shadow: none;
}

#modalMessage{
    text-align: center;
}


#msglogin{
    margin: 10px 0 20px;
}

/* Corpo della modale */
.custom-modal-body {
  padding: 20px;
  flex-grow: 1; /* Permette al body di occupare lo spazio disponibile */
  overflow-y: auto; /* Se il contenuto è troppo lungo */
}

/* Piè di pagina della modale */
.custom-modal-footer {
  display: flex;
  justify-content: space-between; /* Allinea i bottoni a destra */
  padding: 15px 20px;
  width: 100%;
}

/* Stili per gli elementi del form all'interno della modale */
.custom-form-group {
  margin-bottom: 5px;
}

.custom-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.custom-input::placeholder{
    color: #a0a0a0; /* Colore grigio chiaro */
    opacity: 1; 
    font-style: italic; 
}

.custom-input:focus {
  color: #495057;
  background-color: #fff;
  outline: none;
  border: 2px solid #9d44ff;
  box-shadow: 0 0 0 3px rgba(157, 68, 255, 0.15);
}

/* Stili per i bottoni all'interno della modale */
.custom-button {
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 10px;
  transition: background-color 0.3s ease;
  margin-left: 10px; /* Spazio tra i bottoni nel footer */
}

.custom-button-primary {
  border: 1px solid #9d44ff;
  background-color: #9d44ff;
  color: white;
  padding: 10px 10px;
}

.custom-button-primary:hover {
    background-color: #b36dff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    border-color: #ffffff;
  }

.custom-button-secondary {
  background-color: #6c757d;
  color: white;
}

.custom-button-secondary:hover {
  background-color: #5a6268;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  cursor: pointer;

}

.custom-form-group p{
  color:#727171;
  font-family: var(--font-body);
  font-size: 15px;
}

.error{
    color: red;
}

.success{
    color: green;
}

@media screen and (max-width: 768px) and (min-height: 800px) {
  .container {
    height: 65vh;
    max-height: 600px;
  }
  
  body {
    padding: 20px 10px;
  }
}

@media screen and (max-width: 480px) and (min-height: 800px) {
  .container {
    height: 60vh;
    max-height: 550px;
  }
}