/* #region - General Styling */
:root {
    --touch-btn-size: 4rem;
    --touch-controls-height: 84px;
}

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

body{
    background-image: url(./assets/img/epl_background.jpg);
    width: 100%;
    object-fit: cover;
    background-position: 0 60%;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header,
footer {
    flex: 0 0 auto;
}

main {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 8px 0 10px;
}

h1{
    font-family: "Chimichanga";
    color: #a0220a;
}

header h1 {
    margin: 0.4rem 0;
    font-size: clamp(1.8rem, 4.8vw, 5.5rem);
    line-height: 1;
    padding-top: 5rem;
}

footer {
    padding-bottom: 0.4rem;
}

.container {
    position: relative;
    width: min(92vw, 720px);
    margin: 0 auto;
}
.inter-link{
    font-family: "Chimichanga";
    color: #a0220a;
    font-size: 2rem;
    &:hover{
        color: #223c33
    }
}

/* #endregion */

/* #region - Canvas & Overlay-Wrapper */
/* Canvas */
#canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #000;
}

/* Overlay */
.screen-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
    border-radius: 12px;
    color: #fff7e2;
    background:
        linear-gradient(160deg, rgba(20, 10, 6, 0.82), rgba(60, 28, 12, 0.72)),
        radial-gradient(circle at 20% 20%, rgba(255, 183, 86, 0.2), transparent 45%);
    backdrop-filter: blur(2px);
    &.hidden{
        display: none;
    }
}

#screen-title {
    margin: 0;
    font-family: "Chimichanga", sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
}

#screen-text {
    margin: 0;
    max-width: 34ch;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.screen-result-image {
    display: block;
    width: min(86%, 440px);
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.screen-result-image.hidden {
    display: none;
}

.screen-overlay-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

#screen-btn {
    margin-top: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: transform 120ms ease;
    &:hover{
        transform: translateY(-2px);
        &:after{
            content:"";
        }
    }
    &:active{
        transform: translateY(0);
    }

    img {
        display: block;
        width: 5rem;
        height: auto;
    }
}

#screen-home-btn {
    margin-top: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: transform 120ms ease;
}

#screen-home-btn:hover {
    transform: translateY(-2px);
}

#screen-home-btn:active {
    transform: translateY(0);
}

#screen-home-btn img {
    display: block;
    width: 5rem;
    height: auto;
}

#screen-home-btn.hidden {
    display: none;
}
/* #endregion */

.overlay-symbols {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    z-index: 100;
    ul{ 
        display: flex;
        gap: 8px;
    }
    li{
        opacity: 0.4;
        transition: transform 120ms ease, opacity 120ms ease;
        cursor: pointer;
        &:hover{
            opacity: 0.8;
        }
    }
    img{
        width: 3rem;
    }
}

.instructions-btn {
    width: 3rem;
    height: 3rem;
    border: 0;
    color: #fff7e2;
    font-family: "Chimichanga", sans-serif;
    font-size: 1.6rem;
    line-height: 1;
    opacity: 0.6;
    cursor: pointer;
    transition: transform 120ms ease, opacity 120ms ease;
}

.instructions-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.instructions-btn:active {
    transform: translateY(0);
}

.fullscreen-btn-wrapper {
    display: none;
}

.fullscreen-btn {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 120ms ease;
    &:hover {
        opacity: 0.8;
    }
    &:active {
        transform: scale(0.95);
    }
    img {
        width: 3rem;
        height: auto;
        display: block;
    }
}

.overlay-symbols .is-hidden {
    display: none;
}


/* #region - instructions*/
.instructions-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.instructions-modal.hidden {
    display: none;
}

.instructions-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(2px);
}

.instructions-modal__panel {
    position: relative;
    z-index: 1;
}

.instructions-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    width: 1.5rem;
    width: 1.5rem;
    color: #223c33;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
}

.instructions {
    text-align: center;
    h2{
        font-size: 2.5rem;
        font-family: "Chimichanga";
        color: #223c33;
    }
    ul{
        li{
            font-family: "Chimichanga";
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 1.4rem;
            justify-content: center;
            margin-bottom: 0.8rem;

            img{
                height: 3rem;
                width: auto;
            }
        }
    }
    width: min(35rem, 92vw);
    height: auto;
    background-image: url("./assets/img/wodden-sign.webp");
    background-size: 100%;
    padding: 1rem 3rem;
    color: white;
}
/* #endregion */

/* #region - Imprint */
#imprint-content {
    padding: 4rem;
    text-align: center;
    width: 40rem;
    height: auto;
    background-image: url("./assets/img/wodden-sign.webp");
    background-size: 100%;
    background-repeat: no-repeat;
    color: white;
}

/* #endregion */

/* #region - Responsive Touch-Btns */
.touch-controls {
    display: none;
    position: absolute;
    bottom: max(6px, env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    z-index: 50;
    pointer-events: none;
}

.touch-controls__left,
.touch-controls__right {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.touch-btn {
    opacity: 0.78;
    img{
        width: var(--touch-btn-size);
        height: auto;
    }
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: none;
    transition: background 80ms ease;
}

.touch-btn.pressed {
    opacity: 1;
    box-shadow: 0px 0px 2rem rgba(255, 225, 0, 0.2);
}

/* Responsive Portrait Notice */
.portrait-hint {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1000;
    font-size: 1.4rem;
    padding: 2rem;
}

@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
    .portrait-hint {
        display: flex;
    }
}

@media (hover: none) and (pointer: coarse) {
    main {
        min-height: 100dvh;
    }
    .container {
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        padding-bottom: 0;
    }
    .touch-controls {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: max(6px, env(safe-area-inset-bottom));
        z-index: 120;
    }
}

/* #endregion */

/* #region - Media Queries */
/* calculated with em (base 16px) */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    header {
        display: none;
    }
    main {
        height: 100dvh;
        padding: 0;
        justify-content: flex-start;
    }
    .container {
        width: 100vw;
        max-width: none;
        height: 100dvh;
        margin: 0;
        padding-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    #canvas {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        border-radius: 0;
    }
    .fullscreen-btn-wrapper {
        display: list-item;
    }
    .touch-controls {
        --touch-btn-size: 3.2rem;
        --touch-controls-height: 70px;
        padding: 0 8px;
    }
    .touch-controls__left,
    .touch-controls__right {
        gap: 6px;
    }
    .screen-overlay {
        padding: 12px;
        gap: 8px;
    }

    .instructions {
        width: min(28rem, 94vw);
        padding: 0.8rem 2.4rem;
    }

    .instructions h2 {
        font-size: 2rem;
    }

    .instructions ul li {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .instructions ul li img {
        height: 2.4rem;
    }

    .instructions-close-btn {
        top: 0.9rem;
        right: 1.5rem;
    }
    #screen-title {
        font-size: clamp(1.4rem, 4vw, 2.4rem);
    }
    #screen-text {
        font-size: clamp(0.85rem, 1.8vw, 1rem);
    }
}

@media (max-width: 768px) {
    .screen-overlay {
        padding: 16px;
        gap: 10px;
    }

    .instructions {
        width: min(34rem, 96vw);
        padding: 1rem 2.2rem;
    }

    .instructions h2 {
        font-size: 2rem;
    }

    .instructions ul li {
        font-size: 1rem;
    }
}
/* #endregion */