* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: rgba(38, 9, 255, 0);
    --ui: rgba(74, 74, 74, 0.55);
    --link: rgb(232, 255, 23);
    --hover: #ff00c6;
    --fade: rgba(7, 7, 7, 0.75);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0);
    font-family: 'Courier New', monospace;
}

body {
    background: var(--bg);
    overflow-x: hidden;
}

img {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}




@font-face {
    font-family: 'Montserrat';
    src: url('./fonts/Montserrat.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Athemi';
    src: url('./fonts/athemi_otf-webfont.woff2') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Aesthetic';
    src: url('./fonts/Aesthetic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Remington';
    src: url('./fonts/Remington Noiseless.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}



#labyrinth-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.labyrinth-page {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    z-index: 1;

    display: block;
    overflow: visible;
    filter: url(#glitch-filter);
}

.labyrinth-page.active {
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    opacity: 1;
    z-index: 10;

    animation: glitchIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.labyrinth-page.glitch-out {
    animation: glitchOut 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 15;
}

.page-1 { background: url("./assets/2.png") center/cover no-repeat; }
.page-2 { background: url("./assets/1.png") center/cover no-repeat; }
.page-3 { background: #2609ff; }
.page-4 { background: black;

}

.next-button {
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    background: #0ff;
    color: #000;
    border: none;
    border-radius: 4px;
    transition: 0.3s ease;
    z-index: 9999;
}
.next-button:hover { background: #0aa; }

@keyframes glitchIn {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    10% { opacity: 0.1; filter: saturate(3); transform: translate(-50%, -50%) scale(1.05) translate(3px, -3px); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; }
}

@keyframes glitchOut {
    0% { opacity: 1; filter: none; transform: translate(-50%, -50%) scale(1); clip-path: inset(0 0 0 0); }
    50% { opacity: 0.5; filter: saturate(2) hue-rotate(90deg); transform: translate(-50%, -50%) scale(1.05) translate(-10px, 5px); clip-path: inset(5% 5% 5% 5%); }
    100% { opacity: 0; filter: brightness(0.5); transform: translate(-50%, -50%) scale(1.2) translate(0, 0); clip-path: inset(30% 60% 70% 20%); }
}

.labyrinth-page.glitch-out::before,
.labyrinth-page.glitch-out::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
    z-index: 1000;
    pointer-events: none;
    overflow: hidden;
    mix-blend-mode: difference;
    background: inherit;
}

.labyrinth-page.glitch-out::before {
    clip-path: inset(0 0 50% 0);
    transform: translate(3px, -3px);
}

.labyrinth-page.glitch-out::after {
    clip-path: inset(50% 0 0 0);
    transform: translate(-3px, 3px);
}

.page-content {
    position: absolute;
}

.page-1 .page-content {
    top: 20%;
    left: 10%;
    text-align: left;
    color: #fff;
    font-family: "Inter", sans-serif;
}

.page-2 .page-content {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #0ff;
    font-family: "Inter", sans-serif;
}

.page-3 .page-content {
    top: 10%;
    left: 10%;
    text-align: left;
    color: #fff;
    font-family: "JetBrains Mono", sans-serif;
    font-size: 1rem;
}

.page-3 .bsod-headline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-align: left;
}

.page-3 .next-button {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    background: #ffffff;
    color: #4c32ff;
    border: none;
    border-radius: 0;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    margin-top: 2rem;
    transition: 0.3s ease;
}
.page-3 .next-button:hover {
    background: #0aa;
}




.css-typing p {
    border-right: .15em solid orange;
    font-family: "Courier";
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
}
.css-typing p:nth-child(1) {
    width: 7.3em;
    -webkit-animation: type 2s steps(40, end);
    animation: type 2s steps(40, end);
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
}

.css-typing p:nth-child(2) {
    width: 11.5em;
    opacity: 0;
    -webkit-animation: type2 2s steps(40, end);
    animation: type2 2s steps(40, end);
    -webkit-animation-delay: 2s;
    animation-delay: 2s;
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
}

.css-typing p:nth-child(3) {
    width: 7.3em;
    opacity: 0;
    -webkit-animation: type3 5s steps(20, end), blink .5s step-end infinite alternate;
    animation: type3 5s steps(20, end), blink .5s step-end infinite alternate;
    -webkit-animation-delay: 4s;
    animation-delay: 4s;
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
}

@keyframes type {
    0% {
        width: 0;
    }
    99.9% {
        border-right: .15em solid orange;
    }
    100% {
        border: none;
    }
}

@-webkit-keyframes type {
    0% {
        width: 0;
    }
    99.9% {
        border-right: .15em solid orange;
    }
    100% {
        border: none;
    }
}

@keyframes type2 {
    0% {
        width: 0;
    }
    1% {
        opacity: 1;
    }
    99.9% {
        border-right: .15em solid orange;
    }
    100% {
        opacity: 1;
        border: none;
    }
}

@-webkit-keyframes type2 {
    0% {
        width: 0;
    }
    1% {
        opacity: 1;
    }
    99.9% {
        border-right: .15em solid orange;
    }
    100% {
        opacity: 1;
        border: none;
    }
}

@keyframes type3 {
    0% {
        width: 0;
    }
    1% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

@-webkit-keyframes type3 {
    0% {
        width: 0;
    }
    1% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}
@-webkit-keyframes blink {
    50% {
        border-color: tranparent;
    }
}






.page-4 .page-content {
    top: 30%;
    left: 15%;
    text-align: left;
    color: #fff;
    font-family: "PP Editorial New", sans-serif;
    font-size: 3rem;

}


.page-4 .next-button {
    font-family: 'PP Editorial New', monospace;
    font-size: 3rem;
    background: #ff00fb;
    color: #000000;
    border: none;
    border-radius: 0;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    margin-top: 2rem;
    transition: 0.3s ease;
}
.page-4 .next-button:hover {
    background: #0aa;
}
