:root {
    --primary-color: #00ff9f;
    --secondary-color: #00b8ff;
    --background-color: #0a0a0a;
    --text-color: #ffffff;
    --glitch-color: #ff0080;
}

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

body {
    font-family: 'VT323', monospace;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Noise Effect */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05;
    z-index: 1000;
    background: repeating-radial-gradient(#fff 0 0.0001%, #000 0 0.0002%) 50% 0/2500px 2500px;
    animation: noise 0.2s infinite;
}

/* Scanline Effect */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.5) 51%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
    animation: scanline 10s linear infinite;
    opacity: 0.1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 4rem;
}

.glitch-container {
    position: relative;
    display: inline-block;
}

.glitch {
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0.05em 0 0 var(--glitch-color),
                -0.05em -0.025em 0 var(--secondary-color),
                -0.025em 0.05em 0 var(--primary-color);
    animation: glitch 4s infinite;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 1rem;
    letter-spacing: 0.5em;
}

nav {
    display: flex;
    justify-content: space-around;
    margin-bottom: 4rem;
    border: 2px solid var(--primary-color);
    padding: 1rem;
    background: rgba(0, 255, 159, 0.1);
}

.nav-item {
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--primary-color);
}

.nav-item::before {
    content: '>';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-item:hover::before {
    opacity: 1;
    left: -10px;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.crt-text {
    margin-bottom: 3rem;
}

.crt-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end),
               blink-caret 0.75s step-end infinite;
    display: inline-block;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.number {
    font-size: 2.5rem;
    color: var(--primary-color);
    display: block;
}

.label {
    font-size: 1rem;
    color: var(--secondary-color);
}

.featured {
    margin-top: 4rem;
}

.featured h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.program {
    border: 1px solid var(--primary-color);
    padding: 2rem;
    background: rgba(0, 255, 159, 0.05);
    transition: all 0.3s ease;
}

.program:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.2);
}

.program-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

footer {
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid var(--primary-color);
    padding-top: 2rem;
}

.blink {
    animation: blink 1s step-end infinite;
    color: var(--primary-color);
}

/* Animations */
@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 var(--glitch-color),
                    -0.05em -0.025em 0 var(--secondary-color),
                    -0.025em 0.05em 0 var(--primary-color);
    }
    14% {
        text-shadow: 0.05em 0 0 var(--glitch-color),
                    -0.05em -0.025em 0 var(--secondary-color),
                    -0.025em 0.05em 0 var(--primary-color);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 var(--glitch-color),
                    0.025em 0.025em 0 var(--secondary-color),
                    -0.05em -0.05em 0 var(--primary-color);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 var(--glitch-color),
                    0.025em 0.025em 0 var(--secondary-color),
                    -0.05em -0.05em 0 var(--primary-color);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 var(--glitch-color),
                    0.05em 0 0 var(--secondary-color),
                    0 -0.05em 0 var(--primary-color);
    }
    99% {
        text-shadow: 0.025em 0.05em 0 var(--glitch-color),
                    0.05em 0 0 var(--secondary-color),
                    0 -0.05em 0 var(--primary-color);
    }
    100% {
        text-shadow: -0.025em 0 0 var(--glitch-color),
                    -0.025em -0.025em 0 var(--secondary-color),
                    -0.025em -0.05em 0 var(--primary-color);
    }
}

@keyframes noise {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(-10%, 5%); }
    30% { transform: translate(5%, -10%); }
    40% { transform: translate(-5%, 15%); }
    50% { transform: translate(-10%, 5%); }
    60% { transform: translate(15%, 0); }
    70% { transform: translate(0, 10%); }
    80% { transform: translate(-15%, 0); }
    90% { transform: translate(10%, 5%); }
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color); }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .glitch {
        font-size: 3rem;
    }
    
    nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-item {
        margin: 0.5rem 0;
    }
    
    .stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .program-grid {
        grid-template-columns: 1fr;
    }
}
