/* ************************* Переменные цветов ************************* */
:root {

    --ap-accent: #fd6d94;
    --ap-muted: #acaebd;
    --ap-white: #e6e9ef;
    --ap-shadow: 0 20px 60px rgba(10, 10, 10, 0.6);
    --ap-radius: 14px;
    --ap-btn-bg: linear-gradient(180deg, #534b83, #682c56);
}

.flexrow  {
    display: flex;
    gap: 8px;
    padding-bottom: 10px;
    align-content: space-between;
    justify-content: space-between;
    flex-direction: row;
    align-items: baseline;
}


/* ************************* Контейнер плеера ************************* */
#audioplayer {
    width: 100%;
    margin: 18px auto;
    border-radius: calc(var(--ap-radius) + 6px);
    box-shadow: var(--ap-shadow);
    overflow: hidden;
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: var(--ap-white);
    padding: 23px 10px 10px 10px;
}



/* ************************* Панель быстрых кнопок ************************* */
#audio-extra-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 10px;
    width: 180px;

}

.audio-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #2a2034;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease;
}

.audio-btn:active {
    transform: scale(.97);
}

.audio-btn i {
    font-size: 20px;
    color: var(--ap-white);
}




/* ************************* Прогресс и время ************************* */
#audio-seek-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#audio-seek-area {
    height: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

#audio-seek-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(222deg, var(--ap-accent), #e32879);
    transition: width .12s linear;
}

#audio-seek-hover {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.08);
    left: 0;
    transform: translateX(-1px);
    pointer-events: none;
}

#audio-tooltip-time {
    position: absolute;
    top: -28px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--ap-white);
    font-size: 12px;
    border-radius: 6px;
    display: none;
    white-space: nowrap;
    transform: translateX(-50%);
}

#audio-time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--ap-muted);
}

#audio-current-time,
#audio-total-time {
    min-width: 40px;
}

#audio-total-time {
    text-align: right;
}




/* ************************* Информация о треке ************************* */
#audio-album-title {
    font-weight: 700;
    color: var(--ap-white);
    font-size: 16px;
}

#audio-track-title {
    font-size: 13px;
    color: var(--ap-muted);
    margin-top: 4px;
    margin-bottom: 10px;
}




/* ************************* Обложка ************************* */
#audio-album-art {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 12px;
}

#audio-album-cover {
    width: 160px;
    height: 160px;
    border-radius: 35%;
    background-size: cover;
    background-position: center;
    box-shadow: 0px 0px 15px 7px rgb(57 52 46);
}

#audio-buffer-status {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--ap-muted);
    display: none;
}

#audio-album-cover.audio-rotating {
    animation: spin 5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ************************* Основные кнопки управления ************************* */
#audio-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

#audio-controls .audio-btn {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: var(--ap-btn-bg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

#audio-playpause {
    background: linear-gradient(180deg, #8e54a1, #6b2b56);
}

#audio-controls .audio-btn:hover {
    transform: translateY(-3px);
}



/* ************************* Громкость ************************* */
#audio-volume {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

#audio-volume .audio-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

#audio-volume-range {
    width: 150px;
}



/* ************************* Эквалайзер ************************* */
#audio-equalizer {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.audio-eq-bar {
    width: 4px;
    background: var(--ap-accent);
    height: 5px;
    transition: height 0.15s ease;
}



/* ************************* Подсветка активных кнопок ************************* */
.audio-btn-repeat.active,
.audio-btn-random.active,
.audio-btn-bookmark.active {
    background: var(--ap-accent);
    color: #fff;
    border-radius: 5px;
}




