:root {
    --fx-blur: 0px;
    --fx-brightness: 1;
    --fx-contrast: 1;
    --fx-saturation: 1;
    --fx-hue: 0deg;
    --fx-grayscale: 0;
    --fx-sepia: 0;
    --fx-vignette: 0;
    --fx-chromatic: 0px;
    --fx-scanlines: 0;
}

#post-processing-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: normal;
}

#post-processing-layer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.8) 100%);
    opacity: var(--fx-vignette);
}

#post-processing-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px
        );
    opacity: var(--fx-scanlines);
    animation: scanline-move 8s linear infinite;
}

@keyframes scanline-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

#main-content {
    filter: 
        blur(var(--fx-blur))
        brightness(var(--fx-brightness))
        contrast(var(--fx-contrast))
        saturate(var(--fx-saturation))
        hue-rotate(var(--fx-hue))
        grayscale(var(--fx-grayscale))
        sepia(var(--fx-sepia));
    transition: filter 0.1s ease-out;
}

#fx-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    max-width: 320px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#fx-controls.collapsed {
    transform: translateX(calc(100% + 20px));
    opacity: 0;
    pointer-events: none;
}

#fx-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 8px 16px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
}

#fx-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

#fx-toggle.open {
    top: 30px;
    right: 30px;
    padding: 8px 10px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.4);
    font-size: 16px;
    line-height: 1;
}

#fx-toggle.open:hover {
    background: rgba(255, 0, 0, 0.4);
    transform: scale(1.05);
}

.fx-control {
    margin-bottom: 20px;
}

.fx-control label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fx-value {
    color: #00ffff;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
}

.fx-control input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.fx-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.fx-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

#fx-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.preset-btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

#reset-btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.4);
    border-radius: 8px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-weight: 600;
}

#reset-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    transform: scale(1.02);
}

#fx-controls h3 {
    color: white;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
}

@media (max-width: 768px) {
    #fx-controls {
        max-width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }
}