html,
body {
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: 'Acrom';
    src: url('../fonts/Acrom-Bold.ttf') format('truetype');
    font-weight: bold;
}

@font-face {
    font-family: 'Acrom';
    src: url('../fonts/Acrom-ExtraBold.ttf') format('truetype');
    font-weight: bolder;
}

@font-face {
    font-family: 'Catalpa-Black';
    src: url('../fonts/Catalpa-Black.ttf') format('truetype');
    font-weight: bold;
}

@font-face {
    font-family: 'AktivGrotesk-Medium';
    src: url('../fonts/AktivGrotesk-Medium.ttf') format('truetype');
    font-weight: bold;
}

/* Splash competition */

.splash-competition {
    background-image: url('../img/splash-competition.png');
    background-size: 100% auto;
    display: flex;
    flex-direction: column;
    height: 750px;
    margin: 0 auto;
    position: relative;
    width: 562px;
}

.prizes {
    height: auto;
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 350px;
}

.splash-competition .bottom {
    bottom: 40px;
    position: absolute;
    width: 100%;
}

.splash-competition .white-button {
    bottom: initial;
    display: block;
    left: initial;
    margin: 20px auto 0 auto;
    position: relative !important;
    top: initial;
}

/* Splash */

.splash {
    background-image: url('../img/splash.png');
    background-size: 100% auto;
    display: flex;
    flex-direction: column;
    height: 750px;
    margin: 0 auto;
    position: relative;
    width: 562px;
}

.logo {
    margin: 50px auto 0 auto;
    width: 80%;
}

.play {
    left: 50%;
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 200px;
}

.characters {
    bottom: 30px;
    display: flex;
    flex-direction: column;
    position: absolute;
    width: 100%;
}

.characters .top {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 20px;
}

.characters .character {
    height: auto;
    margin: 0 15px;
    width: 100px;
}

.splash-title {
    color: white;
    font-family: 'AktivGrotesk-Medium', sans-serif;
    font-size: 28px;
    margin: 0 50px;
    text-align: center;
}

.sound-button {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    height: 50px;
    outline: none !important;
    position: absolute;
    right: 15px;
    top: 15px;
    width: 50px;
}

.sound-button.sound-on {
    background-image: url('../img/sound-on.png');
    background-size: 100% 100%;
}

.sound-button.sound-off {
    background-image: url('../img/sound-off.png');
    background-size: 100% 100%;
}

/* Wrapper */

.wrapper {
    background-image: url('../img/background.jpg');
    background-size: 100% auto;
    display: flex;
    flex-direction: column;
    height: 750px;
    margin: 0 auto;
    position: relative;
    width: 562px;
}

/* Score bar */

.score-bar {
    align-items: center;
    background: #000000;
    display: flex;
    height: 46px;
    font-family: 'Acrom', sans-serif;
    font-size: 26px;
    font-weight: bolder;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 2;
}

.score-bar .score-label {
    font-size: 22px;
}

.score-bar .current-score {
    color: white;
}

.score-bar .high-score,
.current-level {
    color: #e74810;
}

/* Game */

