* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --background-base: #000000;
    --background-elevated-base: #121212;
    --background-tinted-base: rgba(255, 255, 255, 0.1);
    --text-base: #ffffff;
    --text-subdued: #b3b3b3;
    --essential-base: #ffffff;
    --decorative-base: #ffffff;
    --background-highlight: rgba(255, 255, 255, 0.1);
    --text-bright-accent: #1ed760;
    --essential-bright-accent: #1ed760;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-base);
    color: var(--text-base);
    overflow: hidden;
}
/* Основной контейнер */
.main-container {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100vh;
}
/* Шапка сайта */
.global-nav-bar {
    background-color: var(--background-base);
    padding: 8px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    width: 131px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
}
.logo svg {
    width: 100%;
    height: 100%;
    fill: var(--decorative-base);
}
/* Контейнер поиска (в шапке) */
.search-container {
    flex: 1;
    max-width: 546px;           /* ← основное изменение — увеличиваем максимальную ширину */
    margin: 0 16px;
    display: flex;
    align-items: center;
}

.search-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

/* Кнопка "Главная" слева */
.home-button {
    background: #242424;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.home-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.home-icon {
    width: 24px;
    height: 24px;
    fill: var(--text-subdued);
}

.home-button:hover .home-icon {
    fill: var(--text-base);
}

/* Форма поиска — основной контейнер, который и будет подсвечиваться */
.search-form {
    position: relative;
    width: 100%;
    height: 48px;                      /* точная высота всего поля */
    display: flex;
    align-items: center;
    background-color: #242424;
    border-radius: 500px;
    overflow: hidden;
    transition: all 0.18s ease;
}

/* Подсветка при фокусе — только внешняя рамка вокруг всей формы */
.search-form:focus-within {
    background-color: #2a2a2a;
    box-shadow: 0 0 0 2px #ffffff;
}

/* Само поле ввода — полностью прозрачное и без собственных стилей обводки/фона */
.search-input {
    flex: 1;                           /* занимает всё доступное место */
    height: 100%;                      /* ровно 48px, без отступов сверху/снизу */
    padding: 0 16px 0 8px;             /* слева меньше (под иконку), справа больше (под крестик) */
    background: transparent;            /* фон берётся от родителя */
    border: none;
    border-radius: 0;                  /* убираем собственное скругление */
    color: var(--text-base);
    font-size: 16px;                   /* современный размер, как в Spotify */
    outline: none;                     /* убираем стандартную обводку браузера */
}

/* Placeholder */
.search-input::placeholder {
    color: var(--text-subdued);
    font-size: 16px;
    opacity: 1;
}

/* При фокусе на input — никаких дополнительных обводок */
.search-input:focus {
    outline: none;
    box-shadow: none;
}


/* Иконка поиска (слева, всегда видна) */
.search-icon-btn {
    background: none;
    border: none;
    padding: 0 12px;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.search-icon {
    width: 24px;
    height: 24px;
    fill: var(--text-subdued);
}



/* Кнопка очистки (справа) */
.clear-btn {
    background: none;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.clear-btn:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.clear-icon {
    width: 16px;
    height: 16px;
    fill: var(--text-subdued);
}

.clear-btn:hover .clear-icon {
    fill: var(--text-base);
}

/* Скрываем крестик по умолчанию */
.hidden {
    display: none !important;
}

.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-right: 8px;
}
.icon-btn {
    background: none;
    border: none;
    color: var(--text-subdued);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-base);
}
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ff6437;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #000;
    cursor: pointer;
}
/* Средний контейнер с сайдбарами */
.content-wrapper {
    display: flex;
    height: calc(100vh - 64px - 90px);
    overflow: hidden;
}
.left-sidebar {
    width: 82px;
    min-width: 72px;
    background-color: var(--background-elevated-base);
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    margin: 0 0 0 8px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    user-select: none;
    scrollbar-gutter: unset;
}

/* Верхняя кнопка "Медиатека" */
.sidebar-header {
    padding: 8px 8px 12px;
    display: flex;
    justify-content: center;
    box-shadow: 0 2px 4px rgb(0 0 0 / 69%);
}
.library-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    width: 48px;           /* чуть уменьшили для баланса */
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.library-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.library-btn:active {
    transform: scale(0.96);
}

