/* === ОСНОВНЫЕ ПЕРЕМЕННЫЕ И СТИЛИ === */
:root {
    --bg-main: #110D12;
    --bg-secondary: #1A1520;
    --bg-ui-element: #2A1F30;
    --bg-ui-hover: #3D2D44;

    --text-primary: #FFFFFF;
    --text-secondary: #B1A2BC;
    --text-interactive: #FF6B35;
    --text-interactive-hover: #FFA270;

    --border-color: #38273F;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.sidebar-is-open {
    overflow: hidden;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--text-interactive);
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    /* padding: 0 15px; */
    margin: 0 auto;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hide,
.mf-hide {
    display: none !important;
}

/* === ОСНОВНАЯ СТРУКТУРА (правый сайдбар) === */
main {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    align-items: flex-start;
}

main>section {
    flex-grow: 1;
    min-width: 0;
    background-color: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    order: 1;
}

main>aside {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    order: 2;
}

/* === HEADER ВНУТРИ СЕКЦИИ === */
.content-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.burger-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.burger-toggle:hover {
    color: var(--text-primary);
    background-color: var(--bg-ui-element);
}

.content-header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-interactive);
    margin-right: auto;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.content-header__logo:hover {
    color: var(--text-interactive-hover);
}

.content-header__logo svg.fox-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.content-header__logo:hover svg.fox-icon {
    transform: rotate(-15deg) scale(1.1);
}

.content-header .search {
    max-width: 650px;
    flex-shrink: 1;
    width: 100%;
    margin-bottom: 0;
}

.search {
    position: relative;
}

.search input {
    width: 100%;
    height: 40px;
    background-color: var(--bg-ui-element);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0 45px 0 20px;
    color: var(--text-primary);
    outline: none;
}

.search button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

.search button:hover {
    color: var(--text-primary);
}


/* === САЙДБАР (ASIDE) === */
.aside__block {
    background-color: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--border-radius);
    /* border: 1px solid var(--border-color); */
}

/* Стили для обычных списков (Жанры и т.д.) */
.aside__block ul li a {
    display: block;
    padding: 8px 10px;
    border-radius: 4px;
    font-weight: 500;
    color: var(--text-secondary);
}

.aside__block ul li a:hover {
    background-color: var(--bg-ui-element);
    color: var(--text-primary);
}

.aside__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    padding: 0 10px;
}

/* === НОВЫЕ СТИЛИ ДЛЯ ГЛАВНОГО МЕНЮ === */
.aside__block--main-menu .aside__title {
    padding-left: 5px;
    /* Небольшая корректировка для заголовка */
}

.aside__block--main-menu ul {
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* Отступ между кнопками меню */
}

.aside__block--main-menu ul li a {
    /* Отменяем и переопределяем старые стили */
    padding: 12px 15px;
    font-size: 15px;
    font-weight: 600;
    /* Делаем шрифт жирнее */
    color: var(--text-primary);
    /* Текст всегда белый */
    background-color: var(--bg-ui-element);
    /* Сразу задаем фон, как у кнопки */
    border-radius: var(--border-radius);
    /* Более скругленные углы */
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.aside__block--main-menu ul li a:hover {
    background-color: var(--text-interactive);
    color: var(--text-primary);
}


/* === СПИСОК ТРЕКОВ === */
.tracks .track {
    display: grid;
    grid-template-columns: 40px 1fr 50px 40px;
    gap: 15px;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.tracks .track:hover {
    background-color: var(--bg-ui-element);
}

.tracks .track:hover .track__play .icon-play {
    color: var(--text-primary);
}

.track__play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.track__play .icon-pause {
    display: none;
}

.track.track__playing .track__play .icon-play {
    display: none;
}

.track.track__playing .track__play .icon-pause {
    display: block;
    color: var(--text-interactive);
}

.track.track__playing {
    background-color: var(--bg-ui-hover);
    box-shadow: inset 3px 0 0 var(--text-interactive);
}

.track.track__playing .track__title-name {
    color: var(--text-interactive);
}

.track__title {
    line-height: 1.3;
}

.track__title-name {
    font-weight: 600;
}

.track__title-artist {
    font-size: 12px;
}

.track__title-artist a,
.track__title-artist span {
    color: var(--text-secondary);
}

.track__title-artist a:hover {
    text-decoration: underline;
    color: var(--text-primary);
}

.track__title-artist a::after,
.track__title-artist span::after {
    content: ", ";
}

.track__title-artist a:last-child::after,
.track__title-artist span:last-child::after {
    display: none;
}

.track__duration {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.track__action .track__download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--text-secondary);
    font-size: 0;
}

.track__action .track__download:hover {
    color: var(--text-primary);
}


/* === FOOTER === */
footer {
    padding: 40px 0;
    text-align: center;
    margin-bottom: 120px;
}

.footer__text,
.footer__text a {
    font-size: 12px;
    color: var(--text-secondary);
}

.footer__text a:hover {
    color: var(--text-primary);
}


/* === ПЛЕЕР === */
.mf-player-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1090;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 5px 0 10px;
}

