html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

html, body {
    height: 100%;
}

canvas {
    display: block;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top, rgba(140, 25, 15, 0.45), transparent 42%),
        linear-gradient(180deg, #160404 0%, #080808 100%);
    color: #f4d58d;
}

body, canvas, #canvas {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-text-size-adjust: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    overflow: hidden;
}

#unity-container {
    width: 100%;
    height: 100%;
}

#unity-canvas {
    width: 100%;
    height: 100%;
    background: #151515;
}

#loading-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.12);
}

.doom-main-menu-ui {
    position: fixed;
    inset: 0;
    z-index: 25;
    pointer-events: none;
}

.doom-main-menu-ui-hidden {
    display: none;
}

.doom-about-trigger {
    position: absolute;
    left: 50%;
    bottom: max(24px, 4vh);
    width: clamp(110px, 10vw, 200px);
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 1;
    transform: translate(-50%, 0);
    cursor: pointer;
    pointer-events: auto;
    transition:
        transform 240ms ease,
        opacity 240ms ease;
}

.doom-about-trigger.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 24px);
}

.doom-about-trigger img,
.doom-about-panel-image {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    user-select: none;
    pointer-events: none;
}

.doom-about-trigger:hover {
    filter: brightness(1.08);
}

.doom-about-trigger:focus-visible,
.doom-about-link:focus-visible,
.doom-about-close:focus-visible {
    outline: 3px solid rgba(241, 202, 84, 0.95);
    outline-offset: 2px;
}

.doom-about-panel {
    position: absolute;
    left: 50%;
    bottom: max(24px, 4vh);
    width: min(88vw, 780px);
    transform: translate(-50%, calc(100% + 32px));
    opacity: 0;
    pointer-events: none;
    transition:
        transform 240ms ease,
        opacity 240ms ease;
}

.doom-about-panel.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.doom-about-link,
.doom-about-close {
    position: absolute;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.doom-about-link {
    top: 5%;
    left: 47%;
    width: 49%;
    height: 30%;
}

.doom-about-close {
    left: 38%;
    top: 54%;
    width: 24%;
    height: 34%;
}

.doom-about-close:hover {
    filter: brightness(1.08);
}

.doom-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;
    pointer-events: auto;
    padding: 24px;
    background: rgba(0, 0, 0, 0.52);
}

.doom-overlay-hidden {
    display: none;
}

.doom-loading-panel,
.doom-menu-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    width: min(92vw, 620px);
    padding: 0;
    text-align: center;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.doom-menu-panel {
    position: relative;
    width: min(92vw, 640px);
    max-width: 640px;
}

.doom-loading-title,
.doom-menu-title,
.doom-menu-option,
.doom-loading-progress,
.doom-loading-subtitle {
    display: inline-block;
    font-family: "Courier New", monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    -webkit-font-smoothing: none;
    font-smooth: never;
    text-shadow:
        2px 0 0 #520300,
        0 2px 0 #520300,
        2px 2px 0 #520300,
        4px 4px 0 rgba(0, 0, 0, 0.4);
}

.doom-loading-title {
    margin-top: -8vh;
}

.doom-loading-title,
.doom-menu-title {
    color: #d41410;
    font-size: clamp(20px, 3.4vw, 38px);
    line-height: 0.9;
}

.doom-loading-progress {
    color: #f1ca54;
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1;
    letter-spacing: 0.12em;
}

.doom-menu-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 18ch;
    margin-bottom: 4px;
}

body.doom-modal-open #unity-container,
body.doom-modal-open #unity-canvas {
    visibility: hidden;
    pointer-events: none !important;
}

.doom-menu-image {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    user-select: none;
    pointer-events: none;
}

.doom-menu-hotspots {
    position: absolute;
    inset: 0;
}

.doom-menu-hotspot {
    position: relative;
    padding: 0;
    border: 0;
    appearance: none;
    background: transparent;
    cursor: pointer;
    outline: none;
}

.doom-menu-hotspot-yes,
.doom-menu-hotspot-no {
    position: absolute;
    top: 65%;
    width: 26%;
    height: 15%;
    transform: translateY(-50%);
}

.doom-menu-hotspot-yes {
    left: 28%;
}

.doom-menu-hotspot-no {
    left: 54%;
}

.doom-menu-hotspot:focus-visible {
    box-shadow:
        0 0 0 3px rgba(241, 202, 84, 0.95),
        0 0 0 6px rgba(108, 9, 0, 0.9);
    border-radius: 6px;
}

.doom-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes doom-loading-dots {
    0% {
        content: "";
    }

    25% {
        content: ".";
    }

    50% {
        content: "..";
    }

    75%,
    100% {
        content: "...";
    }
}

@media (max-width: 640px) {
    .doom-about-trigger {
        width: min(34vw, 170px);
        bottom: max(14px, 2.5vh);
    }

    .doom-about-panel {
        width: min(92vw, 780px);
        bottom: max(14px, 2.5vh);
    }

    .doom-loading-panel,
    .doom-menu-panel {
        gap: 16px;
    }

    .doom-loading-title,
    .doom-menu-title {
        font-size: clamp(18px, 6vw, 26px);
        max-width: 16ch;
    }

    .doom-loading-progress {
        font-size: clamp(15px, 4vw, 20px);
    }

    .doom-menu-hotspot-yes,
    .doom-menu-hotspot-no {
        top: 65%;
        height: 17%;
    }
}
