:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --neon-cyan: #00f5ff;
    --neon-purple: #a855f7;
    --neon-blue: #3b82f6;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: none;
    position: relative;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
    mix-blend-mode: difference;
}

.cursor.hover {
    width: 40px;
    height: 40px;
    border-color: var(--neon-purple);
    background: rgba(168, 85, 247, 0.1);
}

.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    filter: blur(4px);
    mix-blend-mode: screen;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(
        135deg,
        var(--bg-primary) 0%,
        #0f0f1f 25%,
        #1a1a2e 50%,
        #0f0f1f 75%,
        var(--bg-primary) 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 20% 50%,
        rgba(0, 245, 255, 0.1) 0%,
        transparent 50%
    ),
    radial-gradient(
        circle at 80% 80%,
        rgba(168, 85, 247, 0.1) 0%,
        transparent 50%
    );
    animation: pulse 8s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Main Container */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
    backdrop-filter: blur(20px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 4rem 3rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Wordmark */
.wordmark {
    font-size: 6rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    background: linear-gradient(
        135deg,
        rgba(0, 245, 255, 0.8) 0%,
        rgba(168, 85, 247, 0.8) 50%,
        rgba(59, 130, 246, 0.8) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: rgba(0, 245, 255, 0.8); /* Fallback for browsers without support */
    animation: gradientShift 5s ease infinite;
    text-shadow: 
        0 0 15px rgba(0, 245, 255, 0.15),
        0 0 30px rgba(168, 85, 247, 0.1),
        0 0 45px rgba(59, 130, 246, 0.08);
    filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.2));
}

/* Subtle glow effect behind - minimal blur */
.wordmark::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 245, 255, 0.6) 0%,
        rgba(168, 85, 247, 0.6) 50%,
        rgba(59, 130, 246, 0.6) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(4px);
    opacity: 0.2;
    z-index: -1;
    animation: gradientShift 5s ease infinite;
    pointer-events: none;
}

/* Fallback for browsers that don't support background-clip: text */
@supports not (background-clip: text) {
    .wordmark {
        -webkit-text-fill-color: var(--neon-cyan);
        background: none;
    }
    
    .wordmark::after {
        display: none;
    }
}

@keyframes glow {
    0%, 100% {
        opacity: 0.5;
        filter: blur(15px);
    }
    50% {
        opacity: 0.8;
        filter: blur(20px);
    }
}

/* Subtext */
.subtext {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
    animation: fadeIn 1.2s ease-out 0.3s both;
}

/* Error Page Styles */
.error-code {
    font-size: 8rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    background: linear-gradient(
        135deg,
        rgba(0, 245, 255, 0.8) 0%,
        rgba(168, 85, 247, 0.8) 50%,
        rgba(59, 130, 246, 0.8) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: rgba(0, 245, 255, 0.8);
    animation: gradientShift 5s ease infinite;
    text-shadow: 
        0 0 15px rgba(0, 245, 255, 0.15),
        0 0 30px rgba(168, 85, 247, 0.1),
        0 0 45px rgba(59, 130, 246, 0.08);
    filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.2));
}

.error-code::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 245, 255, 0.6) 0%,
        rgba(168, 85, 247, 0.6) 50%,
        rgba(59, 130, 246, 0.6) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(4px);
    opacity: 0.2;
    z-index: -1;
    animation: gradientShift 5s ease infinite;
    pointer-events: none;
}

.error-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    animation: fadeIn 1.2s ease-out 0.4s both;
}

.home-link {
    display: inline-block;
    padding: 1rem 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeIn 1.2s ease-out 0.6s both;
}

.home-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.home-link:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 245, 255, 0.3),
        0 0 20px rgba(0, 245, 255, 0.2);
}

.home-link:hover::before {
    width: 200px;
    height: 200px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.4s ease-out 0.6s both;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.social-link:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
    transform: translateY(-4px);
    box-shadow: 
        0 8px 24px rgba(0, 245, 255, 0.3),
        0 0 20px rgba(0, 245, 255, 0.2);
}

.social-link:hover::before {
    width: 100px;
    height: 100px;
}

.social-link svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.social-link:hover svg {
    transform: scale(1.1) rotate(5deg);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wordmark {
        font-size: 5rem;
    }
    
    .error-code {
        font-size: 6rem;
    }
    
    .content {
        padding: 3rem 2.5rem;
    }
}

@media (max-width: 768px) {
    .wordmark {
        font-size: 4rem;
    }
    
    .error-code {
        font-size: 5rem;
    }
    
    .error-title {
        font-size: 1.5rem;
    }
    
    .subtext {
        font-size: 1.25rem;
    }
    
    .home-link {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .content {
        padding: 2.5rem 2rem;
        border-radius: 20px;
    }
    
    .social-links {
        gap: 1.5rem;
    }
    
    .social-link {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .wordmark {
        font-size: 3rem;
    }
    
    .error-code {
        font-size: 4rem;
    }
    
    .error-title {
        font-size: 1.25rem;
    }
    
    .subtext {
        font-size: 1rem;
    }
    
    .home-link {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .content {
        padding: 2rem 1.5rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-link svg {
        width: 20px;
        height: 20px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .background-animation {
        animation: none;
    }
}

