:root {
    --screen-wrap: #616a79;
    --test-screen: rgba(0, 0, 0, 0.1);
    --mono: #808086;
}

@font-face {
    font-family: 'nintendo';
    src: url('/assets/retro-font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    font-family: 'nintendo', sans-serif;
    color: var(--mono)
}

.show {
    display: flex !important;
}

.hide {
    display: none !important;
}

canvas {
    will-change: transform, opacity;
}

.nintendo {
    font-weight: 900;
    font-size: 18px;
}

.game-boy {
    font-weight: 600;
    font-style: italic;
    font-size: 1rem;
}

body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}

main {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1b1919;
}

.gameboy {
    position: relative;
    width: calc(90dvh / 1.85);
    height: 90dvh;
    border-radius: 10px 2.5px 90px 10px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(0deg, #171717 0%, #323232 100%);
    overflow: hidden;
    box-shadow: inset -2px -2px 8px 1px black;

    @media screen and (max-width: 500px) {
        width: 95%;
        height: 85%;
    }
}

.gameboy::after {
    content: "";
    position: absolute;
    height: 100%;
    width: 1px;
    left: 5px;
    background-color: #242525;
    z-index: 1;
    box-shadow: 0 0 3px 1px #232424;
}

.gameboy-top {
    width: 100%;
    height: 70%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.gameboy-bottom {
    width: 100%;
    height: 30%;
    display: grid;
    grid-template-rows: 10% 45% 45%;
    padding: 5px;
    gap: 5px;
}

.gameboy-heading {
    padding-left: 15px;
    position: relative;
    bottom: 35px;
    font-size: 0.5rem;

    span {
        font-size: 0.85rem;
    }
}

.gameboy-buttons {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    position: relative;
    bottom: 20px;
    font-size: 0.75rem;
}

.x-line {
    position: absolute;
    width: 100%;
    height: 5px;
    top: 20px;
    left: 0;
    background-color: #131212;
    z-index: 2;
}

.y-line-1,
.y-line-2 {
    position: absolute;
    width: 5px;
    height: 20px;
    background-color: #131212;
    top: 0;
}

.y-line-1 {
    left: 50px;
}

.y-line-2 {
    right: 50px;
}

.speakers {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30%;
    height: 10%;
    transform: rotate(-25deg);
    display: flex;
    justify-content: center;
    gap: 7.5px;
}

.speaker {
    width: 7.5px;
    height: 75%;
    background-color: #131212;
    border-radius: 15px;
    box-shadow: inset 1px 1px 2px 1px #222222;
}

.gameboy-screen-wrap {
    background-color: rgb(32, 31, 31);
    width: 90%;
    height: 85%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px 10px 50px 10px;
    box-shadow: inset 1px 1px 5px 1px black;
    position: relative;
}

.trackpad {
    width: 80px;
    height: 80px;
    border-radius: 100%;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 30px 0 #1b1a1a;
}

.y-track {
    height: 100%;
    width: 35%;
    background: linear-gradient(to right, #1d1d1d, #141414);
    border-radius: 12px;
    position: absolute;
    z-index: 1;
    overflow: hidden;
}

.y-track::after {
    content: "";
    position: absolute;
    height: 100%;
    width: 1px;
    left: 4px;
    background-color: #2d2c2c;
    z-index: 1;
    box-shadow: 0 0 5px 0 #2d2e2e;
}

.x-track {
    height: 35%;
    width: 100%;
    background: linear-gradient(to bottom, #1e1e1e, #161616);
    border-radius: 12px;
    position: absolute;
    z-index: 2;
    overflow: hidden;
}

.x-track::after {
    content: "";
    position: absolute;
    height: 1px;
    width: 100%;
    left: 0;
    background-color: #1d1c1c;
    z-index: 1;
    box-shadow: 0 0 5px 0 #2d2e2e;
}

.button {
    padding: 10px 20px;
    display: flex;
    transform: rotate(-25deg);
    box-shadow: inset 0 0 30px 0 #171717;
    border-radius: 75px;
}

.button-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.button-red {
    position: relative;
    background: linear-gradient(to right, var(--red), #460505);
    border-radius: 100%;
    width: 40px;
    height: 40px;
    text-align: center;
    box-shadow: inset 1px 1px 3px 0 rgb(236, 236, 236),
        1px 1px 3px 1px black
}

.button-red>p {
    margin-top: 52px;
    margin-left: 10px;
    font-weight: 900;
}


.gameboy-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.options {
    width: 50px;
    height: 12.5px;
    border-radius: 20px;
    transform: rotate(-25deg);
    position: relative;
    bottom: 20px;
    text-align: center;
    background: linear-gradient(to top, #1e1e1e, #110f0f);
    padding: 1px;
    box-shadow: inset 0 0 5px 0 rgb(33, 32, 32);
}

.options>p {
    font-weight: 900;
    font-size: 0.6rem;
}

.screen {
    background-color: var(--test-screen);
    width: 85%;
    height: 85%;
    box-shadow: inset 2px 2px 10px 1px black;
    display: flex;
    position: relative;
    overflow: hidden;
}

.score-screen {
    width: 85%;
    height: 45px;
    display: flex;
    justify-content: space-between;
}

.track-score {
    display: flex;
    flex-direction: column;
}

#score-to-add {
    position: relative;
    left: 100%;
    color: lightgreen;
}

.canvasWrap {
    width: 60%;
    height: 100%;
    border-left: 2px rgb(106, 105, 105) solid;
    border-right: 2px rgb(106, 105, 105) solid;
    position: relative;

    .updates-screen {
        height: 100%;
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        display: flex;
        justify-content: center;
        align-items: center;

    }
}

#board {
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

#canvas,
#shadow,
#clear,
#drop,
#special {
    width: 100%;
    height: auto;
    display: block;
    position: absolute;
    left: 0;
    z-index: 9;
}

#overlay {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 20;
    pointer-events: none;
}

#overlayContent {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 21;
    pointer-events: none;
    image-rendering: pixelated;
}

#manaCanvas {
    width: 15%;
    height: 100%;
    position: relative;
    bottom: 15px;
}

#hudCanvas {
    width: 25%;
    height: 100%;
    padding-left: 5px;
    position: relative;
    top: 25px;
}

