/* Color Variables */
  :root {
    --primary-orange: #F5914A;
    --primary-orange-light: #FF9F5C;
    --primary-orange-dark: #E87D35;
    --primary-navy: rgb(9, 11, 30);
    --primary-navy-light: rgb(25, 30, 60);
    --primary-navy-transparent: rgba(9, 11, 30, 0.9);
    --accent-warm: #FFF5E6;
    --text-light: #FFFFFF;
    --shadow-orange: rgba(245, 145, 74, 0.4);
    --shadow-navy: rgba(9, 11, 30, 0.3);
  }

  .section {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
  }

  .section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    pointer-events: none;
  }

 #formLogin,  #formRegister {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 245, 230, 0.95) 100%);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 45px;
    box-shadow: 
      0 25px 50px var(--shadow-navy),
      0 5px 20px var(--shadow-orange),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(245, 145, 74, 0.3);
    position: relative;
    overflow: hidden;
  }

  #formRegister::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange) 0%, var(--primary-orange-light) 50%, var(--primary-orange) 100%);
  }

  .form-control {
    border: 2px solid rgba(245, 145, 74, 0.3);
    border-radius: 15px;
    padding: 18px 25px;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 250, 240, 0.9) 100%);
    color: var(--primary-navy);
    font-weight: 500;
  }

  .form-control:focus {
    border-color: var(--primary-orange);
    box-shadow: 
      0 0 0 0.25rem rgba(245, 145, 74, 0.25),
      0 8px 25px rgba(245, 145, 74, 0.2),
      0 3px 10px rgba(9, 11, 30, 0.1);
    background: linear-gradient(145deg, #ffffff 0%, #fffaf0 100%);
    transform: translateY(-3px) scale(1.01);
  }

  .form-control::placeholder {
    color: rgba(9, 11, 30, 0.6);
    font-weight: 500;
  }

  .btn-success {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 14px 20px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    color: var(--text-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
    box-shadow: 
      0 8px 25px var(--shadow-orange),
      0 2px 10px rgba(9, 11, 30, 0.2);
  }

  .btn-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-navy-light) 100%);
    transition: left 0.4s ease;
    z-index: -1;
  }

  .btn-success span {
    position: relative;
    z-index: 1;
  }

  .btn-success:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
      0 15px 35px var(--shadow-orange),
      0 5px 15px rgba(9, 11, 30, 0.3);
    border-color: var(--primary-orange);
  }

  .btn-success:hover::before {
    left: 0;
  }

  .btn-success:active {
    transform: translateY(-2px) scale(1.01);
  }

  label {
    color: var(--primary-navy);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
  }

  label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-orange);
    border-radius: 4px;
    border: 2px solid rgba(245, 145, 74, 0.5);
  }

  .text-danger {
    color: var(--primary-orange) !important;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
  }

  .text-danger::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
    transition: width 0.3s ease;
  }

  .text-danger:hover {
    color: var(--primary-orange-dark) !important;
    transform: translateY(-1px);
  }

  .text-danger:hover::after {
    width: 100%;
  }

  .text-login {
    font-weight: 700;
    transition: all 0.3s ease;
    color: var(--primary-orange) !important;
  }

  .text-login:hover {
    text-decoration: none;
    transform: scale(1.05);
    color: var(--primary-orange-dark) !important;
  }

  .message {
    margin-bottom: 25px;
  }

  .modal-content {
    border-radius: 25px;
    border: 2px solid rgba(245, 145, 74, 0.3);
    box-shadow: 
      0 25px 50px var(--shadow-navy),
      0 5px 20px var(--shadow-orange);
    background: linear-gradient(145deg, #ffffff 0%, #fffaf0 100%);
  }

  .modal-header {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    color: var(--text-light);
    border-radius: 23px 23px 0 0;
    border-bottom: none;
    padding: 20px 30px;
  }

  .modal-title {
    font-weight: 700;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(9, 11, 30, 0.3);
  }

  .close {
    color: var(--text-light);
    opacity: 0.9;
    text-shadow: none;
    font-size: 28px;
    transition: all 0.3s ease;
  }

  .close:hover {
    color: var(--text-light);
    opacity: 1;
    transform: scale(1.1);
  }

  /* Enhanced Animations */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(40px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes glowPulse {
    0%, 100% {
      box-shadow: 
        0 25px 50px var(--shadow-navy),
        0 5px 20px var(--shadow-orange),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    50% {
      box-shadow: 
        0 25px 50px var(--shadow-navy),
        0 5px 25px var(--shadow-orange),
        0 0 30px rgba(245, 145, 74, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
  }

 #formLogin,  #formRegister {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1), glowPulse 4s ease-in-out infinite;
  }

  .form-group {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .form-group:nth-child(2) { animation-delay: 0.1s; }
  .form-group:nth-child(3) { animation-delay: 0.2s; }
  .form-group:nth-child(4) { animation-delay: 0.3s; }
  .form-group:nth-child(5) { animation-delay: 0.4s; }
  .form-group:nth-child(6) { animation-delay: 0.5s; }
  .form-group:nth-child(7) { animation-delay: 0.6s; }

  /* Text styling */
  p {
    color: var(--primary-navy);
    font-weight: 500;
  }

  /* Password Toggle Icon */
  .toggle-password {
    position: absolute;
    right: 20px;
    top: 13px; /* Fixed position instead of 50% */
    color: var(--primary-orange);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.7;
  }

  .toggle-password:hover {
    opacity: 1;
    color: var(--primary-orange-dark);
    transform: scale(1.1);
  }

  .toggle-password.active {
    color: var(--primary-navy);
  }

  /* Adjust padding for password inputs */
  input[type="password"], 
  input[type="text"][name="password"],
  input[type="text"][name="repassword"] {
    padding-right: 55px !important;
  }

  /* Error styling */
  .form-control.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
  }

  .error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 600;
    animation: fadeInUp 0.3s ease;
  }

  /* Password strength indicator */
  .password-strength {
    font-size: 12px;
    margin-top: 5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    animation: fadeInUp 0.3s ease;
    position: relative;
    z-index: 1; /* Lower than toggle icon */
  }

  .password-strength.weak {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
  }

  .password-strength.medium {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
  }

  .password-strength.strong {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
  }

  /* Ensure password container maintains consistent height */
  .form-group.position-relative {
    min-height: 60px; /* Consistent height */
  }



  /* Enhanced focus states */
  .form-group.focused .form-control {
    border-color: var(--primary-orange);
    box-shadow: 
      0 0 0 0.25rem rgba(245, 145, 74, 0.25),
      0 8px 25px rgba(245, 145, 74, 0.2);
  }

  .form-group.filled .form-control {
    background: linear-gradient(145deg, #ffffff 0%, #fffaf0 100%);
  }

  /* Responsive Design */
  @media (max-width: 768px) {
   #formLogin,  #formRegister {
      padding: 35px 25px;
      margin: 0 20px;
      border-radius: 20px;
    }
    
    .form-control {
      padding: 15px 20px;
      font-size: 15px;
      border-radius: 12px;
    }
    
    .btn-success {
      padding: 15px 30px;
      font-size: 16px;
      border-radius: 12px;
    }

    .section {
      padding: 40px 0;
    }

    /* Adjust icon position for mobile */
    .toggle-password {
      top: 15px;
      right: 15px;
      font-size: 16px;
    }

    .form-group.position-relative .form-control {
      height: 48px;
      padding-right: 45px !important;
    }
  }

  @media (max-width: 480px) {
   #formLogin,  #formRegister {
      padding: 30px 20px;
      margin: 0 15px;
    }
    
    .modal-dialog {
      margin: 20px 10px;
    }
  }

  /* Loading state for button */
  .btn-success.loading {
    pointer-events: none;
    opacity: 0.8;
  }

  .btn-success.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Disabled button state */
  .btn-success:disabled {
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
    color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
  }

  .btn-success:disabled:hover {
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
    transform: none !important;
    box-shadow: none !important;
  }

  /* reCAPTCHA styling */
  .g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    transform: scale(0.9);
    transform-origin: center;
  }

  /* Captcha error message */
  #captcha-error {
    text-align: center;
    margin-top: 10px;
  }

  /* AJAX loading overlay */
  .ajax-loading {
    position: relative;
  }

  .ajax-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  .close::before, .close::after
  {
    display: none;
  }
  /* Verification Modal Styling */
  #modalVerifyEmail {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    overflow: auto;
  }
  #closeVerifyModal span{
    display: none;
  }
  #modalVerifyEmail.show {
    display: block !important;
  }

  #modalVerifyEmail .modal-dialog {
    position: relative;
    width: auto;
    margin: 30px auto;
    max-width: 500px;
  }

  #modalVerifyEmail .modal-content {
    border-radius: 20px;
    border: 2px solid rgba(245, 145, 74, 0.3);
    box-shadow: 
      0 25px 50px var(--shadow-navy),
      0 5px 20px var(--shadow-orange);
  }

  #modalVerifyEmail .modal-header {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    color: var(--text-light);
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    padding: 20px 30px;
  }

  #modalVerifyEmail .modal-body {
    padding: 30px;
    background: linear-gradient(145deg, #ffffff 0%, #fffaf0 100%);
    border-radius: 0 0 18px 18px;
  }

  #verificationCode {
    border: 2px solid rgba(245, 145, 74, 0.3);
    border-radius: 12px;
    padding: 15px;
    text-transform: initial;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
  }

  #verificationCode:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 0.25rem rgba(245, 145, 74, 0.25);
    background: #ffffff;
    transform: scale(1.02);
  }

  .countdown-timer {
    background: linear-gradient(135deg, rgba(245, 145, 74, 0.1) 0%, rgba(245, 145, 74, 0.2) 100%);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid rgba(245, 145, 74, 0.3);
    display: inline-block;
    min-width: 100px;
  }

  .countdown-timer.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.2) 100%);
    border-color: rgba(255, 193, 7, 0.5);
    color: #ffc107;
  }

  .countdown-timer.danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.2) 100%);
    border-color: rgba(220, 53, 69, 0.5);
    color: #dc3545;
  }

  #btnVerifyCode {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
  }

  #btnVerifyCode:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 145, 74, 0.4);
  }

  #btnVerifyCode:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }

  #resendCode {
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
  }

  #resendCode:hover {
    text-decoration: underline;
    transform: scale(1.05);
  }

  @keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
  }