@font-face {
    font-family: 'Rubik';
    src: url(../fonts/Rubik-Bold.woff) format('woff');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Rubik';
    src: url(../fonts/Rubik-Medium.woff) format('woff');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Rubik';
    src: url(../fonts/Rubik-Regular.woff) format('woff');
    font-weight: 400;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    font-family: "Rubik", sans-serif !important;
    font-optical-sizing: auto;
    font-weight: auto;
    font-style: normal;
}

:root {
    --black-01 : #121212;
    --black-02 : #343434;
    --gray-01  : #3A3A3C;
    --gray-02  : #545458;
    --blue-01  : #00095B;
    --white-01 : #FFFFFF;
    --green-01 : #29BC49;

    --blue-02  : #2584ff;
    --red-01   : #ff0000;
}

body.no-scroll {
    overflow: hidden;
}

/* Splash Screen */
.splash-screen .content {
    width: 100%;
    height: 100vh;
    gap: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

.splash-screen .content {
    text-align: center;
    width: 26rem;
    background-size: cover;
    background-position: center;
    background-image: url('../images/background-image/puzzle-bg.png');
}

.splash-screen .center .box {
    gap: 1rem;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    border-radius: 1rem;
    background-color: var(--white-01);
}

.splash-screen .center h3 {
    color: var(--black-01);
}

.splash-screen .center p {
    color: var(--gray-01);
}

.splash-screen .center .start-game {
    cursor: pointer;
    padding: .8rem 1rem;
    border-radius: .5rem;
    color: var(--white-01);
    background-color: var(--blue-01);
}

.splash-screen .bottom p {
    font-size: .8rem;
    margin-bottom: .6rem;
    color: var(--white-01);
}

.splash-screen .bottom img {
    width: 6rem;
}

.splash-screen .select-car {
    color: var(--white-01) !important;
    cursor: pointer;
    padding: .61rem 1rem;
    border-radius: .5rem;
    border: 1px solid var(--blue-01);
    background-color: var(--blue-01) !important;
}

.modal-select-car .modal-content {
    border-radius: 1rem;
    width: 85%;
}

.modal-dialog-centered {
    justify-content: center;
}

.modal-select-car .modal-body {
    padding: 2rem;
    gap: 1.5rem;
    display: flex;
    flex-direction: column;
}

.modal-select-car .top {
    display: flex;
    justify-content: end;
}

.modal-select-car .top img {
    width: 2rem;
}

.modal-select-car .center {
    gap: .5rem;
    display: flex;
    flex-direction: column;
}

.modal-select-car .middle figure img {
    width: 8rem;
}

.modal-select-car .middle figure {
    gap: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-select-car .middle figure h4 {
    width: max-content;
    text-align: center;
}

.modal-select-car .middle button {
    z-index: 1;
    top: 5rem;
    position: absolute;
}

.modal-select-car .middle .slick-prev {
    width: 3.8rem;
    height: 3.8rem;
    left: 0;
    background-image: url(../icons/arrow-left-blue.png);
    border: none;
    color: transparent;
    background-size: 2.5rem;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 100%;
}

.modal-select-car .middle .slick-next {
    width: 3.8rem;
    height: 3.8rem;
    right: 0;
    background-image: url(../icons/arrow-right-blue.png);
    border: none;
    color: transparent;
    background-size: 2.5rem;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 100%;
}

.modal-select-car .bottom .choose-car {
    padding: .8rem 0;
    width: -webkit-fill-available;
    color: var(--white-01);
    background-color: var(--blue-01);
}

/* Block Game */
.block-game {
    display: none;
}

.block-game .container-fluid {
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-image: url(../images/background-image/puzzle-bg-01.png);
    gap: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.block-game .container {
    gap: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.block-game .top {
    display: flex;
    justify-content: center;
}

.block-game .top .duration {
    border-radius: 2rem;
    font-size: 1.5rem;
    color: var(--white-01);
    padding: 1rem;
    gap: 1rem;
    display: flex;
    align-items: center;
    background-color: var(--green-01);
}

.block-game .top img {
    width: 1.7rem;
}

.block-game .middle {
    width: auto;
    border-radius: 1rem;
    background-color: var(--white-01);
}

.block-game .bottom button {
    color: var(--white-01);
    padding: .8rem 10rem;
    border-radius: .5rem;
    background-color: var(--blue-01);
}
.modal-view-image .modal-body {
    gap: 1rem;
    display: flex;
    flex-direction: column;
}
.modal-view-image .top {
    display: flex;
    justify-content: end;
}
.modal-view-image .top img {
    width: 2rem;
}
.modal-view-image .bottom img {
    width: 100%;
}

/* .block-game #puzzle {
    display: grid;
    gap: 1px; 
    margin: .8rem;
    border-radius: 1rem;
}

.block-game .tile {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center !important;
    cursor: pointer;
}

.block-game .empty {
    background-color: #ffffff;
    cursor: default;
} */

#puzzle {
    display: grid;
    gap: 1px;
    margin: .5rem;
}

.tile {
    cursor: pointer;
    background-position: center;
}

.empty {
    background-color: #ffffff;
    cursor: default;
    background-image: none;
}

#message {
    margin-top: 20px;
    font-size: 20px;
    color: green;
    display: none;
}


/* Game Result */
.game-result {
    display: none;
}

.game-result .container-fluid {
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-image: url(../images/background-image/result-bg.png);
    gap: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.game-result .top {
    gap: 1rem;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.game-result .middle,
.game-result .container {
    gap: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.game-result .middle img {
    width: 50%;
}

.game-result .top h3 {
    color: var(--white-01);
    text-align: center;
}

.game-result .bottom {
    width: 100%;
    display: flex;
    justify-content: center;
}

.game-result .bottom .btn {
    width: 90%;
    padding: .5rem;
    color: var(--blue-01) !important;
    background-color: var(--white-01);
}

/* Popup select levels */
.modal-body .btn {
    width: 100%;
    padding: .7rem 0;
    color: var(--blue-01) !important;
    border: 1px solid var(--blue-01);
    border-radius: .6rem;
}

.modal-body .btn.active {
    color: var(--white-01) !important;
    background-color: var(--blue-01);
}

.modal-body .bottom {
    gap: 1.2rem;
    display: flex;
    align-items: center;
    flex-direction: column;
}

/* Responsive Media Queries */

/* Large devices (1025px and up) */
@media (min-width: 1025px) {
    body {
        display: none !important;
    }
}

/* Medium devices (768px to 1024px) */
@media (max-width: 1024px) {
    .game {
        width: 100%;
        background-size: cover;
        background-position: center;
        background-image: url('../images/background-image/Ford-GT-01.png');
    }

    .splash-screen .content {
        width: 100%;
    }

    .gameArea {
        width: 50% !important;
    }

    .game-over-screen {
        width: 30% !important;
    }

    .game-control {
        bottom: 15rem !important;
    }
    .game-result .bottom .btn {
        width: 55%;
        padding: .8rem;
    }
    .game-result .middle img {
        width: 45%;
    }
}

/* Small devices (landscape phones, 576px to 767px) */
@media (max-width: 576px) { 
    .splash-screen .content {
        width: 100%;
    }

    .block-game .top .duration {
        font-size: 1rem;
    }

    .block-game .top img {
        width: 1rem;
    }

    .block-game #puzzle {
        grid-template-columns: repeat(4, 5.5rem);
        grid-template-rows: repeat(4, 5.5rem);
    }

    .block-game .tile {
        background-size: cover;
    }
    .block-game .bottom button {
        padding: .8rem 9rem;
    }
    .block-game .container-fluid {
        gap: 4rem;
    }
}


@supports (-webkit-touch-callout: none) {
    .game-control button.control-right img {
        rotate: 180deg;
    }
}