body.world_ui {
    width: 100%;
    height: 100%;
    clip: always;
    margin-left: inset-left;
}

#top_panel {
    display: block;
    position: absolute;
    top: 10dp;
    left: 8dp;
    transition: margin-top 0.2s linear-in;
    margin-top: 0dp;
}

#left_panel {
    display: block;
    position: absolute;
    top: 90dp;
    left: 8dp;
    transition: margin-left 0.2s linear-in;
    margin-left: 0dp;
}

#left_panel.withPearls {
    top: 135dp;
}

.full-hide #left_panel,
.petbattle-hide #left_panel,
.hide #left_panel {
    transition: margin-left 0.2s linear-in;
    margin-left: -130dp;
}

.ftue-hide #top_panel,
.full-hide #top_panel,
.petbattle-hide #top_panel,
.hide #top_panel {
    transition: margin-top 0.2s linear-in;
    margin-top: -100dp;
}

/*-------------------------------------------------------------------------------*/
/*--------------                   Gems panel                      --------------*/
@spritesheet gems_panel_sprites {
    src: interface/large/gui_store_top_scale9.rttex;
    resolution: 1x;
    gems_panel_bg: 0px 0px 32px 32px;
    gems_panel_bg_inner: 15px 15px 2px 2px;
}

#gems_panel {
    display: inline;
    width: 250dp;
    height: 75dp;
    border-radius: 7dp;
    background-color: rgba(24, 107, 139, 170);
    display: inline-block;
    vertical-align: top;
}

.box_border {
    margin-top: 5dp;
    margin-left: 5dp;
    width: 65dp;
    height: 65dp;
    border-radius: 7dp;
    background-color: #186B8BCC;
    vertical-align: top;
    /* Remove any margins that might interfere with centering */
}

.box_border_background {
    width: 65dp;
    height: 65dp;
    background-color: rgba(121, 194, 222, 0);
    border-top-left-radius: 6dp;
    border-bottom-left-radius: 6dp;
    vertical-align: top;
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

@spritesheet dungeon_avatar_sprite
{
	src: game/vilpix.rttex;
    resolution: 1x;
    dungeonAvatar0: 4px 164px 24px 24px;
}

.avatar {
    width: 77%;
    height: 77%;
    margin-top: 13%;
    margin-left: 12%;
    z-index: 2;
    top: 0;
    left: 0;
    display: block;
}

    #gems_panel .panel {
        margin-left: 15dp;
        width: 70%;
        height: 34dp;
        background-color: rgba(65,123,150,255);
        display: inline-block; 
        vertical-align: top;
        box-shadow: #000a 0px 2px 2px;
        border-top-left-radius: 6dp;
        border-top-right-radius: 6dp;
        border-bottom-left-radius: 6dp;
        border-bottom-right-radius: 6dp;
    }

    
    #gems_panel .left_panel {
        height:100%; 
        width:20%; 
        display: inline-block; 
        vertical-align: top;
    }    
    
    #gems_panel .right_panel {
        margin-left: 12dp; 
        height:100%; 
        width:75%; 
        display: inline-block;
        vertical-align: top;
	sound-on-click: true;
    }

    #gems_panel .panel_name {
        width: 95%; /* Ensure it takes full width */
        height: 33dp;
        vertical-align: top;
        margin-left: 15dp;
    }

    #gems_panel .panel:active,
    #gems_panel .panel:active * {
        image-color: #aaa;
        color: #aaa;
    }

        #gems_panel .panel:active #gem_left_panel {
            background-color: rgba(83, 133, 152, 255);
        }

    #gems_panel #gem_left_panel {
        width: 41dp;
        height: 100%;
        background-color: rgba(116,189,212,255);
        border-top-left-radius: 6dp;
        border-bottom-left-radius: 6dp;
        margin-left: -4dp;
        margin-right: 8dp;
        display: inline-block;
    }

        #gems_panel #gem_left_panel #gem_icon {
            width: 28dp;
            height: 28dp;
            decorator: image(interface/cash_icon_overlay.rttex);
            margin: auto;
        }

    #gems_panel #gem_right_panel {
        width: 66%;
        text-align: center;
        margin-top: 12%;
        font-size: 82%;
        margin-left: -4%;
        font-weight: bold;
        white-space: nowrap;
        overflow: hidden;
        font-effect: shadow(2dp 2dp black);
        display: inline-block;
        vertical-align: top;
    }

    #gems_panel #gem_plus_button_right {
        margin-left: 2dp; /* Space from currency panel */
        margin-top: 0.5dp;
        width: 35dp;
        height: 35dp;
        vertical-align: top;
        display: inline-block;
    }

    #gems_panel #player_name {
    text-align: left;
    font-size: 20dp;
    width: 95%; /* Make it take full width of its container */
    min-width: 0; /* Allow it to shrink below content size */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 0dp; /* Remove fixed margin */
    margin-top: 3dp; /* Remove fixed margin */
    font-weight: bold;
    font-effect: shadow(2dp 2dp black);
    display: block; /* Change to block for full width */
    vertical-align: top;
    }

    #gems_panel #plus_button {
        display: inline-block;
        width: 35dp;
        height: 35dp;
        decorator: image(interface/large/gui_buy_plus.rttex);
	sound-on-click: true;
    }

    #gems_panel #plus_button:active {
        image-color: #aaa;
    }

/*-------------------------------------------------------------------------------*/
/*--------------                   Pearl panel                      --------------*/
@spritesheet pearls_panel_sprites {
    src: interface/large/gui_store_top_scale9.rttex;
    resolution: 1x;
    pearls_panel_bg: 0px 0px 32px 32px;
    pearls_panel_bg_inner: 15px 15px 2px 2px;
}

#pearls_panel {
    display: block;
    margin-top: 5dp;
}

#pearls_panel.hidden {
    display: none;
}

#pearls_panel .panel {
    width: 186dp;
    height: 41dp;
    decorator: ninepatch(pearls_panel_bg, pearls_panel_bg_inner);
    display: inline-block;
    vertical-align: top;
}

#pearls_panel #pearl_left_panel {
    width: 41dp;
    height: 39dp;
    background-color: rgba(121, 194, 222, 255);
    border-top-left-radius: 6dp;
    border-bottom-left-radius: 6dp;
    margin-left: -1dp;
    margin-right: 8dp;
    display: inline-block;
}

#pearls_panel #pearl_left_panel #pearl_icon {
    width: 26dp;
    height: 26dp;
    decorator: image(interface/large/pearl_icon_overlay.rttex);
    margin: auto;
}

#pearls_panel #pearl_right_panel {
    font-size: 24dp;
    font-weight: bold;
    line-height: 39dp;
    font-effect: shadow(2dp 2dp black);
    display: inline-block;
    vertical-align: top;
}

/*-------------------------------------------------------------------------------*/
