@font-face {
    font-family: 'PressStart2P';
    src: url("./public/fonts/PressStart2P-Regular.ttf") format("truetype");
}

:root {
    --panel-border: #959DA0;
    --panel-background: #2B3238;
    --accent: #68816C;
    --panel-text: #DBD7BE;
}

body {
    margin: 0;
    overflow: hidden;
}

.canvas-container {
    margin: 0;
    padding: 0;

    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.canvas {
    width: 100vw;
    height: 100vh;
    background-color: gray;
    overflow: hidden;
    position: relative;
}

.score {
    position: absolute;
    top: 5vh;
    left: 5vw;
    color: orange;
    font-size: xx-large;
    -webkit-user-select: none;
    user-select: none;
    font-family: 'PressStart2P', serif;
}

.background {
    width: 100vw;
    height: 100vh;
}

@keyframes block-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-100vw - 100%));
    }
}

.block {
    position: absolute;
    animation: block-scroll 1.5s linear forwards;
    bottom: 10vh;
    left: 100vw;
}

@keyframes player-jump {
    0% {
        transform: translateY(0);
    }

    45% {
        transform: translateY(-324px);
    }

    100% {
        transform: translateY(0);
    }
}

.jump {
    animation: player-jump 600ms ease-in-out;
}

.paused {
    animation-play-state: paused;
}

.player {
    width: 150px;
    height: auto;
    position: absolute;
    left: 10vw;
    bottom: 10vh;
    top: auto;
    display: block;
}

.menu-container {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

.menu {
    width: 384px;
    max-height: 53vh;

    background: var(--panel-background);
    border: 5px double var(--panel-border);
    border-radius: 8px;

    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    align-items: center;

    font-family: 'PressStart2P', serif;
    color: var(--panel-text);

    overflow: auto;

    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--panel-background);
}

.menu::-webkit-scrollbar {
    width: 12px;
}

.menu::-webkit-scrollbar-track {
    background: var(--panel-background);
}

.menu::-webkit-scrollbar-thumb {
    background: var(--accent);
    border: 2px solid var(--panel-border);
}

.menu::-webkit-scrollbar-thumb:hover {
    background: #7B9880;
}


.menu>h1 {
    margin: 0;
    text-align: center;
    text-shadow: 1px 1px 10px black;
}

.hidden {
    display: none;
}

.drawHitbox {
    background-color: green;
}

.volume {
    appearance: none;
    width: 75%;
    height: 12px;
    border: 2px solid #A7ADB0;
    border-radius: 7px;
    background: linear-gradient(90deg, #6D7D76 30%, #2C363F 30%);
    cursor: pointer;
    padding-top: 5px;
}

.volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 35px;
    height: 35px;
    border: 2px solid #333333;
    border-radius: 10px;
    background: #8D9B9E;
    box-shadow: none;
}

.volume::-moz-range-thumb {
    width: 35px;
    height: 35px;
    border: 2px solid #333333;
    border-radius: 10px;
    background: #8D9B9E;
    box-shadow: none;
}

.volume-bar-container {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-top: 10px;
    margin-bottom: 10px;
}

.volume-indicator {
    display: flex;
    justify-content: space-between;
}

.menu-header {
    text-align: center;
    font-size: small;
}

.bg-music-container {
    width: 80%;
    border: var(--panel-border) 5px double;
    padding: 10px;

    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bg-music {
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;

    padding: 8px 10px;
    line-height: 1.5;
}

.bg-music-active {
    background-color: #555C51;
}

.bg-music:hover {
    background-color: #555C51;
    opacity: 0.7;
}

.volume-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fa-solid {
    padding-bottom: 12px;
}

.menu-button-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 15px;
}

.menu-button {
    width: 175px;
    height: 55px;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'PressStart2P', serif;
    color: var(--panel-text);
    border: 5px ridge var(--panel-border);
    border-radius: 8px;
    cursor: pointer;
}

.menu-button:hover {
    border: 5px groove var(--panel-border);
}

.resume-button {
    background-color: var(--accent);
}

