html,
body {
    width: 100%;
    max-width: 100%;
    /* overflow-x: hidden; */
    margin: 0;
    padding: 0;
    background-color: none;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: white;
    text-shadow: 0px 0px 6px red;
    background: black url(./4dekerstquiz.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

input,
button {
    padding: .5em;
    font-size: 1.2em;
    background: rgba(0, 0, 0, 0.8);
    transition: .3s;
}

input {
    color: gold;
    border: 1px solid gold;
    border-radius: 6px;
}

input:hover,
button:hover {
    background: rgba(100, 0, 0, 0.8);
    color: gold;
}

header {
    font-family: Impact, 'Arial Narrow Bold', sans-serif;
    margin-bottom: .6em;
    top: 0;
    z-index: 100;
}

.logo {
    transition: .5s;
}

.container {
    margin-bottom: 2em;
}

.heading {
    margin: 10px 0;
}

.header-sticky {
    position: sticky;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    padding: .2em 5vw;
    margin-bottom: 36px;
}

.header-sticky div.team {
    display: flex;
    font-size: 6vw;
    color: gold;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    margin-bottom: 12px;
}

.header-logo {
    display: flex;
    flex-grow: 1;
    gap: 1em;
    padding: 0 5vw;
    justify-content: space-between;

    .assignment-buttons {
        max-width: 150px;

        a {
            display: block;
            position: relative;    
            padding: 4px;
            background-color: #000000;
            color: gold;
            margin-bottom: 4px;
            padding-left: 30px;
        }

        a::before {
            position: absolute;
            left: 2px;
            content: "";
        }
    }
}

header h1 {
    font-size: 16px;
}

.door-search {
    text-align: center;
}

.container>img {
    padding: 12px 5vw;
    margin-top: 10px;
}

header section {
    border-radius: 10px;
    background: linear-gradient(#300, #030);
    font-size: 4vw;
    padding: 10px;
}

header section:before {
    display: block;
    font-size: 50%;
    opacity: 0.9;
}

#team-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}

#team-name:before {
    content: "Team Name";
}

#door-timeout:before {
    content: "Door Retry Timeout";
}

#team-score {
    text-align: right;
}

#team-score:before {
    content: "Score";
}

main {
    padding: 0 5vw;
}

section.doors {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 4em 2em;
    margin-bottom: 6em;
}

advent-door {
    background-color: transparent;
}

dialog {
    background: linear-gradient(135deg, #4c4c4c 0%, #595959 12%, #666666 25%, #474747 39%, #2c2c2c 50%, #000000 51%, #111111 60%, #2b2b2b 76%, #1c1c1c 91%, #131313 100%);
    color: white;
    text-shadow: none;
    border: 3px solid gold;
    box-shadow: 10px 10px 10px black;
    border-radius: 10px;
    padding: 30px;
    max-width: 90%;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.3);
}

dialog h2 {
    margin: 0;
}

dialog input {
    font-size: 1.2em;
}

.door-code-dialog-keypad {
    display: flex;
    flex-wrap: nowrap;
    gap: 1em;
    text-align: center;
    justify-content: space-evenly;
}

.door-code-dialog-keypad img {
    height: 50vh;
    max-height: 300px;
    box-shadow: 5px 5px 5px black;
    border-radius: 6px;
}

.door-code-dialog-keypad-title {
    font-size: 150%;
    font-weight: bold;
    text-transform: uppercase;
}

#door-code-dialog-answer {
    font-family: Impact, 'Arial Narrow Bold', sans-serif;
    font-size: 400%;
    color: gold;
}

#door-code-dialog-door-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

#door-code {
    font-family: Consolas, 'Andale Mono', 'Courier New', Courier, monospace;
    font-size: 1.5em;
    margin: 0;  
    border-radius: 6px 0 0 6px;
    width: 100%;
}

#door-code:focus {
    outline: none;
}

