@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

html, body {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    overflow-x: hidden;
}
body {
    font-family: "JetBrains Mono", sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #252527 url('../img/404bg.png') no-repeat center center;
    background-size: 100% auto;
    background-position: center center;
    opacity: 0.8;
    animation: fadeBgIn 1.2s ease forwards;
}

@keyframes fadeBgIn {
    to {
        opacity: 1;
    }
}

body, .container, .top-left, .bottom-right, .bottom-left {
    position: relative;
    z-index: 1;
}
.container {
    position: relative;
    width: 100%;
    height: 100%;
}

.top-left {
    position: absolute;
    top: 150px;
    left: 150px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeInleft 0.8s ease forwards;
    animation-delay: 0.7s;
    z-index: 2;
}

.top-left h1,
.top-left h2 {
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 8px #000a;
    letter-spacing: 2px;
    opacity: 1;
    transform: none;
    animation: none;
}

.top-left h1 {
    font-size: 16rem;
    font-weight: 800;
}

.top-left h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 6px;
}

.bottom-right {
    position: absolute;
    bottom: 0px;
    right: 5%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: clamp(400px, 70vw, 1100px);
    height: auto;
    z-index: 2;
    opacity: 0.77;
    justify-content: flex-end;
    align-items: flex-end;
}

.bottom-left {
    position: absolute;
    bottom: 0px;
    left: 20px;
    z-index: 3;
    transform: translatex(30px);
    animation: fadeInleft 0.8s ease forwards;
    animation-delay: 0s;
}

.bottom-right {
    opacity: 0;
    transform: translatex(70px);
    animation: fadeInleft 0.8s ease forwards;
    animation-delay: 0s;
}

.top-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeInleft 0.8s ease forwards;
    animation-delay: 0.7s;
}

@keyframes fadeInleft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 500px) {
    body::before {
        background-repeat: repeat;
        background-size: 110%;
    }
    .top-left {
        top: 40px;
        left: 40px;
        transform: translateY(-10%);
        gap: 2px;
        text-align: left;
    }
    .top-left h1 {
        font-size: 6rem;
    }
    .top-left h2 {
        font-size: 2rem;
    }
    .bottom-left {
        top: 40%;
        transform: translateX(-100%);
    }
    .bottom-right {
        position: fixed;
        left: 0%;
        right: auto;
        bottom: 0;
        top: auto;
        transform: translateY(50%);
        width: 96vw;
        max-width: 96vw;
        min-width: 0;
        box-sizing: border-box;
        justify-content: flex-end;
        align-items: center;
        padding-bottom: 0px;
        overflow-x: hidden;
        display: flex;
    }
}