/* ======================================================
   История эфира Соль FM
====================================================== */

.playlist-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: #ffffff;
    background: #07072d;
}

.playlist-main {
    min-height: 100vh;
}

/* Заголовок */

.playlist-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 58px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.10);

    background:
        radial-gradient(
            circle at 18% 24%,
            rgba(255, 42, 184, 0.16),
            transparent 34%
        ),
        radial-gradient(
            circle at 86% 75%,
            rgba(5, 184, 255, 0.16),
            transparent 34%
        ),
        rgba(7, 5, 39, 0.78);
}

.playlist-hero__content {
    position: relative;
    z-index: 2;
}

.playlist-back {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;

    color: rgba(255, 255, 255, 0.56);
    font-size: 12px;
    font-weight: 700;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.playlist-back:hover {
    color: #ffffff;
    transform: translateX(-3px);
}

.playlist-hero__label {
    margin: 0 0 13px;

    color: var(--yellow);
    font-size: 12px;
    font-weight: 900;

    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.playlist-hero h1 {
    max-width: 920px;
    margin: 0;

    color: #ffffff;

    font-size: clamp(46px, 7vw, 88px);
    line-height: 0.92;
    letter-spacing: -0.055em;
}

.playlist-hero h1 span {
    display: inline-block;
    color: transparent;

    background:
        linear-gradient(
            100deg,
            #ffffff 0%,
            #67efff 34%,
            #ff5bc8 72%,
            #fff36c 100%
        );

    background-size: 220% 220%;

    -webkit-background-clip: text;
    background-clip: text;

    animation:
        playlistTitleFlow
        5s
        ease-in-out
        infinite;

    filter:
        drop-shadow(
            0 0 18px
            rgba(255, 42, 184, 0.23)
        );
}

.playlist-hero__description {
    max-width: 760px;
    margin: 24px 0 0;

    color: rgba(255, 255, 255, 0.68);
    font-size: 16px;
    line-height: 1.65;
}

/* Основная область */

.playlist-section {
    padding: 36px 0 90px;
}

.playlist-toolbar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;

    margin-bottom: 22px;
}

.playlist-control {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.playlist-control > span {
    color: rgba(255, 255, 255, 0.47);
    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.playlist-control select {
    min-height: 43px;

    padding: 8px 36px 8px 13px;

    color: #ffffff;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;

    outline: none;

    background: rgba(255, 255, 255, 0.065);
}

.playlist-control select:hover,
.playlist-control select:focus {
    border-color: rgba(193, 88, 255, 0.40);
    background: rgba(255, 255, 255, 0.09);
}

.playlist-control select option {
    color: #ffffff;
    background: #17082e;
}

.playlist-control--search {
    margin-left: auto;
}

.playlist-refresh {
    min-height: 43px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 8px 14px;

    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
    font-weight: 800;

    cursor: pointer;

    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.04);

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.playlist-refresh:hover {
    color: #ffffff;
    border-color: rgba(189, 88, 255, 0.34);
    background: rgba(122, 45, 168, 0.13);
    transform: translateY(-1px);
}

.playlist-refresh:disabled {
    opacity: 0.45;
    cursor: wait;
    transform: none;
}

.playlist-status {
    min-height: 24px;
    margin-bottom: 20px;

    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
}

.playlist-status.is-loaded {
    color: rgba(255, 255, 255, 0.42);
}

.playlist-status.is-error {
    color: #ff8d9b;
}

/* Группы по датам */

.playlist-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.playlist-day {
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(43, 15, 78, 0.60),
            rgba(11, 13, 58, 0.70)
        );

    box-shadow:
        0 18px 55px
        rgba(0, 0, 0, 0.16);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.playlist-day__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding: 15px 18px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.075);

    background: rgba(255, 255, 255, 0.035);
}

.playlist-day__heading span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.playlist-day__heading small {
    color: rgba(255, 255, 255, 0.38);
    font-size: 10px;
}

/* Одна композиция */

.playlist-track {
    position: relative;

    min-height: 58px;

    display: grid;
    grid-template-columns:
        62px
        minmax(0, 1fr)
        auto
        46px;

    align-items: center;

    border-bottom: 1px solid rgba(255, 255, 255, 0.055);

    transition:
        background 0.2s ease;
}

.playlist-track:last-child {
    border-bottom: 0;
}

.playlist-track:hover {
    background: rgba(255, 255, 255, 0.035);
}

.playlist-track.is-latest {
    background:
        linear-gradient(
            90deg,
            rgba(255, 213, 0, 0.055),
            transparent 45%
        );
}

.playlist-track.is-latest::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;

    width: 2px;

    content: "";

    background:
        linear-gradient(
            var(--yellow),
            var(--orange)
        );

    box-shadow:
        0 0 12px
        rgba(255, 213, 0, 0.35);
}

