:root {
    --primary: #CDDC39;
    --secondary: #00AB8F;
    --backlight: #EEE;
    --backgray: #CCC;
    --danger: #F22;
}

* {
    margin: 0;
    padding: 0;
    border: none;
    box-sizing: border-box;
    list-style: none;
    font-family: 'Poppins', sans-serif;
    background-color: transparent;
}

html, body, .container-hf {
    height: 100vh;
}

body {
    color: var(--secondary);
    overflow: hidden;
}

h1 {
    color: var(--primary);
    font-size: 1.2rem;
    text-align: center;
}

.color-primary {
    color:var(--primary);
}

.color-secondary {
    color:var(--secondary);
}

.color-white {
    color: white;
}

.border-primary {
    border: var(--primary) 1px solid;
}

.bold {
    font-weight: bold;
}

.hidden {
    display: none!important;
}

.text-strong {
    font-weight: bold;
}

.button {
    padding: 1rem;
    margin: 1rem;
    border-radius: 1rem;
}

.bg-white {
    background-color: white;
}

button:hover, .button:hover {
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--secondary);
    color: white;
    font-weight: bold;
    border-color: var(--backgray);
    box-shadow: rgba(0,0,0,0.4) 0.5rem 0.5rem 1rem 1px;
}

.library {
    display: flex;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.book {
    flex-grow: 1;
    justify-content: flex-end;
    padding-bottom: 2rem;
    background-color: transparent;
}

.book:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.float-right {
    float: right;
}

.h-1-3 {
    height: 50vh;
    margin-top: 4rem;
}

.responsive-img {
    width: 100%;
}

.side-bar {
    height: 100vh;
    min-width: 19rem;
    position: absolute;
    right: 0;
    top: 0;
    background-color: white;
    box-shadow: rgba(0, 0, 0, 0.7) -0.5rem 0 1rem;
    overflow: none;
    overflow-y: auto;
    font-size: 1.2rem;
    line-height: 2rem;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.side-bar .side-bar-header {
    position: fixed;
    width: 20rem;
    text-align: center;
    padding: 0.5rem 0;
    background-color: var(--primary);
    font-size: 1rem;
    color: #333;
    z-index: 0;
}

.side-bar .side-bar-name {
    font-size: 0.8rem;
    font-weight: normal;
    text-align: center;
    max-width: 19rem;
    color: #333;
    padding: 1rem 0;
    background-color: var(--primary);
}

.side-bar .side-bar-close-btn {
    position: fixed;
    right: 1rem;
    top: 0;
    margin: 0.5rem;
    width: 2rem;
    height: auto;
    background-color: transparent;
    color: white;
    z-index: 1;
    border-radius: 1rem;
}

.side-bar .side-bar-close-btn:hover {
    box-shadow: #333 1px 1px 5px;
}

.side-bar .card {
    padding: 0.5rem;
    border: transparent 2px solid;
}

.side-bar #card_0 {
    margin-top: 2.5em;
}

.side-bar .card button h3 {
    padding: 1em;
    font-weight: bold;
}

.side-bar .card button:hover {
    border-color: var(--primary);
}

.side-bar .card button[disabled]:hover {
    border-color: var(--secondary);
}

.side-bar .card button:disabled h3 {
    background-color: var(--secondary);
    color: white;
    font-weight: bold;
}

.side-bar .card button img {
    width: 100%;
}

.video-container {
    margin: 4rem 4rem 0 4rem;
    position: relative;
    aspect-ratio: 16/9;
    max-height: 80%;
}

.video-container .btn-skip {
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 10;
    background-color: transparent;
    color: var(--secondary);
    font-weight: bold;
}

.video-container video {
    width: 100%;
    height: auto;
    border-radius: 1rem;
}

#app_frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
}

#container {
    justify-content: center;
    height: 100%;
}

#container img {
    max-width: 500px;
    width: 100%;
}

/* Modal Style */

#modal {
    background-color: white;
    border-radius: 25px;
    position: absolute;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    z-index: 2;
    border-width: 3px;
    min-width: 30%;
}

#modal #modal-body {
    display: flex;
    color: #333;
    width: 95%;
    margin: auto;
}

#modal #close-modal {
    display: block;
    text-align: center;
    color: var(--secondary);
    font-size: 1em;
    width: 100px;
    background-color: transparent;
    align-self: flex-end;
}