.restart-button {
    background-color: #81444B;
}

.main-menu-return-button {
    background-color: var(--accent);
}

img {
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

.game-over>h1 {
    color: #7F2524;
}

.game-over-image {
    width: 80%;
    height: auto;
}

.game-audio {
    position: absolute;
    top: 5vh;
    right: 5vw;
    cursor: pointer;
    z-index: 2;
}

.rainbow_text_animated {
    background: radial-gradient(circle at 100%, #6666ff, #0099ff, #00ff00, #ff3399, #6666ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: 2s linear infinite rainbow_animation;
    background-size: 200% auto;
}

@keyframes rainbow_animation {
    to {
        background-position: 200% center;
    }
}

.muted {
    filter: saturate(50%);
}

.main-menu-container {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.main-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 30px;

    width: 100%;
    height: 100%;

    font-family: 'PressStart2P', serif;
    position: relative;
}

.main-menu>h1 {
    margin: 0;
    position: static;
    align-self: center;
    margin-top: 4vh;

    text-align: center;
    font-size: clamp(0.8rem, 2.2vw, 1.8rem);
    line-height: 1.6;
    padding: 0 20px;
    box-sizing: border-box;

    color: orange;
    text-shadow:
        3px 3px 0 #000,
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000;
}

.main-menu>.background {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    object-fit: cover;
}

.main-menu-button {
    width: 220px;
    height: 60px;
    font-size: 15px;
    line-height: 1.6;
    background-color: #555C51;
}

.main-menu-button-container {
    background: rgb(43 50 56 / 0.5);
    margin-left: 50px;
    align-self: flex-start;
    border: 5px double var(--panel-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    align-items: center;

    font-family: 'PressStart2P', serif;
    color: var(--panel-text);

    overflow: auto;
}

.play-button {
    background-color: var(--accent);
}

.main-menu-audio {
    align-self: flex-start;
    justify-self: flex-end;
    margin-left: 30px;
    margin-bottom: 30px;
    cursor: pointer;
}

.settings-menu-exit-button {
    background-color: #81444B;
}

.settings-menu,
.htp-menu {
    z-index: 200;
}

.htp-menu>.menu {
    width: 500px;
    height: 400px;
    overflow: auto;
    gap: 10px;
}

.htp-graphic {
    width: 200px;
    height: 200px;
    position: relative;
}

.htp-graphic>.htp-cat-walking {
    width: 100px;
    height: 50px;
    position: absolute;
    bottom: 50px;
    left: 20px;
}

.htp-graphic>.htp-cat-walking>img {
    width: 100%;
    height: 100%;
}

.htp-graphic>.htp-cat-jumping {
    width: 100px;
    height: 50px;
    position: absolute;
    bottom: 150px;
    left: 160px;
}

.htp-graphic>.htp-cat-jumping>img {
    width: 100%;
    height: 100%;
}

.htp-graphic>#jumpArc {
    --a: 72deg;
    transform: rotate(-66deg);
    width: 210px;
    aspect-ratio: 1;
    padding: 3px;
    box-sizing: border-box;
    border-style: dashed;
    border-radius: 50%;
    border-color: #555C51;
    mask:
        linear-gradient(#0000 0 0) content-box intersect,
        conic-gradient(#000 var(--a), #0000 0);

    position: relative;
    top: 20px;
    left: 35px;
}

.htp-graphic>.htp-box {
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: 50px;
    left: 150px;
}

.htp-graphic>.htp-box>img {
    width: 100%;
    height: 100%;
}

.htp-graphic>.htp-space {
    width: 200px;
    height: 35px;
    position: absolute;
    bottom: 0px;
    left: 10px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: 'PressStart2P', sans-serif;
    font-size: small;
    color: #000000;
    background-color: #D9D9D9;
    border: 5px var(--accent) outset;

    -webkit-user-select: none;
    user-select: none;
}

.htp-text {
    position: relative;
    width: 100%;
}

.htp-menu-exit-button {
    background-color: #81444B;
    height: 40px;
}