/* Kontejner celého přehrávače */
.production-player {
    max-width: 900px;
    margin: 6rem auto;
    padding: 3rem;
    background: #ffffff;
    border: 5px solid #aaa;
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(255,255,255,0.4);
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* --- CUSTOM SLIDER ENGINE --- */
.custom-slider-container {
    position: relative;
    width: 90%;
    /* Obří dotyková výška - super pro mobil */
    height: 50px; 
    margin: 3rem auto;
    display: flex;
    align-items: center; /* Vystředí stopu vertikálně */
    z-index: 5; /* Výše než zbytek v production-player */
    touch-action: none; /* Prevence systémových gest */
    /*padding: 0 20px;*/ /* Vytvoříme bezpečný prostor uvnitř pro thumb */
    /*overflow: visible; */
}

/* Samotný neviditelný input - slouží jen jako ovládací vrstva */
#stageSlider {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    opacity: 0; /* Totálně neviditelný */
    cursor: pointer;
    z-index: 100; /* Musí být navrchu */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none; /* Extrémně důležité pro mobily i trackpady */
   /* width: calc(100% - 40px);*/ /* Input je o něco užší než kontejner */
    /*margin: 0 20px;*/
}

/* Stopa slideru (šedé pozadí) */
.slider-track-bg {
    position: absolute;
    width: 100%;
    height: 12px; /* Výška samotné čáry */
    background: #e1e1e1;
    border-radius: 6px;
    z-index: 1;
}

/* Naplnění stopy (růžová část) */
.slider-track-fill {
    position: absolute;
    height: 12px;
    background: #cc147f; /* Tvoje růžová */
    border-radius: 6px;
    z-index: 2;
    /*transition: width 0.05s linear;*/ /* Jemný posun */
}

/* Vizuální táhlo (thumb) - Obří neonové kolečko */
.slider-thumb {
    position: absolute;
    width: 40px; /* Velikost táhla */
    height: 40px;
    /*background: #ffffff;*/
    /*border: 4px solid #cc147f;*/
    border-radius: 50%;
    z-index: 3;
    transform: translate(-50%, -50%); /* Vycentrování na střed stopy */
    top: 50%;
    /*box-shadow: 0 0 15px rgba(204, 20, 127, 0.4);*/ /* Základní neonový glow */
    /*transition: left 0.05s linear, transform 0.2s ease, box-shadow 0.2s ease; */
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease; 
    /*cursor: grab;*/
}

/* Větší svítící táhlo */
.slider-thumb {
    box-shadow: 0 0 15px var(--current-color, #666);
    border: 3px solid #fff;
    background: var(--current-color, #666);
    pointer-events: none; /* Tímto zajistíme, že kliky projdou SKRZE thumb přímo na input pod ním */
    user-select: none;
    -webkit-user-drag: none;
}

/* Efekt při podržení/pohybu */
#stageSlider:active + .slider-thumb {
    transform: translate(-50%, -50%) scale(1.15); /* Zvětšení při dotyku */
    box-shadow: 0 0 25px rgba(204, 20, 127, 0.7); /* Silnější neonový glow */
}

/* Vnitřní část táhla pro detail */
.thumb-glow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #cc147f;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* --- LABELS & BUTTONS --- */
.slider-labels {
    color: #888;
    font-size: 1.4rem;
    font-weight: 500;
    margin-top: -1rem;
}

.btn--play {
    position: relative;
    z-index: 2;
    background: #000;
    color: #fff;
    border: 2px solid transparent; /* Rámeček nahradí SVG */
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.2rem;
    width: 250px;
    height: 60px;
    padding: 0;
    margin: 0;
}

.btn--play:hover {
    background: #666;
    /*box-shadow: 0 5px 20px rgba(204, 20, 127, 0.3);*/
}

/* Odstranění modrého obrysu (focus) na mobilech */
.btn--play:focus {
    outline: none;
}

/* Úprava pro mobil */
@media screen and (max-width: 600px) {
    .production-player {
        padding: 2rem 1.5rem;
    }
    
    .slider-thumb {
        width: 50px; /* Ještě větší na mobilu */
        height: 50px;
    }
    
    .slider-labels {
        font-size: 1.2rem;
    }
}
/* Kontejner pro popisky v řadě */
.slider-labels-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 90%;
    margin: 0 auto;
}

.label-item {
    font-size: 1.6rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-align: center;
}

/* Aktivní popisek dostane barvu podle fáze */
.label-item.active {
    color: var(--accent);
    font-weight: bold;
    transform: scale(1.1);
}

/* Mobilní optimalizace pro popisky */
@media screen and (max-width: 800px) {
    .label-item {
        font-size: 1.4rem;
        letter-spacing: 0;
    }
}

/* Mobilní optimalizace pro popisky */
@media screen and (max-width: 600px) {
    .label-item {
        font-size: 0.9rem;
        letter-spacing: 0;
    }
}

/* POZADÍ SLIDERU - Barevné segmenty */
.slider-track-bg {
    position: absolute;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right, 
        #666 0%, #666 25%, 
        #3498db 25%, #3498db 50%, 
        #9b59b6 50%, #9b59b6 75%, 
        #cc147f 75%, #cc147f 100%);
    opacity: 0.3; /* Jemné pozadí */
    z-index: 1;
}

/* FILL SLIDERU - Plynulý přechod (Gradient) */
.slider-track-fill {
    position: absolute;
    height: 12px;
    border-radius: 6px;
    z-index: 2;
    /* Plynulý barevný přechod podle toho, jak táhlo postupuje */
    background: linear-gradient(to right, #666, #3498db, #9b59b6, #cc147f);
    width: 0%; 
    transition: width 0.05s linear;
}

.play-button-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.progress-rect {
    fill: none;
    stroke: #cc147f;
    stroke-width: 4;
    stroke-linecap: round;
    /* Nastavíme obvod - JS ho pak upřesní */
    stroke-dasharray: 1000; 
    stroke-dashoffset: 1000;  
    /*filter: drop-shadow(0 0 3px rgba(204, 20, 127, 0.8));*/
    pathLength: 100;
    /*transition: stroke-dashoffset 0.1s linear;*/
}

.play-progress-svg {
    position: absolute;
    top: -2px; /* Mírný přesah, aby linka nebyla "uříznutá" okrajem */
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    pointer-events: none;
    z-index: 10; /* Musí být nad tlačítkem */
    overflow: visible;
}