#modal #element-info {
    display: flex;
    margin: 2rem;
}

#modal #element-info #element-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 50%;
}

#modal #element-info #element-text #element-name {
    font-size: 1.5em;
    margin-bottom: 1.5em;
}

#modal #element-info #element-text #element-description {
    font-size: 0.8em;
}

#modal #element-info #element-text #element-features {
    font-size: 0.8em;
    color: #333;
    align-self: flex-start;
    margin-top: 1em;
}

#modal #element-info #element-text h1, #modal #element-info #element-text p {
    color: #333;
}

#modal #element-info #element-viewer {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#modal #element-info #element-viewer  iframe{
    aspect-ratio: 1;
    width: 100%;
    padding: 0 1rem;
}

#modal #modal-title {
    color: black;
    width: 70%;
    margin: auto;
    text-align: center;
    margin-bottom: 1em;
}

#modal #qr-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

#modal #qr-column #qr-image {
    max-width: 200px;
    height: auto;
    border: #CDDC39 solid 0.5em;
    margin-bottom: 1em;
    padding: 0.5rem 0.5rem;
    font-size: 0.7rem;
}

#modal #qr-column #qr-scan-text {
    font-weight: bold;
    text-align: center;
    width: 13em;
    margin-bottom: 1em;
}

#modal #show-features {
    align-self: flex-start;
    background-color: transparent;
    margin-top: 1em;
}

#menu-categories {
    position: absolute;
    left: 50%;
    width: 30%;
    transform: translateX(-50%);
}

#menu-categories #menu-btn-container {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    border: #999 solid 1px;
    box-shadow: white 0px 1px 55px 0px;
}

#menu-categories #menu-btn-container label {
    border: var(--primary) solid 1px;
    border-radius: 0.3rem;
    padding: 1rem;
    margin: 0.5rem auto;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.5);
}

#menu-categories .btn-category {
    border: var(--primary) solid 1px;
}

#menu-categories .btn-category img {
    width: 100%;
    height: auto;
}

#menu-categories #grid-categories {
    display: grid;
    gap: 0.5rem 0;
    grid-template-columns: repeat(3, 1fr);
    background-color: white;
    box-shadow: rgba(0, 0, 0, 0.7) -0.5rem 0 1rem;
    padding: 0 2rem;
}

#instructions-grid {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: flex-start;
    padding: 0;
}

#instructions-grid>div {
    display: flex;
    max-width: 18em;
}

#instructions-grid>div>img {
    height: 4em;
    width: 85px;
    margin: 1em 0;
}

#instructions-grid>div>div {
    text-align: center;
    font-size: 0.8em;
    padding: 1em 1em;
}

#instructions-grid>div>div>h2 {
    font-size: 1em;
}

#home-btn {
    position: absolute;
    margin-top: 0.7rem;
    left: 20px;
}

#sound-btn {
    position: absolute;
    margin-top: 0.7rem;
    left: 90px;
}

#preloader-container {
    background-color: white;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

#preloader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    max-width: 60%;
    align-items: center;
    justify-content: center;
}

#preloader img {
    width: 100%;
    height: auto;
}

#preloader .loader-bar {
    min-height: 1rem;
    position: relative;
    overflow: hidden;
    border: black 1px solid;
    width: 100%;
    border-radius: 0.5rem;
}

#preloader .loader-bar .loader-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background-color: #CDDC39;
}


@media (max-width:1980px) {
    #menu-categories {
        width: 40%;
    }
}

@media (max-width:1366px) {
    #menu-categories {
        width: 40%;
    }
}

@media (max-width:1200px) {
    #menu-categories #grid-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:600px) {
    #menu-categories #grid-categories {
        grid-template-columns: auto;
        max-height: 90vh;
        overflow-y: scroll;
    }
}

