* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #1e1e24;
    color: #f5f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.simulator-container {
    width: 100%;
    max-width: 1200px;
    background: #2a2a35;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.animation-section {
    width: 100%;
    background: #111116;
    border-bottom: 2px solid #3a3a4a;
    padding: 10px 0;
}

#optic-diagram {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
}

.wave-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
}

/* Układ Flexbox dla dolnej sekcji */
.control-section {
    display: flex;
    flex-wrap: wrap;
    padding: 25px;
    gap: 30px;
}

.sliders-column {
    flex: 2;
    min-width: 300px;
    order: 1;
}

.preview-column {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-left: 1px solid #3a3a4a;
    padding-left: 20px;
    order: 2;
}

/* Dostosowanie mobilne (Smartfony) */
@media (max-width: 768px) {
    .control-section {
        flex-direction: column;
        gap: 20px;
    }
    .sliders-column {
        order: 1;
    }
    .preview-column {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #3a3a4a;
        padding-top: 20px;
        order: 2;
    }
}

h2 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: #a0a0b0;
}

.slider-group {
    margin-bottom: 18px;
}

.slider-group label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: #e0e0e6;
}

.slider-group label small {
    color: #8a8a9a;
    font-style: italic;
    margin-left: 5px;
}

/* 1. GŁÓWNY RESET PASKA SUWAKA */
.slider-group input[type="range"] {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #444454;
    background: transparent !important; /* Przezroczyste tło bazy, by nie dublować kolorów */
}

/* 2. WYMUSZENIE JEDNOLITEGO KOLORU DLA WEWNĘTRZNEGO TORU (Chrome, Edge, Safari, Opera) */
.slider-group input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: var(--track-color, #e0e0e0) !important; /* Pobiera czysty rgb() z JS */
    transition: background 0.1s ease;
    border: none;
}

/* 3. WYMUSZENIE JEDNOLITEGO KOLORU DLA WEWNĘTRZNEGO TORU (Firefox) */
.slider-group input[type="range"]::-moz-range-track {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: var(--track-color, #e0e0e0) !important;
    transition: background 0.1s ease;
    border: none;
}

/* 4. OKRĄGŁY UCHWYT (KROPKA) SUWAKA (Chrome, Edge, Safari, Opera) */
.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--thumb-color, #ffffff);
    border: 2px solid #ffffff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0,0,0,0.6);
    margin-top: -6px; /* Dokładne wyśrodkowanie kropki 24px na pasku o wysokości 12px */
}

/* 5. OKRĄGŁY UCHWYT (KROPKA) SUWAKA (Firefox) */
.slider-group input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--thumb-color, #ffffff);
    border: 2px solid #ffffff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0,0,0,0.6);
}

#final-color-preview {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    border: 3px solid #444454;
    margin-bottom: 15px;
    transition: background-color 0.1s ease;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.color-data {
    width: 100%;
    text-align: center;
}

.data-block {
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: bold;
    margin-bottom: 8px;
}

.cmyk-display {
    background: #34495e;
    color: #fff;
    font-size: 1.1rem;
}

.rgb-display {
    background: #2c3e50;
    color: #bdc3c7;
    font-size: 0.95rem;
}