.icon-lg {
    width: 28px;
    height: 28px;
    fill: var(--text-base);
}

.library-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    
    /* Отступы: слева и справа симметрично, но с запасом под скроллбар */
    padding: 0 8px 8px 8px;            /* 8px со всех сторон — контент центрируется */
    
    /* Компенсация не нужна, если используем overlay правильно */
    margin: 0;
    
    overflow-x: hidden;                /* ← УБИРАЕТ горизонтальный скролл навсегда */
    overflow-y: overlay;               /* overlay — скроллбар поверх, не занимает место */
    -webkit-overflow-scrolling: touch;
}

/* Для Firefox */
.library-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

/* Для Chrome / Edge / Safari */
.library-content::-webkit-scrollbar {
    width: 6px;                    /* очень тонкий */
    height: 6px;
}

.library-content::-webkit-scrollbar-track {
    background: transparent;       /* полностью прозрачный трек */
    margin-block: 4px;             /* небольшие отступы сверху/снизу */
}

.library-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);   /* почти невидимый в покое */
    border-radius: 3px;
    border: none;
}

.library-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);   /* заметнее при наведении */
}

/* Опционально: показываем скроллбар только при наведении на весь сайдбар */
.left-sidebar:hover .library-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.38);
}

.library-item {
    width: 64px;                 /* ← контейнер 64×64 */
    height: 64px;
    border-radius: 8px;          /* чуть большее скругление выглядит современнее */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin: 0 auto;              /* центрирование внутри 72px */
    display: flex;
    align-items: center;
    justify-content: center;
}

.library-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Сама картинка внутри — 48×48 */
.library-item-image {
    width: 48px;                 /* ← картинка 48×48 */
    height: 48px;
    object-fit: cover;
    display: block;
    border-radius: inherit;      /* наследует скругление от контейнера */
}


/* Для артистов — круглые аватарки */
.library-item-image.artist {
    border-radius: 50%;
}

.library-item-info {
    flex: 1;
    min-width: 0;
}
.library-item-title {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-base);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.library-item-subtitle {
    font-size: 14px;
    color: var(--text-subdued);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 4px;
}
/* Основной контент */
.main-content {
    flex: 1;
    position: relative;
    background: linear-gradient(to bottom, #1E1E1E 0%, #121212 300px);
    overflow-y: auto;
    padding: 16px 0;
    margin-left: 8px;
    margin-right: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-content.is-detail-view {
    padding: 0;
    overflow: hidden;
}
.main-view-inner {
    display: block;
    height: 100%;
}
.main-view-inner[hidden] {
    display: none !important;
}
.detail-view {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.contentSpacing {
    padding: 0 24px;
}
.content-spacing {
    max-width: 1955px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Вид альбома/плейлиста/исполнителя (детальный) */
.detail-view .detail-view-scroll {
    overflow-y: auto;
    height: 100%;
    padding-bottom: 24px;
}
.detail-hero {
    position: relative;
    padding: 24px 0 24px;
    margin-bottom: 0;
}
.detail-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
}
.detail-hero-content {
    position: relative;
    z-index: 1;
}
.detail-hero-top {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.detail-hero-image-wrap {
    position: relative;
    width: 232px;
    height: 232px;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.detail-hero-cover-edit {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}
.detail-hero-image-wrap:hover .detail-hero-cover-edit {
    opacity: 1;
}
.detail-hero-cover-edit:hover {
    background: rgba(0,0,0,0.8);
}
.detail-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.detail-hero-image-wrap .detail-hero-image.artist {
    border-radius: 50%;
}
.detail-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}
.detail-type-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-base);
}
.detail-title {
    font-size: clamp(2rem, 6vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text-base);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.detail-subtitle {
    font-size: 14px;
    color: var(--text-subdued);
}
.detail-meta {
    font-size: 14px;
    color: var(--text-subdued);
}
.detail-action-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
}

.detail-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--essential-bright-accent);
    border: none;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.detail-play-btn:hover {
    background: #1fdf64;
    transform: scale(1.04);
}

.detail-play-btn svg {
    width: 24px;
    height: 24px;
    margin-left: 2px;
}
.detail-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-subdued);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.detail-icon-btn:hover {
    color: var(--text-base);
    background: rgba(255, 255, 255, 0.08);  /* более мягкий hover */
}

