:root {
    --bg-dark: #050510;
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ea;
    --text-color: #e2e8f0;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    perspective: 1000px;
}

/* Abstract Space Background instead of images */
.stars, .twinkling {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    display: block;
    pointer-events: none;
}

.stars {
    background: radial-gradient(circle at 15% 50%, rgba(0, 243, 255, 0.1), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(255, 0, 234, 0.05), transparent 25%);
    z-index: 0;
}

.twinkling {
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 160px 120px, #ddd, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    z-index: 1;
    animation: move-twink-back 100s linear infinite;
    opacity: 0.5;
}

@keyframes move-twink-back {
    from {background-position: 0 0;}
    to {background-position: -10000px 5000px;}
}

.error-container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 2rem;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.1), inset 0 0 20px rgba(255, 0, 234, 0.05);
    max-width: 600px;
    width: 90%;
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}

/* Glitch Effect */
.glitch {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: white;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
                 0 0 20px rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
    transform: translateZ(30px);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.glitch::before {
    left: 3px;
    text-shadow: -2px 0 var(--neon-pink);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -3px;
    text-shadow: -2px 0 var(--neon-blue);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(75px, 9999px, 83px, 0); }
    5% { clip: rect(69px, 9999px, 20px, 0); }
    10% { clip: rect(4px, 9999px, 73px, 0); }
    15% { clip: rect(82px, 9999px, 94px, 0); }
    20% { clip: rect(11px, 9999px, 81px, 0); }
    25% { clip: rect(78px, 9999px, 49px, 0); }
    30% { clip: rect(2px, 9999px, 63px, 0); }
    35% { clip: rect(98px, 9999px, 56px, 0); }
    40% { clip: rect(41px, 9999px, 87px, 0); }
    45% { clip: rect(61px, 9999px, 32px, 0); }
    50% { clip: rect(81px, 9999px, 63px, 0); }
    55% { clip: rect(3px, 9999px, 14px, 0); }
    60% { clip: rect(26px, 9999px, 9px, 0); }
    65% { clip: rect(94px, 9999px, 72px, 0); }
    70% { clip: rect(10px, 9999px, 58px, 0); }
    75% { clip: rect(41px, 9999px, 87px, 0); }
    80% { clip: rect(82px, 9999px, 2px, 0); }
    85% { clip: rect(51px, 9999px, 35px, 0); }
    90% { clip: rect(12px, 9999px, 10px, 0); }
    95% { clip: rect(31px, 9999px, 45px, 0); }
    100% { clip: rect(71px, 9999px, 99px, 0); }
}

.error-container h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateZ(20px);
}

.error-container p {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    transform: translateZ(10px);
}

/* Glow Button */
.actions {
    transform: translateZ(25px);
}

.btn-glow {
    position: relative;
    padding: 1rem 2.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    transition: transform 0.2s;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 99px;
    padding: 2px;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-pink));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.btn-text {
    position: relative;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    z-index: 2;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-glow:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4), inset 0 0 10px rgba(255, 0, 234, 0.2);
    transform: translateY(-2px);
}

.btn-glow:hover .btn-text {
    text-shadow: 0 0 10px var(--neon-blue);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}