.mf-player {
    color: var(--text-primary);
}

.mf-player-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
}

.mf-player__track-info {
    text-align: left;
}

.mf-player__title-heading {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mf-player__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.mf-player__button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.mf-player__button:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.mf-player__play,
.mf-player__pause {
    color: var(--text-primary);
}

.mf-player__volumebox {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.mf-player__mute {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    width: 22px;
    height: 22px;
}

.mf-player__mute .icon-volume-muted {
    display: none;
}

.mf-player__mute.muted .icon-volume-muted {
    display: block;
}

.mf-player__mute.muted .icon-volume-high {
    display: none;
}

.mf-player-progress-bar,
.mf-player__volume {
    display: flex;
    align-items: center;
}

.mf-player-progress-bar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.mf-player__progress,
.mf-player__volume {
    --track-bg: #4d4d4d;
    --progress-bg: var(--text-interactive);
    --thumb-size: 12px;
    background: var(--track-bg);
    height: 4px;
    width: 100%;
    border-radius: 2px;
    cursor: pointer;
}

.mf-player__progress>span,
.mf-player__volume>span {
    display: block;
    height: 100%;
    background: var(--progress-bg);
    border-radius: 2px;
}

.mf-player__progress-time {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: center;
}


/* === ОБЩИЕ ЭЛЕМЕНТЫ (Хлебные крошки, кнопки) === */
.mf-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    font-size: 13px;
    color: var(--text-secondary);
}

.mf-breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mf-breadcrumbs li:not(:last-child)::after {
    content: '›';
    font-size: 16px;
    color: var(--text-secondary);
}

.mf-breadcrumbs a {
    color: var(--text-secondary);
}

.mf-breadcrumbs a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.mf-breadcrumbs span {
    color: var(--text-primary);
    font-weight: 500;
}

.mf-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--bg-ui-element);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.mf-btn:hover {
    background-color: var(--bg-ui-hover);
    color: var(--text-primary);
    border-color: var(--text-secondary);
    transform: scale(1.05);
}