.detail-icon-btn svg {
    width: 32px;            /* ← иконки стали крупнее */
    height: 32px;
}

/* Для shuffle иногда делают акцент, когда включено */
.detail-icon-btn.shuffle-btn[aria-pressed="true"],
.detail-icon-btn.shuffle-btn.active {
    color: var(--essential-bright-accent);
}

/* ——— Треклист (как в Spotify): одна сетка, ровные колонки, 56px строки ——— */
.detail-tracklist {
    padding-top: 8px;
    --row-height: 56px;
    --index-width: 28px;
    --grid-cols: [index] var(--index-width) [first] minmax(180px, 4fr) [var1] minmax(120px, 2fr) [var2] minmax(120px, 2fr) [last] minmax(120px, 1fr);
}

.tracklist-header {
    display: grid;
    grid-template-columns: var(--grid-cols);
    gap: 16px;
    padding: 0 16px;
    height: var(--row-height);
    min-height: 36px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-subdued);
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    user-select: none;
    margin-bottom: 16px;
}

.tracklist-col {
    display: flex;
    align-items: center;
    position: relative;
    min-width: 0;
}

.tracklist-col-index {
    justify-content: center;
    font-weight: 400;
}
.tracklist-col-title {
    flex: 1;
    min-width: 0;
}
.tracklist-col-duration {
    justify-content: flex-end;
    padding-right: 8px;
}

.column-header-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: default;
}
.tracklist-header-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Иконка часов ровно над колонкой «длительность» (как в строках: сердечко | время | троеточие) */
.duration-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.duration-header::before,
.duration-header::after {
    content: '';
    width: 36px;
    height: 16px;
    flex-shrink: 0;
}

.duration-header svg {
    flex-shrink: 0;
}

.column-resizer {
    position: absolute;
    right: -8px;
    top: 0;
    bottom: 0;
    width: 16px;
    cursor: col-resize;
    z-index: 2;
    background: transparent;
}

.column-resizer:hover,
.column-resizer:active {
    background: rgba(255, 255, 255, 0.15);
}

.tracklist-col:hover .tracklist-header-text {
    color: var(--text-base);
}

.tracklist-col-duration .column-header-inner svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tracklist-rows {
    padding: 0;
}

/* Строка трека — та же сетка, что и заголовок */
.tracklist-row {
    display: grid;
    grid-template-columns: var(--grid-cols);
    gap: 16px;
    align-items: center;
    height: var(--row-height);
    min-height: var(--row-height);
    padding: 0 16px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-base);
    transition: background 0.15s;
    min-width: 0;
}

.tracklist-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Столбец №1: индекс + кнопка Play */
.tracklist-row .track-index-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
    position: relative;
}

.tracklist-row .track-index-cell .track-num {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-subdued);
}

.tracklist-row:hover .track-index-cell .track-num {
    display: none;
}

.tracklist-row .track-index-cell .track-play-btn {
    display: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-base);
    align-items: center;
    justify-content: center;
}

.tracklist-row:hover .track-index-cell .track-play-btn {
    display: flex;
}

.tracklist-row .track-index-cell .track-play-btn svg {
    width: 24px;
    height: 24px;
}

/* Столбец №2: обложка + название + исполнитель */
.tracklist-row .track-title-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tracklist-row .track-title-cell .track-cover {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.tracklist-row .track-title-cell .track-info-wrap {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
}

.tracklist-row .track-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-base);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tracklist-row .track-name a {
    color: inherit;
    text-decoration: none;
}

.tracklist-row .track-name a:hover {
    text-decoration: underline;
}

