/* Modern CSS Reset & Variable Definitions */
:root {
    --bg-primary: #040d1a;
    --bg-secondary: #02060d;
    --text-primary: #ffffff;
    --text-muted: #5b7194;
    --color-accent-1: #ffd200;
    --color-accent-2: #2774ae;
    --color-accent-3: #89cff0;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

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

body {
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at 50% 50%, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    font-family: var(--font-mono);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(39, 116, 174, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(39, 116, 174, 0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
    animation: gridMove 25s linear infinite;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 50px 50px;
    }
}


.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    padding: 1.5rem;
}

.text-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.logo-text {
    font-size: clamp(1.75rem, 8.5vw, 6.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    background: linear-gradient(135deg, var(--color-accent-2) 0%, var(--color-accent-3) 50%, var(--color-accent-1) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 8s ease infinite, logoGlow 4s ease-in-out infinite alternate;
    user-select: none;
    cursor: default;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 15px rgba(39, 116, 174, 0.2));
    }

    100% {
        filter: drop-shadow(0 0 35px rgba(255, 210, 0, 0.4));
    }
}


/* Link Defaults & 404 Styling */
a, a:visited {
    color: var(--color-accent-3);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, a:focus {
    color: var(--color-accent-1);
}

.error-content {
    gap: 1.25rem;
    max-width: 600px;
}

.error-code {
    font-size: clamp(4rem, 15vw, 9rem);
    line-height: 1;
    margin: 0;
}

.error-message {
    font-size: clamp(1rem, 3vw, 1.35rem);
    font-weight: 400;
    color: var(--text-muted);
}

.home-link, .home-link:visited {
    color: var(--color-accent-3);
    font-family: var(--font-mono);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    text-decoration: none;
    border-bottom: 1px dashed rgba(137, 207, 240, 0.4);
    padding-bottom: 2px;
    margin-top: 0.5rem;
    transition: color 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.home-link:hover, .home-link:focus {
    color: var(--color-accent-1);
    border-bottom-color: var(--color-accent-1);
    border-bottom-style: solid;
}

.footer {
    padding: 1.5rem;
    z-index: 3;
    font-size: clamp(0.65rem, 2.5vw, 0.75rem);
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .footer {
        padding: 1rem;
    }
}