.playlist-track__time {
    padding-left: 18px;

    color: rgba(255, 255, 255, 0.43);
    font-size: 11px;
    font-weight: 800;

    font-variant-numeric: tabular-nums;
}

.playlist-track__title {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 10px 12px;

    color: #ffffff;

    text-align: left;
    cursor: pointer;

    border: 0;
    background: transparent;
}

.playlist-track__name {
    min-width: 0;
    overflow: hidden;

    font-size: 13px;
    font-weight: 750;

    white-space: nowrap;
    text-overflow: ellipsis;

    transition:
        color 0.2s ease;
}

.playlist-track__hint {
    flex: 0 0 auto;

    color: rgba(255, 255, 255, 0.25);
    font-size: 9px;
    font-weight: 700;

    opacity: 0;

    transform: translateX(4px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.playlist-track__title:hover
.playlist-track__name {
    color: #fff5a3;
}

.playlist-track__title:hover
.playlist-track__hint {
    opacity: 1;
    transform: translateX(0);
}

.playlist-track__search {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    justify-self: center;

    padding: 0;

    color: rgba(255, 255, 255, 0.52);
    font-size: 19px;

    cursor: pointer;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.035);

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.playlist-track__search:hover {
    color: #ffffff;

    border-color: rgba(196, 94, 255, 0.42);
    background: rgba(116, 43, 166, 0.18);

    box-shadow:
        0 0 13px
        rgba(189, 66, 255, 0.13);

    transform: scale(1.05);
}

/* Пустой список */

.playlist-empty {
    max-width: 520px;

    margin: 65px auto;

    padding: 35px 30px;

    color: rgba(255, 255, 255, 0.58);

    text-align: center;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.035);
}

.playlist-empty > span {
    display: block;

    margin-bottom: 12px;

    color: rgba(255, 213, 0, 0.72);
    font-size: 30px;
}

.playlist-empty strong {
    display: block;
    margin-bottom: 8px;

    color: #ffffff;
    font-size: 17px;
}

.playlist-empty p {
    margin: 0;

    font-size: 12px;
    line-height: 1.6;
}

/* Анимация */

@keyframes playlistTitleFlow {
    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Телефоны */

@media (max-width: 720px) {

    .playlist-hero {
        padding: 54px 0 42px;
    }

    .playlist-back {
        margin-bottom: 22px;
    }

    .playlist-hero h1 {
        font-size: clamp(42px, 14vw, 66px);
    }

    .playlist-hero__description {
        font-size: 14px;
    }

    .playlist-section {
        padding: 25px 0 65px;
    }

    .playlist-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .playlist-control,
    .playlist-control--search {
        width: 100%;
        margin-left: 0;
    }

    .playlist-control select,
    .playlist-refresh {
        width: 100%;
    }

    .playlist-track {
        grid-template-columns:
            51px
            minmax(0, 1fr)
            auto
            42px;
    }

    .playlist-track__rating {
        gap: 2px;

        padding:
            0
            3px;
    }


    .playlist-track__vote {
        min-width: 30px;
        height: 28px;

        gap: 2px;

        padding:
            0
            4px;

        font-size: 11px;

        border-radius: 7px;
    }


    .playlist-track__vote-count {
        font-size: 8px;
    }

    .playlist-track__time {
        padding-left: 13px;
        font-size: 10px;
    }

    .playlist-track__title {
        padding: 10px 8px;
    }

    .playlist-track__name {
        font-size: 12px;
    }

    .playlist-track__hint {
        display: none;
    }

    .playlist-day__heading {
        padding: 13px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .playlist-hero h1 span {
        animation: none;
    }
}

/* ======================================================
   РЕЙТИНГ ТРЕКА
====================================================== */

.playlist-track__rating {
    display: flex;
    align-items: center;

    gap: 4px;

    padding:
        0
        6px;
}


.playlist-track__vote {
    min-width: 40px;
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    padding:
        0
        7px;

    color:
        rgba(255, 255, 255, 0.63);

    cursor: pointer;

    border:
        1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 9px;

    background:
        rgba(255, 255, 255, 0.035);

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


.playlist-track__vote:hover {
    color: #ffffff;

    transform:
        translateY(-1px);
}


.playlist-track__vote:active {
    transform:
        scale(0.95);
}


.playlist-track__vote:disabled {
    cursor: wait;

    opacity: 0.5;
}


.playlist-track__vote-count {
    min-width: 8px;

    font-size: 9px;
    font-weight: 900;
}


/* Лайк */

.playlist-track__vote--like.is-active {
    color: #ffffff;

    border-color:
        rgba(45, 225, 125, 0.48);

    background:
        rgba(45, 225, 125, 0.16);

    box-shadow:
        0 0 15px
        rgba(45, 225, 125, 0.14);
}


/* Дизлайк */

.playlist-track__vote--dislike.is-active {
    color: #ffffff;

    border-color:
        rgba(255, 59, 79, 0.48);

    background:
        rgba(255, 59, 79, 0.15);

    box-shadow:
        0 0 15px
        rgba(255, 59, 79, 0.13);
}


/* Небольшой эффект выбора */

.playlist-track__vote.is-active
> span:first-child {
    animation:
        playlistVotePop
        0.32s
        ease;
}


@keyframes playlistVotePop {

    0% {
        transform:
            scale(0.8);
    }

    60% {
        transform:
            scale(1.2);
    }

    100% {
        transform:
            scale(1);
    }
}

/* ======================================================
   ИСТОРИЯ / ТОП / АНТИТОП
====================================================== */

.playlist-rating-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;

    flex-wrap: wrap;

    gap: 14px;

    margin:
        5px
        0
        24px;
}


.playlist-view-tabs,
.playlist-period-tabs {
    display: flex;
    align-items: center;

    flex-wrap: wrap;

    gap: 7px;
}


.playlist-view-tab,
.playlist-period-tab {
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding:
        8px
        15px;

    color:
        rgba(255, 255, 255, 0.64);

    font-size: 11px;
    font-weight: 900;

    cursor: pointer;

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.04);

    transition:
        color 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease,
        transform 0.22s ease,
        box-shadow 0.22s ease;
}


.playlist-view-tab:hover,
.playlist-period-tab:hover {
    color: #ffffff;

    border-color:
        rgba(255, 213, 0, 0.30);

    transform:
        translateY(-2px);
}


/* Основная активная вкладка */

.playlist-view-tab.is-active {
    color: #ffffff;

    border-color:
        rgba(255, 213, 0, 0.46);

    background:
        linear-gradient(
            135deg,
            rgba(255, 213, 0, 0.16),
            rgba(185, 63, 215, 0.15)
        );

    box-shadow:
        0 0 22px
        rgba(255, 190, 65, 0.10);
}


/* Активный период */

.playlist-period-tab.is-active {
    color: #ffffff;

    border-color:
        rgba(91, 195, 255, 0.48);

    background:
        rgba(30, 137, 216, 0.17);

    box-shadow:
        0 0 17px
        rgba(46, 170, 255, 0.12);
}


.playlist-period-tabs[hidden] {
    display: none !important;
}


/* ======================================================
   РЕЙТИНГ
====================================================== */

.playlist-ranking {
    overflow: hidden;

    border:
        1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 22px;

    background:
        rgba(12, 8, 40, 0.39);

    box-shadow:
        0 22px 55px
        rgba(0, 0, 0, 0.17);
}


.playlist-ranking-track {
    min-height: 65px;

    display: grid;

    grid-template-columns:
        58px
        minmax(0, 1fr)
        auto
        46px;

    align-items: center;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.055);

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}


.playlist-ranking-track:last-child {
    border-bottom: 0;
}


.playlist-ranking-track:hover {
    background:
        rgba(255, 255, 255, 0.035);
}


/* Место */

.playlist-ranking-track__position {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    justify-self: center;

    color:
        rgba(255, 255, 255, 0.48);

    font-size: 12px;
    font-weight: 900;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.035);
}