.menu {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #141414;
    box-shadow: inset 0 0 1.2rem 0.1rem #272b2a;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    z-index: 10;

    h1 {
        font-size: 1.25em;

        span:nth-child(1) {
            color: #ff0000cf;
        }

        span:nth-child(2) {
            color: #00ff00c3;
        }

        span:nth-child(3) {
            color: #ffa600d4;
        }

        span:nth-child(4) {
            color: #ffff00de;
        }

        span:nth-child(5) {
            color: #ff00ffe6;
        }

        span:nth-child(6) {
            color: #00ffffe4;
        }

        span:nth-child(7) {
            color: #4141f1de;
        }
    }

    .description {
        font-size: 0.65rem;
        color: #d3d2d2;
        text-align: center;
        width: 60%;
        margin-bottom: 5px;
        position: relative;
        bottom: 7px;
    }
}

.menu-item {
    background-color: #033232;
    font-family: 'nintendo';
    font-size: 0.75rem;
    color: #d3d2d2;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    width: 50%;
    padding: 10px 20px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(1, 95, 95, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    justify-content: center;
    align-items: center;
}

.menu-item:hover {
    background-color: #025f5f;
    box-shadow: 0 0 10px rgba(0, 153, 153, 0.5);
    cursor: pointer;
}

.menu-items {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.volume-control-wrap {
    display: flex;
    align-items: end;
    height: 2rem;
}

.controls-guide {
    width: 25%;
    height: 65%;
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
}

.keyboard-guide,
.phone-guide,
.mouse-guide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-top: 20px;

    > div {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-top: 20px;
    }

    img {
        width: 50px;
    }

    span {
        text-align: center;
        font-size: 12px;
    }
}