/* 404 Page Styles - External CSS to comply with CSP */
body {
    background-color: #000;
    color: #00ff00;
    font-family: "Courier New", monospace;
    padding: 20px;
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    animation: containerFloat 8s ease-in-out infinite;
}

@keyframes containerFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.error-code {
    font-size: 2.5em;
    font-weight: bold;
    color: #ff0000;
    text-shadow:
        0 0 20px #ff0000,
        0 0 40px #ff00ff,
        0 0 60px #00ffff;
    animation: glitch 2s infinite, colorShift 4s ease-in-out infinite, wobble 3s ease-in-out infinite, psychedelicPulse 5s ease-in-out infinite;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    line-height: 1.4;
    filter: drop-shadow(0 0 20px currentColor);
}

@keyframes colorShift {
    0%, 100% {
        color: #ff0000;
        text-shadow:
            0 0 20px #ff0000,
            0 0 40px #ff00ff,
            0 0 60px #00ffff;
    }
    25% {
        color: #00ff00;
        text-shadow:
            0 0 20px #00ff00,
            0 0 40px #ffff00,
            0 0 60px #ff00ff;
    }
    50% {
        color: #0000ff;
        text-shadow:
            0 0 20px #0000ff,
            0 0 40px #00ffff,
            0 0 60px #ff0000;
    }
    75% {
        color: #ffff00;
        text-shadow:
            0 0 20px #ffff00,
            0 0 40px #ff00ff,
            0 0 60px #00ff00;
    }
}

@keyframes glitch {
    0%, 100% { transform: translate(0) skew(0deg); }
    10% { transform: translate(-3px, 3px) skew(2deg); }
    20% { transform: translate(3px, -3px) skew(-2deg); }
    30% { transform: translate(-3px, -3px) skew(1deg); }
    40% { transform: translate(3px, 3px) skew(-1deg); }
    50% { transform: translate(-3px, 3px) skew(2deg); }
    60% { transform: translate(3px, -3px) skew(-2deg); }
    70% { transform: translate(-3px, -3px) skew(1deg); }
    80% { transform: translate(3px, 3px) skew(-1deg); }
    90% { transform: translate(-3px, 3px) skew(2deg); }
}

@keyframes wobble {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.05) rotate(1deg) translateX(-5px);
    }
    50% {
        transform: scale(0.95) rotate(-1deg) translateX(5px);
    }
    75% {
        transform: scale(1.05) rotate(0.5deg) translateY(-3px);
    }
}

@keyframes psychedelicPulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px currentColor) hue-rotate(0deg);
        transform: scale(1);
    }
    25% {
        filter: drop-shadow(0 0 40px currentColor) hue-rotate(90deg);
        transform: scale(1.08);
    }
    50% {
        filter: drop-shadow(0 0 60px currentColor) hue-rotate(180deg);
        transform: scale(0.95);
    }
    75% {
        filter: drop-shadow(0 0 40px currentColor) hue-rotate(270deg);
        transform: scale(1.08);
    }
}

h1 {
    color: #00ff00;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow:
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px currentColor;
    animation: titleWave 3s ease-in-out infinite, wobbleText 4s ease-in-out infinite, colorCycle 5s linear infinite;
    position: relative;
    z-index: 2;
}

