@font-face {
    font-family: 'Maiden Orange';
    src: url(./fonts/Maiden_Orange/MaidenOrange-Regular.ttf);
}

* {
    font-family: Arial, Helvetica, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #7e3807;
    color: white;
    min-height: 100dvh;
    margin: 0;
    overflow-y: auto;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #4d1f16;
}

::-webkit-scrollbar-thumb {
    background: #ff9d00;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffde00;
    cursor: pointer;
}

h1 {
    font-family: 'Maiden Orange';
    color: #ffde00;
    font-size: 48px;
    margin: 12px 0;
}

.game-container {
    position: relative;
    height: 480px;
    max-height: 100dvh;
}

canvas {
    background-color: #532605;
    z-index: 1;
    width: 720px;
    max-height: 100dvh;
}

.overlay {
    position: absolute;
    display: flex;
    justify-content: center;
    width: 720px;
    height: 480px;
    max-height: 100dvh;
    background-color: rgba(0, 0, 0, 0.4);
}

.overlay button {
    font-family: 'Maiden Orange';
    font-size: 32px;
    border: unset;
    border-radius: 4px;
    box-shadow: 4px 4px 0px 0px #9a3a17;
    position: relative;
    top: 48px;
    height: 56px;
    padding: 8px;
    cursor: pointer;
    z-index: 110;
    background-color: #ffde00;
    color: #4d1f16;
}

.buttons {
    position: absolute;
    width: 100%;
    height: 100%;
}

#main-menu-btns,
#end-menu-btns {
    display: flex;
    gap: 24px;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#main-menu-btns {
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

#main-menu-btns a {
    z-index: 110;
    text-decoration: none;
    margin-bottom: 16px;
    background-color: #ffa500;
    color: #4d1f16;
    padding: 4px;
    border-radius: 4px;
}

#main-menu-btns a:hover {
    background-color: #ffde00;
    transition: 125ms;
}

#explain-button,
#close-explain {
    position: absolute;
    right: 12px;
    top: 12px;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    box-shadow: none;
    padding: 0;
}

.start-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 100;
}

.game-explain {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    z-index: 120;
    background-color: #532605;
}

.game-explain h2 {
    align-self: center;
    width: max-content;
    padding: 4px;
    margin: 24px 0 8px;
    font-size: 32px;
}

.game-explain p {
    font-size: 18px;
    margin: 12px 0;
    line-height: 1.3;
}

.controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 24px;
    margin: 16px 0;
}

.controls .left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.controls .left>div,
.controls .left .move>div,
.controls .right>div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.controls .left .move {
    gap: 12px;
}

.controls .text {
    color: #ffde00;
    font-size: 20px;
}

.controls .key {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 24px;
    padding: 0 4px;
}

.game-explain h2,
.controls .key {
    box-sizing: border-box;
    font-family: 'Maiden Orange';
    font-size: 24px;
    border: unset;
    border-radius: 4px;
    box-shadow: 2px 2px 0px 0px #9a3a17;
    background-color: #ffde00;
    color: #4d1f16;
}

.responsive-overlay {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.911);
    width: 100%;
    height: 100dvh;
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.responsive-overlay img {
    filter: brightness(0) saturate(100%) invert(61%) sepia(39%) saturate(1709%) hue-rotate(1deg) brightness(104%) contrast(105%);
}

.responsive-overlay p {
    font-family: 'Maiden Orange';
    font-size: 32px;
    color: #ffa500;
}