body {
    color:#fff;
    font-family: 'Nimbus';
    text-shadow: #0008 0px 1px 2px;
}


/*Headbar*/
    .headbar-home-button{
        background-image: url(./textures/home-button.png);
        background-size: 100% 100%;
        
        filter: none;
        transition: filter 0.2s;
    }
        .headbar-home-button:hover{
            filter: drop-shadow(0px 0px 4px #ff8);
        }
        .headbar-home-button.disabled{
            background-image: url(./textures/home-button-disabled.png);
        }
            .headbar-home-button.disabled:hover{
                filter: none;
            }

    .headbar-watermark{
        background-image: url(/dat/logos/page-watermark.png);
        background-size: 100% 100%;
        opacity: 0.5;
        transition: opacity 0.2s;
    }
        .headbar-watermark:hover{
            opacity: 1;
        }



/*sections*/
.section{
    /*box-shadow: inset #000 0px 1px 2px, inset #0008 0px 5px 10px;*/
    /*background: linear-gradient(#0008 0px, #0000 5px);*/
}

.tab{
    background: url(./textures/background.jpg );
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

    @media (orientation: portrait) {
        /*verticalversion of background*/
        .tab{
            background: url(./textures/background-vertical.jpg );
            background-size: cover;
            background-position: center center;
            background-attachment: fixed;
        }
    }

.section.upload {
    text-align: center;
    font-size: 20px;

    cursor: pointer;
    text-shadow: none;
}

#select-files-text{
    
    color: #fff;
    text-shadow: none;
    font-size: 50px;
    font-family: 'Genos', 'Nimbus';
    font-weight: 300;
}

.section.upload:hover {
    background: linear-gradient(#0000, #fff4);
}

.bottom.enter-code{
    box-shadow: #0008 0px 5px 10px;
}

    .type-code{
        height: 30px;

        border-image: url(./textures/button.jpg);
        border-image-slice: 25 fill;
        border-image-width: 25px;
        border-image-repeat: repeat repeat;
        flex-grow: 1;

        padding: 7px;
        padding-left: 20px;
        padding-right: 20px;
        font-size: 20px;

        color: #000;
        text-shadow: #fff8 0px 1px, #0004 0px -1px;

        cursor: pointer;
        transition: border-image 0.2s;
    }
    .type-code:hover{
        border-image: url(./textures/button-hover.jpg);
        border-image-slice: 25 fill;
        border-image-width: 25px;
        border-image-repeat: repeat repeat;

        color: #fff;
        text-shadow:  #0004 0px 1px;
    }
    #app-button-connect{        
        height: 30px;

        border-image: url(./textures/button-yellow.jpg);
        border-image-slice: 25 fill;
        border-image-width: 25px;
        border-image-repeat: repeat repeat;
        
        cursor: pointer;
        font-size: 20px;
        padding: 7px;
        padding-left: 20px;
        padding-right: 20px;

        text-shadow: #0004 0px 2px 4px, #0008 0px 1px 1px;
    }
    #app-button-connect:hover{
        border-image: url(./textures/button-hover.jpg);
        border-image-slice: 25 fill;
        border-image-width: 25px;
        border-image-repeat: repeat repeat;
    }


    .type-code:empty::before{
        content: "Write code here...";
        color:#0008;
        text-shadow: none;
    }

/* Modal/notificaiton */
    #modal{
        position: fixed;
        z-index: 999999;        

        display: none;

        bottom: 25px;
        left: 25px;
        width: calc(100% - 50px);
        height: 40px;

        padding: -10px;

        justify-items: flex-start;
        align-content: center;

        border-image: url(./textures/speechbubble-green-lines.png);
        border-image-slice: 50 fill;
        border-image-width: 50px;
        border-image-outset: 20px;
        border-image-repeat: round round;
    }
        #modal > div {
            width: 100%;
        }
        #modal-text{
            font-size: 18px;
            margin-left: 20px;
            margin-right: 20px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        #modal.play{        
            display: block;
            animation: notification 7s ease forwards;
        }
        @keyframes notification{
            0% {
                display: block;
                top: -70px;
                width: 40px;
                opacity: 1;
            }
            5% {
                /*bottom: 50px;*/
                top: calc(env(titlebar-area-height, 0px) + 50px);
                width: 40px;
            }
            10%{
                width: calc(100% - 50px);
            }
            90% {
                width: calc(100% - 50px);
            }
            95% {
                top: calc(env(titlebar-area-height, 0px) + 50px);
                width: 40px;
            }
            100%{
                width: 40px;
                top: -70px;
                display: none;
            }
        }

