:root {
    --toxic-green: #39ff14;
    --police-blue: #4169e1;
    --blood-red: #8b0000;
    --noir-bg: #1a1a2e;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--noir-bg);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Custom Tailwind Colors */
.bg-noir {
    background-color: var(--noir-bg);
}

.text-toxic-green {
    color: var(--toxic-green);
}

.text-police-blue {
    color: var(--police-blue);
}

.text-blood-red {
    color: var(--blood-red);
}

.bg-toxic-green {
    background-color: var(--toxic-green);
}

.bg-police-blue {
    background-color: var(--police-blue);
}

.bg-blood-red {
    background-color: var(--blood-red);
}

.border-toxic-green\/30 {
    border-color: rgba(57, 255, 20, 0.3);
}

.border-toxic-green\/50 {
    border-color: rgba(57, 255, 20, 0.5);
}

.border-police-blue\/30 {
    border-color: rgba(65, 105, 225, 0.3);
}

.border-police-blue\/50 {
    border-color: rgba(65, 105, 225, 0.5);
}

.border-blood-red\/30 {
    border-color: rgba(139, 0, 0, 0.3);
}

.border-blood-red\/50 {
    border-color: rgba(139, 0, 0, 0.5);
}

.bg-toxic-green\/10 {
    background-color: rgba(57, 255, 20, 0.1);
}

.bg-toxic-green\/20 {
    background-color: rgba(57, 255, 20, 0.2);
}

.bg-police-blue\/10 {
    background-color: rgba(65, 105, 225, 0.1);
}

.bg-police-blue\/20 {
    background-color: rgba(65, 105, 225, 0.2);
}

.bg-blood-red\/20 {
    background-color: rgba(139, 0, 0, 0.2);
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.3;
}

/* Glitch Text Effect */
.glitch-text {
    position: relative;
    animation: glitch 2s infinite;
}

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

.glitch-text::before {
    animation: glitch-1 0.5s infinite;
    color: var(--toxic-green);
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 0.5s infinite;
    color: var(--blood-red);
    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% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 60% 0); transform: translate(-3px); }
    40% { clip-path: inset(40% 0 40% 0); transform: translate(3px); }
    60% { clip-path: inset(60% 0 20% 0); transform: translate(-3px); }
    80% { clip-path: inset(80% 0 0 0); transform: translate(3px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(80% 0 0 0); transform: translate(3px); }
    40% { clip-path: inset(60% 0 20% 0); transform: translate(-3px); }
    60% { clip-path: inset(40% 0 40% 0); transform: translate(3px); }
    80% { clip-path: inset(20% 0 60% 0); transform: translate(-3px); }
}

/* Pulse animation for high heat */
@keyframes danger-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.4); }
    50% { box-shadow: 0 0 20px 10px rgba(139, 0, 0, 0.2); }
}

.danger-border {
    animation: danger-pulse 1s infinite;
}

/* Money collection flash */
@keyframes cash-flash {
    0% { background-color: rgba(57, 255, 20, 0.3); }
    100% { background-color: transparent; }
}

.cash-collect {
    animation: cash-flash 0.5s ease-out;
}

/* Typewriter cursor effect */
.typewriter::after {
    content: '▋';
    animation: blink 1s step-end infinite;
}

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

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

::-webkit-scrollbar-track {
    background: var(--noir-bg);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

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

/* Button hover effects */
button {
    transition: all 0.2s ease;
}

button:not(:disabled):hover {
    transform: translateY(-1px);
}

button:not(:disabled):active {
    transform: translateY(0);
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    height: 6px;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #a855f7;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #a855f7;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Mobile optimizations */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }
    
    .scanlines {
        opacity: 0.15;
    }
}