.game {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.dark-background {
    background-image: url('../img/screen-darken.png');
    background-size: 100% auto;
    background-repeat: no-repeat;
    bottom: 0;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: -1;
}

.game-running {
    cursor: none;
}

.suitcase {
    background-image: url('../img/open-suitcase.png');
    background-size: 100% auto;
    background-repeat: no-repeat;
    bottom: 10px;
    height: 84px;
    position: absolute;
    width: 100px;
    z-index: 99;
}

.suitcase-frozen {
    background-image: url('../img/suitcase-frozen.png');
    background-size: 100% auto;
    background-repeat: no-repeat;
    bottom: 10px;
    height: 81px;
    position: absolute;
    width: 100px;
    z-index: 99;
}

.suitcase-front {
    background-image: url('../img/suitcase-front.png');
    background-size: 100% auto;
    background-repeat: no-repeat;
    bottom: 10px;
    height: 24px;
    position: absolute;
    width: 100px;
    z-index: 101;
}

.splash-animation {
    animation: play-splash 0.5s steps(8) infinite;
    background-image: url('../img/splash_animation.png');
    background-position: left center;
    background-size: cover;
    height: 80px;
    left: 50%;
    position: absolute;
    top: -20px;
    transform: translateX(-50%);
    width: 80px;
}

@keyframes play-splash {
    100% {
        background-position: -640px;
    }
}

.correct-animation {
    animation: play-correct 0.5s steps(6) infinite;
    background-image: url('../img/correct_animation.png');
    background-position: left center;
    background-size: cover;
    height: 80px;
    left: 50%;
    position: absolute;
    top: -10px;
    transform: translateX(-50%);
    width: 80px;
}

@keyframes play-correct {
    100% {
        background-position: -480px;
    }
}

.incorrect-animation {
    animation: play-incorrect 0.5s steps(6) infinite;
    background-image: url('../img/incorrect_animation.png');
    background-position: left center;
    background-size: cover;
    height: 80px;
    left: 50%;
    position: absolute;
    top: -10px;
    transform: translateX(-50%);
    width: 80px;
}

@keyframes play-incorrect {
    100% {
        background-position: -480px;
    }
}

.item {
    background-size: 100% auto;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    z-index: 100;
}

.item-1 {
    background-image: url('../img/balloon.png');
    height: 82px;
    width: 52px;
}

.item-2 {
    background-image: url('../img/ball.png');
    height: 57px;
    width: 55px;
}

.item-3 {
    background-image: url('../img/shield.png');
    height: 64px;
    width: 50px;
}

.item-4 {
    background-image: url('../img/hat.png');
    height: 39px;
    width: 71px;
}

.item-5 {
    background-image: url('../img/bear.png');
    height: 76px;
    width: 61px;
}

.item-6 {
    background-image: url('../img/clock.png');
    height: 70px;
    width: 55px;
}

.item-7 {
    background-image: url('../img/ice.png');
    height: 68px;
    width: 57px;
}

.item-8 {
    background-image: url('../img/paint.png');
    height: 68px;
    width: 49px;
}

/* Items animations */

.going-left-animation {
    animation: going-left 1.5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
    z-index: 102;
}

@keyframes going-left {
    50% {
        transform: translateX(-60px) rotate(-540deg);
        transform-origin: center center;
    }
    100% {
        transform: translateX(-80px) rotate(-1080deg);
        transform-origin: center center;
    }
}

.going-right-animation {
    animation: going-right 1.5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
    z-index: 102;
}

@keyframes going-right {
    50% {
        transform: translateX(60px) rotate(540deg);
        transform-origin: center center;
    }
    100% {
        transform: translateX(80px) rotate(1080deg);
        transform-origin: center center;
    }
}

/* Level ui */

.level-ui {
    align-items: center;
    display: flex;
    flex-direction: row;
    left: 0;
    opacity: 0;
    padding: 10px 20px;
    position: absolute;
    right: 0;
    top: 0;
    transition: opacity 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
    z-index: -1;
}

.level-ui .character {
    margin-right: 20px;
    width: 130px;
}

.items-ui {
    align-items: center;
    background: #d6f1ff;
    -webkit-box-shadow: 1px 1px 9px 1px rgba(0, 0, 0, 0.5);
    -moz-box-shadow: 1px 1px 9px 1px rgba(0, 0, 0, 0.5);
    box-shadow: 1px 1px 9px 1px rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 10px 0px;
    position: relative;
}

.triangle {
    border-color: transparent transparent #d6f1ff transparent;
    border-style: solid;
    border-width: 0 0 24px 35px;
    height: 0;
    left: -35px;
    position: absolute;
    top: 50%;
    transform: translateY(-15px);
    width: 0;
}

.items-ui .title {
    font-family: 'Acrom', sans-serif;
    font-weight: bold;
    font-size: 17px;
    margin: 0 15px 5px 15px;
}

.ui-items-list {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    height: 40px;
    justify-content: space-between;
    padding: 0 15px;
    width: 100%;
}

.ui-item {
    display: flex;
    flex: 1;
    justify-content: center;
    margin-right: 13px;
}

.ui-item:last-child {
    margin-right: 0;
}

.ui-item .ui-item-icon {
    height: 35px;
}

.ui-item .collected {
    height: 40px;
}

.ui-wrong-items-list {
    align-items: center;
    background: white;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    margin: 10px 0 5px 0;
    padding: 6px;
    width: 100%;
}

.ui-wrong-items-list img {
    height: 35px;
    margin: 0 5px;
}

.ui-wrong-items-list h3 {
    font-family: 'Acrom', sans-serif;
    font-weight: bold;
    font-size: 18px;
    margin: 0 0 0 5px;
}

/* New level ui */

.new-level-ui {
    display: flex;
    flex-direction: column;
    left: 0;
    opacity: 0;
    padding: 10px 20px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}

.big-title {
    color: white;
    font-family: 'Catalpa-Black', sans-serif;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    margin-left: 150px; /* Character width + margin right */
    margin-top: 0;
    position: absolute;
    top: -50px;
}

.big-title img {
    height: 26px;
}

.new-level-ui .middle {
    align-items: center;
    display: flex;
    flex-direction: row;
}

.new-level-ui .character {
    margin-right: 20px;
    width: 130px;
}

.new-level-ui .ui-items-lists {
    width: 100%;
}

/* End game UI */

.end-game-ui {
    display: flex;
    flex-direction: column;
    left: 0;
    opacity: 0;
    padding: 10px 20px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}

.end-game-ui .middle {
    align-items: center;
    display: flex;
    flex-direction: row;
}

.end-game-ui .middle .title {
    margin: 10px 0 5px 0;
    line-height: 25px;
}

.end-game-ui .character {
    margin-right: 20px;
    width: 130px;
}

.end-game-ui .items-ui {
    align-items: flex-start;
    padding: 20px 15px;
}

.end-game-ui .triangle {
    top: 50%;
    transform: translateY(-50%);
}

.black-title {
    color: black;
    font-family: 'Acrom', sans-serif;
    font-size: 30px;
    font-weight: bolder;
    margin: 0;
}

.bigger-title {
    color: black;
    font-family: 'Acrom', sans-serif;
    font-size: 50px;
    font-weight: bolder;
    margin: 0;
}

.score-line {
    display: flex;
    flex-direction: row;
    font-family: 'Acrom', sans-serif;
    font-size: 20px;
    font-weight: bolder;
    justify-content: space-between;
    margin-top: 5px;
    width: 100%;
}

.white-button {
    align-self: start;
    background: white;
    background-size: auto 100%;
    background-repeat: repeat-x;
    border: none;
    border-radius: 50px;
    bottom: -60px;
    color: #e74810;
    cursor: pointer;
    font-family: 'Catalpa-Black', sans-serif;
    font-size: 26px;
    font-weight: bolder;
    margin-left: 150px; /* Character width + margin right */
    margin-top: 10px;
    min-width: 180px;
    padding: 8px 30px;
    position: absolute;
    text-transform: uppercase;
}

.white-button:focus {
    outline: none;
}

/* Timer bar */

.timer-bar {
    align-items: center;
    background-image: url('../img/timer-back-panel.png');
    background-size: auto 100%;
    background-repeat: repeat-x;
    height: 40px;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    padding: 0 20px;
    transition: opacity 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.timer-bar .bar {
    border-radius: 8px;
    background: #000000;
    flex: 1;
    height: 26px;
    position: relative;
    overflow: hidden;
}

.timer-bar .bar-label {
    color: #00c7ff;
    font-family: 'Acrom', sans-serif;
    font-size: 20px;
    font-weight: bolder;
    margin-left: 20px;
}

.timer-bar .bar .timer {
    background-size: auto 100%;
    background-repeat: repeat-x;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    transition: width;
    width: 100%;
}

.blue-timer {
    background-image: url('../img/blue-timer.png');
}

.yellow-timer {
    background-image: url('../img/yellow-timer.png');
}

.red-timer {
    background-image: url('../img/red-timer.png');
}

/* Stuff */

.hidden {
    display: none !important;
}

.show {
    opacity: 1;
    z-index: 110;
}

.dark-background.show {
    z-index: 1;
}

/* Mobile */

@media only screen and (max-width: 562px) {
    .splash-competition {
        height: 1.3345195729537367rem;
        margin: 0.10676156583629894rem auto;
        width: 1rem;
    }

    .prizes {
        width: 0.6227758007117438rem;
    }

    .splash-competition .white-button {
        margin: 0.03558718861209965rem auto 0 auto;
    }

    .splash-competition .bottom {
        bottom: 0.0711743772241993rem;
    }

    .splash {
        height: 1.3345rem;
        margin: 0.1068rem auto;
        width: 1rem;
    }

    .logo {
        margin: 0.089rem auto 0 auto;
    }

    .play {
        width: 0.35587188612099646rem;
    }

    .characters {
        bottom: 0.05338078291814947rem;
    }

    .characters .top {
        margin-bottom: 0.03558718861209965rem;
    }

    .characters .character {
        margin: 0 0.026690391459074734rem;
        width: 0.17793594306049823rem;
    }

    .splash-title {
        font-size: 0.0498220640569395rem;
        margin: 0 0.08896797153024912rem;
    }

    .sound-button {
        height: 0.08896797153024912rem;
        width: 0.08896797153024912rem;
        right: 0.026690391459074734rem;
        top: 0.026690391459074734rem;
    }

    .wrapper {
        width: 100%;
        height: 1.3345rem;
        margin: 0.10676156583629894rem auto;
    }

    .score-bar {
        height: 0.0819rem;
        font-size: 0.0463rem;
        padding: 0 0.05338078291814947rem;
    }

    .score-bar .score-label {
        font-size: 0.039099999999999996rem;
    }

    .big-title {
        font-size: 0.0641rem;
        margin-bottom: 0.0178rem;
        margin-left: 0.2669rem;
        top: -0.089rem;
    }

    .new-level-ui .character {
        margin-right: 0.0356rem;
        width: 0.2313rem;
    }

    .items-ui {
        padding: 0.0178rem 0px;
        border-radius: 0.028469750889679714rem;
    }

    .triangle {
        border-width: 0 0 0.042699999999999995rem 0.0663rem;
        left: -0.0633rem;
        transform: translateY(-0.0267rem);
    }

    .items-ui .title {
        font-size: 0.0311rem;
        margin: 0 0.0267rem 0.0089rem 0.0267rem;
        word-spacing: -0.002rem;
    }

    .ui-items-list {
        height: 0.0712rem;
        padding: 0 0.0267rem;
    }

    .ui-item {
        margin-right: 0.023100000000000002rem;
    }

    .ui-item .ui-item-icon {
        height: 0.0623rem;
    }

    .ui-wrong-items-list {
        margin: 0.0178rem 0 0.0089rem 0;
        padding: 0.010700000000000001rem;
    }

    .ui-wrong-items-list img {
        height: 0.0623rem;
        margin: 0 0.0089rem;
    }

    .ui-wrong-items-list h3 {
        font-size: 0.030249110320284697rem;
        margin: 0 0 0 0.0089rem;
    }

    .white-button {
        bottom: -0.1068rem;
        font-size: 0.0463rem;
        margin-left: 0.2669rem;
        margin-top: 0.0178rem;
        max-width: 0.5338rem;
        min-width: 0.32030000000000003rem;
        padding: 0.0142rem 0.0534rem;
    }

    .level-ui {
        padding: 0.0178rem 0.0356rem;
    }

    .level-ui .character {
        margin-right: 0.0356rem;
        width: 0.2313rem;
    }

    .timer-bar {
        height: 0.0712rem;
        padding: 0 0.0356rem;
    }

    .timer-bar .bar {
        border-radius: 0.0142rem;
        height: 0.0463rem;
    }

    .timer-bar .bar-label {
        font-size: 0.0356rem;
        margin-left: 0.0356rem;
    }

    .suitcase {
        bottom: 0.0178rem;
        height: 0.1495rem;
        width: 0.1779rem;
    }

    .suitcase-frozen {
        bottom: 0.0178rem;
        height: 0.14409999999999998rem;
        width: 0.1779rem;
    }

    .suitcase-front {
        bottom: 0.0178rem;
        height: 0.042699999999999995rem;
        width: 0.1779rem;
    }

    .item-1 {
        height: 0.1459rem;
        width: 0.0925rem;
    }

    .item-2 {
        height: 0.10142348754448399rem;
        width: 0.09789999999999999rem;
    }

    .item-3 {
        height: 0.1139rem;
        width: 0.089rem;
    }

    .item-4 {
        height: 0.0694rem;
        width: 0.1263rem;
    }

    .item-5 {
        height: 0.13520000000000001rem;
        width: 0.1085rem;
    }

    .item-6 {
        height: 0.12455516014234876rem;
        width: 0.09786476868327403rem;
    }

    .item-7 {
        height: 0.12099644128113879rem;
        width: 0.10142348754448399rem;
    }

    .item-8 {
        height: 0.12099644128113879rem;
        width: 0.08718861209964412rem;
    }

    /* End game UI */

    .end-game-ui {
        padding: 0.0178rem 0.0356rem;
    }

    .end-game-ui .middle .title {
        margin: 0.017793594306049824rem 0 0.0089rem 0;
        line-height: 0.04448398576512456rem;
    }

    .end-game-ui .character {
        margin-right: 0.0356rem;
        width: 0.2313rem;
    }

    .end-game-ui .items-ui {
        padding: 0.0356rem 0.0267rem;
    }

    .black-title {
        font-size: 0.0534rem;
    }

    .bigger-title {
        font-size: 0.089rem;
    }

    .score-line {
        font-size: 0.0356rem;
        margin-top: 0.0089rem;
    }

    .white-button {
        bottom: -0.1068rem;
        font-size: 0.0463rem;
        margin-left: 0.2669rem;
        margin-top: 0.0178rem;
        max-width: 0.5338rem;
        min-width: 0.32030000000000003rem;
        padding: 0.0142rem 0.0534rem;
    }

    /* New level ui */

    .new-level-ui {
        padding: 0.0178rem 0.0356rem;
    }

    .big-title {
        font-size: 0.0641rem;
        margin-bottom: 0.0178rem;
        margin-left: 0.2669rem;
        top: -0.089rem;
    }

    .big-title img {
        height: 0.0463rem;
    }

    .incorrect-animation {
        height: 0.1423rem;
        top: -0.0178rem;
        width: 0.1423rem;
        background-size: 600%;
    }

    @keyframes play-incorrect {
        100% {
            background-position: -600%;
        }
    }

    .correct-animation {
        height: 0.1423487544483986rem;
        top: -0.017793594306049824rem;
        width: 0.1423487544483986rem;
        background-size: 600%;
    }

    @keyframes play-correct {
        100% {
            background-position: -600%;
        }
    }
}
