/* Universal Audio Player - Complete CSS with Fixed Progress Bar */
.universal-audio-player {
    --primary-color: #4361ee;
    --hover-color: #3a56d4;
    --text-color: #fff;
    --text-light: #666;
    --progress-bg: #e0e0e0;
    --progress-color: #ee5343;
    --progress-hover: #e65f2a;
    
    font-family: 'Inter', 'Poppins', sans-serif;
    background: white;
    border: #eee 1px solid;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 94%;
    max-width: 400px;
    padding: 20px 20px 20px 15px;
    margin: 0 auto;
}

/* Header Section */
.universal-audio-player .player-header {
	background: #2ab9f0;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: var(--text-color);
    padding: 8px 0 8px 0;
    border-bottom: 1px solid #eee;
	border-radius: 8px 8px 4px 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Song Info Section */
.universal-audio-player .info {
    text-align: center;
    margin-bottom: 15px;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.universal-audio-player .song-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 15px;
}

.universal-audio-player .artist-name {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 20px;
}

/* Progress Bar - Fixed Version */
.universal-audio-player .progress-container {
    position: relative;
    height: 20px;
    margin: 15px 0;
    cursor: pointer;
    width: 100%;
    user-select: none;
    -webkit-user-select: none;
}

.universal-audio-player .progress-container:hover .progress-bar {
    background-color: var(--progress-hover);
}

.universal-audio-player .progress-container:active .progress-bar {
    background-color: var(--hover-color);
    height: 8px;
    margin-top: -1px;
}

.universal-audio-player .progress-bar {
    position: absolute;
    height: 6px;
    width: 0;
    background: var(--progress-color);
    border-radius: 3px;
    pointer-events: none;
    transition: width 0.1s linear, height 0.1s ease;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
	padding:3px;
}

.universal-audio-player .progress {
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    margin: 0;
    background: transparent;
    position: relative;
    z-index: 2;
    cursor: pointer;
    opacity: 0;
}

.universal-audio-player .progress-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--progress-bg);
    border-radius: 3px;
    transform: translateY(-50%);
    pointer-events: none;
	padding: 3px;
}

/* Time Display */
.universal-audio-player .time {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* Controls */
.universal-audio-player .controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.universal-audio-player .controls button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.universal-audio-player .controls button:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.universal-audio-player .controls .material-icons {
    font-size: 22px;
}

/* Volume Controls */
.universal-audio-player .volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px auto;
    width: 90%;
    max-width: 250px;
    position: relative;
}

.universal-audio-player .volume-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.universal-audio-player .volume-btn .material-icons {
    font-size: 24px;
    color: var(--text-light);
    transition: all 0.2s;
}

.universal-audio-player .volume-btn:hover .material-icons {
    color: var(--primary-color);
}

.universal-audio-player .volume-slider-wrapper {
    position: relative;
    flex-grow: 1;
    height: 24px;
    display: flex;
    align-items: center;
}

.universal-audio-player .volume-bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--progress-bg);
    border-radius: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.universal-audio-player .volume-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--volume-width, 70%);
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.2s;
}

.universal-audio-player .volume {
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    margin: 0;
    background: transparent;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

/* Firefox Volume Thumb */
.universal-audio-player .volume::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    position: relative;
    z-index: 3;
}

/* WebKit Volume Thumb */
.universal-audio-player .volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    position: relative;
    z-index: 3;
    margin-top: -5px;
}

/* Playlist */
.universal-audio-player h3 {
    font-size: 1.1rem;
    margin: 15px 0 10px;
    color: var(--text-color);
    text-align: center;
}

.universal-audio-player .playlist {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    margin: 0;
    padding: 5px;
    border-radius: 6px;
    background: #f1f3f5;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f3f5;
}

.universal-audio-player .playlist::-webkit-scrollbar {
    width: 6px;
}

.universal-audio-player .playlist::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 3px;
}

.universal-audio-player .playlist::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

.universal-audio-player .playlist li {
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 3px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.universal-audio-player .playlist li:hover {
    background: #e9ecef;
}

.universal-audio-player .playlist li.active {
    background: #e0e8ff;
    color: var(--primary-color);
    font-weight: 500;
}

.universal-audio-player .song-duration {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: 8px;
}

/* Equalizer Animation */
@keyframes eqAnimation {
    0%, 100% { height: 30%; }
    25% { height: 60%; }
    50% { height: 40%; }
    75% { height: 80%; }
}

.universal-audio-player .eq-bars {
    display: flex;
    align-items: flex-end;
    height: 18px;
    gap: 3px;
    margin-left: 8px;
}

.universal-audio-player .eq-bar {
    width: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.universal-audio-player .eq-bar:nth-child(1) { height: 50%; animation: eqAnimation 1s infinite ease-in-out; }
.universal-audio-player .eq-bar:nth-child(2) { height: 30%; animation: eqAnimation 1.2s infinite ease-in-out 0.1s; }
.universal-audio-player .eq-bar:nth-child(3) { height: 70%; animation: eqAnimation 0.8s infinite ease-in-out 0.2s; }
.universal-audio-player .eq-bar:nth-child(4) { height: 40%; animation: eqAnimation 1.1s infinite ease-in-out 0.3s; }

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .universal-audio-player {
        padding: 18px;
        max-width: 100%;
    }
    
    .universal-audio-player .volume-container {
        width: 100%;
        max-width: none;
        padding: 0 15px;
    }
    
    .universal-audio-player .volume-slider-wrapper {
        height: 28px;
    }
    
    .universal-audio-player .volume::-webkit-slider-thumb,
    .universal-audio-player .volume::-moz-range-thumb {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .universal-audio-player {
        padding: 15px;
    }
    
    .universal-audio-player .volume-btn .material-icons {
        font-size: 22px;
    }
    
    .universal-audio-player .volume-slider-wrapper {
        height: 32px;
    }
    
    .universal-audio-player .volume::-webkit-slider-thumb,
    .universal-audio-player .volume::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }
}

/* Wrapper Styles */
#audio-player-wrapper {
    float: right;
    width: 350px;
    margin-left: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    #audio-player-wrapper {
        float: none;
        width: 100%;
        margin-left: 0;
        margin-bottom: 20px;
        display: flex;
        justify-content: center;
    }
}