/* Стили модуля плейлистов в стиле KinoPush-17 */

/* Модальное окно */
.playlist-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.playlist-modal-content {
    background-color: var(--bg);
    margin: 5% auto;
    padding: 30px;
    border: 1px solid var(--bdc);
    width: 90%;
    max-width: 600px;
    color: var(--tt);
}

.playlist-modal-close {
    color: var(--tt-fade);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.playlist-modal-close:hover,
.playlist-modal-close:focus {
    color: var(--tt);
}

.playlist-modal h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--tt);
}

.playlist-modal-anime-title {
    color: var(--tt-fadest);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Список плейлистов в модальном окне */
.playlist-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid var(--bdc);
    padding: 10px;
}

.playlist-item {
    padding: 10px;
    margin-bottom: 5px;
    background: var(--bg-darker);
    transition: background 0.2s;
    cursor: pointer;
}

.playlist-item:hover {
    background: var(--bg-darkest);
}

.playlist-item.in-playlist {
    background: rgba(74, 175, 80, 0.1);
}

.playlist-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.playlist-item input[type="checkbox"] {
    margin-right: 10px;
}

.playlist-title {
    flex: 1;
    color: var(--tt);
}

.playlist-count {
    color: var(--tt-fadest);
    font-size: 12px;
}

.playlist-list .loading,
.playlist-list .empty,
.playlist-list .error {
    text-align: center;
    padding: 20px;
    color: var(--tt-fade);
}

.playlist-list .error {
    color: var(--red);
}

/* Страница плейлистов */
.playlists-page {
    padding: 0;
}

.playlists-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bdc);
}

.playlists-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--tt);
}

/* Форма создания плейлиста */
.playlist-create-form {
    background: var(--bg-darker);
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--bdc);
}

.playlist-create-form h3 {
    margin: 0 0 20px 0;
    color: var(--tt);
    font-size: 18px;
    font-weight: 500;
}

.playlist-create-form input[type="text"],
.playlist-create-form textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    background: var(--bg);
    border: 1px solid var(--bdc);
    color: var(--tt);
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.playlist-create-form input[type="text"]:focus,
.playlist-create-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.playlist-create-form label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--tt);
    cursor: pointer;
}

.playlist-create-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.playlist-create-form button {
    padding: 0 20px;
    height: 40px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.playlist-create-form button:first-of-type {
    background-color: var(--accent-primary);
    color: #fff;
}

.playlist-create-form button:first-of-type:hover {
    opacity: 0.9;
}

.playlist-create-form button:last-of-type {
    background: var(--bg);
    border: 1px solid var(--bdc);
    color: var(--tt);
}

.playlist-create-form button:last-of-type:hover {
    background: var(--bg-darker);
}

/* Сетка плейлистов */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Карточка плейлиста */
.playlist-card {
    padding: 20px;
    border: 1px solid var(--bdc);
    background-color: var(--bg);
    transition: all 0.3s ease;
    position: relative;
}

.playlist-card:hover {
    box-shadow: var(--bsh);
}

.playlist-card h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
}

.playlist-card h3 a {
    color: var(--tt);
    text-decoration: none;
    transition: color 0.3s ease;
}

.playlist-card h3 a:hover {
    color: var(--accent-primary);
}

.playlist-card .description {
    color: var(--tt-fade);
    font-size: 14px;
    margin: 0 0 16px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: var(--tt-fadest);
    padding-top: 16px;
    border-top: 1px solid var(--bdc);
}

.playlist-card .meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Кнопки */
.add-to-playlist-btn,
.btn-edit,
.btn-delete,
.btn-toggle-watched,
.btn-remove {
    padding: 0 20px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
}

.add-to-playlist-btn {
    background-color: var(--accent-primary);
}

.add-to-playlist-btn:hover {
    opacity: 0.9;
}

.btn-edit {
    background-color: var(--blue);
    color: #fff;
}

.btn-edit:hover {
    opacity: 0.9;
}

.btn-delete {
    background-color: var(--red);
    color: #fff;
}

.btn-delete:hover {
    opacity: 0.9;
}

/* Страница просмотра плейлиста */
.playlist-view-page {
    padding: 0;
}

/* Бейдж владельца/гостя */
.playlist-ownership-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid;
    background: var(--bg-darker);
}

.playlist-ownership-badge--owner {
    border-left-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.playlist-ownership-badge--visitor {
    border-left-color: #2196F3;
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.playlist-ownership-badge .badge-icon {
    font-size: 20px;
    filter: grayscale(0);
}

.playlist-ownership-badge .badge-text {
    flex: 1;
}

.playlist-header {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-darker);
    border: 1px solid var(--bdc);
}

.playlist-header h1 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--tt);
}

