#game-container {
    position: relative;
    width: 854px;
    height: 480px;
    margin: 0 auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

@media only screen and (max-width: 854px) {
    #game-container {
        width: 100%;
        height: auto;
        aspect-ratio: 854 / 480;
        margin: 0 auto;
    }
}

#canvas {
    position: relative;
    z-index: 1;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.fight-overlay {
    z-index: 9998;
}

.menu-overlay {
    z-index: 9999;
}

#game-container:fullscreen {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: black;
}

#game-container:fullscreen canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
}

#game-container:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: black;
}

#game-container:-webkit-full-screen canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
}

.instructions-container {
    display: none;
    flex-direction: column;
    align-items: center;
    color: white;
    font-size: 24px;
    letter-spacing: 2px;
    text-align: center;
    margin-top: 20px !important;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    margin: 0 16px;
    border-radius: 10px;
    max-width: 854px;
    margin-left: auto;
    margin-right: auto;
    user-select: none;
}

.instructions-container.active {
    display: flex;
}

.instructions-title {
    font-size: 32px;
    font-weight: bold;
    color: rgb(207, 47, 47);
    text-shadow: #000 1px 1px 4px;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

#hud {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    z-index: 50;
}

#hud img {
    height: 24px;
    width: 24px;
}

#hud.active {
    display: none;
}

#hud button {
    pointer-events: all;
}

.panel-top {
    position: absolute;
    top: 10px;
    right: 24px;
    display: flex;
    gap: 16px;
    z-index: 60;
}

.panel-top img {
    width: 30px;
    height: 30px;
}

.panel-bottom {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 50;
}

.panel-wrapper {
    display: flex;
    gap: 24px;
}

.mobile-button {
    width: 48px;
    height: 48px;
    font-size: 24px;
    background-color: #f08b17;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.125s;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.mobile-button:active {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

#game-container:fullscreen canvas {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

#game-container:-webkit-full-screen canvas {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}