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

/* Body */
body {
    min-height: 100vh;
    background: #0f1f2c;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

/* ==========================
   Navigation
========================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 30px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    z-index: 100;
}

nav a {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 45px;
    height: 45px;

    border-radius: 50%;
    transition: 0.3s ease;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

nav img {
    position: static;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* ==========================
   Error Container
========================== */

.error-container {
    position: relative;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 2rem;
    color: white;
    text-align: center;
    overflow: hidden;
}

/* Dark overlay */

.error-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

/* Keep all text above the plane */

.error-container>*:not(.error-image) {
    position: relative;
    z-index: 2;
}

/* ==========================
   Flying Paper Plane
========================== */

.error-image {
    width: 250px;
    height: 250px;
    object-fit: contain;
    margin-bottom: 30px;
    animation: fly 5s linear infinite;
    z-index: 1;
}

/* ==========================
   Text Styling
========================== */

.error-text {
    font-size: 1.2rem;
    letter-spacing: 8px;
    margin-bottom: 10px;
}

.error-code {
    font-size: 8rem;
    line-height: 1;
    margin: 0;
}

.message {
    margin-top: 20px;
    font-size: 1.2rem;
    color: white;
    animation: glitch 1s infinite;
}

/* ==========================
   Plane Animation
========================== */

@keyframes fly {

    0% {
        transform: translate(-200px, 50px) rotate(-20deg);
    }

    50% {
        transform: translate(0, -40px) rotate(10deg);
    }

    100% {
        transform: translate(200px, 20px) rotate(25deg);
    }
}

/* ==========================
   Glitch Animation
========================== */

@keyframes glitch {

    0% {
        transform: translate(0);
    }

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

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

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

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

    100% {
        transform: translate(0);
    }
}