.playlist-description {
    color: var(--tt-fade);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.playlist-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg);
    border: 2px solid var(--bdc);
    border-radius: 8px;
}

.playlist-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-darker);
    border-radius: 6px;
    border-left: 3px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.playlist-meta-item:hover {
    transform: translateX(5px);
    border-left-color: var(--accent-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.playlist-meta-item .meta-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.playlist-meta-item .meta-label {
    font-size: 13px;
    color: var(--tt-fadest);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.playlist-meta-item .meta-value {
    font-size: 14px;
    color: var(--tt);
    font-weight: 600;
}

.playlist-meta-item .meta-value a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.playlist-meta-item .meta-value a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.playlist-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Элементы плейлиста */
.playlist-items {
    display: grid;
    gap: 20px;
}

.playlist-item-card {
    display: grid;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--bdc);
    background-color: var(--bg);
    transition: all 0.3s ease;
    grid-template-columns: 1fr auto;
    align-items: start;
}

.playlist-item-card:hover {
    box-shadow: var(--bsh);
}

.playlist-item-card.watched {
    opacity: 0.6;
}

.playlist-item-card.watched:hover {
    opacity: 0.8;
}

.playlist-item-content {
    flex: 1;
}

.playlist-item-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
}

.playlist-item-title a {
    color: var(--tt);
    text-decoration: none;
    transition: color 0.3s ease;
}

.playlist-item-title a:hover {
    color: var(--accent-primary);
}

.playlist-item-note {
    color: var(--tt-fade);
    font-size: 14px;
    margin: 0 0 10px 0;
    font-style: italic;
    padding-left: 15px;
    border-left: 3px solid var(--accent-primary);
}

.playlist-item-meta {
    font-size: 13px;
    color: var(--tt-fadest);
}

.playlist-item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-toggle-watched {
    background: var(--bg-darker);
    border: 1px solid var(--bdc);
    color: var(--tt);
    font-size: 12px;
    padding: 0 16px;
    height: 32px;
}

.btn-toggle-watched:hover {
    background: var(--bg-darkest);
}

.btn-remove {
    background: var(--bg-darker);
    border: 1px solid var(--red);
    color: var(--red);
    font-size: 12px;
    padding: 0 16px;
    height: 32px;
}

.btn-remove:hover {
    background: var(--red);
    color: #fff;
}

/* Пустое состояние */
.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--tt-fade);
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Информация о плейлисте для новостей */
.playlist-item-info {
    margin: 15px 0 30px;
    padding: 15px;
    background: var(--bg-darker);
    border-left: 3px solid var(--accent-primary);
    border-radius: 4px;
}

.ple-item--watched {
    opacity: 0.7;
}

.ple-item--watched:hover {
    opacity: 1;
}

.playlist-item-info > div {
    margin-bottom: 10px;
}

.playlist-item-info > div:last-child {
    margin-bottom: 0;
}

.playlist-item-note {
    color: var(--tt);
    font-size: 14px;
    line-height: 1.6;
    background: var(--bg);
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid var(--accent-primary);
    margin-bottom: 12px;
}

.playlist-item-note strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Редактируемая заметка */
.playlist-item-note-edit {
    margin-bottom: 15px;
}

.playlist-item-note-edit label {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.playlist-item-note-edit label strong {
    font-weight: 500;
}

.playlist-note-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--bdc);
    border-radius: 4px;
    color: var(--tt);
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.playlist-note-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.1);
}

.playlist-note-textarea::placeholder {
    color: var(--tt-fadest);
    font-style: italic;
}

.playlist-item-added {
    color: var(--tt-fadest);
    font-size: 13px;
}

.playlist-item-added strong {
    color: var(--tt-fade);
    font-weight: 500;
}

.playlist-item-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.playlist-item-status.watched {
    background: rgba(74, 175, 80, 0.15);
    color: #4CAF50;
}

.playlist-item-status.not-watched {
    background: rgba(158, 158, 158, 0.15);
    color: var(--tt-fadest);
}

.playlist-item-info .playlist-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--bdc);
    flex-wrap: wrap;
}

.playlist-item-info .btn {
    padding: 0 16px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-decoration: none;
}

.playlist-item-info .btn-toggle-watched {
    background: var(--bg);
    border: 1px solid var(--bdc);
    color: var(--tt);
}

