html,
body
{
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body
{
    background-color: #0D0A07;
    background: radial-gradient( circle at center, #261C14, 70%, #000000 );
    font-family: 'Roboto', sans-serif;
}

.content {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

#coins
{
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    pointer-events: none;
}

.coin
{
    --coin-size: 5vw;

    width: var( --coin-size );
    height: var( --coin-size );
    background: url( "images/coin.png" );
    background-repeat: no-repeat;
    background-size: contain;
    image-rendering: pixelated;

    z-index: -1;
    position: absolute;
    left: 0;
    top: calc( var( --coin-size ) * -1 );

    animation: coin-drop 5s linear infinite;

    opacity: 0.0;
    transition: opacity 500ms;
}

.chest-open .coin
{
    opacity: 0.1;
}

@keyframes coin-drop
{
    from
    {
        top: calc( var( --coin-size ) * -1 );
    }

    to
    {
        top: 100%;
    }
}

.chest-part
{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate( -50%, -50% );

    width: 50%;
    aspect-ratio: 1.0;
}

#chest_top
{
    image-rendering: pixelated;
    background-image: url( 'images/chest_top_closed.png' );
    background-repeat: no-repeat;
    background-size: contain;

    z-index: 1;
}

.chest-open #chest_top
{
    background-image: url( 'images/chest_top_open.png' );
}

#chest_bottom
{
    image-rendering: pixelated;
    background-image: url( 'images/chest_bottom.png' );
    background-repeat: no-repeat;
    background-size: contain;

    z-index: 3;
}

#booty
{
    width: 25%;
    aspect-ratio: 1.0;
    pointer-events: none;

    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate( -50%, -50% );

    z-index: 0;

    image-rendering: pixelated;
    background-image: url( 'images/booty.png' );
    background-repeat: no-repeat;
    background-size: contain;
}

.chest-open #booty
{
    transform: translate( -50%, -150% );
    transition: transform 3s ease-in-out, filter 2.5s ease-in-out 0.5s;

    filter: drop-shadow( 0 0 60px #FFD700 );

    z-index: 2;
}