/*Здесь всё, что относится к музыке: плеер внизу экрана, список треков и регулятор громкости дождя.*/
/* Контейнер плеера */
.player-box {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border: 1px solid #222;
    overflow-y: auto;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    width: 100%;
}

/* Прогресс-бар */
.custom-progress-container {
    width: 100%;
    height: 4px;
    background: #1a1a1a;
    margin: 15px 0;
    cursor: pointer;
}
.progress-fill {
    width: 0%;
    height: 100%;
    background: #444; /* Грязный серый цвет */
}

/* Громкость */
.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}
#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    background: #666; /* Светлая дорожка (инверсия темного) */
    height: 4px;
    border-radius: 2px;
    outline: none;
}

/* Бегунок (Thumb) */
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #000; /* Темный бегунок */
    border: 1px solid #444;
    cursor: pointer;
    border-radius: 50%;
}

#volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #000;
    border: 1px solid #444;
    cursor: pointer;
    border-radius: 50%;
}

/* Иконки кнопок */
.ctrl-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
}
.ctrl-btn:hover { color: #fff; }

/* Плейлист */
.mini-playlist {
    margin-top: 15px;
    max-height: 500px;
    font-size: 0.8rem;
    text-align: left;
    border-top: 1px solid #111;
    padding-top: 10px;
    overflow-y: auto !important; /* Принудительно даем понять браузеру, что тут есть скролл */
}

.track-item {
    font-size: 1.2rem !important; /* Увеличьте это число (было примерно 0.9-1.0) */
    margin-bottom: 8px !important; /* Расстояние между треками */
    color: #909090;
    transition: color 0.3s;
}

@media (max-width: 768px) {
    /* 1. Центрируем и выравниваем сам плеер */
.player-box {
        position: relative !important;
        width: 100% !important;
        left: auto !important;
        transform: none !important;
        bottom: auto !important;
        margin: 20px 0 !important; /* Отступ от навигации */
        box-sizing: border-box;
        z-index: 10;
        background: rgba(0, 0, 0, 0.5); /* Можно сделать чуть прозрачнее, раз он в потоке */
    }

    /* 2. Чистим плейлист от браузерных отступов */
    #mini-playlist, .mini-playlist {
        width: 100% !important;
        padding: 10px 0 0 0 !important; /* Убираем боковые отступы полностью */
        margin: 15px 0 0 0 !important;
        list-style: none !important;
        max-height: 300px;
    }

    /* 3. Каждая строчка трека */
    .track-item {
        width: 100% !important;
        display: flex;
        justify-content: flex-start !important;
        align-items: baseline;
        padding: 10px !important; /* Внутренние отступы для текста */
        margin: 0 !important;
        box-sizing: border-box;
        text-align: left !important;
    }

    /* 4. Кнопки управления */
    .player-controls {
        display: flex;
        justify-content: center; 
        align-items: center;
        gap: 15px; 
        width: 100%;
        padding: 0;
    }

    .ctrl-btn {
        flex: 0 1 auto;
        font-size: 1.4rem !important;
        padding: 5px;
        margin: 0;
    }

    /* 5. Скрываем громкость */
    .volume-container {
        display: none !important;
    }

    .main-content {
        display: flex;
        flex-direction: column;
        justify-content: flex-start !important; /* Контент пойдет сверху вниз */
        align-items: center;
        min-height: 100vh;
        height: auto !important;     /* Позволяем странице растягиваться */
        padding-top: 70px;           /* Отступ для заголовка сверху */
        padding-bottom: 0px !important; /* ЗАПАС МЕСТА под плеер (высота плеера + отступ) */
        overflow-y: auto;            /* Включаем скролл */
    }

    /* Навигация должна иметь четкие отступы */
    nav {
        margin-top: 30px;
        margin-bottom: 30px;
        width: 100%;
    }
}