.playlist-item-info .btn-toggle-watched:hover {
    background: var(--bg-darkest);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.playlist-item-info .btn-remove {
    background: transparent;
    border: 1px solid var(--red);
    color: var(--red);
}

.playlist-item-info .btn-remove:hover {
    background: var(--red);
    color: #fff;
}

/* Модальное окно для заметок */
.playlist-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-modal-content {
    background: var(--bg);
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.playlist-modal-content h3 {
    margin: 0;
    padding: 20px 50px 20px 20px;
    border-bottom: 1px solid var(--bdc);
    color: var(--tt);
    font-size: 18px;
}

.playlist-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: var(--tt-fade);
    cursor: pointer;
    transition: color 0.3s;
}

.playlist-modal-close:hover {
    color: var(--accent-primary);
}

.playlist-modal-body {
    padding: 20px;
}

.playlist-modal-body .playlist-note-textarea {
    width: 100%;
    min-height: 150px;
    margin-bottom: 15px;
}

.playlist-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlist-modal-actions .btn-playlist {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0 20px;
    height: 40px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-transform: none;
    white-space: nowrap;
}

.playlist-modal-actions .btn-save-note {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.playlist-modal-actions .btn-save-note:hover {
    opacity: 0.9;
}

.playlist-modal-actions .btn-cancel {
    background: var(--bg-darker);
    color: var(--tt);
    border-color: var(--bdc);
}

.playlist-modal-actions .btn-cancel:hover {
    background: var(--bg-darkest);
}

.playlist-modal-danger {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--bdc);
}

.playlist-modal-danger .btn-remove-modal {
    width: 100%;
    padding: 0 20px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--red);
    color: var(--red);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.playlist-modal-danger .btn-remove-modal:hover {
    background: var(--red);
    color: #fff;
}

/* Поля формы редактирования плейлиста */
.playlist-input,
.playlist-textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: var(--bg);
    border: 1px solid var(--bdc);
    border-radius: 4px;
    color: var(--tt);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.playlist-input:focus,
.playlist-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.1);
}

.playlist-textarea {
    min-height: 120px;
    resize: vertical;
}

.playlist-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    user-select: none;
}

.playlist-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Загрузка изображения плейлиста */
.playlist-image-upload {
    margin-bottom: 20px;
}

.playlist-image-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--tt);
}

.playlist-image-preview {
    position: relative;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--bdc);
}

.playlist-image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.playlist-image-preview .btn-delete-image {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.playlist-image-preview .btn-delete-image:hover {
    background: var(--red);
}

.playlist-image-upload-box {
    position: relative;
}

.playlist-image-upload-box input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.playlist-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: var(--bg-darker);
    border: 2px dashed var(--bdc);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--tt);
}

.playlist-upload-label:hover {
    border-color: var(--accent-primary);
    background: var(--bg);
}

.playlist-upload-label .upload-icon {
    font-size: 24px;
}

/* Изображение в карточке плейлиста (профиль) */
.playlist-image-thumb {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 15px;
    background: var(--bg-darker);
}

.playlist-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Заглушка для плейлистов без изображения */
.playlist-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-darkest) 100%);
    border: 2px dashed var(--bdc);
}

.playlist-image-placeholder .placeholder-icon {
    font-size: 48px;
    opacity: 0.3;
}

/* Изображение в заголовке плейлиста (страница просмотра) */
.playlist-header-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.playlist-header-info {
    flex: 1;
}

.playlist-header-image {
    width: 300px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--bdc);
}

.playlist-header-image img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .playlist-header-content {
        flex-direction: column;
    }

    .playlist-header-image {
        width: 100%;
    }

    .playlist-image-thumb {
        height: 120px;
    }
}

/* Бейдж статуса просмотра */
.playlist-watched-badge {
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Меняем фон родительской кнопки для просмотренных */
a:has(.playlist-watched-badge.watched) {
    background: #4CAF50;
    color: #fff;
}

/* Эффект при наведении на просмотренные */
a:has(.playlist-watched-badge.watched):hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

/* Эффект при наведении на не просмотренные */
a:has(.playlist-watched-badge.not-watched):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* Кнопка заметки */
.card__btn-note {
    background: var(--accent-secondary, #f39c12) !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card__btn-note:hover {
    opacity: 0.9;
}

/* Адаптивность */
@media (max-width: 768px) {
    .playlists-grid {
        grid-template-columns: 1fr;
    }

    .playlists-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .playlists-header h1 {
        font-size: 24px;
    }

    .playlist-header h1 {
        font-size: 22px;
    }

    .playlist-item-card {
        grid-template-columns: 1fr;
    }

    .playlist-item-actions {
        flex-direction: row;
        width: 100%;
    }

    .playlist-item-actions button {
        flex: 1;
    }
}

/* Секция плейлистов в профиле пользователя */
.user-playlists-section {
    margin-top: 30px;
    padding: 25px;
    background: var(--bg);
    border: 1px solid var(--bdc);
    border-radius: 4px;
}

.playlists-header-profile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-primary);
    gap: 15px;
    flex-wrap: wrap;
}

