:root {
            /* Dark Mode Defaults */
            --bg-base: #000000;
            --text-main: #ffffff;
            --text-muted: #888888;
            --accent-red: #ff3333;
            --glow-red: rgba(255, 50, 50, 0.4);
            --glass-bg: rgba(20, 20, 20, 0.6);
            --glass-border: rgba(255, 255, 255, 0.08);
            --glass-highlight: rgba(255, 50, 50, 0.3);
            --shadow-base: rgba(0, 0, 0, 0.6);
            --shadow-heavy: rgba(0, 0, 0, 0.8);
            --hero-glow-bg: rgba(200, 10, 10, 0.15);
            --placeholder-bg: rgba(0, 0, 0, 0.6);
            --font-primary: 'Inter', -apple-system, sans-serif;
            --font-title: 'Space Grotesk', sans-serif;
        }
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
        body.light-mode {
            /* Light Mode Overrides */
            --bg-base: #f2f2f7;
            --text-main: #111111;
            --text-muted: #666666;
            --accent-red: #d30000;
            --glow-red: rgba(211, 0, 0, 0.3);
            --glass-bg: rgba(255, 255, 255, 0.6);
            --glass-border: rgba(0, 0, 0, 0.05);
            --glass-highlight: rgba(211, 0, 0, 0.2);
            --shadow-base: rgba(0, 0, 0, 0.05);
            --shadow-heavy: rgba(0, 0, 0, 0.1);
            --hero-glow-bg: rgba(211, 0, 0, 0.08);
            --placeholder-bg: rgba(0, 0, 0, 0.05);
        }

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

        html {
            scroll-behavior: smooth;
            font-size: 110%;
        }

        body {
            background-color: var(--bg-base);
            color: var(--text-main);
            font-family: var(--font-primary);
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            transition: background-color 0.5s ease, color 0.5s ease;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        /* --- Dynamic 404 Background --- */
        .bg-404-wrapper {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: -3; /* Placed at the very bottom */
            overflow: hidden;
            pointer-events: none;
        }

        .floating-text {
            position: absolute;
            bottom: -20%;
            font-family: var(--font-title);
            font-weight: 900;
            color: var(--text-main);
            white-space: nowrap;
            user-select: none;
            animation: floatUp linear infinite;
        }

        /* Outline Effect */
        .floating-text.outline {
            color: transparent;
            -webkit-text-stroke: 1px var(--text-muted);
            opacity: 0.3;
        }

        /* Red Faded Effect */
        .floating-text.red {
            color: var(--accent-red);
            opacity: 0.15;
        }

        /* Muted Effect */
        .floating-text.muted {
            color: var(--text-muted);
            opacity: 0.1;
        }

        @keyframes floatUp {
            0% {
                transform: translateY(0) rotate(0deg);
            }
            100% {
                transform: translateY(-130vh) rotate(360deg);
            }
        }

        /* --- NAVBAR --- */
        nav {
            position: fixed;
            top: 24px;
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            height: 10%;
            max-width: 950px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 24px;
            background: var(--glass-bg);
            backdrop-filter: blur(24px) saturate(150%);
            -webkit-backdrop-filter: blur(24px) saturate(150%);
            border: 1px solid var(--glass-border);
            border-radius: 100px;
            z-index: 100;
            box-shadow: 0 20px 40px var(--shadow-heavy), inset 0 1px 0 rgba(255, 255, 255, 0.05);
            transition: all 0.5s ease;
        }

        .nav-left, .nav-right {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .brand-logo {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 900;
            font-size: 1.2rem;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: var(--text-main);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
            position: relative;
            z-index: 101;
        }

        .brand-logo::before {
            content: '';
            display: inline-block;
            width: 12px; height: 12px;
            background: var(--accent-red);
            border-radius: 50%;
            box-shadow: 0 0 15px var(--accent-red);
            transition: all 0.3s ease;
        }

        .brand-logo:hover::before {
            transform: scale(1.2);
            box-shadow: 0 0 25px var(--accent-red);
        }

        .nav-links {
            display: flex;
            gap: 25px;
            list-style: none;
        }

        .nav-links a {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.85rem;
            font-weight: 600;
            letter-spacing: 1px;
            text-transform: uppercase;
            transition: color 0.3s ease, text-shadow 0.3s ease;
            font-family: var(--font-title);
        }

        .nav-links a:hover {
            color: var(--accent-red);
            text-shadow: 0 0 10px rgba(255, 50, 50, 0.5);
        }

        .control-btn {
            background: transparent;
            border: none;
            color: var(--text-main);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: rgba(128, 128, 128, 0.1);
            transition: all 0.3s ease;
        }

        .control-btn:hover {
            background: rgba(128, 128, 128, 0.2);
            color: var(--accent-red);
            transform: scale(1.05);
        }

        .control-btn svg { width: 18px; height: 18px; fill: currentColor; }
        .sun-icon { display: none; }
        body.light-mode .sun-icon { display: block; }
        body.light-mode .moon-icon { display: none; }

        .menu-toggle {
            display: none;
            flex-direction: column;
            gap: 5px;
            cursor: pointer;
            z-index: 101;
            padding: 5px;
        }

        .menu-toggle span {
            width: 24px; height: 2px;
            background: var(--text-main);
            border-radius: 2px;
            transition: 0.3s;
        }

        /* --- BOTTOM SHEET MENU --- */
        .mobile-menu-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
            background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px);
            opacity: 0; pointer-events: none; transition: opacity 0.4s ease; z-index: 998;
        }
        .mobile-menu-overlay.active { opacity: 1; pointer-events: all; }

        .bottom-sheet {
            position: fixed; bottom: 0; left: 0; width: 100%;
            background: var(--glass-bg); backdrop-filter: blur(30px);
            border-top: 1px solid var(--glass-border); border-radius: 30px 30px 0 0;
            padding: 20px 30px 50px; transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.3, 1, 0.2, 1);
            z-index: 999; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
        }
        .bottom-sheet.active { transform: translateY(0); }
        .sheet-handle { width: 50px; height: 4px; background: rgba(128, 128, 128, 0.4); border-radius: 4px; margin: 0 auto 30px; }
        .sheet-links { list-style: none; display: flex; flex-direction: column; gap: 20px; text-align: center; }
        .sheet-links a { color: var(--text-main); text-decoration: none; font-size: 1.5rem; font-family: var(--font-title); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; transition: color 0.3s; }
        .sheet-links a:hover { color: var(--accent-red); }

        /* --- 404 SECTION --- */
        .error-section {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 150px 20px 80px;
            position: relative;
            text-align: center;
            z-index: 1;
        }

        .error-glow {
            position: absolute;
            width: 70vw;
            height: 70vw;
            max-width: 600px;
            max-height: 600px;
            background: radial-gradient(circle at center, var(--hero-glow-bg) 0%, transparent 60%);
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            filter: blur(60px);
            z-index: -2;
            pointer-events: none;
        }

        .error-visual {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 20px;
        }

        .error-code {
            font-family: 'Space Grotesk', sans-serif;
            font-size: clamp(8rem, 20vw, 15rem);
            font-weight: 900;
            color: var(--accent-red);
            line-height: 0.8;
            text-shadow: 0 10px 30px rgba(255, 50, 50, 0.2);
            /* Pulsing text effect */
            animation: pulseText 4s ease-in-out infinite alternate;
        }

        @keyframes pulseText {
            0% { transform: scale(1); text-shadow: 0 10px 30px rgba(255, 50, 50, 0.2); }
            100% { transform: scale(1.02); text-shadow: 0 15px 40px rgba(255, 50, 50, 0.4); }
        }

        .dino-wrapper {
            display: flex;
            align-items: flex-end;
            justify-content: center;
            height: clamp(8rem, 20vw, 15rem);
            padding-bottom: 5px;
        }

        .dino-icon {
            width: clamp(70px, 15vw, 120px);
            height: clamp(70px, 15vw, 120px);
            fill: var(--text-main);
            animation: dinoJump 1.5s ease-in-out infinite;
            transform-origin: bottom center;
            filter: drop-shadow(0 10px 15px var(--shadow-heavy));
        }

        /* Jumping Animation */
        @keyframes dinoJump {
            0%, 100% { transform: translateY(0); }
            40% { transform: translateY(-40px); }
            60% { transform: translateY(-40px); }
        }

        .error-title {
            font-family: var(--font-title);
            color: var(--accent-red);
            font-size: clamp(2rem, 5vw, 3rem);
            font-weight: 700;
            letter-spacing: -0.05em;
            margin-bottom: 15px;
            text-transform: uppercase;
        }

        .error-desc {
            color: var(--text-muted);
            font-size: 1.1rem;
            max-width: 400px;
            margin: 0 auto 40px;
            line-height: 1.6;
        }

        .btn-home {
            display: inline-flex;
            align-items: center;
            gap: 12px;
            padding: 14px 32px;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: 50px;
            backdrop-filter: blur(10px);
            color: var(--text-main);
            font-size: 0.95rem;
            font-weight: 700;
            letter-spacing: 1px;
            text-transform: uppercase;
            box-shadow: 0 10px 30px var(--shadow-base);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            cursor: pointer;
            font-family: var(--font-title);
            text-decoration: none;
        }

        .btn-home:hover {
            background: var(--glow-red);
            border-color: var(--accent-red);
            color: var(--text-main);
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 15px 40px rgba(255, 50, 50, 0.25);
        }

        /* --- FOOTER --- */
        .solid-footer {
            margin-top: auto;
            padding: 80px 20px 40px;
            border-top: 1px solid rgba(255, 50, 50, 0.2);
            background: var(--bg-base); /* Solid background to block 404s */
            position: relative;
            z-index: 10;
        }

        .footer-container { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
        .footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 40px; }
        .footer-brand { display: flex; flex-direction: column; gap: 15px; }
        .footer-brand h2 { font-family: 'Space Grotesk', sans-serif; font-size: 2.5rem; letter-spacing: -1px; display: flex; align-items: center; gap: 12px; }
        .footer-brand h2::before { content: ''; display: inline-block; width: 16px; height: 16px; background: var(--accent-red); border-radius: 50%; box-shadow: 0 0 20px var(--accent-red); }
        .footer-brand p { color: var(--text-muted); font-size: 1.05rem; max-width: 350px; line-height: 1.6; }
        .footer-socials { display: flex; gap: 15px; }
        
        .social-icon { 
            width: 50px; height: 50px; 
            border-radius: 50%; 
            border: 1px solid var(--glass-border); 
            background: var(--glass-bg); 
            display: flex; align-items: center; justify-content: center; 
            color: var(--text-main); 
            transition: all 0.4s ease; 
            text-decoration: none; 
        }
        .social-icon svg { width: 22px; height: 22px; fill: currentColor; transition: transform 0.4s; }
        .social-icon:hover { border-color: var(--accent-red); background: var(--glow-red); color: var(--accent-red); transform: translateY(-5px); box-shadow: 0 10px 25px rgba(255, 50, 50, 0.2); }
        .social-icon:hover svg { transform: scale(1.1); }
        .footer-bottom { text-align: center; color: var(--text-muted); font-size: 0.85rem; letter-spacing: 1.5px; padding-top: 30px; border-top: 1px solid var(--glass-border); text-transform: uppercase; font-family: var(--font-title); }

        /* Animation Classes */
        .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
        .reveal.active { opacity: 1; transform: translateY(0); }

        /* Responsive Breakpoints */
        @media (max-width: 900px) {
            .footer-top { flex-direction: column; text-align: center; align-items: center; }
            .footer-brand h2 { justify-content: center; }
        }

        @media (max-width: 768px) {
            html { font-size: 95%; }
            nav { width: 92%; padding: 8px 16px; border-radius: 50px; top: 15px; }
            .nav-links { display: none; } 
            .menu-toggle { display: flex; } 
            .brand-logo { font-size: 1.1rem; }
            .control-btn { width: 32px; height: 32px; }
            .control-btn svg { width: 16px; height: 16px; }
            .error-visual { gap: 10px; }
        }


img, svg { max-width: 100%; }
@media (max-width: 520px) {
    nav { max-width: calc(100% - 24px); }
}