/**************************Стили для мобильного отображения****************/
@media (max-width: 768px) {


    /* Порядок размещения*/
    #audio-controls { order: 1; }
    #audio-extra-controls { order: 2; }
    #audio-volume { order: 3; }

    /* Контейнер */
    #audioplayer {
        padding: 15px;
    }

    /* Обложка меньше */
    #audio-album-cover {
        width: 200px;
        height: 200px;
        margin-bottom: 40px;
        margin-top: 40px;
    }

    /* Инфо о треке */
    #audio-album-title {
        font-size: 14px;
    }
    #audio-track-title {
        font-size: 12px;
    }

    /* Кнопки управления */
    #audio-controls .audio-btn {
        width: 68px;
        height: 68px;
    }
    .audio-btn i {
        font-size: 16px;
    }

    /* Доп. кнопки */
    #audio-extra-controls {
        width: 100%;
        justify-content: center;
    }

    /* Громкость */
    #audio-volume-range {

    }

    /* Упрощаем расположение */
    .flexrow {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }



}

@media (max-width: 992px) {

    #audio-extra-controls { order: 1; }
    #audio-controls { order: 2; }
    #audio-volume { order: 3; }

}

/**************************Стили для мобильного отображения****************/


#audio-playlist {
    width: 100%;
    margin: 18px auto;
    border-radius: calc(var(--ap-radius) + 6px);
    box-shadow: var(--ap-shadow);
    overflow: hidden;
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: var(--ap-white);
    padding: 23px 10px 10px 10px;

}




/******************************Стили плейлиста*****************************/
.audio-track {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
}

.track-cover-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin-right: 15px;
    flex-shrink: 0;
}

.track-cover {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

/* Большая кнопка Play прямо на обложке */
.track-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.track-cover-wrapper:hover .track-play {
    opacity: 1;
}

.track-play:hover {
    background: #1db954; /* зелёный акцент */
    transform: translate(-50%, -50%) scale(1.1);
}

/* Текст */
.track-info {
    flex: 1;
}

.track-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.track-artist {
    font-size: 14px;
    color: #aaa;
    margin-top: 3px;
}

/* Кнопка "ещё" справа */
.track-more {
    position: relative;
}

.track-more-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
}

.track-more-btn:hover {
    color: #fff;
}

/* Выпадающее меню */
.track-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    background: #222;
    border-radius: 10px;
    padding: 12px;
    min-width: 220px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.6);
    z-index: 10;
}

.track-dropdown p {
    font-size: 13px;
    color: #ddd;
    margin: 0 0 8px;
}

.track-dropdown a {
    color: #1db954;
    text-decoration: none;
    font-size: 13px;
}

.track-dropdown a:hover {
    text-decoration: underline;
}

/* Активное меню */
.track-more.active .track-dropdown {
    display: block;
}


/*CSS для выделения трека*/
#audio-playlist .audio-track.active {
    background: rgba(29, 185, 84, 0.15); /* зелёный полупрозрачный фон */
    border-left: 4px solid #1db954;      /* зелёная полоска слева */
    border-radius: 6px;
}

#audio-playlist .audio-track.active .track-title {
    color: #1db954; /* подсветим название */
    font-weight: 600;
}


/******************************Стили плейлиста*****************************/



/*********************Изменяемые стили для разных подкастов****************/
#audioplayer.pod_1 {
    background: linear-gradient(45deg, #1d1b17, #10171d);
}
#audioplayer.pod_2 {
    background: linear-gradient(345deg, #667581, #08080d);
}
#audioplayer.pod_3 {
    background: linear-gradient(345deg, #1a2949, #08080d);
}

#audio-playlist.pod_1 {
    background: linear-gradient(45deg, #1d1b17, #10171d);
}
#audio-playlist.pod_2 {
    background: linear-gradient(45deg, #353c44, #10171d);
}
#audio-playlist.pod_3 {
    background: linear-gradient(45deg, #1a2949, #10171d);
}

#audio-album-cover.pod_1 {
    box-shadow: 0px 0px 15px 7px rgb(57 52 46);
}
#audio-album-cover.pod_2 {
    box-shadow: 0px 0px 15px 7px rgb(46 54 57);
}
#audio-album-cover.pod_3 {
    box-shadow: 0px 0px 15px 7px rgb(20 30 53);
}
/*********************Изменяемые стили для разных подкастов****************/