/* === СТРАНИЦА ИСПОЛНИТЕЛЯ (ARTIST PAGE) === */
.artist-profile {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.artist-profile__image {
    width: 250px;
    height: 250px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.artist-profile__info h1 {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
}

.artist-profile__tag {
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: block;
}

.mf-artist__section {
    margin-bottom: 50px;
}

.mf-artist__section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    border: none;
}

.mf-artist__more-link {
    margin-top: 30px;
    text-align: center;
}

.mf-artist__albums {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.mf-album {
    background: transparent;
    padding: 0;
    transition: transform 0.2s ease;
}

.mf-album:hover {
    transform: translateY(-5px);
}

.mf-album__image-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.mf-album__image {
    width: 100%;
    padding-bottom: 100%;
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.mf-album__play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mf-album:hover .mf-album__play-overlay {
    opacity: 1;
}

.mf-album__play-overlay svg {
    width: 48px;
    height: 48px;
    color: var(--text-primary);
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.mf-album:hover .mf-album__play-overlay svg {
    transform: scale(1);
}

.mf-album__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.mf-album__year {
    font-size: 13px;
    color: var(--text-secondary);
}

.mf-related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px;
}

.mf-related__artist {
    display: block;
    background-color: var(--bg-ui-element);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.mf-related__artist:hover {
    background-color: var(--bg-ui-hover);
    transform: translateY(-5px);
}

.mf-related__image {
    width: 120px;
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    margin: 0 auto 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.mf-related__name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

/* === СТРАНИЦА ТРЕКА (SONG PAGE) & АЛЬБОМА (ALBUM PAGE) === */
.song-header {
    display: flex;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 40px;
}

.song-header__image {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.song-header__info h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.song-header__artist {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 5px 0 15px 0;
}

.song-header__tag {
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: block;
    font-size: 1rem;
}

.song-header__meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.song-header__meta li:not(:last-child) {
    position: relative;
    padding-right: 20px;
}

.song-header__meta li:not(:last-child)::after {
    content: '•';
    position: absolute;
    right: 0;
    top: 0;
}

.song-player-wrapper {
    margin-bottom: 30px;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.song-player-wrapper .track {
    display: grid;
    grid-template-columns: 40px 1fr 50px 40px;
    gap: 15px;
    align-items: center;
    padding: 0;
}

.song-player-wrapper .track:hover {
    background-color: transparent;
}

.song-page-info {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

.song-lyrics-section,
.song-popular {
    margin-top: 50px;
}

.song-lyrics-section h2,
.song-popular h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.song-lyrics-text {
    white-space: pre-wrap;
    line-height: 0.8;
    color: var(--text-secondary);
    font-size: 14px;
}

/* === СТРАНИЦА ПЛЕЙЛИСТА / СПИСКА ИСПОЛНИТЕЛЕЙ === */
.list-page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.list-page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px;
}

.artist-card {
    background-color: var(--bg-ui-element);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.artist-card:hover {
    background-color: var(--bg-ui-hover);
    transform: translateY(-5px);
}

.artist-card__image {
    width: 140px;
    height: 140px;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.artist-card__name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === ПАГИНАЦИЯ === */
.pagination-wrapper {
    margin-top: 50px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination li {
    margin: 0;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 8px 14px;
    background-color: var(--bg-ui-element);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.2s ease-in-out;
}

.pagination li a:hover {
    background-color: var(--bg-ui-hover);
    color: var(--text-primary);
    border-color: #555;
}

.pagination li.active a {
    background-color: var(--text-interactive);
    color: var(--bg-main);
    border-color: var(--text-interactive);
    font-weight: 700;
}

.pagination li.disabled span {
    background-color: var(--bg-secondary);
    color: #555;
    cursor: not-allowed;
}

.pagination li.prev.disabled span,
.pagination li.next.disabled span {
    background: transparent;
    border-color: transparent;
}


/* === ДИЗАЙН ТОП-ИСПОЛНИТЕЛЕЙ В САЙДБАРЕ === */
.related.related-horizontal {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.related__artist {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease-in-out;
}

.related__artist:hover {
    background-color: var(--bg-ui-hover);
}

.related__artist:hover .related__name {
    color: var(--text-interactive);
}

.related__number {
    font-size: 14px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.related__name {
    flex-grow: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease-in-out;
}

.related__name:hover {
    text-decoration: none;
}


/* === ОВЕРЛЕЙ ДЛЯ САЙДБАРА === */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

body.sidebar-is-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}


/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    main {
        display: block;
        padding: 10px 0;
    }

    main>aside {
        position: fixed;
        top: 0;
        right: -310px;
        left: auto;
        width: 300px;
        height: 100vh;
        z-index: 1100;
        background-color: var(--bg-secondary);
        transition: right 0.3s ease-in-out;
        padding: 20px;
        overflow-y: auto;
        border-left: 1px solid var(--border-color);
        gap: 15px;
        order: 2;
    }

    main>aside.is-open {
        right: 0;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    .aside__block {
        background: none;
        padding: 0;
    }

    .content-header {
        gap: 10px;
        margin-left: -5px;
    }

    .burger-toggle {
        display: block;
    }

    .content-header__logo {
        margin-right: 0;
    }

    .content-header .search {
        flex-grow: 1;
    }

    .tracks .track {
        grid-template-columns: 40px 1fr 40px;
    }

    .track__duration {
        display: none;
    }

    .mf-player-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 10px;
        padding-bottom: 10px;
    }

    .mf-player__track-info {
        text-align: center;
    }

    .mf-player__volumebox {
        display: none;
    }

    footer {
        margin-bottom: 150px;
    }

    /* Адаптивность для страницы артиста */
    .artist-profile {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .artist-profile__image {
        width: 180px;
        height: 180px;
    }

    .artist-profile__info h1 {
        font-size: 3rem;
    }

    /* Адаптивность для страницы трека/альбома */
    .song-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .song-header__image {
        width: 180px;
        height: 180px;
    }

    .song-header__info h1 {
        font-size: 2.2rem;
    }

    .song-header__meta {
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }

    .song-header__meta li:not(:last-child)::after {
        display: none;
    }

    .song-player-wrapper .track {
        grid-template-columns: 40px 1fr 40px;
    }

    .song-player-wrapper .track .track__duration {
        display: none;
    }

    /* Адаптивность для страницы плейлиста */
    .list-page-header h1 {
        font-size: 2.2rem;
    }
}

/* ==========================================================
 * СТИЛИ ДЛЯ ТРЕКОВ В САЙДБАРЕ
 * ========================================================== */
aside .tracks .track {
    grid-template-columns: 40px 1fr;
}

aside .tracks .track__duration,
aside .tracks .track__action {
    display: none;
}

.ya-share2,
.ya-share2 * {
    line-height: normal;
    text-align: center;
    padding: 5px;
}