/*
    CHUDNATION Stylesheet
    Author: Cascade
    Last Updated: 2025-07-15
*/

/* === 1. BASE & LAYOUT === */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden; /* CRITICAL: Prevents the main window from scrolling */
    background-color: #000;
    color: #00ff41;
    font-family: 'VT323', monospace;
    font-size: 18px;
    text-align: center; /* Center text globally */
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Layer 1: Matrix falls here */
    overflow: hidden;
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2; /* Layer 3: On top of content, below scrollbar */
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) 1px, transparent 1px, transparent 2px);
    opacity: 0.5;
    animation: flicker 0.15s infinite;
}

.container {
    height: 100%;
    overflow-y: auto; /* CRITICAL: This is the ONLY scrollable element */
    position: relative;
    z-index: 1; /* Layer 2: Content scrolls here */
    box-sizing: border-box;
    padding: 2rem; /* Add padding here */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
}

/* === 2. CONTENT STYLES === */
a {
    color: #00ff41;
    text-decoration: none;
    text-shadow: 0 0 5px #00ff41;
}

a:hover {
    color: #ffffff;
    background-color: #00ff41;
    text-shadow: none;
}

.content-wrapper {
    max-width: 800px;
    width: 100%; /* Ensure it takes up available space */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center inner content */
}

header h1 {
    font-size: 4rem;
    text-transform: uppercase;
    text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41, 0 0 30px #00ff41;
}

.image-container {
    margin: 2rem 0;
    border: 3px solid #00ff41;
    padding: 10px;
    box-shadow: 0 0 15px #00ff41;
    background-color: #000;
    display: inline-block;
}

.image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.content p {
    line-height: 1.6;
    text-align: center; /* Center paragraph text */
    max-width: 600px;
    margin: 1rem auto;
}

footer {
    margin-top: 3rem;
    font-size: 0.9rem;
    border-top: 1px solid #00ff41;
    padding-top: 1rem;
}

/* === 3. ANIMATIONS & EFFECTS === */

.glitch {
    position: relative;
}

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


.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
    background: #000; /* Match body background */
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
    background: #000; /* Match body background */
}

@keyframes flicker {
    0% { opacity: 0.3; } 50% { opacity: 0.6; } 100% { opacity: 0.3; }
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(15% 0 86% 0); }
    20% { clip-path: inset(25% 0 38% 0); }
    40% { clip-path: inset(54% 0 7% 0); }
    60% { clip-path: inset(68% 0 21% 0); }
    80% { clip-path: inset(91% 0 2% 0); }
    100% { clip-path: inset(45% 0 47% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(83% 0 13% 0); }
    20% { clip-path: inset(40% 0 54% 0); }
    40% { clip-path: inset(1% 0 95% 0); }
    60% { clip-path: inset(89% 0 8% 0); }
    80% { clip-path: inset(59% 0 35% 0); }
    100% { clip-path: inset(2% 0 79% 0); }
}

/* === 4. CUSTOM SCROLLBAR === */
.container::-webkit-scrollbar {
    width: 12px;
}

.container::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid #00ff41;
}

.container::-webkit-scrollbar-thumb {
    background-color: #00ff41;
    box-shadow: 0 0 8px #00ff41;
    border: 1px solid #00ff41;
}

.container::-webkit-scrollbar-thumb:hover {
    background-color: #5eff8d;
    box-shadow: 0 0 12px #5eff8d;
}

/* === 5. RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    body, html {
        font-size: 16px;
    }

    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .content p {
        max-width: 100%;
    }
}
