#menu, #bars {
    display: none;
}

#menu {
    margin-top: 10px;
}
#menu.showMenu {
    display: flex;
}

#package, #inventory, #badges {
    height: 200px;
}

#package {
    width: 300px;
}

#badges {
    width: 150px;
    justify-content: right;
    display: flex;
    flex-wrap: wrap;
    align-content: space-between;
    position: relative;
}
#badges > div {
    height: 90px;
    width: 100%;
    position: relative;
}
#badges img {
    position: absolute;
    top: 0;
    right: 0;
    height: 90px;
    transition: 1s all;
}
#badges img.empty {
    opacity: .7;
}
#badges img.full {
    opacity: 0;
    transform: scale(1.3);
    pointer-events: none;
}

#badges .taken img.empty {
    opacity: 0;
}
#badges .taken img.full {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}

#inventory {
    flex-grow: 1;
    display: flex;
}

#package.unknownPackage {
    opacity: .7;
}

.bigItems {
    width: 25%;
    display: flex;
    flex-direction: column;
    position: relative;
}
.smallItems {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: space-around;
    position: relative;
}
.bigItems .icon, .smallItems .icon {
    background-image: url(../images/badge_quadrato_icone.png);
    background-size: 100%;
    background-repeat: no-repeat;
    position: relative;
    animation: heartbeatBig 2s 1;
}

.bigItems > [data-inventory], .smallItems > [data-inventory] {
    position: relative;
    transition: 1s all;
    
    transform-origin: 20px
}

.bigItems > [data-inventory] {
    height: 64px;
    margin: 2px;
}
.bigItems .icon {
    width: 64px;
    height: 64px;
}
.smallItems > [data-inventory] {
    height: 42px;
    margin: 4px 0;
    flex-basis: 25%;
}
.smallItems .icon {
    width: 42px;
    height: 42px;
}

.bigItems .quantity, .smallItems .quantity {
    position: absolute;
    bottom: -2px;
    left: 50px;
    background-image: url(../images/inventory_quantity.png);
    background-size: 100%;
    background-repeat: no-repeat;
    width: 30px;
    height: 32px;
    line-height: 28px;
    text-align: center;
    color: #E5D0B2;
    font-size: 14px;
    font-weight: bold;
    opacity: 1;
    transition: 1s opacity;
}
.smallItems .quantity {
    left: 31px;
    width: 24px;
    height: 24px;
    bottom: 0px;
    line-height: 21px;
    font-size: 12px;
    background: #77604e;
    border-radius: 50%;
    border: 1px solid #4b311b;
}

.bigItems .name, .smallItems .name {
    position: absolute;
    left: 85px;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    transition: 1s color;

    font-size: 14px;
}
.smallItems .name {
    left: 60px;
}
#inventory .hiddenInventory {
    filter: saturate(0.2);
    opacity: .7;
    pointer-events: none;
}

#inventory .hiddenInventory .icon {
    animation: none;
}

#inventory .hiddenInventory .name {
    color: transparent;
}
#inventory .hiddenInventory .name::before {
    content: "???";
    color: black;
}
#inventory .hiddenInventory .quantity {
    opacity: 0;
}


#packagesContainer {
    display: flex;
    max-width: 1366px;
    margin: 0 auto;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

#packagesContainer .package {
    width: 250px;
    height: 493px;
    background-image: url(../images/box_base.png);
    background-size: 100%;
    background-repeat: no-repeat;
    padding: 30px;
    color: black;
    position: relative;
    margin: 8px;
    filter: saturate(0.2);
    transform: scale(0.9);
    transition: 0.5s all;
}
#packagesContainer .package:hover {
    filter: saturate(1);
    transform: scale(1);
}
#packagesTitle {
    font-size: 22px;
}

#packagesContainer .package > img {
    padding: 10px 10px 0 10px;
}

#packagesContainer .choosePackage {
    position: absolute;
    bottom: -17px;
    left: 0;
    right: 0;
    margin: 0 auto;
}





#bars {
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    justify-content: center;
    align-items: center;
    transform: scale(0.8);
}
#bars[style*='display: block'] {
    display: flex !important;
}

@media (min-height: 800px) {
    #bars {
        top: 65px;
        transform: scale(1);
    }
}


#barSeparator {
    height: 50px;
    width: 63px;
    margin: 20px;
    background-repeat: no-repeat;
    background-size: 100%;
    background-image: url(../images/bars/cornice_dettaglio.png);
}
#waterBar, #foodBar {
    position: relative;
    width: 450px;
    height: 130px;
}
#bars .icon {
    position: absolute;
    height: 130px;
    width: 103px;
    background-repeat: no-repeat;
    background-size: 100%;
}

#waterBar .icon {
    background-image: url(../images/bars/label-ico_water.png);
    right: 0;
}
#foodBar .icon {
    background-image: url(../images/bars/label-ico_food.png);
    left: 0;
}

#bars .background {
    position: absolute;
    height: 130px;
    width: 355px;
    background-repeat: no-repeat;
    background-size: 100%;
    overflow: hidden;
}
#waterBar .background {
    background-image: url(../images/bars/bar_empty_water.png);
    right: 97px;
}
#foodBar .background {
    background-image: url(../images/bars/bar_empty_food.png);
    left: 97px;
}


#bars .fill {
    position: absolute;
    height: 130px;
    width: 331px;
    background-repeat: no-repeat;
    background-size: 100%;
    transition: 0.5s all;
}

#waterBar.dying , #foodBar.dying {
    animation: heartbeat 2s infinite;
}

.animation-duration4 {
    animation-duration: 2s !important;
}
.animation-duration3 {
    animation-duration: 1.5s !important;
}
.animation-duration2 {
    animation-duration: 1s !important;
}
.animation-duration1 {
    animation-duration: 0.5s !important;
}


#waterBar .fill {
    background-image: url(../images/bars/bar_full_water.png);
    right: 0;
    margin-right: 6px;
}
#foodBar .fill {
    background-image: url(../images/bars/bar_full_food.png);
    left: 0;
    margin-left: 6px;
}



@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes heartbeatBig {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}
