/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400&family=Jost:wght@500&display=swap');

/* Basic Reset and Setup */
:root {
    --bg-color: #1E1E1E;
    --text-color: #FFFFFF;
    --accent-color: #F97316;
    --track-color: #FFFFFF;
    --handle-color: #BDBDBD;
}

.custom-audio-player .media-player {
    width: 100%;
    max-width: 950px;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 40px;
    gap: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Shared styles for control groups */
.custom-audio-player .controls {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.custom-audio-player .right-controls {
    gap: 15px;
}

/* Control buttons */
.custom-audio-player .control-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.custom-audio-player .control-button:hover {
    opacity: 0.8;
}

.custom-audio-player .control-button:active {
    opacity: 0.6;
}

/* Center Section */
.custom-audio-player .center-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligns content to the left */
    gap: 10px;
    min-width: 0;
}

.custom-audio-player .track-title {
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    width: 100%;
    text-align: left;
    padding-left: 8px; /* Indents the title */
    font-family: 'Cinzel', serif;
}

/* Timeline and Progress Bar */
.custom-audio-player .timeline-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 18px;
}

.custom-audio-player .time-stamp {
    font-size: 19px;
    font-weight: 400;
    font-family: 'Jost', sans-serif;
}

.custom-audio-player .progress-bar-wrapper {
    flex-grow: 1;
    height: 5px;
    cursor: pointer;
    position: relative;
}

.custom-audio-player .progress-bar {
    width: 100%;
    height: 100%;
    background-color: var(--track-color);
    border-radius: 2.5px;
}

.custom-audio-player .progress-bar-filled {
    width: 0%;
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 2.5px;
    transition: width 0.1s ease;
}

/* Volume Slider */
.custom-audio-player .volume-slider-wrapper {
    width: 100px;
}

.custom-audio-player .volume-slider-track {
    position: relative;
    width: 100%;
    height: 5px;
    background-color: var(--track-color);
    cursor: pointer;
    border-radius: 2.5px;
}

.custom-audio-player .volume-slider-filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background-color: var(--accent-color);
    border-radius: 2.5px;
    transition: width 0.1s ease;
}

.custom-audio-player .volume-slider-handle {
    position: absolute;
    top: 50%;
    left: 40%;
    width: 13px;
    height: 13px;
    background-color: var(--handle-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: left 0.1s ease;
    cursor: grab;
}

.custom-audio-player .volume-slider-handle:active {
    cursor: grabbing;
}

/* Hide the default audio element */
.custom-audio-player .audio-element {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-audio-player .media-player {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .custom-audio-player .center-section {
        order: -1;
        width: 100%;
    }
    
    .custom-audio-player .controls {
        width: 100%;
        justify-content: center;
    }
    
    .custom-audio-player .right-controls {
        justify-content: center;
    }
    
    .custom-audio-player .volume-slider-wrapper {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .custom-audio-player .media-player {
        padding: 15px;
        gap: 15px;
    }
    
    .custom-audio-player .track-title {
        font-size: 10px;
    }
    
    .custom-audio-player .time-stamp {
        font-size: 16px;
    }
    
    .custom-audio-player .volume-slider-wrapper {
        width: 60px;
    }
}
