/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.input-group {
  position: relative;
  margin-bottom: 30px;
}

.tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 8px;
  padding: 15px;
  background-color: rgba(255, 255, 255, 1);
  border: 2px solid #9b5de5;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  font-size: 0.95em;
  z-index: 10;
  color: #333;
  
  /* Transition for smooth appearance */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.input-group input:focus + .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tooltip ul {
  margin-top: 10px;
  padding-left: 20px;
}

.tooltip li {
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Tooltip Colors */
.tooltip li:nth-child(1) strong,
.tooltip li:nth-child(2) strong,
.tooltip li:nth-child(3) strong {
  color: #0077b6; /* blue */
}

.tooltip li:nth-child(4) strong,
.tooltip li:nth-child(5) strong {
  color: #d62828; /* red */
}

/* Password Strength Bar Visuals */
.strength-bar {
    background: linear-gradient(to right, #ff4d6d, #fca311, #2ec4b6, #3a86ff);
    border-radius: 5px;
}

#togglePassword {
    
    position: absolute; 
    right: 16px; 
    top: 38px; 
    cursor: pointer;
    font-size: 18px;
    user-select: none;
    
}


body, html {
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #7b2cbf, #3a86ff, #48cae4);
    overflow: auto;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 950px; /* Set the maximum width for the form */
    background: rgba(255, 255, 255, 0.9);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease-out;
    margin: 20px auto; /* This will center the form horizontally */
}

/* Form Wrapper */
.form-wrapper {
    text-align: center;
}

/* Form Heading */
h2 {
    font-size: 2em;
    color: #5a189a;
    margin-bottom: 20px;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Input Groups */
.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #480ca8;
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #9b5de5;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    transition: all 0.3s ease-in-out;
}

/* Focus Effect */
.input-group input:focus, 
.input-group select:focus {
    border-color: #48cae4;
    box-shadow: 0 0 10px rgba(72, 202, 228, 0.6);
}

/* Error Messages */
.error-message {
    color: #ff595e;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Password Strength Bar */
.password-strength-bar {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.5s ease;
}

.terms-container {
    
    margin: 20px 0;
    
}

  .terms-container label {
    cursor: pointer;
    user-select: none;
  }

  label {
    cursor: pointer;
  }

  /* Popup overlay */
  .popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(36, 0, 70, 0.85);
    z-index: 1000;
      justify-content: center;
    align-items: center;
    padding: 1rem;
  }

  .popup {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem 2.5rem;
    max-width: 550px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.4s ease-out;
  }

  .popup h2 {
    font-size: 2em;
    color: #5a189a;
    margin-bottom: 1.5rem;
    text-align: center;
  }

   .condition {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
   .condition input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #7b2cbf;
    border-radius: 5px;
    flex-shrink: 0;
  }

  .condition label {
    cursor: pointer;
    color: #000;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: left;
  }
  
  .condition label strong {
    cursor: pointer;
    color: #480ca8;
    font-weight: 500;
    font-size: 1rem;
  }
  
   #red {
    color: #c0392b; /* soft comfortable red */
    font-weight: bold;
  }
  #blue {
    color: #2980b9; /* soft readable blue */
    font-weight: bold;
  }

/* Agree Button */
  #agreeBtn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 15px;
    background: linear-gradient(145deg, #48cae4, #3a86ff);
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s ease;
  }
  
  #agreeBtn:disabled {
    background-color: #9b5de5cc;
    cursor: not-allowed;
  }
  
   #agreeBtn:not(:disabled):hover {
    background: linear-gradient(145deg, #3a86ff, #7b2cbf);
    transform: translateY(-3px);
  }

  #agreeBtn:not(:disabled):active {
    transform: translateY(1px);
  }

  /* Checkbox main terms */
  #mainTermsCheckbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7b2cbf;
    border-radius: 5px;
    margin-right: 10px;
  }

  /* Animations */
  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateY(-30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Responsive */
  @media (max-width: 600px) {
    .popup {
      padding: 1.5rem 1.8rem;
    }
  }

/* Radio Group */
.radio-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 15px 0;
}

.radio-group label {
    display: inline-block;
    padding: 12px 20px;
    background-color: #f0f0f0;
    color: #480ca8;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

/* Hide Default Radio Buttons */
.radio-group input[type="radio"] {
    display: none;
}

/* Active State for the Labels (Clicked State) */
.radio-group input[type="radio"]:checked + label {
    background-color: #48cae4;
    color: white;
}

/* Hover State for Labels */
.radio-group label:hover {
    background-color: #ddd;
}

/* Focus Effect */
.radio-group input[type="radio"]:focus + label {
    box-shadow: 0 0 5px rgba(72, 202, 228, 0.6);
}

/* Button */
.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(145deg, #3a86ff, #7b2cbf);
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s ease;
}

.options {
  text-align: center;
}

.btn-submit:hover {
      background: linear-gradient(145deg, #48cae4, #3a86ff);
    transform: translateY(-3px);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 600px) {
    .login-container {
        width: 90%;
        padding: 25px 20px;
    }

    h2 {
        font-size: 1.8em;
    }

    /* Ensure the form still looks good on mobile devices */
    .form-grid {
        grid-template-columns: 1fr; /* Stack inputs on top of each other */
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}