body{
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.auth-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.auth-modal__content {
   font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
   position: relative;
   background: linear-gradient(145deg, #fdfdfd, #ffffff);
   margin: 15% auto;
   padding: 32px;
   border: none;
   border-radius: 13px;
   width: 90%;
   max-width: min(420px, 90vw);
   text-align: center;
   box-shadow: 
       0 20px 60px rgba(0, 0, 0, 0.15),
       0 8px 25px rgba(0, 0, 0, 0.1),
       inset 0 1px 0 rgba(255, 255, 255, 0.8);
   transform: translateY(0);
   transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
   -webkit-transform: translateZ(0);
   -moz-transform: translateZ(0);
   transform: translateZ(0);
   -webkit-backface-visibility: hidden;
   backface-visibility: hidden;
    box-sizing: border-box;
}

.auth-modal__content h2 {
   font-size: 1.75em;
   font-weight: 700;
   margin-bottom: 8px;
   background: linear-gradient(135deg, #1e293b, #334155);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

.signin {
   font-size: 1.75em;
   font-weight: 700;
   background: linear-gradient(135deg, #1e293b, #334155);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

.auth-modal__secure-notice {
   display: flex;
   justify-content: center;
   align-items: center;
   color: #059669;
   font-size: 14px;
   line-height: 18px;
   margin: 16px 0 24px 0;
   font-weight: 500;
   padding: 2px 16px 12px 16px;
   border-radius: 12px;
   border: none;
}

.auth-modal__secure-icon {
   margin-right: 8px;
   opacity: 0.9;
}

.auth-modal__close {
    color: #EAEDF0;
    font-size: 16px;
    font-weight: bold;
    position: absolute;
    right: 6px;
    top: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal__close:hover {
   background: rgba(248, 250, 252, 0.8);
   color: #64748b;
   transform: scale(1.05);
}

.elabel {
   text-align: left;
   font-weight: 500;
   padding-left: 10px;
   width: 100%;
   margin: 20px 0 7px 0;
   color: #4F5963;
   font-size: 15px;
}

.auth-form__input {
   height: 52px;
   width: 100%;
   font-size: 16px;
   padding: 0 20px;
   border: 1.5px solid #e2e8f0;
   border-radius: 14px;
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
   background: rgba(255, 255, 255, 0.9);
   font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
   -webkit-appearance: none;
   -moz-appearance: none;
   appearance: none;
   box-sizing: border-box;
}

.auth-form__input:focus {
   outline: none;
   border-color: #3b82f6;
   box-shadow: 
       0 0 0 4px rgba(59, 130, 246, 0.1),
       0 1px 3px rgba(0, 0, 0, 0.1);
   transform: translateY(-1px);
   background: #ffffff;
}

.auth-form__input::placeholder {
   color: #9ca3af;
   font-weight: 400;
}

.auth-form__submit {
   height: 56px;
   width: 100%;
   text-transform: uppercase;
   letter-spacing: 1.5px;
   font-size: 0.875em;
   font-weight: 600;
   display: flex;
   justify-content: center;
   align-items: center;
   margin: 24px 0 16px 0;
   border: none;
       font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
   background: #3b82f6;
   color: #ffffff;
   cursor: pointer;
   border-radius: 14px;
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
   box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
   position: relative;
   overflow: hidden;
}



.auth-form__submit:disabled {
   background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
   color: #94a3b8;
   cursor: not-allowed;
   box-shadow: none;
   transform: none;
}

.auth-form__submit:hover:not(:disabled) {
   box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.auth-form__submit:active:not(:disabled) {
   transform: translateY(0);
   box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.auth-form__divider {
   color: #ADB5BD;
   position: relative;
   display: flex;
   justify-content: center;
   align-items: center;
   font-size: 0.9em;
   letter-spacing: 0.5px;
   font-weight: 300;
   margin: 32px 0 24px 0;
}

.auth-form__divider::before,
.auth-form__divider::after {
   content: "";
   display: block;
   width: 4rem;
   border-top: 1px solid #d1d5db;
   transform: scaleY(.5);
}

.auth-form__divider::before {
   margin-right: 1rem;
}

.auth-form__divider::after {
   margin-left: 1rem;
}

.social-login button {
   height: 48px;
   display: flex;
   align-items: center;
   justify-content: center;
   margin: 12px auto;
   width: 95%;
   font-size: 0.875em;
   font-weight: 500;
   background: #ffffff;
   border: 1.5px solid #e2e8f0;
   border-radius: 120px;
   font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
   cursor: pointer;
   transition: all 0.2s ease;
   position: relative;
   overflow: hidden;
   background: linear-gradient(135deg, #1e293b, #334155);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
   box-shadow: 0 0 8px rgba(0,0,0,0.06);
}

.social-login button:hover {
   transform: translateY(-1px);
   border-color: #cbd5e1;
   box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

.social-login button:active {
   transform: translateY(0);
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-login a {
   text-decoration: none;
   color: #374151;
   display: block;
   width: 100%;
}
.social-login button{
     color: #374151;
}
.social-login .arrowdown {
   width: 40px;
   height: 15px;
   margin: 16px auto 0px auto;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   color: #6b7280;
   border-radius: 20px;
   transition: all 0.2s ease;
}

.social-login .arrowdown:hover {
   background: rgba(107, 114, 128, 0.1);
   transform: scale(1.1);
}

.social-login__hidden {
   display: none !important;
}

.error-messages {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left: 4px solid #ef4444;
    color: #dc2626;
    margin-bottom: 1.5rem;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.error-messages ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.error-message,
#emailError {
   display: none;
   justify-content: center;
   align-items: center;
   color: #dc2626;
   font-size: 14px;
   line-height: 18px;
   margin: 16px 0 24px 0;
   font-weight: 500;
   background: rgba(239, 68, 68, 0.05);
   padding: 12px 16px;
   border-radius: 12px;
   border: 1px solid rgba(239, 68, 68, 0.1);
   text-align: center;
}

.backButton {
    border: none;
    background: none;
    cursor: pointer;
    color: #000;
    position: absolute;
    left: 16px;
    top: 16px;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    white-space: nowrap;
}

.backButton:hover {
   background: rgba(248, 250, 252, 0.8);
   color: #1e293b;
   transform: scale(1.05);
}

.social-login img {
   height: 28px;
   margin-right: 12px;
   transition: transform 0.2s ease;
}

.social-login button:hover img {
   transform: scale(1.05);
}

#troubleSignIn {
   margin-bottom: 16px;
   margin-top: 20px;
    border-top: 1px solid #F0F2F4;
    padding-top: 20px;
    text-decoration: none;
    width: 90%;
    margin-left: 5%;
    margin-right: 5%;
   color: #007BFF;
    font-weight: 500;
   font-size: 0.875em;
   cursor: pointer;
   transition: color 0.2s ease;
   text-decoration: underline;
   text-decoration-color: transparent;
}

#troubleSignIn:hover {
   color: #3b82f6;
   text-decoration-color: #3b82f6;
}

.agreeterms {
   font-size: 0.75em;
   color: #6b7280;
    font-weight: 500;
   line-height: 1.5;
   margin-top: 16px;
}

.agreeterms a {
   color: #007BFF;
   text-decoration: none;
   transition: color 0.2s ease;
}

.agreeterms a:hover {
   color: #1d4ed8;
   text-decoration: underline;
}

/* Password validation styles */
.password-requirements-login {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 24px;
    border-radius: 16px;
    margin: 24px 0;
    width: 100%;
    text-align: left;
    border: 1px solid #e2e8f0;
    box-sizing: border-box; 
}

.password-requirements-login p {
    margin: 0 0 16px 0;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
}

.password-requirements-login ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.password-requirements-login li {
    margin: 12px 0;
    color: #64748b;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.password-requirements-login li::before {
    content: "";
    width: 20px;
    height: 20px;
    margin-right: 12px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px;
}

.password-requirements-login li.valid {
    color: #059669;
}

.password-requirements-login li.valid::before {
    border-color: #10b981;
    background-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    transform: scale(1.1);
}

.password-strength-login {
    width: 95%;
    margin: 16px auto;
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden; 
}

.password-strength-bar-login {
    height: 100%;
    width: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.strength-weak {
    background: linear-gradient(90deg, #ef4444, #f87171);
    width: 33.33%;
}

.strength-medium {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    width: 66.66%;
}

.strength-strong {
    background: linear-gradient(90deg, #10b981, #34d399);
    width: 100%;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-modal__content {
    animation: slideUp 0.2s ease-out;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .auth-modal__content {
        padding: 24px;
        border-radius: 12px;
    }

    .signin {
        font-size: 1.5em;
    }

    .elabel {
        font-size: 0.9em;
        margin: 18px 0 7px 0;
    }


    .auth-form__submit {
        height: 52px;
        font-size: 0.8em;
        margin: 20px 0 12px 0;
    }

    .social-login button {
        height: 44px;
        font-size: 0.85em;
    }

    .social-login img {
        height: 24px;
        margin-right: 10px;
    }

    .password-requirements-login {
        padding: 20px;
        margin: 20px 0;
    }
}

@media screen and (max-width: 480px) {
    .auth-modal__content {
        padding: 20px;
        border-radius: 12px;
    }
    .auth-modal {
       background: rgba(0,0,0,0.25);
        transition: none;
        animation: none;
    }

    .signin {
        font-size: 1.3em;
    }

    .elabel {
        font-size: 0.85em;
        margin: 16px 0 6px 0;
    }

    .auth-form__submit {
        height: 48px;
        font-size: 0.75em;
        letter-spacing: 1px;
        margin: 16px 0 10px 0;
    }

    .social-login button {
        height: 42px;
        font-size: 0.8em;
    }

    .social-login img {
        height: 22px;
        margin-right: 8px;
    }

    .auth-form__divider {
        font-size: 0.8em;
        margin: 24px 0 16px 0;
    }

    #troubleSignIn {
        font-size: 0.8em;
    }

    .agreeterms {
        font-size: 0.7em;
    }
}

@media screen and (max-width: 380px) {
    .auth-modal__content {
        margin: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        box-shadow: none;
    }

    .signin {
        font-size: 1.2em;
    }

    .elabel {
        font-size: 0.8em;
        margin: 14px 0 6px 0;
    }

    #authForm {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .auth-form__submit {
        height: 44px;
        font-size: 0.7em;
        letter-spacing: 0.8px;
        margin: 14px 0 8px 0;
    }

    .social-login button {
        height: 40px;
        font-size: 0.75em;
    }

    .social-login img {
        height: 20px;
        margin-right: 6px;
    }
}

@media screen and (max-height: 700px) {
    .auth-modal__content {
        margin: 4% auto;
        padding: 16px;
        max-height: 94vh;
        overflow-y: auto;

    }

    .signin {
        font-size: 1.4em;
        margin-bottom: 12px;
    }

    .password-requirements-login {
        padding: 16px;
        margin: 16px 0;
    }

    .elabel {
        margin: 14px 0 8px 0;
    }

    .auth-form__input {
        padding: 0 14px;
    }

    .auth-form__submit {
        height: 44px;
        margin: 12px 0 8px 0;
    }

    .social-login button {
        height: 38px;
        margin: 8px auto;
    }
}

@media screen and (max-height: 500px) {
    .auth-modal__content {
        margin: 0 auto;
        max-height: 94vh;
        overflow-y: auto;
        padding: 12px;
    }

    .auth-modal__secure-notice {
        margin: 8px 0 12px 0;
        padding: 8px 12px;
    }

    .password-requirements-login {
        padding: 12px;
        margin: 12px 0;
    }

    .auth-form__divider {
        margin: 12px 0;
    }

}

/* Better touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .social-login button,
    .auth-form__submit {
        min-height: 44px;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .password-requirements-login li::before {
        border-width: 1.5px;
    }
}

/* Prevent zoom on input focus for iOS */
@supports (-webkit-touch-callout: none) {
    .auth-form__input {
        font-size: 16px;
    }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .auth-modal__content {
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}



/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    .auth-modal__content {
        scroll-behavior: smooth;
    }
}

/* Print styles */
@media print {
    .auth-modal {
        background: none;
        height: auto;
    }

    .auth-modal__content {
        box-shadow: none;
        margin: 0;
        padding: 0;
        background: white;
    }

    .social-login,
    .auth-form__divider,
    .password-strength {
        display: none;
    }
}

/* Height-specific media queries for compact layout */

@media screen and (max-height: 800px) {
    .auth-modal__content {
        padding: 24px;
        margin: 2% auto;
    }
    
    .signin {
        font-size: 1.5em;
    }
    
    .elabel {
        margin: 16px 0 8px 0;
    }
    
    .password-requirements-login {
        padding: 16px;
        margin: 16px 0;
    }
    
    .password-requirements-login li {
        margin: 8px 0;
        font-size: 13px;
    }
}

@media screen and (max-height: 750px) {
    .auth-modal__content {
        padding: 20px;
        margin: 1% auto;
    }
    
    .signin {
        font-size: 1.4em;
        margin-bottom: 12px;
    }
    
    .elabel {
        margin: 12px 0 6px 0;
        font-size: 14px;
    }
    
    .auth-form__input {
        margin-bottom: 4px;
    }
	.password-requirements-login li::before {
		background-size: 10px;
		height: 15px;
		width: 15px;
	}
	
    .password-requirements-login {
        padding: 12px;
        margin: 12px 0;
    }
    
    .password-requirements-login p {
        margin-bottom: 10px;
        font-size: 13px;
    }
    
    .password-requirements-login li {
        margin: 8px 0;
        font-size: 12px;
    }
    
    .auth-form__submit {
        height: 48px;
        margin: 16px 0 8px 0;
    }
    
    .agreeterms {
        margin-top: 8px;
    }
}

@media screen and (max-height: 650px) {
    .auth-modal__content {
        padding: 16px;
        margin: 0 auto;
        max-height: 98vh;
        overflow-y: auto;
    }
    
    .signin {
        font-size: 1.3em;
    }
    
    .elabel {
        margin: 8px 0 4px 0;
        font-size: 13px;
    }
    
    .password-requirements-login {
        padding: 10px;
        margin: 8px 0;
    }
    
    .password-requirements-login p {
        margin-bottom: 8px;
        font-size: 12px;
    }
    
    .password-requirements-login li {
        margin: 4px 0;
        font-size: 11px;
    }
    
    .password-strength-login {
        margin: 8px auto;
    }
    
    .auth-form__submit {
        height: 44px;
        margin: 12px 0 6px 0;
        font-size: 0.8em;
    }
    
    .agreeterms {
        font-size: 0.7em;
        margin-top: 6px;
    }
}