/* Container */
.purple-player {
    position: relative;
    max-width: 800px;
    width: 100%;
    margin: 50px auto;
    background: #1b0b2e;
    border-radius: 12px;
    overflow: hidden; /* ensures controls stay inside */
    box-shadow: 0 8px 30px rgba(75,0,130,0.5);
}

/* Video */
.video {
    width: 100%;
    display: block;
}

/* Controls container */
.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(50,0,80,0.7);
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s;
}

.purple-player:hover .controls {
    opacity: 1;
}

/* Buttons */
button {
    background: none;
    border: none;
    color: #d9b3ff;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

button:hover {
    color: #9b59b6;
}

/* Time text */
#currentTime, #duration {
    color: #d9b3ff;
    font-size: 14px;
    min-width: 35px;
    text-align: center;
}

/* Progress bar */
.progress-container {
    flex: 1;
    position: relative;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
}

.progress-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #9b59b6;
    border-radius: 3px;
    pointer-events: none;
}

.progress-container {
    position: relative;
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
}

#seekBar {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: transparent;
    margin: 0;
    position: absolute;  /* overlay on top of progress bar */
    top: 0;              /* align vertically */
    z-index: 2;
}

#seekBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d9b3ff;
    margin-top: -4px;  /* vertically center thumb */
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

#seekBar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d9b3ff;
    border: none;
    cursor: pointer;
}


/* Volume controls */
.volume-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Volume slider with bar */
#volume {
    width: 70px;
    height: 6px;
    cursor: pointer;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    position: relative;
}

#volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d9b3ff;
    cursor: pointer;
    margin-top: -4px;
    border: none;
    transition: transform 0.2s;
}

#volume::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d9b3ff;
    border: none;
    cursor: pointer;
}

/* Show slider bar progress using pseudo-element */
#volume::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.2);
}

#volume::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.2);
}