.playlists-header-profile h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--tt);
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlists-header-profile h3::before {
    content: '📋';
    font-size: 24px;
}

/* Контейнер плейлистов */
.user-playlists {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Ссылка-обертка для карточки плейлиста */
.playlist-item-small-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Карточка плейлиста в профиле */
.playlist-item-small {
    background: var(--bg-darker);
    border: 1px solid var(--bdc);
    padding: 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.playlist-item-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.playlist-item-small-link:hover .playlist-item-small {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
}

.playlist-item-small-link:hover .playlist-item-small::before {
    transform: scaleY(1);
}

.playlist-item-small h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--tt);
    transition: color 0.3s ease;
}

.playlist-item-small-link:hover h4 {
    color: var(--accent-primary);
}

.playlist-item-small p {
    margin: 0 0 15px 0;
    color: var(--tt-fade);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.playlist-item-small .playlist-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--bdc);
    font-size: 13px;
    color: var(--tt-fadest);
    gap: 10px;
}

.playlist-item-small .playlist-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.playlist-item-small .playlist-meta span:first-child::before {
    content: '🎬';
    font-size: 14px;
}

.playlist-item-small .playlist-meta span:last-child {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Статусы плейлистов */
.playlist-item-small .playlist-meta .status-public {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
}

.playlist-item-small .playlist-meta .status-private {
    background: rgba(255, 152, 0, 0.15);
    color: #FF9800;
}

/* Пустое состояние */
.user-playlists-section [no-playlists] p {
    text-align: center;
    padding: 40px 20px;
    color: var(--tt-fade);
    font-size: 15px;
    background: var(--bg-darker);
    border: 2px dashed var(--bdc);
    border-radius: 4px;
    margin: 0;
}

.user-playlists-section [no-playlists] p::before {
    content: '📭';
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .user-playlists {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }

    .user-playlists-section {
        padding: 20px 15px;
    }

    .user-playlists-section h3 {
        font-size: 20px;
    }
}

@media (max-width: 470px) {
    .playlists-grid {
        gap: 0;
    }

    .playlist-card {
        margin: 0 var(--indent-negative);
        border-left: 0;
        border-right: 0;
    }

    .playlist-card:not(:last-child) {
        border-bottom: 0;
    }

    .playlist-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .playlist-modal-content h3 {
        font-size: 16px;
        padding: 15px 40px 15px 15px;
    }

    .playlist-modal-body {
        padding: 15px;
    }

    .playlist-modal-actions {
        flex-direction: column;
    }

    .playlist-watched-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .user-playlists {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .user-playlists-section {
        margin: 15px var(--indent-negative) 0;
        padding: 15px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .playlist-item-small {
        padding: 15px;
    }
}

/* ================================================
   ТОПОВЫЕ ПЛЕЙЛИСТЫ (Top Playlists Widget)
   ================================================ */

.top-playlist-item {
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.top-playlist-item:hover {
    transform: translateY(-3px);
}

.top-playlist-link {
    display: block;
    background: var(--bg-darker);
    border: 1px solid var(--bdc);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--tt);
    transition: all 0.3s ease;
}

.top-playlist-link:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.top-playlist-poster {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg);
}

.top-playlist-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.top-playlist-link:hover .top-playlist-poster img {
    transform: scale(1.05);
}

.top-playlist-poster--no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-darker) 100%);
}

.top-playlist-no-image-icon {
    font-size: 60px;
    opacity: 0.3;
    filter: grayscale(100%);
}

.top-playlist-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.top-playlist-items-count,
.top-playlist-views {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-playlist-info {
    padding: 15px;
}

.top-playlist-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--tt);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.top-playlist-description {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: var(--tt-fade);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.top-playlist-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.top-playlist-author {
    color: var(--tt-fadest);
}

.top-playlist-author a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.top-playlist-author a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Контейнер для топовых плейлистов (опциональный) */
.top-playlists-container {
    margin-bottom: 30px;
}

.top-playlists-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tt);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-primary);
}

/* Адаптивность для топовых плейлистов */
@media (max-width: 768px) {
    .top-playlist-poster {
        height: 150px;
    }

    .top-playlist-title {
        font-size: 15px;
    }

    .top-playlist-description {
        font-size: 12px;
    }
}
