/* Основной стиль */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 40px; /* Отступ от краев окна браузера */
    display: flex;
    justify-content: center; /* Центрируем плеер по горизонтали */
    flex-direction: column;
    margin: 0 auto;
    align-items: center;
}

/* Главный контейнер плеера */
.player {
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    /*padding: 5px 125px;*/
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);

    position: fixed; /* Фиксируем позицию */
    bottom: 0; /* Прижимаем к низу */
    left: 0; /* Прижимаем к левому краю */
    right: 0; /* Растягиваем до правого края (вместо width) */
    margin-left: auto; /* Центрируем относительно левого и правого отступов */
    margin-right: auto;
    padding-top: 10px;
    padding-bottom: 15px;

    display: flex;
    flex-direction: column;
    align-items: center;
    border: 0px solid rgb(163, 4, 4);
}

/* Верхняя строка: Кнопки | Название | Громкость */
.top-row {
    width: 60%;
    display: flex;
    justify-content: space-between; /* Распределяет блоки */
    align-items: center;
    gap: 10px; /* Общий отступ между группами элементов */
    margin-bottom: 5px;

    height: 33px;
    border: 0px solid rgb(163, 4, 4);
    align-items: center;
    justify-items: center;
}
.track-name {
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    width:80%;
    border: 0px solid #777;
    text-align: left;
}

#current-track {color: #555;}

/* Нижняя строка: Время | Прогресс бар */
.bottom-row {
    width: 60%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.time {
    font-size: 14px;
    color: #777;
}
.progress-bar {
    flex-grow: 1;
    height: 6px;
    background-color: #eee;
    border-radius: 5px;
    position: relative;
    cursor: pointer;
    margin-left: 15px;
}
.fill {
    height: 100%;
    background-color: #3498db;
    border-radius: inherit;
    width: 0%;
}

/* Блок кнопок */
.main-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 115px;
    border: 0px solid #777;
}

.main-controls button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #3498db;
    transition: transform 0.1s ease-in-out, color 0.2s;

    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 80px;
    width: 30px;
    height: 30px;
    border: 0px solid #777;
    border-radius: 100%;
}
.main-controls button:hover {
    color: #2980b9;
    transform: scale(1.1);
}
#play-pause-btn { font-size: 35px; }


/* Блок громкости */
.volume-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 80px;
    gap: 5px;

    width: 145px;
    border: 0px solid #777;
    
}
#mute-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #3498db;
}
#volume-range {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 6px;
    background: #ddd;
    outline: none;
    border-radius: 3px;
}
#volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}



/* ... (стили выше остались без изменений) ... */

/* Стили плейлиста */
.playlist {
    width: 95%;
    max-width: 650px;
    background-color: #fafafa;
    border-radius: 15px;
    padding: 10px;
    margin-top: 30px; /* ОТСТУПИЛИ ОТ ПЛЕЕРА ВНИЗ */
}
.song {
    display: flex;
    align-items: center;
    padding: 2px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.song:hover {
    background-color: #eaeaea;
}
.song.active {
    background-color: #ddeeff;
}
.play-pause_song::before {
    content: '►';
    margin-right: 5px;
    font-size: 17px;
    color: #3498db;
}
.song.active .play-pause_song::before {
    content: '❚❚';
}
.nameSong_song {
    font-size: 14px;
}
