html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

.cPageBg {
    position: fixed;
    width: 100%;
    height: 100%;
}

header {
    h1 {
        font-size: clamp(2.5rem, 5vw, 4rem);
        text-shadow: 0 1rem 2rem #2b2810d1;
        color: #ffffffc0;
    }
}

main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#idKeyGuide {
    z-index: 1;
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Caveat Brush';
    font-weight: 100;
    font-size: clamp(1.2rem, 2vw, 2rem);
    color: #06060640;
    text-shadow: 0 0 3rem #00ddff;
    border-radius: 1.5rem;
}

.cGameScreens {
    position: relative;
    width: min(720px, 100vw, calc(100vh * 3 / 2));
    max-height: 100vh;
    aspect-ratio: 3 / 2;
}

.cSoundControls {
    position: absolute;
    top: 25%;
    right: 2%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 2;
}

.cSoundBtn {
    border: none;
    background: #ffffff02;
    padding: 0.3rem;
    border-radius: 1rem;
    cursor: pointer;
    box-shadow: 0 0rem 1rem #00000057;

    img {
        width: 1.5rem;
    }
}

.cFullscreenBtn {
    z-index: 1;
    position: absolute;
    right: 2%;
    top: 2%;
    border: none;
    background: #ffffff00;
    padding: 0.3rem;
    border-radius: 1rem;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 0rem 1rem #00000044;

    img {
        width: 1.5rem;
    }
}

.cSoundPanel {
    display: flex;
    background: #ffffff36;
    padding: 0.3rem;
    border-radius: 1rem;
    box-shadow: 0 0rem 1rem #00000057;

    input {
        width: 7rem;
    }
}

#idCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: black;
    border-radius: 1.5rem;
    box-shadow: 0 0 1.5rem #000000aa;
    display: block;
}

.cStartScreen,
.cLastScreen {
    z-index: 1;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 1.5rem;
}

_.cLastScreen {
    width: 70%;
    height: 70%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.hidden {
    display: none;
}

.cMobileControls {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 1;
}

@media (max-height: 1024px) {
    .cMobileControls {
        display: flex;
    }
}

.cMobileGroup {
    position: absolute;
    bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.cMobileLeft {
    left: 10rem;
}

.cMobileRight {
    right: 10rem;
}

.cMobileBtn {
    width: 5rem;
    height: 5rem;
    border-radius: 1.3rem;
    border: none;
    background: #ffffff10;
    color: #ffffffb4;
    font-size: 2rem;
    font-weight: 500;
    box-shadow: 0 0rem 1rem #000000a7;
}

.cOverlayBTNs {
    position: absolute;
    left: 75%;
    top: 15%;
    transform: translate(-50%, -50%);
    padding: 0.5rem;
    font-family: 'Caveat Brush';
    font-size: 2.2rem;
    border: none;
    border-radius: 1rem;
    background: #ffffff00;
    color: #1c12079f;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 0rem 2rem #000000c8;

    transition: transform 0.1s ease;

    &:hover {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

#idBtnImg {
    width: 6rem;
}

#idRestartBtn,
#idBackToStartBtn {
    top: 80%;
    background: #dfbf8fb4;
}

#idBackToStartBtn {
    left: 40%;
}

#idRestartBtn {
    left: 60%;
}

.cImpressum {
    position: absolute;
    left: 50%;
    bottom: 0.1rem;
    transform: translateX(-50%);
    padding: 0.3rem 0.5rem;
    border-radius: 0.5rem;
    background: #0000004f;
    color: #ffffff78;
    font-size: 1em;
    box-shadow: 0 0rem 1rem #00000066;
    z-index: 1;

    a {
        color: #ed9b219f;
    }
}

.cImpressum.is-disabled {
    pointer-events: none;
    opacity: 0.6;
}

@media only screen and (max-width: 720px) {
    .cOverlayBTNs {
        font-size: 2rem;
    }

    #idBtnImg {
        width: 4.5rem;
    }

    #idKeyGuide {
        top: 10%;
        font-size: 1.5rem;
    }

    .cMobileControls {
        display: flex;
    }

    .cMobileGroup {
        bottom: 1rem;
        gap: 1.5rem;
    }

    .cMobileLeft {
        left: 6rem;
    }

    .cMobileRight {
        right: 6rem;
    }

    .cMobileBtn {
        width: 4rem;
        height: 4rem;
        font-size: 1.5rem;
    }

    .cFullscreenBtn {
        top: 1%;
        right: 2%;
        padding: 0.2rem 0.4rem;
    }
}

@media only screen and (max-width: 540px) {
    .cOverlayBTNs {
        font-size: 1.3rem;
    }

    #idBtnImg {
        width: 3.5rem;
    }

    #idKeyGuide {
        top: 9%;
        font-size: 1.2rem;
    }

    .cMobileGroup {
        bottom: 0.5rem;
        gap: 1.5rem;
    }

    .cMobileLeft {
        left: 4.5rem;
    }

    .cMobileRight {
        right: 4.5rem;
    }

    .cMobileBtn {
        width: 3.2rem;
        height: 3.2rem;
        font-size: 1.3rem;
    }

    .cFullscreenBtn {
        top: 1.5%;
        right: 2%;
        padding: 0.2rem 0.35rem;
    }
}

@media only screen and (max-width: 420px) {
    .cOverlayBTNs {
        font-size: 1rem;
    }

    #idBtnImg {
        width: 2.5rem;
    }

    #idKeyGuide {
        top: 8%;
        font-size: 1rem;
    }

    .cMobileGroup {
        bottom: 0.3rem;
        gap: 1rem;
    }

    .cMobileLeft {
        left: 2.5rem;
    }

    .cMobileRight {
        right: 2.5rem;
    }

    .cMobileBtn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.2rem;
    }

    .cFullscreenBtn {
        top: 2%;
        right: 2.5%;
        padding: 0.18rem 0.3rem;
    }
}

@media only screen and (max-height: 720px) {
    header {
        display: none;
    }
}

.cRotateOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #000000c1;
    color: #f8f5ec;
    z-index: 2;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
}

.cRotateOverlayContent {
    max-width: 20rem;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

@media only screen and (orientation: portrait) and (max-width: 900px) {
    .cRotateOverlay {
        display: flex;
    }

    .cPageBg,
    .cGameScreens,
    header,
    footer {
        filter: blur(0.1rem);
    }
}