/* ----------------- Global Player ----------------- */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111;
    color: #fff;
    padding: 10px 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 999;
    font-family: sans-serif;
}

.stream-player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    gap: 20px;
}

/* ----------------- Left: Song Info ----------------- */
.player-left {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 20%;
}
.player-left .track-image-holder {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.player-left img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}
.song-info h4, .song-info p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-info h4 { font-size: 14px; }
.song-info p { font-size: 12px; opacity: 0.7; }

/* ----------------- Middle + Right container ----------------- */
.player-middle-right {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 20px;
}

/* ----------------- Progress Container ----------------- */
.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
#current-time, #total-time {
    width: 40px;
    text-align: center;
    font-size: 12px;
}

/* ----------------- Progress Bars ----------------- */
#stream-progress-wrapper {
    flex: 1;
    height: 6px;
    background: #ddd;
    position: relative;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}
#stream-buffer-bar {
    position: absolute;
    height: 100%;
    width: 0%;
    background: #bbb;
    border-radius: 4px;
}
#stream-progress-bar {
    position: absolute;
    height: 100%;
    width: 0%;
    background: #ff3b3b;
    border-radius: 4px;
}
#stream-progress-handle {
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid #ff3b3b;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
}

/* ----------------- Right: Controls + Volume ----------------- */
.player-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Player Controls */
.player-controls {
    display: flex;
    gap: 10px;
    padding: 0 50px;
}
.player-controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    min-width: 14px;
    cursor: pointer;
    transition: color 0.3s ease;
}

/* Volume */
.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
}
.player-volume i {
    cursor: pointer;
}
.player-volume i.fa-volume-mute {
    color: red;
}

/* ----------------- Shuffle / Repeat Highlights ----------------- */
#shuffle-btn.active,
#repeat-btn.active {
    color: #4D36A9;
}
#shuffle-btn.active i,
#repeat-btn.active i {
    color: #4D36A9;
}

/* ----------------- Track Card Play Button ----------------- */
.track-card-item { position: relative; margin: 5px; display: inline-block; }
.play-pause-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
}
.play-pause-btn {
    min-width: 17px;
    border-radius: 50%;
    line-height: 40px;
    text-align: center;
    color: #fff;
    display: inline-block;
    font-size: 16px;
}
.play-pause-btn.playing:before { content: "\f04c"; font-family: FontAwesome; }
.play-pause-btn.paused:before { content: "\f04b"; font-family: FontAwesome; }

/* ----------------- Responsive Breakpoints ----------------- */

/* Mac / Large Tablet ~1024px */
@media (max-width: 1024px) {
    .music-player { padding: 10px 80px; }
    .player-left { width: 25%; }
    .player-left img { width: 50px; height: 50px; }
    .song-info h4 { font-size: 13px; }
    .song-info p { font-size: 11px; }
}

/* Tablet ~991px */
@media (max-width: 991px) {
    .music-player { padding: 10px 60px; }
    .player-left { width: 30%; }
    .player-middle-right { gap: 15px; }
    .progress-container { gap: 6px; }
    #current-time, #total-time { width: 35px; font-size: 11px; }
    .player-controls button { font-size: 16px; }
    .player-volume input { width: 70px; }
}

/* Small Tablet / Large Phone ~768px */
@media (max-width: 768px) {
    .music-player { padding: 10px 40px; flex-wrap: wrap; gap: 10px; }
    .player-left { width: 100%; justify-content: flex-start; margin-bottom: 5px; }
    .player-middle-right { width: 100%; flex-direction: column; align-items: stretch; gap: 5px; }
    .progress-container { width: 70%; }
    .player-right { width: 30%; justify-content: flex-end; }
    #current-time, #total-time { width: 30px; font-size: 10px; }
    .player-controls button { font-size: 14px; }
    .player-volume input { width: 60px; }
}

/* Small Phone ~575px */
@media (max-width: 575px) {
    .music-player { padding: 5px 20px; }
    .player-left { width: 100%; margin-bottom: 5px; justify-content: center; padding-top: 5px; }
    .progress-container { width: 100%; }
    .player-right { width: 100%; justify-content: space-between; margin-top: 5px; }
    .player-controls button { font-size: 12px; }
    .player-volume input { width: 50px; }
    .stream-player-content{ display: block; }
}

/* Extra Small Phones ~480px */
@media (max-width: 480px) {
    .music-player { padding: 5px 10px; }
    .player-left img { width: 45px; height: 45px; }
    .song-info h4 { font-size: 12px; }
    .song-info p { font-size: 10px; }
    #current-time, #total-time { width: 25px; font-size: 9px; }
    .player-controls button { font-size: 11px; }
    .player-volume input { width: 40px; }
}

#stream-volume {
    -webkit-appearance: none;
    height: 6px;
    background: #fff;
    border-radius: 50px;
    outline: none;
    box-shadow: 10.87px 10.87px 16.3px 0px #161320;
}
