@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.05em;
    user-select: none;
}

body {
    height: 100vh;
    width: 100vw;
    background-color: rgb(199, 199, 199);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5%;
}

.parent {
    width: fit-content;
    position: relative;
}

#container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    position: relative;
}

button {
    width: max-content;
    padding: 15px 30px;
    border: none;
    outline: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 0 0 0 gray;
    transition: background-color 0.2s;
}

button:hover {
    box-shadow: 0 0 5px 0 gray;
    background-color: aqua;
}

button:active {
    background-color: rgb(161, 161, 161);
}

#container div {
    width: 180px;
    aspect-ratio: 1;
    border-radius: 10px;
    box-shadow: 0 0 10px 0 gray;
}

#container div:first-child {
    background-color: rgb(155, 0, 0)
}

#container div:nth-child(2) {
    background-color: rgb(0, 0, 100);
}

#container div:nth-child(3) {
    background-color: rgb(201, 201, 0);
}

#container div:nth-child(4) {
    background-color: green;
}

.boxText {
    visibility: hidden;
}

.flash {
    background-color: var(--color) !important;
}

#scores {
    position: absolute;
    width: 100%;
    top: -50px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    font-weight: bolder;
    font-size: 1.1em;
}

#scores>div {
    width: 180px;
    border-radius: 10px;
    text-align: center;
}

.transition {
    height: 50px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.transition div {
    height: 50px;
}

#currentScr,
#highScr {
    transition: transform 1s ease-in-out;
}

.hidden {
    transform: scale(0);
    transition: transform 1s ease-in-out;
}

.instructions {
    height: 550px;
    width: 400px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 15px gray;
    border-radius: 10px;
    transition: transform 0.6s ease-in-out;
    background-color: rgb(195, 195, 195);
}

.gameOver {
    height: 400px !important;
    width: 400px !important;
    top: 48% !important;
    /* background-color: rgba(255, 255, 255, 0.9); */
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(to right, red, red, #e23b4a, #db0768, #360670);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.instructions .header {
    border-radius: 10px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    height: 15%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(164, 77, 77);
    color: rgb(195, 195, 195);
    box-shadow: 0 0 10px gray;
}

h1 {
    font-family: cursive;
    letter-spacing: 0.2em;
}

.steps>div {
    padding: 10px;
}

.flex {
    display: flex;
    gap: 5px;
    box-shadow: 0 0 1px gray;
}

i {
    cursor: pointer;
    transform: scale(1.5);
    position: absolute;
    top: 10px;
    right: 10px;
    -webkit-text-fill-color: black;
}

#gameFinished {
    font-weight: bolder;
    letter-spacing: 0.18em;
    font-size: 2.7em;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#title {
    position: absolute;
    width: max-content;
    font-size: 2em;
    top: 6%;
    left: 53%;
    transform: translateX(-50%);
    opacity: 0.7;
    font-weight: bold;
    letter-spacing: 0.1em;
}


@media screen and (min-width:768px) {
    #container>div {
        width: 200px;
    }

    #scores>div {
        width: 200px;
    }

    .instructions {
        height: 600px;
        width: 500px;
    }

    .steps>div {
        padding: 20px 10px;
    }

    .gameOver {
        height: 450px !important;
        width: 450px !important;
        top: 45% !important;
    }

    #title {
        left: 51%;
    }
}