body {
    background-color: grey;
    width: 100%;
    height: 98vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    text-align: center;
    margin: 0;
}

button {
    width: 100%;
    height: 100%;
    font-size: 40px !important;
    /* color: black !important; */
}

.main {
    height: 500px;
    width: 500px;
}

.puzzle-header {
    position: relative;
    height: 120px;
    background-color: rgb(194, 194, 194);
    border-bottom: rgb(158, 158, 158) solid 1px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 30px;
}

.top-score {
    position: absolute;
    top: 10px;
    left: 20px;
    width: 220px;
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    align-items: center;
}
.timer {
    position: absolute;
    left: 20px;
    width: 65px;
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    align-items: center;
}

.steps {
    position: absolute;
    right: 20px;
    width: 100px;
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    align-items: center;
}

.puzzle-content {
    position: relative;
    height: 380px;
    background-color: rgb(223, 223, 223);
    display: flex;
    align-items: center;
    justify-content: center;
}

.puzzle-panel {
    height: 302px;
    width: 302px;
    background-color: rgb(241, 241, 241);
    border: rgb(73, 73, 73) solid 1px;
}

.box {
    height: 100px;
    width: 100px;
    border: rgb(163, 163, 163) solid 0.1px;
    text-align: center;
    padding: 0;
}

.row {
    margin: 0;
}

/* <----- Modal -----> */

.end-modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 30vh;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-main {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 8px;
    max-width: 400px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    animation-name: animatetop;
    animation-duration: 0.8s
}


@keyframes animatetop {
    from { top: -300px; opacity: 0 }
    to { top: 0; opacity: 1 }
}

.modal-text {
    font-size: 50px;
    text-align: center;
    margin: 20px 0;
}

/* <----- Move Animation -----> */

.right {
    position: relative;
    transition: ease-out;
    animation-name: right;
    animation-duration: 0.3s;
}

@keyframes right {
    from { left: 0px; top: 0px; }
    to { left: 100px; top: 0px; }
}

.left {
    position: relative;
    transition: ease-out;
    animation-name: left;
    animation-duration: 0.3s;
}

@keyframes left {
    from { left: 0px; top: 0px; }
    to { left: -100px; top: 0px; }
}

.up {
    position: relative;
    transition: ease-out;
    animation-name: up;
    animation-duration: 0.3s;
}

@keyframes up {
    from { left: 0px; top: 0px; }
    to { left: 0px; top: -100px; }
}

.down {
    position: relative;
    transition: ease-out;
    animation-name: down;
    animation-duration: 0.3s;
}

@keyframes down {
    from { left: 0px; top: 0px; }
    to { left: 0px; top: 100px; }
}

.transparent {
    opacity: 0;
}

.zoom {
    animation-name: zoom;
    animation-duration: 0.8s;
}

@keyframes zoom {
    from { opacity: 0; }
    to { opacity: 1;}
}

.number-btn {
    background-color: #888;
    height: 100%;
    width: 100%;
    color: black;
}

/* <----- Mobile Responsive -----> */

@media only screen and (max-width: 500px) {
    .main {
        height: 100%;
        width: 100%;
    }

    .puzzle-header {
        position: relative;
        height: 25%;
        background-color: rgb(194, 194, 194);
        border-bottom: rgb(158, 158, 158) solid 1px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 30px;
    }

    .timer {
        position: absolute;
        bottom: 20px;
        left: 20px;
    }

    .steps {
        position: absolute;
        right: 20px;
        bottom: 20px;
    }

    .puzzle-content {
        height: 75%;
    }

    .puzzle-panel {
        width: 92vw;
        height: 92vw;
        border: rgb(73, 73, 73) solid 1vw;

    }

    .box {
        height: 30vw;
        width: 30vw;
        border: rgb(163, 163, 163) solid 0.1px;
        text-align: center;
        padding: 0;
    }

    @keyframes right {
        from { left: 0px; top: 0px; }
        to { left: 30vw; top: 0px; }
    }

    @keyframes left {
        from { left: 0px; top: 0px; }
        to { left: -30vw; top: 0px; }
    }

    @keyframes up {
        from { left: 0px; top: 0px; }
        to { left: 0px; top: -30vw; }
    }
    
    @keyframes down {
        from { left: 0px; top: 0px; }
        to { left: 0px; top: 30vw; }
    }
}

.help {
    position: absolute;
    bottom: 15px;
    right: 15px;
    height: 60px;
    width: 60px;
    padding: 0;
    border: none;
    background-color: #ffffff00;
}