/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 10 versions
*/

@property --s { /* Scaling */
    syntax: "<length>";
    inherits: true;
    initial-value: 1svh;
}

@property --ss { /* Screen Scaling */
    syntax: "<length>";
    inherits: true;
    initial-value: 1svh;
}

html {
    --s: min(1svw, 1svh);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;

    width: 100svw;
    height: 100svh;

    background-color: black;
}

* {
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
}

.screen {
    position: absolute;
}

.chin {
    position: absolute;
    background-color: rgba(0, 0, 0, 1);
}

.home-button {
    width: calc(10 * var(--s));
    -o-object-fit: cover;
       object-fit: cover;

    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);

    cursor: pointer;
}

@media (orientation: portrait) {
    .screen {
        top: 0;
        left: 0;
        width: 100svw;
        height: calc(100svh - 15 * var(--s));

        --ss: min(1svw, calc(1svh - 0.15 * var(--s)));
    }
    
    .chin {
        top: calc(100% - 15 * var(--s));
        left: 0;
        width: 100%;
        height: calc(15 * var(--s));
    }
}

@media (orientation: landscape) {
    .screen {
        top: 0;
        left: 0;
        width: calc(100svw - 15 * var(--s));
        height: calc(100svh);

        --ss: min(calc(1svw - 0.15 * var(--s)), 1svh);
    }
    
    .chin {
        top: 0;
        left: calc(100% - 15 * var(--s));
        width: calc(15 * var(--ss));
        height: 100%;
    }
}

.wallpaper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5)), url("/legacy/src/img/wallpaper.jpg");
    background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.5))), url("/legacy/src/img/wallpaper.jpg");
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5)), url("/legacy/src/img/wallpaper.jpg");
    background-size: 100% 100%;
    background-position: center;
    z-index: -1;
}

.top-bar {
    width: 100%;
    height: calc(8 * var(--ss));
    
    background-color: rgba(0, 0, 0, 0.65);
    color: white;
    -webkit-box-shadow: 0 calc(0.5 * var(--ss)) calc(0.8 * var(--ss)) rgba(0, 0, 0, 0.5);
            box-shadow: 0 calc(0.5 * var(--ss)) calc(0.8 * var(--ss)) rgba(0, 0, 0, 0.5);

    font-size: calc(4 * var(--ss));
    font-weight: bold;

    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;

    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.content {
    width: 100%;
    height: calc(100% - 8 * var(--ss));
}

.app-list {
    position: absolute;
    top: calc(13 * var(--ss));
    /* left is calculated in JS */

    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-flow: row wrap;
            flex-flow: row wrap;
    gap: calc(5 * var(--ss)) calc(5 * var(--ss));
}

.app-iframe {
    position: absolute;
    left: 0;
    top: calc(8 * var(--ss));
    width: 100%;
    height: calc(100% - 8 * var(--ss));
    border: none;
    z-index: 1;
}

.app-container {
    width: calc(17.5 * var(--ss));

    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;

    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

.app-button {
    cursor: pointer;
}

.app-link {
    line-height: 0;
}

.app-icon {
    width: 100%;
    -o-object-fit: cover;
       object-fit: cover;

    /*border-radius: calc(1.8 * var(--ss));*/
    -webkit-filter: drop-shadow(0vh calc(0.3 * var(--ss)) calc(0.3 * var(--ss)) rgba(0, 0, 0, 0.5));
            filter: drop-shadow(0vh calc(0.3 * var(--ss)) calc(0.3 * var(--ss)) rgba(0, 0, 0, 0.5));
    margin-bottom: var(--ss);
}

.app-text {
    color: white;
    text-align: center;
    width: 120%;

    font-size: calc(3 * var(--ss));
    text-shadow: rgba(0, 0, 0, 1) 0svh calc(0.5 * var(--ss)) calc(0.5 * var(--ss));
    font-weight: bold;
}