html,
body {
    margin: 0;
    padding: 0;
    width: 100vw;
    min-height: 100vh;
    overflow-y: hidden;
    overflow-x: hidden;
}

#fullscreen-container {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
}

#app-container,
#sdk-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

#sdk-container {
    z-index: 10;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
}

#popup-container {
    position: absolute;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 11;
}

#game-title {
    font-size: clamp(12px, 2.5vw, 36px);
    color: white;
    line-height: 1.2;
}

#popup {
    display: flex;
    width: 90%;
    height: 90%;
    background-color: none;
    flex-direction: column;
}

#popup-inner-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    height: 100%;
    border-radius: clamp(10px, 1vw, 15px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

#popup-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: clamp(40px, 6vh, 120px);
    border-width: 0 2px;
    border-style: solid;
    border-image: url('./../images/popup_header.png') 0 2 fill stretch;
    position: relative;
}

#popup-header h1 {
    flex: 1;
    text-align: center;
    font-size: clamp(18px, 5vw, 48px);
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

#close-button {
    width: clamp(20px, 2vw, 60px);
    height: clamp(20px, 2vw, 60px);
    background: none;
    margin-left: auto;
    border: none;
    cursor: pointer;
    position: absolute;
}

#close-button svg {
    width: 100%;
    height: 100%;
}

#popup-body {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: auto;
    display: block;
    object-fit: contain;
}

@media (orientation: portrait) {
    #popup {
        width: 90%;
        height: 85%;
    }

    #popup-header {
        height: clamp(20px, 6vh, 80px);
    }

    #popup-header h1 {
        font-size: clamp(20px, 6vw, 36px);
    }

    #close-button {
        width: clamp(35px, 6vw, 50px);
        height: clamp(35px, 6vw, 50px);
        right: 2vw;
    }

    #game-title {
        font-size: clamp(14px, 4vw, 20px);
        margin-bottom: 1vh;
    }
}

@media (orientation: landscape) {
    #popup {
        width: 80%;
        height: 80%;
    }

    #popup-header {
        height: clamp(30px, 8vh, 100px);
    }

    #popup-header h1 {
        font-size: clamp(18px, 4vh, 32px);
    }

    #close-button {
        width: clamp(20px, 4.5vh, 60px);
        height: clamp(20px, 4.5vh, 60px);
        right: 1vh;
    }

    #game-title {
        font-size: clamp(12px, 2vh, 24px);
        margin-bottom: 1vh;
    }
}
