* {
    padding: 0;
    margin: 0;
}

body {
    font-family: 'VT323', monospace;
    background-color: var(--secondary-background-color);
    font-size: 16pt;
    letter-spacing: 2pt;
    color: var(--main-foreground-color);
    width: 100%;
    height: 100%;
}

#overlay {
    position: fixed;
    height: 100vh;
    width: 100vw;
    background-image: url('../media/old_screen_overlay.png');
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

::-moz-selection {
    color: black;
    background: rgb(50, 126, 73);
}

::selection {
    color: black;
    background: rgb(50, 126, 73);
}

a::-moz-selection {
    color: black;
    background: rgb(50, 126, 73);
}

a::selection {
    color: black;
    background: rgb(50, 126, 73);
}

a {
    text-decoration: none;
    color: black;
}

main {
    position: fixed;
    width: 95%;
    height: 95%;
    top: 50%;
    left: 50%;
    background-color: var(--main-background-color);
    border-radius: 5%;

    box-shadow: 0 0 20px 10px var(--main-background-color);
    filter: blur(0.5px);

    transform: translate(-50%, -50%);
}

#centerPanel {
    position: fixed;
    height: max-content;
    width: max-content;
    max-width: 80%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

h2,
p {
    text-shadow: 0 0 20px rgb(159, 255, 188);
    max-width: 100%;
}

h2 {
    display: inline;
    font-weight: normal;
    height: 3ex;
}

p {
    opacity: 0;
}

#progressbar {
    position: relative;
    width: 0em;
    max-width: 95%;
    height: 6ex;
    border: none;
    margin: auto;
    margin-top: 4ex;
    margin-bottom: 4ex;

    transition: width 0.5s;
}

#progress {
    position: absolute;
    width: calc(100% - 6pt);
    height: calc(100% - 6pt);
    background-color: rgb(56, 88, 63);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.percentage {
    position: absolute;
    display: none;
    text-align: right;
    height: 100%;
    z-index: 5000;
    font-size: 34pt;
    right: 0;
    width: 100%;
    color: rgb(7, 17, 9);
    text-shadow: 0 0 10px rgb(62, 110, 62);
}

.percentage::-moz-selection {
    filter: invert();
}

.percentage::selection {
    filter: invert();
}

#fill {
    height: 100%;
    width: 0%;
    max-width: 100%;
    background-color: var(--main-foreground-color);
    transition: width 2s;
}

#connect {
    position: fixed;
    top: 50%;
    left: 50%;
    font-size: 20pt;
    transform: translate(-50%, -50%);
    padding: 1ex;
    cursor: pointer;
    text-shadow: 0 0 10px rgb(159, 255, 188);
}

#cursorSpan {
    position: relative;
}

#cursor {
    display: none;
    position: absolute;
    top: 0;
    left: 0.1em;
    transform: translate(0, -25%);
    text-shadow: 0 0 20px var(--main-foreground-color);
    width: min-content;

    animation: none;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    25% {
        opacity: 1;
    }

    30% {
        opacity: 0;
    }

    75% {
        opacity: 0;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

#bgvid {
    min-width: 100vw;
    min-height: 100vh;
    opacity: 15%;
}

#info {
    display: none;
    margin-top: 2ex;
    width: 4em;
    position: absolute;
    transform: translate(-50%, 0);
    cursor: pointer;
}

#info:hover {
    filter: invert(1);
}

#infopanel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: var(--main-background-color);
    border: solid;
    border-color: var(--main-foreground-color);
    padding: 3ex;
    max-height: 90%;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 17cm;
    min-width: 8cm;
}

#infopanel h2 {
    display: inline-block;
    width: 100%;
    height: max-content;
    padding-bottom: 2ex;
    margin-bottom: 2ex;
    border-bottom: dashed;
}

#infopanel p {
    opacity: 1;
    margin-top: 2ex;
    margin-bottom: 2ex;
}

#infopanel p a {
    color: white;
    text-decoration: underline;
}

#closeInfo {
    position: absolute;
    top: -1ex;
    right: -0.5ex;
    padding: 1ex;
    font-size: 30pt;
    cursor: pointer;
    color: white;
}

#ERROR {
    position: absolute;
    text-align: center;
    width: 100%;
    bottom: 3ex;
}

#ERROR2 {
    position: absolute;
    text-align: center;
    width: 100%;
    bottom: -3ex;
}

#ERROR a {
    font-weight: bold;
    color: red;
    text-shadow: 0 0 10px red;
}

#ERROR2 a {
    font-weight: bold;
    color: red;
    text-shadow: 0 0 10px red;
}

@keyframes shake {
    0% {
        transform: skewX(-60deg);
    }

    5% {
        transform: skewX(60deg);
    }

    10% {
        transform: skewX(-60deg);
    }

    15% {
        transform: skewX(60deg);
    }

    20% {
        transform: skewX(0deg);
    }

    60% {
        transform: skewX(0deg);
    }

    65% {
        transform: skewX(-60deg);
    }

    70% {
        transform: skewX(60deg);
    }

    75% {
        transform: skewX(-60deg);
    }

    80% {
        transform: skewX(60deg);
    }

    100% {
        transform: skewX(0deg);
    }
}

.glitch:hover {
    animation: 0.5s shake infinite alternate;
}