.door-code-form {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.submit-code {
    background-color: gold;
    height: 100%;
    margin-left: 0;
    font-size: 1.5em;
    border-radius: 0 6px 6px 0;
    color: black;
}

.door-code-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.door-code-dialog-actions input {
    flex-grow: 1;
}

footer {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 6px;
    font-size: 80%;
    text-align: center;
    text-shadow: none;
    color: rgba(255, 255, 255, 0.6);
}

.lightrope {
    position: sticky;
    top: 0px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    z-index: 1;
    margin: -15px 0 0 0;
    padding: 0;
    pointer-events: none;
    width: 100%;
}

.lightrope li {
    position: relative;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    width: 12px;
    height: 28px;
    border-radius: 50%;
    margin: 20px;
    display: inline-block;
    background: #00f7a5;
    box-shadow: 0px 4.6666666667px 24px 3px #00f7a5;    
}

.lightrope li {
    -webkit-animation-duration: 2s;
    animation-duration: 2s;
}

.lightrope:not(#code) {
    -webkit-animation-name: flash-1;
    animation-name: flash-1;
}

.lightrope li:nth-child(2n+1) {
    background: aqua;
    box-shadow: 0px 4.6666666667px 24px 3px rgba(0, 255, 255, 0.5);
    -webkit-animation-name: flash-2;
    animation-name: flash-2;
    -webkit-animation-duration: 0.4s;
    animation-duration: 0.4s;
}

.lightrope li:nth-child(4n+2):not(#code) {
    background: #f70094;
    box-shadow: 0px 4.6666666667px 24px 3px #f70094;
    -webkit-animation-name: flash-3;
    animation-name: flash-3;
    -webkit-animation-duration: 1.1s;
    animation-duration: 1.1s;
}

.lightrope li:nth-child(odd) {
    -webkit-animation-duration: 1.8s;
    animation-duration: 1.8s;
}

.lightrope li:nth-child(3n+1) {
    -webkit-animation-duration: 1.4s;
    animation-duration: 1.4s;
}

.lightrope li:before {
    content: "";
    position: absolute;
    background: #222;
    width: 10px;
    height: 9.3333333333px;
    border-radius: 3px;
    top: -4.6666666667px;
    left: 1px;
}

.lightrope li:after {
    content: "";
    top: -14px;
    left: 9px;
    position: absolute;
    width: 52px;
    height: 18.6666666667px;
    border-bottom: solid #222 2px;
    border-radius: 50%;
}

.lightrope li:last-child:after {
    content: none;
}

.lightrope li:first-child {
    margin-left: -40px;
}

@-webkit-keyframes flash-1 {

    0%,
    100% {
        background: #00f7a5;
        box-shadow: 0px 4.6666666667px 24px 3px #00f7a5;
    }

    50% {
        background: rgba(0, 247, 165, 0.4);
        box-shadow: 0px 4.6666666667px 24px 3px rgba(0, 247, 165, 0.2);
    }
}

@keyframes flash-1 {

    0%,
    100% {
        background: #00f7a5;
        box-shadow: 0px 4.6666666667px 24px 3px #00f7a5;
    }

    50% {
        background: rgba(0, 247, 165, 0.4);
        box-shadow: 0px 4.6666666667px 24px 3px rgba(0, 247, 165, 0.2);
    }
}

@-webkit-keyframes flash-2 {

    0%,
    100% {
        background: aqua;
        box-shadow: 0px 4.6666666667px 24px 3px aqua;
    }

    50% {
        background: rgba(0, 255, 255, 0.4);
        box-shadow: 0px 4.6666666667px 24px 3px rgba(0, 255, 255, 0.2);
    }
}

@keyframes flash-2 {

    0%,
    100% {
        background: aqua;
        box-shadow: 0px 4.6666666667px 24px 3px aqua;
    }

    50% {
        background: rgba(0, 255, 255, 0.4);
        box-shadow: 0px 4.6666666667px 24px 3px rgba(0, 255, 255, 0.2);
    }
}

@-webkit-keyframes flash-3 {

    0%,
    100% {
        background: #f70094;
        box-shadow: 0px 4.6666666667px 24px 3px #f70094;
    }

    50% {
        background: rgba(247, 0, 148, 0.4);
        box-shadow: 0px 4.6666666667px 24px 3px rgba(247, 0, 148, 0.2);
    }
}

@keyframes flash-3 {

    0%,
    100% {
        background: #f70094;
        box-shadow: 0px 4.6666666667px 24px 3px #f70094;
    }

    50% {
        background: rgba(247, 0, 148, 0.4);
        box-shadow: 0px 4.6666666667px 24px 3px rgba(247, 0, 148, 0.2);
    }
}

#snackbar {
    visibility: hidden;
    width: 380px;
    max-width: 100%;
    margin-left: -190px;
    background-color: #333;
    color: #fff;
    text-align: center;
    word-wrap: normal;
    border-radius: 2px;
    padding: 16px;
    position: fixed;
    left: 50%;
    top: 30px;
    z-index: 1000;
    font-size: 150%;
    box-shadow: 5px 5px 5px black;
}

#snackbar.ok {
    background: linear-gradient(135deg, #b4ddb4 0%, #83c783 17%, #52b152 33%, #008a00 67%, #005700 83%, #002400 100%);
}

#snackbar.error {
    background: linear-gradient(135deg, #f85032 0%, #f16f5c 50%, #f6290c 51%, #f02f17 71%, #e73827 100%);
}

#snackbar.show {
    visibility: visible;
    /* Show the snackbar */
    /* Add animation: Take 0.5 seconds to fade in and out the snackbar.
    However, delay the fade out process for 2.5 seconds */
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

#message {
    background-color: rgba(0, 0, 0, 0.3);
    padding: .2em;
    font-size: 4vw;
    color: gold;
}

#message:empty {
    background-color: transparent;
}

/*
@-webkit-keyframes fadein {
    from {
        top: 0;
        opacity: 0;
    }

    to {
        top: 30px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        top: 0;
        top: 0;
    }

    to {
        top: 30px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        top: 30px;
        opacity: 1;
    }

    to {
        top: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        top: 30px;
        opacity: 1;
    }

    to {
        top: 0;
        opacity: 0;
    }
}

*/

@media only screen and (max-width: 767px) {
    #team-logo {
        display: none !important;
    }

    #message {
        display: none !important;
    }

    .keypad {
        display: none;
    }
}