@font-face {
	font-family: pixel;
	src: url(font.ttf);
	font-weight: 50;
}

@media (min-width: 769px) {
    :root {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    :root {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 8px;
    }
}

@media (max-width: 420px) {
    :root {
        font-size: 7.9px;
    }
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: pixel;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
}

.overlay {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#vid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    animation: seized-video-glitch 4s infinite steps(1, end);
}

.content {
    position: absolute;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
}

.ascii-art {
    font-size: 1rem;
    margin-bottom: 20px;
    margin: 0px;
    padding-bottom: 2rem;
    position: relative;
    animation: seized-glitch-shake 2.5s infinite steps(1, end);
    text-shadow:
        2px 0 red,
        -2px 0 cyan,
        0 0 10px white;
    filter: contrast(1.2);
}

.ascii-art::before,
.ascii-art::after {
    content: attr(data-glitch);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    color: white;
    overflow: hidden;
    pointer-events: none;
    white-space: pre;
}

.ascii-art::before {
    left: 2px;
    text-shadow: -2px 0 red;
    animation: seized-glitch-top 1.4s infinite linear alternate-reverse;
}

.ascii-art::after {
    left: -2px;
    text-shadow: 2px 0 cyan;
    animation: seized-glitch-bottom 1.1s infinite linear alternate-reverse;
}

.login-link {
    color: white;
	cursor: pointer;
    text-decoration: none;
}

.login-link:hover {
    text-decoration: underline;
}

.login-link:visited {
    color: white;
    text-decoration: none;
}

@media (min-width: 769px) {
    .footer {
		position: absolute;
		bottom: 0;
		width: 100vw;
		display: flex;
		justify-content: center;
		align-items: center;
		z-index: 3;
		font-size: 1rem;
        gap: 12px;
        padding-bottom: 14px;
        overflow: visible;
	}
}

@media (max-width: 768px) {
	.footer {
		position: absolute;
		bottom: 0;
		width: 100vw;
		display: flex;
		justify-content: center;
		align-items: center;
		z-index: 3;
		font-size: 1.4rem;
        gap: 12px;
        padding-bottom: 14px;
        overflow: visible;
	}
}

@media (max-width: 480px) {
	.footer {
		position: absolute;
		bottom: 0;
		width: 100vw;
		display: flex;
		justify-content: center;
		align-items: center;
		z-index: 3;
		font-size: 1.4rem;
        gap: 12px;
        padding-bottom: 14px;
        overflow: visible;
	}
}

@media (max-width: 420px) {
	.footer {
		position: absolute;
		bottom: 0;
		width: 100vw;
		display: flex;
		justify-content: center;
		align-items: center;
		z-index: 3;
		font-size: 2rem;
        gap: 12px;
        padding-bottom: 14px;
        overflow: visible;
	}
}

.clock {
    margin-right: 0;
}

.toggle-audio {
    margin-left: 0;
    cursor: pointer;
    text-decoration: none;
}

.toggle-audio:hover {
    text-decoration: underline;
}

#volume-container {
    display: flex;
    align-items: center;
    gap: 8px;

    position: relative;
    bottom: auto;
    left: auto;
    transform: none;

    margin-left: 0;
    padding: 6px 10px;

    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;

    z-index: 99999;
}

#volumeSlider {
    display: block;
    width: 120px;
    height: 16px;
    accent-color: white;
    cursor: pointer;
}

#volume-container label {
    color: white;
    font-size: 0.85rem;
}

.overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.04) 0px,
            rgba(255, 255, 255, 0.04) 1px,
            transparent 1px,
            transparent 4px
        );
    mix-blend-mode: screen;
    opacity: 0.35;
    animation: seized-scanlines 0.35s infinite linear;
}

.overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(255, 0, 0, 0.12),
            rgba(0, 255, 255, 0.08),
            rgba(255, 255, 255, 0)
        );
    mix-blend-mode: screen;
    opacity: 0;
    animation: seized-flash 3s infinite steps(1, end);
}

@keyframes seized-glitch-shake {
    0%, 90%, 100% {
        transform: translate(0, 0);
    }

    91% {
        transform: translate(2px, -1px);
    }

    92% {
        transform: translate(-2px, 1px);
    }

    93% {
        transform: translate(1px, 2px);
    }

    94% {
        transform: translate(-1px, -2px);
    }
}

@keyframes seized-glitch-top {
    0% {
        clip-path: inset(0 0 85% 0);
    }

    20% {
        clip-path: inset(10% 0 65% 0);
    }

    40% {
        clip-path: inset(25% 0 55% 0);
    }

    60% {
        clip-path: inset(5% 0 75% 0);
    }

    80% {
        clip-path: inset(35% 0 40% 0);
    }

    100% {
        clip-path: inset(0 0 90% 0);
    }
}

@keyframes seized-glitch-bottom {
    0% {
        clip-path: inset(80% 0 0 0);
    }

    20% {
        clip-path: inset(60% 0 20% 0);
    }

    40% {
        clip-path: inset(70% 0 10% 0);
    }

    60% {
        clip-path: inset(45% 0 35% 0);
    }

    80% {
        clip-path: inset(75% 0 5% 0);
    }

    100% {
        clip-path: inset(85% 0 0 0);
    }
}

@keyframes seized-video-glitch {
    0%, 88%, 100% {
        filter: brightness(0.85) contrast(1.15) saturate(1);
        transform: scale(1);
    }

    89% {
        filter: brightness(1.2) contrast(1.8) saturate(0.7) hue-rotate(12deg);
        transform: scale(1.01) translateX(3px);
    }

    90% {
        filter: brightness(0.6) contrast(2) saturate(1.5) hue-rotate(-12deg);
        transform: scale(1.01) translateX(-3px);
    }

    91% {
        filter: brightness(1) contrast(1.3) saturate(1);
        transform: scale(1);
    }
}

@keyframes seized-scanlines {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(4px);
    }
}

@keyframes seized-flash {
    0%, 92%, 100% {
        opacity: 0;
    }

    93% {
        opacity: 0.45;
    }

    94% {
        opacity: 0;
    }

    96% {
        opacity: 0.25;
    }
}
