:root {
    --accent-color: #ff6600;
}

#slider-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.comparison-module {
    margin-bottom: 3rem;
    font-family: system-ui, -apple-system, sans-serif;
}

/* The Wrapper */
.slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background-color: #eee;
    touch-action: pan-y;
}

/* Image Handling */
.slider-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevents ghost dragging images */
}

.after-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* This is the core logic: Opacity driven by JS */
    opacity: var(--opacity, 0);
    transition: opacity 0.1s ease-out;
}

/* The Accessible Range Input */
.slider-input {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 40px;
    margin: 0;
    cursor: pointer;
    z-index: 10;
    appearance: none;
    background: transparent;
}

/* Range Track Styling */
.slider-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    border-radius: 3px;
}

/* Range Thumb Styling */
.slider-input::-webkit-slider-thumb {
    appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    margin-top: -9px; /* Centers thumb on track */
}

/* Metadata Styling */
.slider-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.meta-block {
    padding: 0.5rem;
    border-left: 3px solid #ccc;
}

.meta-block h3 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #666;
}

.meta-block p {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.credit {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
}