.glp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 25, 40, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glp-overlay.active {
    opacity: 1;
    visibility: visible;
}

.glp-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    padding: 2.5rem;
    border-radius: 20px;
    
    /* Enhanced glassmorphic effect */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.125);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37),
                inset 0 0 0 1px rgba(255, 255, 255, 0.07);
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glp-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 100%
    );
    pointer-events: none;
}

.glp-popup.animate-out {
    transform: translate(-50%, -150%) rotateX(20deg);
    opacity: 0;
}

.glp-popup h2 {
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 1.8rem 0;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.glp-close {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.glp-close:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.glp-input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.glp-input-group:last-of-type {
    margin-bottom: 2rem;
}

.glp-input-group input[type="text"],
.glp-input-group input[type="password"] {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    letter-spacing: 0.01em;
    transition: all 0.3s ease;
}

.glp-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.glp-input-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.glp-input-group label {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.glp-input-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.glp-popup button {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glp-popup button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.2)
    );
    transition: all 0.3s ease;
}

.glp-popup button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.glp-popup button:active {
    transform: translateY(0);
}

.glp-popup button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.glp-message {
    margin-top: 1.2rem;
    text-align: center;
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 500;
    min-height: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Menu styling */
.glp-login-trigger,
.glp-logout {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.glp-login-trigger:hover,
.glp-logout:hover {
    opacity: 0.8;
}

/* Autofill style override */
.glp-input-group input:-webkit-autofill,
.glp-input-group input:-webkit-autofill:hover,
.glp-input-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: rgba(255, 255, 255, 0.95);
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .glp-popup {
        width: 90%;
        max-width: 360px;
        padding: 2rem;
    }

    .glp-popup h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .glp-input-group input[type="text"],
    .glp-input-group input[type="password"] {
        padding: 12px 16px;
        font-size: 15px;
    }

    .glp-popup button {
        padding: 12px;
    }
}

/* Optional: Add subtle animation for form elements */
.glp-popup.active .glp-input-group {
    animation: slideUp 0.4s ease forwards;
    opacity: 0;
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhance focus visibility for accessibility */
.glp-popup button:focus-visible,
.glp-input-group input:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}
