#topUserInterfaceBar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: fixed !important;
    border: 2px solid #8b8b8b;
    border-radius: 0 0 10px 10px;
    padding: 9.5px;
    background: #0586e3;
    width: 100%;
    box-sizing: border-box !important;
    box-shadow: 0 5px 7.85px rgba(0, 0, 0, 0.375), inset 0 1px 19.85px rgba(0, 0, 0, 0.45);
    z-index: 9998;
    top: 0;
    left: 0;
    margin: 0;
    padding: 9.5px;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    z-index: 9998 !important;
    transform-origin: top center;
    will-change: transform, opacity;
}

@media (max-width: 762px) {
    /* Interface button media sizing for device display */
    #expandMenuToolbar {
        transform: scale(0.825) !important;
    }

    #topUserInterfaceBar {
        transform: scale(1) !important;
        width: 100% !important;
        height: 62.5px !important;
    }
    
    #appMenuOpen {
        transform: scale(0.825) !important;
        left: -10px !important;
    }

    #settingsQuick {
        transform: scale(0.825) !important;
        left: -20px !important;
    }

    #pageTitle {
        transform: scale(0.5) scaleX(0.5) !important;
        margin: 0 -55px;
        max-width: calc(10% - 400px);
        width: 150px !important;
        padding: 2.5px !important;
        font-size: 0.7em !important;
        display: none !important;
    }

    .appMenuOpenButtons {
        gap: 0 !important;
    }

    .moreFromHtWebzContainer {
        transform: scale(0.825) !important;
        right: -25px !important;
        background: rgba(210, 210, 210, 0.5) !important;
        opacity: 0.75 !important;
    }
}

.appMenuOpenButtons {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center;
    align-content: first baseline;
    user-select: none !important;
    gap: 12px;
    flex: 0 0 auto;
}

#expandMenuToolbar {
    pointer-events: all !important;
    cursor: pointer !important;
    pointer-events: all !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start;
    align-items: center;
    position: relative !important;
    border: 3px solid #ccc;
    border-radius: 1cm;
    background: white;
    user-select: none;
    font-weight: bold;
    padding: 10px;
    gap: 9.5px !important;
    box-sizing: border-box;
    transition: all 0.3s;
    transform: scale(1);
}

#expandMenuToolbar:hover {
    transform: scale(1.1);
    background: rgb(215, 215, 215);
    border: 3px solid #8d8d8d;
    box-shadow: 0 2px 8.5px rgba(0, 0, 0, 0.375), inset 0 0 17.5px rgba(0, 0, 0, 0.45);
}

#expandToolbarIcon {
    position: relative;
    user-select: none !important;
    pointer-events: none !important;
    background: rgb(236, 235, 235);
    border: 2px solid #ccc;
    border-radius: 1cm;
    transform: scale(1.25) !important;
    padding: 2px;
}

#appMenuOpen {
    pointer-events: all !important;
    cursor: pointer !important;
    pointer-events: all !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start;
    align-items: center;
    position: relative !important;
    border: 3px solid #ccc;
    border-radius: 1cm;
    background: white;
    user-select: none;
    font-weight: bold;
    padding: 10px;
    gap: 9.5px !important;
    box-sizing: border-box;
    transition: all 0.3s;
    transform: scale(1);
}

#appMenuIcon {
    position: relative;
    user-select: none !important;
    pointer-events: none !important;
    background: rgb(236, 235, 235);
    border: 2px solid #ccc;
    border-radius: 1cm;
    transform: scale(1.25) !important;
    padding: 2px;
}

.apps-menu-text {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-user-drag: none !important;
    letter-spacing: 1.25px;
    transform: scaleY(1.25);
}

#settingsQuick {
    pointer-events: all !important;
    cursor: pointer;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start;
    align-items: center;
    cursor: pointer !important;
    position: relative !important;
    border: 3px solid #ccc;
    border-radius: 1cm;
    background: white;
    user-select: none;
    font-weight: bold;
    padding: 10px;
    gap: 9.5px !important;
    box-sizing: border-box;
    transition: all 0.3s;
    transform: scale(1);
}

#settingsIcon {
    position: relative;
    user-select: none !important;
    pointer-events: none !important;
    background: rgb(236, 235, 235);
    border: 2px solid #ccc;
    border-radius: 1cm;
    transform: scale(1.25) !important;
    padding: 2px;
}

.settings-quick-text {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-user-drag: none !important;
    letter-spacing: 1.25px;
    transform: scaleY(1.25);
}