/* Название */

.playlist-ranking-track__title {
    min-width: 0;

    display: flex;
    align-items: flex-start;
    flex-direction: column;

    gap: 3px;

    padding:
        11px
        10px;

    color: #ffffff;

    text-align: left;

    cursor: pointer;

    border: 0;

    background: none;
}


.playlist-ranking-track__title > span {
    max-width: 100%;

    overflow: hidden;

    font-size: 13px;
    font-weight: 800;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.playlist-ranking-track__title small {
    color:
        rgba(255, 255, 255, 0.34);

    font-size: 9px;
}


/* Голоса */

.playlist-ranking-track__stats {
    display: flex;
    align-items: center;

    gap: 6px;

    padding:
        0
        8px;
}

/* ======================================================
   КНОПКИ ГОЛОСОВ В ТОП / АНТИТОП
====================================================== */

.playlist-ranking-track__stats
.playlist-track__vote {
    min-width: 46px;
}


.playlist-ranking-track__vote {
    position: relative;
}


.playlist-ranking-track__vote.is-active {
    transform:
        scale(1.03);
}

/* ======================================================
   МОБИЛЬНАЯ ВЕРСИЯ
====================================================== */

@media (max-width: 720px) {

    .playlist-rating-navigation {
        align-items: stretch;
        flex-direction: column;

        margin-bottom: 18px;
    }


    .playlist-view-tabs {
        display: grid;

        grid-template-columns:
            repeat(3, 1fr);
    }


    .playlist-view-tab {
        padding:
            8px
            6px;

        font-size: 9px;
    }


    .playlist-period-tabs {
        display: grid;

        grid-template-columns:
            repeat(2, 1fr);
    }


    .playlist-period-tab {
        width: 100%;

        font-size: 9px;
    }


    .playlist-ranking-track {
        grid-template-columns:
            39px
            minmax(0, 1fr)
            auto
            38px;

        min-height: 58px;
    }


    .playlist-ranking-track__position {
        width: 27px;
        height: 27px;

        font-size: 10px;

        border-radius: 8px;
    }


    .playlist-ranking-track__title {
        padding:
            9px
            5px;
    }


    .playlist-ranking-track__title > span {
        font-size: 11px;
    }


    .playlist-ranking-track__title small {
        display: none;
    }


    .playlist-ranking-track__stats {
        gap: 2px;

        padding:
            0
            2px;
    }


    .playlist-ranking-track__stat {
        min-width: 30px;

        height: 27px;

        gap: 2px;

        padding:
            0
            3px;

        font-size: 8px;
    }


    .playlist-ranking-track__stat strong {
        font-size: 8px;
    }

}

/* ======================================================
   ИЗМЕНЕНИЕ ПОЗИЦИИ В РЕЙТИНГЕ
====================================================== */

.playlist-ranking-track.moved-up {
    animation:
        playlistRankingMoveUp
        0.55s
        ease
        both;
}


.playlist-ranking-track.moved-down {
    animation:
        playlistRankingMoveDown
        0.55s
        ease
        both;
}


@keyframes playlistRankingMoveUp {

    0% {
        opacity: 0.55;

        transform:
            translateY(14px);

        background:
            rgba(255, 213, 0, 0.10);
    }

    100% {
        opacity: 1;

        transform:
            translateY(0);

        background:
            transparent;
    }
}


@keyframes playlistRankingMoveDown {

    0% {
        opacity: 0.55;

        transform:
            translateY(-14px);

        background:
            rgba(105, 174, 255, 0.09);
    }

    100% {
        opacity: 1;

        transform:
            translateY(0);

        background:
            transparent;
    }
}

@media (max-width: 720px) {

    /*
     * Обычная история:
     *
     * 14:25  ARTIST — TRACK     поиск
     *        👍 12  👎 3
     */

    .playlist-track {
        grid-template-columns:
            47px
            minmax(0, 1fr)
            38px;

        grid-template-areas:
            "time title search"
            ". rating rating";

        row-gap: 1px;

        padding:
            3px
            0
            6px;
    }


    .playlist-track__time {
        grid-area:
            time;
    }


    .playlist-track__title {
        grid-area:
            title;
    }


    .playlist-track__rating {
        grid-area:
            rating;

        justify-self:
            start;

        padding:
            0
            5px
            3px;
    }


    .playlist-track__search {
        grid-area:
            search;
    }


    /*
     * ТОП / АНТИТОП:
     *
     * №   ARTIST — TRACK        поиск
     *     👍 12  👎 3
     */

    .playlist-ranking-track {
        grid-template-columns:
            38px
            minmax(0, 1fr)
            38px;

        grid-template-areas:
            "position title search"
            "position stats stats";

        row-gap: 1px;

        min-height: 64px;

        padding:
            4px
            0
            7px;
    }


    .playlist-ranking-track__position {
        grid-area:
            position;
    }


    .playlist-ranking-track__title {
        grid-area:
            title;
    }


    .playlist-ranking-track__stats {
        grid-area:
            stats;

        justify-content:
            flex-start;

        padding:
            0
            3px;
    }


    .playlist-ranking-track
    .playlist-track__search {
        grid-area:
            search;
    }


    .playlist-ranking-track__stats
    .playlist-track__vote {
        min-width: 34px;

        height: 28px;

        padding:
            0
            5px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .playlist-ranking-track.moved-up,
    .playlist-ranking-track.moved-down {
        animation: none;
    }

}