:root {
    --color-light: beige;
    --color-gray-lighter: #eef5f3;
    --color-gray-light: #d4ddda;
    --color-gray-medium: #bec7c5;
    --color-gray-dark: #555555;
    --color-gray-darker: #333333;
    --color-dark: #222222;
    --space-button-short: 1rem;
    --space-button-long: 5rem;
    --space-height: 3.5rem;
}

html,
body {
    margin: 0;
    font-family: sans-serif;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-dark);
    color: var(--color-light);
    height: var(--space-height);
}

/* footer {
    text-align: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
    z-index: -1;
} */

main {
    display: flex;
    flex-direction: column;
}

#menu {
    position: fixed;
    top: 0;
    left: -16rem;
    width: 16rem;
    height: 100%;
    background: var(--color-dark);
    color: var(--color-light);
    padding-top: var(--space-height);
    transition: left 0.3s ease;
    z-index: 100;
}

#menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#menu li {
    padding: 1.2rem;
    border-bottom: 0.1rem solid var(--color-gray-dark);
    background-color: var(--color-gray-darker);
}

#menu a {
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-light);
}

#menu.active {
    left: 0;
}

#score-player-1 {
    background-color: var(--color-random-1);
}

#score-player-2 {
    background-color: var(--color-random-2);
}

#canvas-confetti {
    /* inset: 0; */
    z-index: 103;
    pointer-events: none;
    position: fixed;
    width: 90%;
    height: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.title {
    font-weight: 600;
}

.burger {
    position: absolute;
    vertical-align: middle;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 2rem;
    gap: 7px;
    left: 1rem;
    z-index: 101;
}

.burger span {
    height: 0.18rem;
    width: 100%;
    border-radius: 0.1rem;
    background: var(--color-light);
}

.design,
.version {
    position: absolute;
    bottom: 0;
    height: 5rem;
    font-weight: 600;
    padding-left: 1.2rem;
}

.version {
    bottom: 2.5rem;
    font-weight: 200;
}

.board {
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.player {
    font-weight: 600;
    font-size: larger;
    padding: 0.5rem;
    color: var(--color-light);
}

.score-board {
    position: relative;
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    background-color: transparent;
    height: 5rem;
}

.score-player {
    display: flex;
    justify-content: center;
    flex-direction: column;
    width: 100%;
}

.score-player-up {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 2.5rem;
}

.turn {
    position: absolute;
    text-align: center;
    bottom: 0;
    padding: 0.4rem;
    margin: 0.4rem;
    border-radius: 1rem;
    height: 1.4rem;
    font-weight: 600;
    color: var(--color-gray-darker);
    background-color: var(--color-light);
}

.turn p {
    margin: 0;
}

.turn-container-player-1 {
    left: 25%;
    transform: translateX(-50%);
}

.turn-container-player-2 {
    right: 25%;
    transform: translateX(50%);
}

.columns {
    display: grid;
    grid-template-columns: var(--space-button-short) var(--space-button-long) var(--space-button-short) var(--space-button-long) var(--space-button-short)var(--space-button-long) var(--space-button-short);
    place-items: center;
}

.clicked {
    border-radius: 2rem;
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@keyframes shine {
    0% {
        left: -75%;
        opacity: 0;
    }

    25% {
        left: -25%;
        opacity: 0.25;
    }

    50% {
        left: 25%;
        opacity: 0.5;
    }

    75% {
        left: 75%;
        opacity: 0.75;
    }

    100% {
        left: 125%;
        opacity: 1;
    }
}

.shine {
    animation: shine 1s ease-in-out;
}

.button-game {
    border-style: none;
    border-color: var(--color-dark);
    background-color: var(--color-gray-light);
    transition: all 0.5s ease;
}

.button-horizontal {
    height: var(--space-button-short);
    width: var(--space-button-long);
}

.button-vertical {
    height: var(--space-button-long);
    width: var(--space-button-short);
}

.box-game {
    box-sizing: border-box;
    border-style: solid;
    border-width: 1px;
    border-color: transparent;
    height: var(--space-button-long);
    width: var(--space-button-long);

    /* Liquid Effect Start */
    overflow: hidden;
    position: relative;
    background: transparent;
    display: flex;
}

.box-game::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.1s cubic-bezier(.2, .9, .2, 1);
    background: var(--fill-color);
    z-index: 0;
}

.box-game.filled::before {
    transform: scaleY(1);
    /* Liquid Effect End */
}

.dot {
    height: var(--space-button-short);
    width: var(--space-button-short);
    background-color: var(--color-dark);
}

.popup-overlay,
.popup-overlay-help {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 102;
}

.popup-overlay {
    display: none;
}

.popup-overlay-help {
    display: none;
}

.popup-box-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
}

.popup-box,
.popup-box-help {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-light);
    border-radius: 8px;
    padding: 20px;
    width: 300px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.popup-box h2 {
    margin-top: 0;
}

.popup-box-button {
    display: block;
    width: 80%;
    margin: 1rem auto;
    padding: 0.7rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    background-color: var(--color-gray-light);
}

.popup-box-button:hover {
    color: var(--color-light);
    background-color: var(--color-gray-darker);
}

@media (max-height: 667px) {
    .main-container {
        margin-top: 1rem;
    }
}

@media (min-width: 414px) {
    :root {
        --space-button-long: 6rem;
    }
}

@media (min-width: 800px) and (min-height: 1000px) {
    :root {
        --space-button-long: 10rem;
    }
}

@media (min-width: 1024px) and (min-height: 750px) {
    :root {
        --space-button-long: 7.5rem;
    }

    main {
        flex-direction: row;
        justify-content: space-around;
    }

    main>section {
        width: 100%;
    }

    .score-board {
        flex-direction: column;
        height: 100%;
    }

    .main-container {
        height: 40rem;
    }

    .player {
        font-size: xx-large;
    }

    .score-player-up {
        margin-bottom: 0;
        display: flex;
    }

    .turn {
        position: absolute;
        bottom: auto;
        height: 1.9rem;
        width: 2.9rem;
        line-height: 1.9rem;
    }

    .turn-container-player-1,
    .turn-container-player-2 {
        left: auto;
        right: 15%;
        transform: translateX(100%);
    }
}

@media screen and (max-width: 1024px) {
    .main-container {
        position: absolute;
        transform: translate(-50%, -50%);
        left: 50%;
        top: 55%;
    }
}
