@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins',sans-serif;
}

body{
    padding-top: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('/img/mindXimg1.jpg') no-repeat;
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

body.fade-out {
    opacity: 0;
}
header.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 80px;
    background: rgba(22, 41, 56, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}
header.main-header a{
    text-decoration: none;
}

.logo {
    font-size: 1.1em;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.navigation {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.navigation a,
.navigation .btnLogout {
    color: #fff;
    text-decoration: none;
    margin-left: 30px;
    font-weight: 500;
    font-size: 1em;
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 5px 0;
    white-space: nowrap;
}

.navigation a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background: #fff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navigation a:hover::after{
    transform-origin:left;
    transform: scaleX(1);
}

.btnLogin-popup {
    margin-left: 30px;
    padding: 10px 20px;
    border: 2px solid #fff;
    background: transparent;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.btnLogin-popup:hover {
    background: #fff;
    color: #162938;
}

.navigation .btnLogout {
    background: #e74c3c;
    border: none;
    outline: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: .3s ease;
    padding: 10px 20px;
    margin-left: 30px;
}

.navigation .btnLogout:hover {
    background: #c0392b;
}

.wrapper{
    position: relative;
    width: 400px;
    height: 440px;
    background: transparent;
    border: 2px solid rgba(255,255,255, .5);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0,0,0, .5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transform: scale(0);
    transition: transform .5s ease, height .2s ease;
}

.wrapper.active-popup{
    transform: scale(1);
}

.wrapper.active{
    height: 570px;
}

.wrapper .form-box.login{
    transition: transform .18s ease;
    transform: translateX(0);
}

.wrapper.active .form-box.login{
    transition: none;
    transform: translateX(-400px);
}

.wrapper .form-box.register{
    position: absolute;
    transition: none;
    transform: translateX(400px);
}

.wrapper.active .form-box.register{
    transition: transform .18s ease;
    transform: translateX(0);
}

.wrapper .icon-close{
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    background: #162938;
    font-size: 2em;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom-left-radius: 20px;
    cursor: pointer;
    z-index: 1;
}

.wrapper .form-box {
    width: 100%;
    padding: 40px;
}

.form-box h2{
    font-size: 2em;
    color: #162938;
    text-align: center;
}

.input-box {
    position: relative;
    width: 100%;
    height: 50px;
    border-bottom: 2px solid #162938;
    margin: 30px 0;
}

.input-box label{
    position: absolute;
    top: 50%;
    left:5px;
    transform: translateY(-50%);
    font-size: 1em;
    color: #162938;
    font-weight: 500;
    pointer-events: none;
    transition: .3s;
}

.input-box input:focus~label,
.input-box input:valid~label{
    top: 5px;
    font-size: .8em;
    color: #000;
}

/* Autofill Fix for Labels and Background */
.input-box input:-webkit-autofill,
.input-box input:-webkit-autofill:hover,
.input-box input:-webkit-autofill:focus,
.input-box input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #162938 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.input-box input:-webkit-autofill ~ label {
    top: 5px;
    font-size: .8em;
    color: #000;
}
/* End Autofill Fix */

.input-box input{
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    color: #162938;
    font-weight: 600;
    padding: 0 35px 0 5px;
}

.input-box .icon{
    position: absolute;
    right: 8px;
    font-size: 1.2em;
    color: #162938;
    line-height: 57px;
}

.remember-forgot{
    font-size: .9em;
    color: #162938;
    font-weight: 500;
    margin:-15px 0 15px ;
    display: flex;
    justify-content: space-between;
}

.remember-forgot label input{
    accent-color: #162938;
    margin-right: 3px;
}

.remember-forgot a {
    color: #162938;
    text-decoration: none;
}

.remember-forgot a:hover{
    accent-color: #162938;
    text-decoration: underline;
}

.btn {
    width: 100%;
    height: 45px;
    background: #162938;
    border: none;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    color: #fff;
    font-weight: 500;
}

.login-register{
    font-size: .9em;
    color: #162938;
    text-align: center;
    font-weight: 500;
    margin: 25px 0 10px;
}

.login-register p a {
    color: #162938;
    text-decoration: none;
    font-weight: 600;
}

.login-register p a:hover{
    text-decoration: underline;
}

.find-role-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(10px);
}

.find-role-form.hidden {
    display: none;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.feedback-message {
    display: none;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
    color: #162938;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.feedback-message.success {
    color: #28a745;
    background: rgba(173, 216, 230, 0.3);
    border-color: rgba(173, 216, 230, 0.7);
}

.feedback-message.error {
    color: #dc3545;
    background: rgba(255, 99, 71, 0.2);
    border-color: rgba(255, 99, 71, 0.5);
}
.role-selection {
    margin: 20px 0;
    padding: 10px 0;
    border-bottom: 2px solid #162938;
    color: #162938;
    font-weight: 500;
}

.role-selection label {
    display: block;
    margin-bottom: 10px;
    font-size: 1em;
}

.role-selection .radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.role-selection input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #162938;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    top: 3px;
}

.role-selection input[type="radio"]:checked {
    background-color: #162938;
    border-color: #162938;
}

.role-selection input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.role-selection .radio-group label {
    margin-bottom: 0;
    display: inline-block;
    cursor: pointer;
    font-weight: normal;
}

.wrapper.active {
    height: 570px;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-color: #fff;
    
    background-image: url('/img/Image.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    
    padding-bottom: 50px;

    z-index: 9999;
    color: #162938;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

#loading-overlay.fade-out {
    opacity: 0;
}

#loading-bar-container {
    width: 200px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
}

#loading-bar {
    width: 0%;
    height: 100%;
    background-color: #007bff;
    border-radius: 5px;
    transition: width 0.1s linear;
}

#loading-overlay p {
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 500;
    text-shadow: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
  margin-bottom: 1rem;
}

.modal-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-around;
}

.modal-actions .btn {
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.modal-actions .cancel {
  background: #ccc;
}


/* Hamburger toggle button */
.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

/* Responsive Nav */
@media (max-width: 768px) {
  .navigation {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(22, 41, 56, 0.95);
    padding: 15px 0;
    display: none;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navigation a, .btnLogin-popup {
    margin: 10px 0;
    font-size: 1rem;
  }

  .navigation.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .logo {
    font-size: 1rem;
  }

  header.main-header {
    flex-wrap: wrap;
  }
}