/* =========================
   Стили для музыки с стеклянным эффектом
========================= */
.music-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px 40px;
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
}

.music-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 600px;
}

.music-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.music-item p {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 0 8px rgba(255, 216, 0, 0.6);
    margin: 0;
}

/* Контейнер для плеера */
.custom-audio-player {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 15px;
}

/* Кнопки управления */
.controls-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.controls-container button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.controls-container button:hover {
    transform: scale(1.1);
}

.controls-container button:active {
    transform: scale(0.95);
}

/* Стили для кнопок SVG */
.prev-btn svg,
.play-btn svg,
.next-btn svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Полоса прогресса */
.progress-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background-color: #333;
}

.progress-bar::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background-color: #ffd700;
    border-radius: 50%;
    cursor: pointer;
}

.current-time, .duration {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* Стили для громкости */
.volume-container {
    position: relative;
}

.volume-icon {
    font-size: 24px;
    cursor: pointer;
}

/* Выпадающая громкость */
.volume-dropdown {
    position: absolute;
    top: 30px;
    left: -20px;
    width: 150px;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    display: none;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.volume-dropdown input {
    width: 80%;
    height: 8px;
    border-radius: 5px;
    background-color: #333;
}

.volume-dropdown input::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background-color: #ffd700;
    border-radius: 50%;
    cursor: pointer;
}

.volume-container:hover .volume-dropdown {
    display: flex;
}

/* Кнопка скачивания */
.download-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    transform: scale(1.05);
}

/* =========================
   Адаптивность
========================= */
@media (max-width: 600px) {
    .music-item {
        padding: 15px;
    }

    .controls-container button {
        font-size: 20px;
    }

    .progress-bar, .volume-bar {
        width: 90%;
    }

    .download-btn {
        font-size: 16px;
    }
}

.progress-wrapper {
    position: relative;
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
}

/* сколько загружено */
.progress-buffer {
    position: absolute;
    height: 100%;
    width: 0%;
    background: #666;
    z-index: 1;
}

/* сколько проиграно */
.progress-played {
    position: absolute;
    height: 100%;
    width: 0%;
    background: #ffd700;
    z-index: 2;
}

/* сам range поверх */
.progress-bar {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
}

.download-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

.download-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.download-btn:active {
    transform: scale(0.95);
}

/* 📱 Мобильная версия */
@media (max-width: 600px) {

    .download-btn {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .download-btn svg {
        width: 16px;
        height: 16px;
    }

}

@media (max-width: 600px) {

    .volume-container {
        display: none;
    }

}

@media (max-width: 600px) {

    .progress-wrapper {
        height: 12px;
    }

}

@media (max-width: 600px) {

    .custom-audio-player {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .controls-container {
        justify-content: flex-start;
    }

    .progress-container {
        width: 100%;
    }

}

@media (max-width: 600px) {

    .download-btn {
        align-self: flex-end;
    }

}

.play-pause-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-pause-btn svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.play-pause-btn:hover {
    background: rgba(255,255,255,0.25);
}

@media (max-width: 600px) {
    .download-btn {
        width: 32px;
        height: 32px;
    }

    .download-btn svg {
        width: 16px;
        height: 16px;
    }
}

.custom-audio-player {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
}