@media only screen
and (orientation: portrait) {
    #container {
        height: 100%;
        justify-content: center;
    }
    .video-container {
        width: 90%;
    }
    .video-container video {
        width: 100%;
    }
    .library {
        flex-direction: column;
    }
    #menu-categories {
        top: 0;
        left: 0;
        width: 100%;
        transform: none;
    }
    #menu-categories #grid-categories {
        display: flex;
        overflow-x: scroll;
    }

    #menu-categories .btn-category {
        aspect-ratio: 1;
        height: 15vh;
        width: auto;
    }
    
    #menu-categories .btn-category span {
        font-size: 0.8rem;
        line-height: 0;
        position: relative;
        top: -0.5rem;
    }

    .side-bar {
        display: flex;
        flex-direction: column;
        right: auto;
        top: auto;
        bottom: 0;
        left: 0;
        height: 25vh;
        width: 100%;
        overflow: hidden;
    }

    .side-bar #side-bar-header {
        background-color: var(--primary);
        position: relative;
        width: 100%;
    }

    .side-bar .side-bar-header {
        position: inherit;
        width: auto;
        background-color: none;
        z-index: auto;
    }

    .side-bar #side-bar-body {
        overflow-x: scroll;
        overflow-y: hidden;
        flex-shrink: 1;
        display: flex;
    }

    .side-bar .card, .side-bar #card_0 {
        margin: 0 0.5rem;
        padding: 0;
        width: 150px;
    }

    .side-bar .side-bar-close-btn {
        position: absolute;
        bottom: 21vh;
        right: 1vw;
    }

    .side-bar .card, .side-bar #card_0 {
        height: 100%;
        margin: 0 0.5rem;
        padding: 0 0.5rem;
        width: min-content;
    }

    .side-bar .card button {
        aspect-ratio: 1;
        min-width: max-content;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        background-color: white;
        flex-grow: 1;
    }

    .side-bar .card button img {
        aspect-ratio: 1;
        flex-grow: 1;
        width: 120px;
    }

    .side-bar .card button h3 {
        flex-grow: 1;
        padding: 0.1rem;
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        min-height: 21%;
    }

    .side-bar .side-bar-name {
        max-lines: 1;
    }

    #modal {
        right: 2rem;
        left: 2rem;
        transform: none;
        top: 40vh;
    }

    @media (min-width:1000px) {
        .side-bar .card button h3 {
            font-size: 1.1rem;
        }

        #modal {
            top: 30vh;
        }
    }

    @media (min-width:750px) {
        .side-bar .card button h3 {
            font-size: 0.7rem;
        }

        #modal {
            top: 30vh;
        }
    }

    @media (max-width:420px) {

        #instructions-grid {
            padding: 0;
        }

        #menu-categories .btn-category span {
            font-size: 0.6rem;
        }

        #modal {
            right: 0.5rem;
            left: 0.5rem;
            top: 25vh;
            overflow-y: scroll;
            max-height: 50%;
        }

        #modal #modal-body {
            flex-direction: column;
        }

        #modal button#close-modal {
            font-size: 1rem;
            position: fixed;
            background-color: white;
            border-radius: 1rem;
        }

        #modal #element-info {
            margin: 0;
        }

        #modal #element-info #element-text #element-name {
            font-size: 0.8rem;
        }

        #modal #element-info #element-text #element-description {
            max-height: 25vh;
            overflow-y: scroll;
            padding: 0 1rem;
        }

        #modal #element-info #element-text #element-features {
            position: absolute;
            top: 0.5rem;
            bottom: 0.5rem;
            left: 0.5rem;
            right: 0.5rem;
            background-color: white;
            overflow-y: scroll;
            margin: 0;
        }

        #modal #modal-title {
            font-size: 0.8rem;
            margin: 1.5rem auto 1rem;
        }

        .side-bar .side-bar-close-btn {
            bottom: 17vh;
        }

        .side-bar .card, .side-bar #card_0 {
            height: 100%;
            margin: 0 5px;
            width: 200px;
            flex: 1;
        }

        .side-bar #side-bar-body {
            overflow-x: scroll;
            overflow-y: hidden;
            flex-shrink: 1;
            display: flex;
        }

        .side-bar .card button {
            aspect-ratio: 1;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            background-color: white;
            width: auto;
            min-width: max-content;
        }

        .side-bar .card button:disabled h3 {
            width: 100px;
        }

        .side-bar .card button img {
            aspect-ratio: 1;
            flex-grow: 1;
            width:90px;
        }

        .side-bar .card button h3 {
            flex-grow: 1;
            padding: 0.1rem;
            font-size: 0.6rem;
            width: 100px;
            text-align: center;
            min-height: 21%;
        }

        .side-bar .side-bar-name {
            max-lines: 1;
        }

    }
}