@keyframes colorCycle {
    0% { color: #ff0000; }
    14% { color: #ff7700; }
    28% { color: #ffff00; }
    42% { color: #00ff00; }
    56% { color: #00ffff; }
    70% { color: #0000ff; }
    84% { color: #ff00ff; }
    100% { color: #ff0000; }
}

@keyframes wobbleText {
    0%, 100% {
        transform: scale(1) skewX(0deg);
    }
    25% {
        transform: scale(1.03) skewX(2deg);
    }
    50% {
        transform: scale(0.97) skewX(-2deg);
    }
    75% {
        transform: scale(1.03) skewX(1deg);
    }
}

@keyframes titleWave {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    25% {
        transform: scale(1.05) rotate(1deg);
        filter: hue-rotate(90deg);
    }
    50% {
        transform: scale(1.1) rotate(0deg);
        filter: hue-rotate(180deg);
    }
    75% {
        transform: scale(1.05) rotate(-1deg);
        filter: hue-rotate(270deg);
    }
}

.magnifying-glass {
    display: inline-block;
    animation: magGlitchShimmer 3s infinite, colorCycle 4s linear infinite;
}

@keyframes magGlitchShimmer {
    0%, 100% {
        transform: translate(0);
        text-shadow: 0 0 10px currentColor;
    }
    10% {
        transform: translate(-1px, 1px);
        text-shadow: 0 0 15px currentColor;
    }
    20% {
        transform: translate(1px, -1px);
        text-shadow: 0 0 15px currentColor;
    }
    30% {
        transform: translate(-1px, -1px);
        text-shadow: 0 0 15px currentColor;
    }
    40% {
        transform: translate(1px, 1px);
        text-shadow: 0 0 20px currentColor;
    }
    50% {
        transform: translate(-1px, 1px);
        text-shadow: 0 0 25px currentColor;
    }
    60% {
        transform: translate(1px, -1px);
        text-shadow: 0 0 15px currentColor;
    }
    70% {
        transform: translate(-1px, -1px);
        text-shadow: 0 0 15px currentColor;
    }
    80% {
        transform: translate(1px, 1px);
        text-shadow: 0 0 15px currentColor;
    }
    90% {
        transform: translate(-1px, 1px);
        text-shadow: 0 0 10px currentColor;
    }
}

.flavor-text {
    color: #00ff00;
    font-family: "Courier New", monospace;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    font-style: italic;
    font-weight: bold;
    opacity: 0.9;
    animation: flicker 1s infinite, gentleWobble 5s ease-in-out infinite, colorCycle 7s linear infinite;
}

@keyframes gentleWobble {
    0%, 100% {
        transform: translateX(0) skewX(0deg);
    }
    25% {
        transform: translateX(2px) skewX(1deg);
    }
    50% {
        transform: translateX(-2px) skewX(-1deg);
    }
    75% {
        transform: translateX(1px) skewX(0.5deg);
    }
}

.error-message {
    color: #ffaa00;
    font-size: 1.1em;
    margin: 20px 0;
}

.navigation {
    margin-top: 40px;
}

.nav-link {
    display: inline-block;
    color: #00ff00;
    text-decoration: none;
    border: 2px solid currentColor;
    padding: 10px 20px;
    margin: 10px;
    transition: all 0.3s ease;
    border-radius: 4px;
    animation: navWobble 6s ease-in-out infinite, colorCycle 6s linear infinite;
    position: relative;
}

.nav-link:nth-child(1) { animation-delay: 0s; }
.nav-link:nth-child(2) { animation-delay: 1.5s; }
.nav-link:nth-child(3) { animation-delay: 3s; }
.nav-link:nth-child(4) { animation-delay: 4.5s; }

@keyframes navWobble {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-3px) rotate(1deg);
    }
    66% {
        transform: translateY(3px) rotate(-1deg);
    }
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    box-shadow: 0 0 15px currentColor, 0 0 30px currentColor, 0 0 45px currentColor;
    animation: navWobble 6s ease-in-out infinite, psychedelicShake 0.5s ease-in-out infinite, colorCycle 2s linear infinite;
    text-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
}

@keyframes psychedelicShake {
    0%, 100% {
        transform: scale(1.05) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    25% {
        transform: scale(1.08) rotate(1deg);
        filter: hue-rotate(90deg);
    }
    50% {
        transform: scale(1.05) rotate(-1deg);
        filter: hue-rotate(180deg);
    }
    75% {
        transform: scale(1.08) rotate(0.5deg);
        filter: hue-rotate(270deg);
    }
}

.nav-link:visited {
    color: #00ff00;
}

.nav-link:active {
    background-color: #00aa00;
    color: #000;
    transform: scale(0.98);
}

/* Breadcrumb Navigation Styles */
.breadcrumb {
    font-size: 0.9em;
    color: #00aa00;
    margin-bottom: 20px;
    padding: 10px 0;
    text-align: left;
}

.breadcrumb a {
    color: #00ff00 !important;
    text-decoration: none;
    transition: all 0.2s ease;
    animation: colorCycle 8s linear infinite;
}

.breadcrumb a:hover {
    color: #ffffff !important;
    text-shadow: 0 0 5px #00ff00;
}

.breadcrumb a:visited {
    color: #00ff00 !important;
}

.breadcrumb a:active {
    color: #00aa00 !important;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #004400;
}

/* Mobile breadcrumb optimization */
@media screen and (max-width: 768px) {
    .breadcrumb {
        font-size: 0.8em;
    }
}

.crt-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(255, 0, 0, 0.8) 0%,
        rgba(255, 255, 0, 0.8) 20%,
        rgba(0, 255, 0, 0.8) 40%,
        rgba(0, 255, 255, 0.8) 60%,
        rgba(0, 0, 255, 0.8) 80%,
        rgba(255, 0, 255, 0.8) 100%);
    animation: scan 1s infinite, dividerWobble 3s ease-in-out infinite, rainbowShift 4s linear infinite;
    margin: 30px auto;
    box-shadow: 0 0 10px currentColor;
}

@keyframes scan {
    0% { opacity: 1; width: 0%; }
    50% { opacity: 0.7; }
    100% { opacity: 1; width: 100%; }
}

@keyframes dividerWobble {
    0%, 100% {
        transform: scaleX(1) skewX(0deg);
    }
    25% {
        transform: scaleX(1.02) skewX(2deg);
    }
    50% {
        transform: scaleX(0.98) skewX(-2deg);
    }
    75% {
        transform: scaleX(1.02) skewX(1deg);
    }
}

@keyframes rainbowShift {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

@keyframes flicker {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.ascii-art {
    font-family: "Courier New", monospace;
    color: #00ff00;
    font-size: 1em;
    white-space: pre;
    margin: 30px 0;
    border: 1px solid rgba(0, 255, 0, 0.3);
    padding: 15px;
    background-color: rgba(0, 17, 0, 0.5);
    border-radius: 4px;
    text-align: center;
}

/* Psychedelic Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 0, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 0, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(255, 0, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 10% 90%, rgba(0, 255, 0, 0.15) 0%, transparent 50%);
    animation: psychedelicBg 10s ease-in-out infinite, bgWobble 8s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes psychedelicBg {
    0%, 100% {
        filter: hue-rotate(0deg) blur(80px) saturate(1.5);
        opacity: 0.5;
    }
    25% {
        filter: hue-rotate(90deg) blur(100px) saturate(2);
        opacity: 0.7;
    }
    50% {
        filter: hue-rotate(180deg) blur(120px) saturate(1.8);
        opacity: 0.6;
    }
    75% {
        filter: hue-rotate(270deg) blur(90px) saturate(2);
        opacity: 0.7;
    }
}

@keyframes bgWobble {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.05) rotate(2deg);
    }
    50% {
        transform: scale(1.1) rotate(-2deg);
    }
    75% {
        transform: scale(1.05) rotate(1deg);
    }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    animation: scanlines 8s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes scanlines {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(20px);
    }
}

/* Animated Error Text Container */
.animated-error-container {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: visible;
    margin: 40px 0;
    z-index: 2;
}

.floating-error-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #ff0000;
    font-size: 1.8em;
    font-weight: bold;
    text-shadow:
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 30px #ff0000,
        0 0 40px #ff00ff,
        0 0 50px #00ffff;
    white-space: pre;
    animation: float 10s ease-in-out infinite, pulse 2s ease-in-out infinite, rainbow 3s linear infinite;
    z-index: 10;
    text-align: center;
    line-height: 1.4;
    filter: drop-shadow(0 0 20px currentColor);
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg) drop-shadow(0 0 20px currentColor); }
    100% { filter: hue-rotate(360deg) drop-shadow(0 0 20px currentColor); }
}

@keyframes float {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    25% {
        transform: translate(-30%, -60%) rotate(2deg);
    }
    50% {
        transform: translate(-70%, -40%) rotate(-2deg);
    }
    75% {
        transform: translate(-30%, -60%) rotate(1deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.8;
        filter: brightness(1.3);
    }
}

.explosion {
    position: fixed !important;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    top: 0;
    left: 0;
}

@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

@keyframes explodeSpiral {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
        border-radius: 50%;
    }
    50% {
        opacity: 1;
        border-radius: 30%;
    }
    100% {
        transform: scale(4) rotate(360deg);
        opacity: 0;
        border-radius: 20%;
    }
}

.explosion-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid;
    border-radius: 50%;
    animation: explode 0.8s ease-out forwards;
}

/* Emoji particle classes removed - using only Fibonacci spirals */

.spiral-trail {
    position: fixed !important;
    pointer-events: none;
}

@keyframes spiralExpand {
    0% {
        transform: translate(var(--centerX), var(--centerY)) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(var(--centerX) + cos(var(--startAngle) + 720deg) * 200px),
            calc(var(--centerY) + sin(var(--startAngle) + 720deg) * 200px)
        ) rotate(720deg) scale(3);
        opacity: 0;
    }
}

@keyframes spiralTrailExpand {
    0% {
        transform: translate(var(--startX), var(--startY)) scale(0);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translate(var(--startX), var(--startY)) scale(1);
    }
    100% {
        transform: translate(var(--endX), var(--endY)) scale(0.5);
        opacity: 0;
    }
}

@keyframes spiralExplosion {
    0% {
        transform: translate(var(--x), var(--y)) scale(0.1) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(1.5) rotate(calc(var(--spinDirection) * 720deg));
        opacity: 0;
    }
}

.glitch-effect {
    animation: glitchText 0.3s;
}

@keyframes glitchText {
    0%, 100% {
        text-shadow:
            0 0 10px #ff0000,
            2px 2px 0 #00ff00,
            -2px -2px 0 #0000ff;
    }
    25% {
        text-shadow:
            0 0 10px #ff0000,
            -2px 2px 0 #00ff00,
            2px -2px 0 #0000ff;
    }
    50% {
        text-shadow:
            0 0 10px #ff0000,
            2px -2px 0 #00ff00,
            -2px 2px 0 #0000ff;
    }
    75% {
        text-shadow:
            0 0 10px #ff0000,
            -2px -2px 0 #00ff00,
            2px 2px 0 #0000ff;
    }
}

@media (max-width: 768px) {
    .error-code {
        font-size: 1.5em;
        line-height: 1.3;
    }
    h1 {
        font-size: 1.8em;
    }
    .flavor-text {
        font-size: 0.9em;
    }
}