/*topbar*/
    .space-topbar{
        /*border-image: url(./textures/button.jpg);
        border-image-slice: 25;
        border-image-width: 25px;
        border-image-repeat: repeat repeat;
        flex-grow: 1;*/
    }
    .device-name{
        color: #fffA;
        text-shadow: none;
        transition: color 0.2s;
    }

    /*.topbar:hover {
        border-image: url(./textures/button-hover.jpg);
        border-image-slice: 25 fill;
        border-image-width: 25px;
        border-image-repeat: repeat repeat;

        color: #fff;
        text-shadow:  #0004 0px 1px;
    }*/
    .topbar:hover>.device-name{
        color: #fff;
        text-shadow:  #0004 0px 1px;
    }
    .i.edit{
        color: #fffa;
        text-shadow: none;
        margin-left: 5px;
        margin-right: 5px;
        
        transition: color 0.2s;
    }
    .topbar:hover>.i.edit{
        color: #fff;
        text-shadow:  #0004 0px 1px;
    }

/*dragover*/
.app-dragover{
    background: repeating-linear-gradient(#444 0px, #888 5px, #444 10px);
    box-shadow: inset 0px 1px 2px #0008, inset 0px 4px 8px #0008, inset 0px 8px 16px #0008;
    animation: static-dark 1.5s linear infinite;
}
    @keyframes static-dark{
        0% {
            background-position: 0px 0px;
        }
        100% {
            background-position: 0px 20px;
        }
    }

/* upload screen b*/
#appscreen-upload > .screen.b{
    background: repeating-linear-gradient(#fff 0px, #eee 2px, #fff 4px);
}
#appscreen-upload > .screen.b > .space-topbar{
    border-image: url(./textures/button.jpg);
    border-image-slice: 25 fill;
    border-image-width: 25px;
    border-image-repeat: repeat repeat;
}

.section.connections > .connection {
    margin: 0px;
    padding: 2px;
}

.section.connections > .connection > div {
    border-image: url(./textures/button.jpg);
    border-image-slice: 25 fill;
    border-image-width: 25px;
    border-image-repeat: repeat repeat;

}

/* Cast/scan area */
    .section.cast{
        
        /*box-shadow: #0008 0px 1px 2px, #0008 0px 4px 8px;*/
        filter: drop-shadow(0 1px 2px #0008) drop-shadow(0 4px 8px #0008);
    }
    .cast-area{
        
        padding: 10px;
        padding-top: 30px;
        padding-bottom: 30px;
        background: linear-gradient(#eee, #999);
        mask-image: url(/dat/css/textures/squircle.png);
        mask-size: 100% 100%;
    }

    #app-scan-qr {
        width: 48%;
        height: auto;
        background-color: #fff;
        padding: 12px;
        margin: 12px;
        flex-grow: 0;
        flex-shrink: 1;
        box-shadow: inset #0008 0px 1px 2px, #fff8 0px 1px 1px;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .qr-code {
        position: relative;
        cursor: pointer;
    }
    .qr-overlay{
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(150deg, #fff8 0%, #fff4 50%, #0000 50%), linear-gradient(#fff1, #0004);
        display: block;

        cursor: pointer;
    }
    .text-code{
        color:#000;
        text-shadow: #0008 0px -1px 1px, #fff8 0px 1px 1px;
    }
        .copy-code{
            font-size: 24px;
        }
        .copy-url{        
            margin-top: 12px;
            
            font-size: 10px;
            text-shadow: none;
            font-weight: lighter;
        }
        .app-copy-on-click {
            background: linear-gradient(#111, #111, #777);
            color: #fffc;
            padding: 5px;
            border-radius: 5px;
            box-shadow: #fff8 0px 1px 1px, inset #0008 0px 4px 8px;
            flex-grow: 0;
            flex-shrink:1;
            border-bottom: #555 solid 1px;
            font-size: 14px;
            font-weight: lighter;
        }
        .app-copy-on-click:hover{
            color: #fff;
        }
            #app-copy-code{
                text-align: center;
                font-size: 30px;
                color:#fff;
                text-shadow: #000 0px 1px 2px, #0008 0px 4px 8px;
            }
            #app-copy-url{
                border-radius: 3px;
                padding-top: 2px;
                padding-bottom: 2px;
            }

    .qr-upside-down-label{
        display: none;
    }
    @media (orientation: portrait){
        .cast-area{
            flex-direction: column;
            align-items: center;
        }
        #app-scan-qr {
            width: 70%;
        }
        .text-code{
            width: 70%;
        }
        
    }

    @media (orientation: portrait) and (pointer: coarse){
        /*ONLY Turn QR code upside down ONLY on Touch Devices ONLY when vertical*/
        .qr-upside-down-label{
            display: flex;
            color:#222;
            text-shadow: #fff 0px -1px 1px, #0008 0px 1px 1px;
            transform: rotate(180deg);
            margin: 0px;
            padding: 0px;
            height: 0;
            font-size: 11px;
            font-weight: bold;
        }
        .qr-overlay{
            transform: rotate(-180deg);
        }
        #app-scan-qr {
            width: 70%;
            transform: rotate(180deg);
            box-shadow: inset #0008 0px -1px 2px, #fff8 0px -1px 1px;
        }
        
    }