/* Right side interface menu buttons (More from HtWebz) */
.moreFromHtWebzContainer {
    display: flex !important;
    flex-direction: row;
    justify-content: flex-start !important;
    align-items: center;
    position: absolute;
    background: rgb(210, 210, 210);
    border: 3px solid #ccc;
    border-radius: 1cm;
    padding-inline: 5px;
    padding-block: 2.5px;
    height: fit-content;
    width: fit-content auto !important;
    will-change: contents;
    gap: 9.5px;
    right: 10px;
    box-sizing: border-box !important;
    transition: all 0.1s linear;
    box-shadow: inset 0 0 12.5px rgba(0, 0, 0, 0.45);
    flex: 0 0 auto;
}

#gamesMenuOpen {
    display: flex !important;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    cursor: pointer !important;
    position: relative;
    border: 3px solid #ccc;
    border-radius: 1cm;
    background: White;
    box-sizing: border-box;
    font-weight: bold;
    padding: 10px;
    gap: 9.5px;
    transition: all 0.3s !important;
}

#gamesMenuOpen.hoveringGamesMenuDefault {
    transform: scale(1.1);
    background: rgb(215, 215, 215);
    border: 3px solid #8d8d8d;
    box-shadow: 0 2px 8.5px rgba(0, 0, 0, 0.375), inset 0 0 17.5px rgba(0, 0, 0, 0.45);
}

#gamesMenuOpen.hoveringGamesMenuSmall {
    transform: scale(0.925);
    background: rgb(215, 215, 215);
    border: 3px solid #8d8d8d;
    box-shadow: 0 2px 8.5px rgba(0, 0, 0, 0.375), inset 0 0 17.5px rgba(0, 0, 0, 0.45);
}
#gamesMenuIcon {
    pointer-events: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    background: rgb(236, 235, 235);
    border: 2px solid #ccc;
    border-radius: 1cm;
    padding: 2.5px;
    align-self: center;
    image-rendering: optimizeSpeed !important;
}

.games-menu-text {
    pointer-events: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    letter-spacing: 1.25px;
    transform: scaleY(1.25);
}

#resourcesMenuOpen {
    display: flex !important;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    cursor: pointer !important;
    position: relative;
    border: 3px solid #ccc;
    border-radius: 1cm;
    background: White;
    box-sizing: border-box;
    font-weight: bold;
    padding: 10px;
    gap: 9.5px;
    transform: scale(1);
    transform-origin: center;
    transition: all 0.3s !important;
}

#resourcesMenuOpen.hoveringResourcesDefault {
    transform: scale(1.1);
    background: rgb(215, 215, 215);
    border: 3px solid #8d8d8d;
    box-shadow: 0 2px 8.5px rgba(0, 0, 0, 0.375), inset 0 0 17.5px rgba(0, 0, 0, 0.45);
}

#resourcesMenuOpen.hoveringResourcesSmall {
    transform: scale(0.925);
    background: rgb(215, 215, 215);
    border: 3px solid #8d8d8d;
    box-shadow: 0 2px 8.5px rgba(0, 0, 0, 0.375), inset 0 0 17.5px rgba(0, 0, 0, 0.45);
}

#resourcesMenuIcon {
    pointer-events: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    background: rgb(236, 235, 235);
    border: 2px solid #ccc;
    border-radius: 1cm;
    padding: 2.5px;
    image-rendering: optimizeSpeed !important;
}

.resources-menu-text {
    pointer-events: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    letter-spacing: 1.25px;
    transform: scaleY(1.25);
}

@keyframes jumpTitleUI {
    0% { transform: scale(1) rotate(0deg) translateY(0); }
    15% { transform: scale(0.9) rotate(-27.5deg) translateY(6.5px); }
    25% { transform: scale(1.3) rotate(2.5deg) translateY(-31.5px); }
    50% { transform: scale(1.1) rotate(-3.5deg) translateY(-37.5px); }
    75% { transform: scale(0.9) rotate(1.5deg) translateY(-10.5px); }
    100% { transform: scale(1) rotate(0deg) translateY(0); }
}

@keyframes expandWidth {
    0% { width: 100px; }
    50% { width: 200px; font-size: 1.5em; }
    100% { width: 285px; }
}

@keyframes fadeOutCover {
    0% { opacity: 1; }
    80% { opacity: 0.5; }
    100% { opacity: 0; }
}

