/* Pixel-perfect styling */
.pixel-border {
    image-rendering: pixelated;
    border-style: solid;
}

.pixel-text {
    text-shadow: 2px 2px 0px #8B0000;
}

.pixelated {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Glow effects */
.glow-red {
    box-shadow: 0 0 10px #FF0000, 0 0 20px #FF0000, 0 0 30px #FF0000;
}

.pulse-glow {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 5px #FF0000, 0 0 10px #FF0000, 0 0 15px #FF0000;
    }
    50% {
        box-shadow: 0 0 10px #FF0000, 0 0 20px #FF0000, 0 0 30px #FF0000, 0 0 40px #FF0000;
    }
}

/* Console rotation effect */
.console-rotate {
    transition: transform 0.3s ease;
}

.console-rotate:hover {
    transform: rotateY(15deg) rotateX(5deg);
}

/* Scanlines overlay */
.scanlines {
    background: linear-gradient(
        transparent 50%, 
        rgba(255, 0, 0, 0.03) 50%
    );
    background-size: 100% 4px;
    animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* Wireframe background */
.wireframe-bg {
    background-image: 
        linear-gradient(rgba(255, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: wireframe-move 20s linear infinite;
}

@keyframes wireframe-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Red vision mode */
.red-vision {
    filter: sepia(1) hue-rotate(-60deg) saturate(3) brightness(1.2);
}

.red-vision .scanlines {
    background: linear-gradient(
        transparent 50%, 
        rgba(255, 0, 0, 0.1) 50%
    );
    background-size: 100% 2px;
}

/* Shake animation for headache simulator */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Retro loading animation */
.loading-bar {
    background: linear-gradient(90deg, #FF0000 0%, #8B0000 50%, #FF0000 100%);
    background-size: 200% 100%;
    animation: loading 2s ease-in-out infinite;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #8B0000;
    border: 2px solid #FF0000;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF0000;
}

/* Responsive design helpers */
@media (max-width: 768px) {
    .pixel-text {
        text-shadow: 1px 1px 0px #8B0000;
    }
    
    .glow-red {
        box-shadow: 0 0 5px #FF0000, 0 0 10px #FF0000;
    }
}

/* Selection styling */
::selection {
    background: #FF0000;
    color: #000;
}

::-moz-selection {
    background: #FF0000;
    color: #000;
}