/*donation area*/
.monetize{
    position: fixed;
    top: unset;
    bottom: 0px;
    width: 100%;

    cursor: pointer;
    border-image: url(./textures/button-yellow.jpg);
    border-image-slice: 25 fill;
    border-image-width: 30px;
    border-image-repeat: repeat repeat;

    
    transition: all 0.2s;

    text-align: center;
}
.space-monetize{
    flex-basis: 15px;
}
.monetize:hover{
    border-image: url(./textures/button-hover.jpg);
    border-image-slice: 25 fill;
    border-image-width: 30px;
    border-image-repeat: repeat repeat;

}
.monetize > .message{
    color:#000;
    text-shadow: none;
    font-size: 20px;
    margin: 5px;
    padding: 0;
    height: 20px;
}

.monetize > .copyright{
    font-size: 11px;
    color: #0008;
    text-shadow: none;
    /*margin-bottom: 5px;*/
    margin: 5px;
    height: 20px;
}

@media (max-width: 400px) {
    .section.download{
        zoom: 0.7;
    }
    .monetize > .message{
        margin: 10px;
        height: 40px;
    }
    .monetize > .copyright {
        height: 0px;
        position: fixed;
        bottom: 80px;
        left:0px;
        width: 100%;
    }
}

/*Downloading*/
    .section.download{
        filter: drop-shadow(0 1px 2px #0008) drop-shadow(0 4px 8px #0008);
    }
    
        .download-section-container{
            background: linear-gradient(#eee, #aaa);
            mask-image: url(/dat/css/textures/squircle.png);
            mask-size: 100% 100%;
            padding: 20px;

            color: #000;
            text-shadow: #0008 0px -1px 1px, #fff8 0px 1px 1px;
            align-items: center;
        }
            .download-progress-bar{
                width: 400px;
                margin: 20px;
                color: #0008;
                text-shadow: none;
                border-radius: 20px;    
                overflow: hidden;
                font-size: 20px;
                height: 40px;
                align-items: center;
                justify-content: start;
                flex-direction: row;

                
                background: linear-gradient(#aaa, #fff);
                border: #888 solid 1.5px;
                border-top-color: #eee;
                border-bottom-color: #ccc;
                box-shadow: inset #0004 0px 1px 2px, inset #0004 0px 4px 8px, #0004 0px 1px 2px, #0004 0px 4px 8px;
                
                position: relative;
            }
                .download-status{
                    width: 0%;
                    height: 100%;
                    color: #fff;
                    align-items: center;
                    justify-content: center;
                    text-align: center;

                    border-right: #888 solid 1px;

                    border-radius: 8px;
                    background: repeating-linear-gradient(-45deg, #0000 0px, #0000 10px, #0002 10px, #0001 20px, #0000 20px), linear-gradient(#0a0, #0f0);
                    text-shadow: #0008 0px 1px 2px;
                    box-shadow:  inset #0004 0px 1px 2px, inset #0004 0px 4px 8px;
                }
                .download-status-overlay{
                    position: absolute;
                    top: 4px;
                    left: 10px;
                    width: calc(100% - 20px);
                    height: 15px;
                    background: linear-gradient(#fffa, #fff5);
                    border-radius: 10px;
                }
                #app-download-status-pretext{
                    width: 100%;
                    text-align: center;
                }