
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow: hidden;
    font-family: 'Acme', sans-serif;
    background: #d5edb5;
}

#gameBox {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.screen {
    position: absolute;
    inset: 0;
    z-index: 5;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;
    background: rgba(25, 45, 29, 0.45);

    overflow-y: auto;
}

.panel {
    width: min(450px, 100%);
    padding: 30px 24px;

    text-align: center;
    color: #493326;

    background: #fff5dc;
    border: 5px solid #493326;
    border-radius: 20px;

    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2);
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 7vw, 46px);
    line-height: 1.1;
}

h2 {
    margin: 0 0 12px;
    font-size: 30px;
}

p {
    font-size: 18px;
    line-height: 1.5;
    margin: 12px 0 20px;
}

.small-text {
    font-size: 15px;
    margin-bottom: 10px;
}

.final-score {
    font-size: 22px;
    font-weight: bold;
    margin: 12px 0 20px;
}

.menu-button {
    display: block;
    width: 100%;
    margin: 12px 0;
    padding: 14px 18px;

    border: 3px solid #493326;
    border-radius: 12px;

    background: #ffb65c;
    color: #493326;

    font-family: inherit;
    font-size: 22px;

    cursor: pointer;
    box-shadow: 0 4px 0 #493326;

    transition:
        transform 0.15s,
        background 0.15s;
}

.menu-button:hover {
    background: #ffd18d;
    transform: translateY(-2px);
}

.menu-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #493326;
}

.secondary-button {
    background: #c9e6a6;
}

.secondary-button:hover {
    background: #d9f0bd;
}


#catPreview,
.end-cat-image {
    display: block;

    width: 128px;
    height: 128px;

    object-fit: contain;
    image-rendering: pixelated;

    margin: 12px auto;
}

.arrow {
    position: absolute;
    z-index: 3;

    background: transparent;
    border: none;

    touch-action: none;
    display: none;
}

#uArrow {
    top: 0;
    width: 100%;
    height: 12%;
}

#dArrow {
    bottom: 0;
    width: 100%;
    height: 12%;
}

#lArrow {
    left: 0;
    top: 12%;

    height: 76%;
    width: 18%;
}

#rArrow {
    right: 0;
    top: 12%;

    height: 76%;
    width: 18%;
}


.hidden {
    display: none !important;
}


@media (max-width: 480px) {
    .screen {
        padding: 12px;
    }

    .panel {
        padding: 24px 18px;
    }

    p {
        font-size: 16px;
    }

    h2 {
        font-size: 26px;
    }

    .menu-button {
        font-size: 20px;
        padding: 12px 14px;
    }

    #catPreview,
    .end-cat-image {
        width: 100px;
        height: 100px;
    }
}
