:root {
    --gutter: 20px;

    /**/
    --color1: rgb(25, 84, 123);
    --color2: rgb(223, 189, 135);
    --color1-transp: rgba(25, 84, 123, 0.95);
    /**
    --color1: rgb(29,67,80);
    --color2: rgb(164,57,49);
    --color1-transp: rgba(29,67,80,0.95);
    /**/
}


* {
    margin: 0;
    padding: 0;
    font-family: Helvetica, sans-serif;
}

html {
    height: 100%;
}

html::before {
    content: ' ';
    display: block;
    background-color: var(--color1);
    background-image: -webkit-linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color2));
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color2));
    background-position: center;
    background-size: cover;
    height: 100vh;
    width: 100vw;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    position: fixed;
    z-index: -10;
}

body {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #fff;
}

*::-webkit-scrollbar {
    display: none;
}

a {
    color: #fff;
    text-decoration: none;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    padding: .25em;
}

h1,
h2,
h3 {
    margin: 0;
}

#content {
    width: 100%;
    padding: var(--gutter) 0;
    display: grid;
    grid-gap: var(--gutter) 0;
    grid-template-columns: var(--gutter) 1fr var(--gutter);
    align-content: center center;
    text-align: center;
    color: #fff;
    font-family: Helvetica, sans-serif;
    font-weight: 100;
    font-size: 1rem;
}

#logo {
    margin-bottom: 26px;
}

.icon {
    width: 80px;
    height: 80px;
}

.icon-small {
    width: 50px;
    height: 50px;
}

.icon svg {
    width: 100%;
    height: 100%;
}

#content>* {
    grid-column: 2 / -2;
}

#content>.full {
    grid-column: 1 / -1;
}

.hs {
    display: grid;
    grid-gap: calc(var(--gutter) / 2);
    grid-template-columns: 10px;
    grid-template-rows: minmax(150px, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: calc(38% - var(--gutter) * 2);

    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    padding-bottom: calc(.75 * var(--gutter));
    margin-bottom: calc(-.25 * var(--gutter));
}

.hs:before,
.hs:after {
    content: ' ';
    width: 10px;
}

.hs>li {
    scroll-snap-align: center;
    padding: calc(var(--gutter) / 2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.hs li.disabled {
    opacity: 0.3;
}

.hs>li div {
    display: inline-block;
    white-space: nowrap;
}

#color-picker {
    width: 100%;
    height: 32px;
}

#color-picker input {
    opacity: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

#login {
    width: 90%;
    max-width: 300px;
    margin: 0 auto;
}

#login > * {
    border: 0px;
    border-radius: 5px;
    width: calc(100% - 6px);
    font-size: 1.2rem;
    margin: 5px;
    padding: 3px;
    color: var(--color1);
}

#login > button {
    color: #fff;
    background-color: var(--color1);
    box-sizing: inherit;
}


#register {
    width: 90%;
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 10px;
}

#register * {
    border: 0px;
    border-radius: 5px;
    width: calc(100% - 6px);
    font-size: 1.2rem;
    margin: 5px;
    padding: 3px;
    color: var(--color1);
    box-sizing: border-box;
}

#register > button {
    color: #fff;
    background-color: var(--color1);
    box-sizing: border-box;
    width: calc(100% - 6px);
}

#register h2 {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}

#register p {
    font-style: italic;
}



/* Snackbar */
#snackbar {
    visibility: hidden;
    background-color: var(--color1-transp);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 20px;
    right: 20px;
    bottom: 20px;
}

#snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 20px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 20px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        bottom: 20px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        bottom: 20px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}


/* Confirmation Dialog */
#dialog {
    visibility: hidden;
    background-color: var(--color1-transp);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#dialog.show {
    visibility: visible;
}
#dialog.hide {
    visibility: hidden;
}

#dialog .message {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

#dialog button {
    padding: 4px 12px;
    margin: 0 4px 0 4px;
    font-size: 16px;
    border: 0px;
    border-radius: 4px;
}

/* Media Remote */

#remotes {
    visibility: hidden;
    background-color: var(--color1-transp);
    color: #fff;
    text-align: center;
    /*border-radius: 4px;*/
    padding: 0;
    position: fixed;
    z-index: 1;
    width: 100%;
    height: 100%;
    font-weight: bold;
    letter-spacing: 0.2em;
    /*
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);*/
}

#remotes .content {
    width: 256px;
    margin: 0 auto;
    height: 100%;
}

#remotes .content>div {
    background-color: var(--color1-transp);
    background-image: -webkit-linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color2));
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--color2));
    padding: 10px;
    border: 3px solid #ffffff;
    border-radius: 10px;
    position: absolute;
    top: 0px;
    height: 612px;
    display: grid;
    grid-column-gap: 4px;
    grid-row-gap: 4px;
    margin: 50px auto;
    align-content: center;
    justify-content: center;
    grid-template-columns: 54px 54px 54px 54px;
    grid-template-rows: 74px 54px 24px 64px 54px 54px 64px 64px 64px;
}


#remotes .content .centered {
    grid-row: 2 / span 3;
    align-self: center;
}

#remotes .content div.center {
    grid-column: 2 / span 2;
    width: 54px;
    justify-self: center;
}

#remotes .content div.lean-left {
    margin-left: -59px;
}

#remotes .content div.lean-right {
    margin-right: -59px;
}


#remotes .content button {
    margin: 0px;
    color: #fff;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.5);
    border: 3px solid #fff;
    border-radius: 4px;
}

#remotes.show {
    visibility: visible;
}

#remotes.hide {
    visibility: hidden;
}



#remotes .content .remote {
    visibility: hidden;
}

#remotes .content .remote.show {
    visibility: visible;
}

#remotes .close {
    position: absolute;
    display: block;
    width: 25px;
    height: 25px;
    margin-right: 10px;
    padding: 0;
    overflow: visible;
    top: 0;
    right: 0;
    font-size: 36px;
    cursor: pointer;
}


/* The side navigation menu */
#sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    background-color: var(--color1-transp);
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 60px;
    transition: 0.5s;
}

#sidebar.show {
    width: 100%;
}

#sidebar .content {
    padding: 16px;
}

#sidebar .close {
    position: absolute;
    display: block;
    width: 25px;
    height: 25px;
    padding: 0;
    margin-right: 12px;
    overflow: visible;
    top: 0;
    right: 0;
    font-size: 36px;
    cursor: pointer;
}

@media (min-width: 801px) {
    #content, .hs {
        display: block;
        overflow: visible;
    }

    .hs>li {
        display: inline-flex;
    }

    #snackbar {
        left: calc(50% - 280px);
        right: calc(50% - 280px);
    }
 
    #sidebar.show {
        width: 280px;
    }
}