/* Modal */
.modal {
   display: none;
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.7);
   justify-content: center;
   align-items: center;
   padding: 10px;
   box-sizing: border-box;
   z-index: 1111;
}

.modal-content {
   background-color: rgba(0, 0, 0, 0.9);
   color: black;
   padding: 20px 30px;
   border-radius: 6px;
   width: 100%;
   max-width: 350px;
   position: relative;
   display: flex;
   flex-direction: column;
   align-items: center;
   box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.modal h2 {
   margin-top: 0;
   text-align: center;
   width: 100%;
   color: white;
}

.modal input {
   padding: 8px;
   margin-bottom: 4px;
   box-sizing: border-box;
   border: 1px solid #ccc;
   border-radius: 4px;
}

.modal form {
   display: flex;
   flex-direction: column;
   margin-bottom: 4px;
   align-items: center;
   width: 100%;
}

.modal form button {
   /* border: 1px solid white; */
   color: white;
   background: #666;
   padding: 8px 16px;
   cursor: pointer;
   font-size: 14px;
   border-radius: 6px;
   transition: background 0.3s, color 0.3s, transform 0.1s;
   white-space: nowrap;
   width: 80px;
   text-align: center;
   box-sizing: content-box;
   box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.modal form button:hover {
   background: #1d1d1d;
}

.modal form button:active {
   transform: scale(0.96);
}

.close {
   position: absolute;
   top: 10px;
   right: 14px;
   font-size: 25px;
   cursor: pointer;
   transition: transform 0.2s ease-in-out;
   color: white;
}

.close:hover {
   transform: scale(1.3);
   color: #ff4d4d;
}

.close:active {
   transform: scale(1.05);
}

.toggle-password {
   position: absolute;
   right: 8px;
   top: 45%;
   width: 25px;
   height: 25px;
   transform: translateY(-50%);
   cursor: pointer;
   opacity: 0.7;
}

.toggle-password:hover {
   opacity: 1;
}

.input-group input {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  outline: none;
  background: rgba(255, 255, 255, 0.03);
  color: #f0f0f0;
  backdrop-filter: blur(4px);
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.05);
  width: 100%;
  padding-right: 35px;
}

.input-group label {
  position: absolute;
  top: 45%;
  left: 5px;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 14px;
  pointer-events: none;
  transition: 0.2s ease all;
  background: transparent;
  padding: 0 3px;
  line-height: 1;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown):valid + label,
.input-group input:not(:focus):not(:placeholder-shown):not(:invalid) + label {
  top: -10px;
  left: 4px;
  font-size: 12px;
  color: white;
}

.error {
   color: red;
   font-size: 12px;
   margin-top: 0px;
   margin-bottom: 16px;
   align-self: flex-start;
   min-height: 18px;
}


/* Mobile */
@media (max-width: 480px) {

   .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.9);
      justify-content: center;
      align-items: center;
      padding: 8px;
      box-sizing: border-box;
   }

   .modal form {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
   }

   .modal h2 {
      margin-top: 0;
      text-align: center;
      width: 100%;
      font-size: 25px;
   }

   .modal form button {
      /* border: 1px solid white; */
      color: white;
      background: #1d1d1d;
      padding: 8px 3px;
      cursor: pointer;
      font-size: 12px;
      border-radius: 6px;
      transition: background 0.3s, color 0.3s, transform 0.1s;
      white-space: nowrap;
      width: 80px;
      text-align: center;
      box-sizing: content-box;
      box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
   }

   .modal input,
   .modal button,
   .modal select,
   .modal textarea {
      font-size: 12px;
   }

   .modal input {
      padding: 6px;
      margin-bottom: 1px;
      box-sizing: border-box;
      border: 1px solid #ccc;
      border-radius: 4px;

   }

   .input-group label {
      font-size: 12px;
      top: 50%;
      left: 5px;
   }

   .modal-content {
      background: white;
      color: black;
      padding: 16px 30px;
      border-radius: 6px;
      width: 100%;
      max-width: 300px;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
      background-color: rgba(0, 0, 0, 0.5);
   }

   .close {
      position: absolute;
      top: 10px;
      right: 14px;
      font-size: 30px;
   }

   .toggle-password {
      position: absolute;
      right: 8px;
      top: 48%;
      width: 20px;
      height: 20px;
      transform: translateY(-50%);
      cursor: pointer;
      opacity: 0.7;
   }
}