@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@200&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Fuzzy+Bubbles:wght@400;700&family=Nunito:wght@200&display=swap');

* {
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    box-sizing: border-box;
    transition: all .4s linear;
    overflow: hidden;
}

body {
    font-family: 'Fuzzy Bubbles', cursive;
    height: 100%;
    background: rgb(248, 248, 248);
}

.btn {
    width: 70%;
    margin: 4px;
    padding: 7px;
    cursor: pointer;
    border: 1px solid gray;
    border-radius: 5px;
    background: none;
    font-family: 'Fuzzy Bubbles', cursive;
    font-size: 1.2rem;
}

.btn:hover {
    letter-spacing: 1px;
    font-weight: bold;
    border: 1px solid black;
    transform: scaleY(1.2);
}

.game {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 5rem;
    height: 100vh;
} 

.game-board {
    display: flex;
    flex-wrap: wrap;  
    position: relative;
}

.game-board.hide-gameboard{
    transform: translateY(1000px);
}

.game-board .block {
    width: 50px;
    height: 50px;
    border: 1px solid white;
    background: lightgray;
    box-sizing: border-box;
    line-height: 50px;
    text-align: center;
    font-size: 50px;
    font-family: 'Fredoka One', cursive;
    color: rgb(0, 0, 0);
}

.game-board .block.bounce-font {
    animation: bounce-font 1s ease;
}

.game-board .winner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    font-size: 3.5rem;
    font-weight: bold;
    transform: scale(0, 0);
    z-index: 100;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.game-board .winner span:nth-child(1) {
    font-family: 'Fredoka One', cursive;
}

.game-board .winner.active {
    transform: scale(1, 1);
}

.input-window {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    top: 200px;
    left: 40%;
    right: 0;
    width: 300px;
    height: 200px;
    transform: scale(0, 0);
    font-family: 'Fuzzy Bubbles', cursive;
    font-size: 1.2rem;
    box-shadow: -100px -100px 100px 0px rgba(229, 255, 0, 0.5),
                100px -100px 100px 0px rgba(0, 255, 19, 0.5),
                100px 100px 100px 0px rgba(255, 0, 0, 0.5),
                -100px 100px 100px 0px rgba(0, 170, 255, 0.5);
    border: 1px solid lightgray;
    border-radius: 10px;
}

.input-window.active {
    transform: scale(1, 1);
}

.btn:hover {
    letter-spacing: 1px;
    font-weight: bold;
    border: 1px solid black;
    transform: scaleY(1.2);
}

.input-window input[type=number] {
    font-size: 1.2rem;
    width: 30px;
    padding-left: 4px;
    border: 1px solid lightgray;
}

.input-window input[type=number]::-webkit-inner-spin-button, 
.input-window input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}

.left-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 0px;
    transform: translateX(-950px);
    transition: all .5s linear;
    border: 1px solid rgba(34, 60, 80, 0.2);
    box-shadow: 10px 10px 10px 2px rgba(34, 60, 80, 0.2);
}

.left-sidebar.active {
    transform: translateX(0);
    width: 300px;
}

.left-sidebar h1 {
    font-size: 4rem;
}

.left-sidebar .score-board {
    font-size: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.right-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 400px;
    width: 0px;
    transition: all .5s linear;
    border: 1px solid rgba(34, 60, 80, 0.2);
    box-shadow: 10px 10px 10px 2px rgba(34, 60, 80, 0.2);
    font-size: 4rem;
    transform: translateX(1500px);
}

.right-sidebar.active {
    transform: translateX(0);
    width: 300px;
}

.right-sidebar .turn {
    height: 160px;
    font-size: 9rem;
    font-family: 'Fredoka One', cursive;
}

.right-sidebar .turn.animate-font {
    animation: change-font-size 1s;
}

.menu {
    position: absolute;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    height: 600px;
    width: 600px;
    border-radius: 10px;
    transform:  translateY(-1000px);
    transform-origin: 0 0;
    /* box-shadow: 10px 10px 10px 2px rgba(34, 60, 80, 0.2); */
    border: 2px solid rgba(34, 60, 80, 0.2);
    box-shadow: -100px -100px 100px 0px rgba(229, 255, 0, 0.3),
                100px -100px 100px 0px rgba(0, 255, 242, 0.3),
                100px 100px 100px 0px rgba(255, 0, 0, 0.3),
                -100px 100px 100px 0px rgba(0, 170, 255, 0.3);
}

.menu.active {
    transform:  translateY(0px);
}

.menu .btn {
    width: 50%;
    box-shadow: 10px 10px 10px 2px rgba(34, 60, 80, 0.2);
}

.menu .btn:nth-child(1):hover {
    color: red;
    border: 1px solid red;
}

.menu .btn:nth-child(2):hover {
    color: blue;
    border: 1px solid blue;
}

.menu .btn:nth-child(3):hover {
    color: rgb(204, 0, 255);
    border: 1px solid rgb(204, 0, 255);
}

.menu .btn:nth-child(4):hover {
    color: green;
    border: 1px solid green;
}

@media (max-width: 1300px) {

    .game {
        flex-direction: column;
        flex-wrap: wrap;
    }

    .left-sidebar.active {
        width: 90%;
        height: 100px;
        flex-direction: row;
        justify-content: space-around;
    }

    .left-sidebar .score-board{
        flex-direction: row;
        gap: 1rem;
        font-size: 2rem;
    }

    .left-sidebar .btn {
        width: 100px;
    }

    .left-sidebar h1 {
        font-size: 2.5rem;
    }
    
}



@keyframes change-font-size {
    from {
        font-size: 0rem;
    }
    to {
        font-size: 9rem;
    }
}

@keyframes bounce-font {
    0% {
        font-size: 50px;
    }
    50% {
        font-size: 15px;
    }
    100% {
        font-size: 50px;
    }
}



@keyframes shadow {
    0% {
        box-shadow: -100px -100px 100px 0px rgba(229, 255, 0, 0.5),
                    100px -100px 100px 0px rgba(0, 255, 19, 0.5),
                    100px 100px 100px 0px rgba(255, 0, 0, 0.5),
                    -100px 100px 100px 0px rgba(0, 170, 255, 0.5);
    }
    25% {
        box-shadow: -100px -100px 100px 0px rgba(0, 170, 255, 0.5),
                    100px -100px 100px 0px rgba(229, 255, 0, 0.5),
                    100px 100px 100px 0px rgba(0, 255, 19, 0.5),
                    -100px 100px 100px 0px rgba(255, 0, 0, 0.5);
    }

    50% {
        box-shadow: -100px -100px 100px 0px rgba(255, 0, 0, 0.5),
                    100px -100px 100px 0px rgba(0, 170, 255, 0.5),
                    100px 100px 100px 0px rgba(229, 255, 0, 0.5),
                    -100px 100px 100px 0px rgba(0, 255, 19, 0.5);
    }

    75% {
        box-shadow: -100px -100px 100px 0px rgba(0, 255, 19, 0.5),
                    100px -100px 100px 0px rgba(255, 0, 0, 0.5),
                    100px 100px 100px 0px rgba(0, 170, 255, 0.5),
                    -100px 100px 100px 0px rgba(229, 255, 0, 0.5);
    }

    100% {
        box-shadow: -100px -100px 100px 0px rgba(229, 255, 0, 0.5),
                    100px -100px 100px 0px rgba(0, 255, 19, 0.5),
                    100px 100px 100px 0px rgba(255, 0, 0, 0.5),
                    -100px 100px 100px 0px rgba(0, 170, 255, 0.5);
    }
}
