/* === CSS VARIABLES FOR EASY CUSTOMIZATION === */
:root {
    --primary-green: #00ff66;
    --secondary-green: #53bc36;
    --dark-green: #0a2d03;
    --accent-pink: #ff6b9d;
    --accent-cyan: #00ffff;
    --accent-magenta: #ff00ff;
    --glow-intensity: 0.3;
}

/* === MATRIX RAIN BACKGROUND === */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: var(--glow-intensity);
}

.matrix-column {
    position: absolute;
    top: -100%;
    color: var(--primary-green);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.2;
    text-shadow: 0 0 5px var(--primary-green);
    animation: matrixFall linear infinite;
}

@keyframes matrixFall {
    to {
        transform: translateY(100vh);
    }
}

/* === GLITCH TEXT EFFECT === */
.glitch-text {
    position: relative;
    color: var(--primary-green);
    animation: glitch 2s infinite;
    display: inline-block;
}

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

.glitch-text::before {
    animation: glitch-1 0.5s infinite;
    color: #ff0040;
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 0.5s infinite;
    color: var(--accent-cyan);
    z-index: -2;
}

@keyframes glitch {
    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 glitch-1 {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-2px, -2px); }
    20% { transform: translate(2px, 2px); }
    30% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    15% { transform: translate(2px, -2px); }
    25% { transform: translate(-2px, 2px); }
    35% { transform: translate(2px, 2px); }
    45% { transform: translate(-2px, -2px); }
}

/* === TERMINAL CURSOR === */
.terminal-cursor::after {
    content: '█';
    color: var(--primary-green);
    animation: cursor-blink 1s infinite;
    margin-left: 2px;
}

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

/* === TYPING EFFECT === */
.typing-header {
    border-right: 2px solid var(--primary-green);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

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

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

/* === NEON GLOW BUTTONS === */
.neon-button {
    background: transparent !important;
    border: 2px solid var(--primary-green) !important;
    color: var(--primary-green) !important;
    padding: 10px 20px !important;
    font-family: 'Courier New', monospace !important;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

.neon-button:hover {
    color: #000 !important;
    background: var(--primary-green) !important;
    box-shadow: 
        0 0 5px var(--primary-green),
        0 0 10px var(--primary-green),
        0 0 15px var(--primary-green),
        0 0 20px var(--primary-green) !important;
    text-shadow: none !important;
}

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

.neon-button:hover::before {
    left: 100%;
}

/* === LOADING BARS === */
.loading-bar {
    width: 100%;
    height: 20px;
    background: var(--dark-green);
    border: 1px solid var(--primary-green);
    position: relative;
    overflow: hidden;
    margin: 10px 0;
}

.loading-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
    width: 0%;
    animation: loading 3s ease-in-out infinite;
    position: relative;
}

.loading-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: loading-shine 1.5s infinite;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 75%; }
    100% { width: 100%; }
}

@keyframes loading-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === ASCII ART BORDERS === */
.ascii-border {
    border: none !important;
    padding: 30px 20px 20px !important;
    position: relative;
    background: rgba(0, 255, 102, 0.02);
    margin: 20px 0;
}

.ascii-border::before {
    content: '┌─────────────────────────────────────────────┐';
    position: absolute;
    top: 5px;
    left: 0;
    color: var(--primary-green);
    font-family: monospace;
    font-size: 12px;
    white-space: pre;
    line-height: 1;
}

.ascii-border::after {
    content: '└─────────────────────────────────────────────┘';
    position: absolute;
    bottom: 5px;
    left: 0;
    color: var(--primary-green);
    font-family: monospace;
    font-size: 12px;
    white-space: pre;
    line-height: 1;
}

/* === RETRO PROGRESS INDICATORS === */
.retro-progress {
    display: flex;
    gap: 2px;
    margin: 10px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.progress-block {
    width: 15px;
    height: 15px;
    background: var(--dark-green);
    border: 1px solid var(--primary-green);
    animation: progressPulse 2s infinite;
    transition: all 0.3s ease;
}

.progress-block.active {
    background: var(--primary-green);
    box-shadow: 0 0 5px var(--primary-green);
}

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

/* === HOLOGRAPHIC TEXT === */
.hologram-text {
    background: linear-gradient(45deg, var(--primary-green), var(--accent-cyan), var(--accent-magenta), var(--primary-green));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: hologram 3s ease infinite;
    font-weight: bold;
    display: inline-block;
}

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

/* === RETRO ALERT BOXES === */
.retro-alert {
    border: 3px solid var(--primary-green);
    background: #000;
    color: var(--primary-green);
    padding: 20px 15px 15px;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 255, 102, 0.1);
    margin: 20px 0;
}

.retro-alert::before {
    content: '⚠ SYSTEM ALERT ⚠';
    position: absolute;
    top: -15px;
    left: 10px;
    background: #000;
    padding: 0 10px;
    color: var(--accent-pink);
    font-size: 12px;
    animation: alertBlink 1s infinite;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

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

/* === INTERACTIVE CONSOLE === */
.console-container {
    background: #111;
    border: 2px solid var(--primary-green);
    font-family: 'Courier New', monospace;
    margin: 20px 0;
}

.console-output {
    padding: 15px;
    height: 150px;
    overflow-y: auto;
    background: #000;
    color: var(--primary-green);
    font-size: 14px;
    line-height: 1.4;
}

.console-input {
    width: 100%;
    background: #000;
    border: none;
    border-top: 1px solid var(--primary-green);
    color: var(--primary-green);
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    outline: none;
}

.console-input::placeholder {
    color: rgba(0, 255, 102, 0.5);
}

.command-line {
    color: var(--accent-pink);
}

.output-line {
    color: var(--primary-green);
}

/* === SCREEN SHAKE EFFECT === */
@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-2px, -2px); }
    20% { transform: translate(2px, -2px); }
    30% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, 2px); }
    50% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, -2px); }
    70% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, 2px); }
    90% { transform: translate(-2px, -2px); }
}

.shake {
    animation: shake 0.1s infinite;
}

/* === CURSOR TRAIL === */
.cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--primary-green);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px var(--primary-green);
    animation: fade-out 0.5s ease-out forwards;
}

@keyframes fade-out {
    to {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* === MOBILE RESPONSIVENESS === */
@media (max-width: 768px) {
    .neon-button {
        padding: 8px 16px !important;
        font-size: 12px !important;
        letter-spacing: 1px !important;
    }
    
    .ascii-border::before,
    .ascii-border::after {
        font-size: 8px;
    }
    
    .matrix-column {
        font-size: 12px;
    }
    
    .console-output {
        height: 100px;
        font-size: 12px;
    }
    
    .retro-progress {
        gap: 1px;
    }
    
    .progress-block {
        width: 12px;
        height: 12px;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    .glitch-text,
    .loading-fill,
    .hologram-text,
    .matrix-column,
    .progress-block {
        animation: none;
    }
    
    .terminal-cursor::after {
        animation: none;
        opacity: 1;
    }
}

/* === PRINT STYLES === */
@media print {
    .matrix-rain,
    .cursor-trail {
        display: none;
    }
    
    .neon-button {
        border: 1px solid #000 !important;
        color: #000 !important;
        background: none !important;
        box-shadow: none !important;
    }
}