.tracklist-row .track-artist-cell {
    font-size: 14px;
    color: var(--text-subdued);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tracklist-row .track-artist-cell a {
    color: inherit;
    text-decoration: none;
}

.tracklist-row .track-artist-cell a:hover {
    text-decoration: underline;
    color: var(--text-base);
}

/* Столбцы альбом и дата */
.tracklist-row .track-album-cell,
.tracklist-row .track-date-cell {
    font-size: 14px;
    color: var(--text-subdued);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.tracklist-row .track-album-cell a {
    color: inherit;
    text-decoration: none;
}

.tracklist-row .track-album-cell a:hover {
    text-decoration: underline;
    color: var(--text-base);
}

/* Столбец длительность: сердечко + время + меню */
.tracklist-row .track-duration-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-right: 8px;
}

.tracklist-row .track-duration-cell .track-duration-btn {
    background: none;
    border: none;
    color: var(--text-subdued);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.tracklist-row:hover .track-duration-cell .track-duration-btn {
    opacity: 1;
}

.tracklist-row .track-duration-cell .track-duration-btn:hover {
    color: var(--text-base);
}

.tracklist-row .track-duration-cell .track-duration-btn svg,
.tracklist-row .track-duration-cell .track-more-btn svg {
    width: 16px;
    height: 16px;
}

.tracklist-row .track-duration-cell .track-duration-text {
    font-size: 14px;
    color: var(--text-subdued);
    min-width: 40px;
    text-align: right;
}

.tracklist-row .track-duration-cell .track-more-btn {
    background: none;
    border: none;
    color: var(--text-subdued);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.tracklist-row:hover .track-duration-cell .track-more-btn {
    opacity: 1;
}

.tracklist-row .track-duration-cell .track-more-btn:hover {
    color: var(--text-base);
}
/* Фильтры */
.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.filter-chip {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 16px;
    border-radius: 500px;
    color: var(--text-base);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.filter-chip.active {
    background-color: var(--text-base);
    color: #000;
}
.filter-chip:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
/* Секции с каруселями */
.section {
    margin-bottom: 40px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-create-playlist-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-subdued);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.section-create-playlist-btn:hover {
    color: var(--text-base);
    background-color: rgba(255, 255, 255, 0.1);
}

.create-playlist-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-playlist-field-wrap {
    display: flex;
    align-items: center;
    height: 32px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    width: 0;
    opacity: 0;
    transition: width 0.25s ease, opacity 0.2s ease;
}

.create-playlist-inline.is-open .create-playlist-field-wrap {
    width: 220px;
    opacity: 1;
}

.create-playlist-field-wrap:focus-within {
    background: rgba(255, 255, 255, 0.12);
}

.create-playlist-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 12px 0 12px;
    border: none;
    background: transparent;
    color: var(--text-base);
    font-size: 14px;
}

.create-playlist-input::placeholder {
    color: var(--text-subdued);
}

.create-playlist-input:focus {
    outline: none;
}

.create-playlist-confirm-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-subdued);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, color 0.15s ease;
}

.create-playlist-inline.has-text .create-playlist-confirm-btn {
    opacity: 1;
    pointer-events: auto;
}

.create-playlist-confirm-btn:hover {
    color: var(--text-base);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
}
.section-title a {
    color: var(--text-base);
    text-decoration: none;
}
.section-title a:hover {
    text-decoration: underline;
}
.see-all {
    color: var(--text-subdued);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}
.see-all:hover {
    text-decoration: underline;
    color: var(--text-base);
}
/* Карусель: одна линия, листать влево/вправо как в оригинале */
.carousel-wrapper {
    position: relative;
    margin: 0 -24px;
    padding: 0 0 0 24px;
    overflow-x: hidden;
}

.carousel {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.carousel .card {
    flex: 0 0 200px;
    min-width: 200px;
    max-width: 200px;
    width: 200px;
    min-height: 250px;
    height: auto;
    padding: 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.carousel .card .card-image-wrapper {
    width: 100%;
    height: 176px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.carousel .card .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel .card .card-image.artist {
    border-radius: 50%;
}

/* Обложка плейлиста без картинки — цветной квадрат (как в оригинале) */
.carousel .card .card-cover-color {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.carousel .card .card-title {
    flex-shrink: 0;
    margin-bottom: 4px;
}

.carousel .card .card-subtitle {
    flex-shrink: 0;
    -webkit-line-clamp: 2;
}

/* Кнопки карусели: чёрные, при наведении чуть светлее */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    z-index: 3;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.carousel-wrapper:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: translateY(-50%) scale(1.05);
}

.carousel-arrow:disabled,
.carousel-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

.carousel-arrow-left {
    left: 0;
}

.carousel-arrow-right {
    right: 0;
}

.carousel-arrow svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.card {
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
}
.card:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.card:hover .play-button {
    opacity: 1;
    transform: translateY(0);
}
.card-image-wrapper {
    position: relative;
    margin-bottom: 16px;
}
.card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}
.card-image.artist {
    border-radius: 50%;
}
.play-button {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 48px;
    height: 48px;
    background-color: #1ed760;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s;
    box-shadow: 0 8px 8px rgba(0, 0, 0, 0.3);
}
.play-button:hover {
    background-color: #1fdf64;
}
.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.card-subtitle {
    font-size: 14px;
    color: var(--text-subdued);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* Правая панель */
.right-sidebar {
    width: 420px;
    background-color: var(--background-elevated-base);
    overflow-y: auto;
    padding: 16px;
    margin: 0px 8px 0 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.now-playing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.now-playing-title {
    font-size: 14px;
    font-weight: 700;
}
.now-playing-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    margin-bottom: 16px;
}
.track-info {
    margin-bottom: 16px;
}
.track-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}
.track-artist {
    font-size: 14px;
    color: var(--text-subdued);
}
.track-artist a {
    color: var(--text-subdued);
    text-decoration: none;
}
.track-artist a:hover {
    text-decoration: underline;
    color: var(--text-base);
}
.track-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.artist-bio {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8)), url('https://i.scdn.co/image/ab6761670000ecd41b4c375cda876c45da8b84e7');
    background-size: cover;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}
.artist-bio:hover {
    transform: scale(1.02);
}
.bio-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}
.artist-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}
.artist-listeners {
    font-size: 12px;
    color: var(--text-subdued);
    margin-bottom: 8px;
}
.artist-description {
    font-size: 12px;
    color: var(--text-subdued);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}
