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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow: hidden;
    min-height: 100vh;
    height: 100vh;
    position: relative;
}

/* Animated background stars */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="white"/></svg>') repeat;
    background-size: 200px 200px;
    animation: stars 20s linear infinite;
    z-index: -2;
}

.twinkling {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="0.5" fill="rgba(255,255,255,0.8)"/></svg>') repeat;
    background-size: 100px 100px;
    animation: twinkle 15s linear infinite;
    z-index: -1;
}

@keyframes stars {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-200px); }
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 404 Error code */
.error-code {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    font-family: 'Orbitron', monospace;
    font-size: 8rem;
    font-weight: 900;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    animation: fadeInUp 1s ease-out 0.5s both;
}

.digit {
    display: inline-block;
    animation: digitFloat 3s ease-in-out infinite;
    transform-origin: center;
    opacity: 1;
}

.digit:nth-child(1) { animation-delay: 0s; }
.digit:nth-child(3) { animation-delay: 0.5s; }

@keyframes digitFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.zero-container {
    position: relative;
    margin: 0 1rem;
}

.zero {
    font-size: 8rem;
    animation: zeroPulse 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.zero-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes zeroPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* Error message */
.error-message {
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out 1s both;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #b0b0b0;
    animation: fadeInUp 1s ease-out 1.2s both;
}

.description {
    font-size: 1.1rem;
    color: #888;
    animation: fadeInUp 1s ease-out 1.4s both;
}

/* Floating elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: rgba(0, 255, 255, 0.6);
    animation: float 6s ease-in-out infinite;
    animation-delay: var(--delay);
}

.floating-icon:nth-child(1) { top: 20%; left: 10%; }
.floating-icon:nth-child(2) { top: 30%; right: 15%; }
.floating-icon:nth-child(3) { top: 60%; left: 20%; }
.floating-icon:nth-child(4) { top: 70%; right: 25%; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(-15px) rotate(240deg); }
}

/* Navigation buttons */
.navigation {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 1.6s both;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    text-decoration: none;
    color: #ffffff;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn.primary {
    background: linear-gradient(45deg, #00ffff, #0080ff);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.nav-btn.secondary {
    background: linear-gradient(45deg, #ff00ff, #8000ff);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.nav-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}



/* Glitch effect */
.glitch-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -2;
    opacity: 0.1;
    pointer-events: none;
}

/* Ensure 404 text is always visible */
.error-code {
    opacity: 1 !important;
    visibility: visible !important;
}

.error-code .digit {
    opacity: 1 !important;
    visibility: visible !important;
}

.error-code:hover {
    opacity: 1 !important;
    visibility: visible !important;
}

.glitch {
    font-family: 'Orbitron', monospace;
    font-size: 20rem;
    font-weight: 900;
    color: #00ffff;
    text-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
    position: relative;
    animation: glitchEffect 4s ease-in-out infinite;
}

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

.glitch::before {
    animation: glitch1 2s infinite;
    color: #ff00ff;
    z-index: -1;
}

.glitch::after {
    animation: glitch2 2s infinite;
    color: #ffff00;
    z-index: -2;
}

@keyframes glitchEffect {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-5px, 5px); }
    40% { transform: translate(-5px, -5px); }
    60% { transform: translate(5px, 5px); }
    80% { transform: translate(5px, -5px); }
}

@keyframes glitch2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(5px, -5px); }
    40% { transform: translate(5px, 5px); }
    60% { transform: translate(-5px, -5px); }
    80% { transform: translate(-5px, 5px); }
}

/* Fade in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .error-code {
        font-size: 5rem;
    }
    
    .zero {
        font-size: 5rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn {
        padding: 0.8rem 1.5rem;
    }
    
    .glitch {
        font-size: 12rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .error-code {
        font-size: 4rem;
    }
    
    .zero {
        font-size: 4rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .description {
        font-size: 0.9rem;
    }
    
    .glitch {
        font-size: 8rem;
    }
} 