#pageTitle {
    position: relative !important;
    overflow: hidden;
    animation: expandWidth 0.8s ease-in-out forwards;
    position: absolute !important;
    display: flex;
    left: 435px;
    justify-content: center;
    align-items: center;
    font-weight: bolder;
    font-size: 1.35em;
    transform: scale(1.25) !important;
    transform-origin: center;
    color: black !important;
    -webkit-text-stroke: 0.025em darkcyan;
    -webkit-text-fill-color: cyan;
    user-select: none !important;
    text-rendering: optimizeSpeed !important;
    text-overflow: ellipsis;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.375);
    box-sizing: border-box;
    box-shadow: inset 0 0 12.5px rgba(0, 0, 0, 0.325), 0 2px 10px rgba(0, 0, 0, 0.375);
    background: rgb(0, 215, 215);
    border: 1.5px solid #ccc;
    border-radius: 1cm;
    padding: 5px 15px;
    transition: all 0.3s;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 100px;
    max-width: calc(100% - 500px);
    overflow: hidden;
}

#pageTitle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(0, 215, 215);
    z-index: 1;
    animation: fadeOutCover 1.2s ease-in-out forwards;
}

#pageTitle span {
    position: relative;
    z-index: 0;
}

#pageTitle:hover {
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.375), 0 2px 10px rgba(0, 0, 0, 0.375);
}

#pageTitle.JumpTitle {
    animation: jumpTitleUI 0.65s linear !important;
}

/* Add custom properties for liquid effect positioning */
#appMenuOpen,
#settingsQuick,
#expandMenuToolbar,
#gamesMenuOpen,
#resourcesMenuOpen {
    --liquid-x: 0px;
    --liquid-y: 0px;
    overflow: hidden;
    position: relative;
}

/* Update liquid fill pseudo-elements with shadow */
#appMenuOpen::before,
#settingsQuick::before,
#expandMenuToolbar::before,
#gamesMenuOpen::before,
#resourcesMenuOpen::before {
    content: '';
    position: absolute;
    top: var(--liquid-y);
    left: var(--liquid-x);
    width: 0;
    height: 0;
    background: rgb(215, 215, 215);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease-out, height 0.5s ease-out, box-shadow 0.5s ease-out;
    box-shadow: inset 0 0 17.5px rgba(0, 0, 0, 0.45);
    mix-blend-mode: multiply;
}

/* Enhanced hover effect with shadow */
#appMenuOpen:hover::before,
#settingsQuick:hover::before,
#expandMenuToolbar:hover::before,
#gamesMenuOpen:hover::before,
#resourcesMenuOpen:hover::before {
    width: 300%;
    height: 300%;
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.45), 
                inset 0 0 15px rgba(0, 0, 0, 0.35);
}

/* Enhanced click effect with deeper shadow */
#appMenuOpen.clicked::before,
#settingsQuick.clicked::before,
#expandMenuToolbar.clicked::before,
#gamesMenuOpen.clicked::before,
#resourcesMenuOpen.clicked::before {
    background: rgb(180, 180, 180);
    width: 350%;
    height: 350%;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.55),
                inset 0 0 25px rgba(0, 0, 0, 0.45);
    transition: width 0.35s cubic-bezier(0.1, 0.8, 0.3, 1), 
                height 0.35s cubic-bezier(0.1, 0.8, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.1, 0.8, 0.3, 1);
}

/* Remove old hover styles */
#appMenuOpen:hover,
#settingsQuick:hover,
#expandMenuToolbar:hover,
#gamesMenuOpen.hoveringGamesMenuDefault,
#gamesMenuOpen.hoveringGamesMenuSmall,
#resourcesMenuOpen.hoveringResourcesDefault,
#resourcesMenuOpen.hoveringResourcesSmall {
    background: none;
}

/* Ensure content stays above liquid fill */
#appMenuOpen *,
#settingsQuick *,
#expandMenuToolbar *,
#gamesMenuOpen *,
#resourcesMenuOpen * {
    position: relative;
    z-index: 1;
}

/* Remove old hover backgrounds */
#appMenuOpen:hover,
#settingsQuick:hover,
#expandMenuToolbar:hover {
    background: none;
}

#gamesMenuOpen.hoveringGamesMenuDefault,
#gamesMenuOpen.hoveringGamesMenuSmall,
#resourcesMenuOpen.hoveringResourcesDefault,
#resourcesMenuOpen.hoveringResourcesSmall {
    background: none;
}

#toolbarExtension {
    display: none; /* Initially hidden */
    flex-direction: column;
}