/* Плеер (футер) */
.player-bar {
    background-color: var(--background-base);
    padding: 16px 24px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 16px;
    align-items: center;
    height: 90px;
}
.player-track-info {
    display: flex;
    gap: 12px;
    align-items: center;
}
.player-cover {
    width: 56px;
    height: 56px;
    border-radius: 4px;
}
.player-details {
    flex: 1;
    min-width: 0;
}
.player-track-title {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player-track-title a {
    color: var(--text-base);
    text-decoration: none;
}
.player-track-title a:hover {
    text-decoration: underline;
}
.player-track-artist {
    font-size: 11px;
    color: var(--text-subdued);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player-track-artist a {
    color: var(--text-subdued);
    text-decoration: none;
}
.player-track-artist a:hover {
    text-decoration: underline;
    color: var(--text-base);
}
.player-like-btn {
    background: none;
    border: none;
    color: var(--text-subdued);
    cursor: pointer;
    padding: 8px;
}
.player-like-btn:hover {
    color: var(--text-base);
}
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.player-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
}
.player-btn {
    background: none;
    border: none;
    color: var(--text-subdued);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-btn:hover {
    color: #ffffff;
}

.player-btn-play {
    width: 32px;
    height: 32px;
    background-color: var(--text-base);
    border-radius: 50%;
    color: #000;
}
.player-btn-play:hover {
    color: #000;
    background-color: #e0e0e0;
}
.player-progress {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    max-width: 722px;
}
.player-time {
    font-size: 11px;
    color: var(--text-subdued);
    min-width: 40px;
    text-align: center;
}
.progress-bar {
    flex: 1;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}
.progress-bar:hover .progress-fill::after {
    opacity: 1;
}
.progress-fill {
    height: 100%;
    background-color: var(--text-base);
    border-radius: 2px;
    width: 0%;
    position: relative;
}
.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--text-base);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}
.player-extra {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}
.volume-control {
    display: flex;
    gap: 8px;
    align-items: center;
}
.volume-bar {
    width: 93px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}
.volume-fill {
    height: 100%;
    background-color: var(--text-base);
    border-radius: 2px;
    width: 100%;
}
/* Скроллбары */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
/* SVG иконки */
.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.icon-lg {
    width: 24px;
    height: 24px;
}
.icon-sm {
    width: 12px;
    height: 12px;
}
/* Адаптация для overflow */
.main-content::-webkit-scrollbar {
    width: 16px;
}
.right-sidebar::-webkit-scrollbar {
    width: 12px;
}
.library-content::-webkit-scrollbar {
    width: 8px;
}