/* Кнопка для открытия/закрытия виджета */
#csl-toggle {
    background-color: var(--main-accent-color);
    border: none;
    color: white;
    padding: 10px;
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    cursor: pointer;
    z-index: 10000; /* Убедитесь, что кнопка будет поверх панели */
    border-radius: 5px 0 0 5px;
    font-weight: bold;
    animation: csl-pulse 3s infinite; /* Добавляем мягкую анимацию */
    transition: background-color 0.3s ease, right 0.5s ease; /* Плавное изменение цвета и перемещение */
}

/* Основная панель (контейнер) */
#csl-sidebar {
    position: fixed;
    right: -300px; /* Начальное положение панели — скрыто за экраном */
    top: 10%; /* Позиционируем от верхней части экрана */
    max-height: 80vh; /* Ограничиваем максимальную высоту панели */
    width: 300px;
    z-index: 9999; /* Панель будет под кнопкой */
    overflow-y: auto; /* Прокрутка, если слишком много ссылок */
    transition: right 0.5s ease; /* Плавное перемещение панели */
    background-color: #1a1a1a; /* Фон панели */
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5); /* Тень для панели */
}

/* Когда виджет открыт */
#csl-sidebar.open {
    right: 0; /* Панель появляется плавно */
}

/* Список ссылок */
#csl-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}



/* Анимация для мягкого перелива */
@keyframes csl-pulse {
    0% {
        background-color: var(--main-accent-color); /* Начальный цвет */
    }
    50% {
        background-color: rgba(0, 0, 0, 0.99); /* Легкий светлый перелив */
    }
    100% {
        background-color: var(--main-accent-color); /* Возврат к исходному цвету */
    }
}



/* Плавное перемещение кнопки вместе с виджетом */
#csl-toggle.open {
    right: 300px; /* Кнопка двигается вместе с панелью */
}


/* Стили для списка ссылок */
#csl-links-list li {
    list-style: none;
    padding: 10px;
    border-bottom: 1px solid #000000;
    text-align: center;
}

/* Ссылка */
#csl-links-list a {
    text-decoration: none;
    color: white;
    display: block;
    transition: background-color 0.3s ease, transform 0.3s ease;
    outline: none;
    position: relative;
    overflow: hidden;
}

/* Ссылка при наведении */
#csl-links-list a:hover {
    background-color: #333;
}

/* Изображение постера во всю ширину */
#csl-links-list img {
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Название ссылки под постером */
#csl-links-list .title {
    font-size: 16px;
    font-weight: bold;
    color: white;
    text-align: center;
    margin-top: 5px;
}

/* Эффект размытия изображения при наведении */
#csl-links-list a:hover img {
    filter: blur(5px);
    transform: scale(1.1);
}

/* Мобильная версия */
@media only screen and (max-width: 768px) {
    #csl-sidebar {
        top: 22%;
        max-height: 60vh;
    }

    #csl-toggle {
        right: 0;
    }

    #csl-links-list {
        top: auto;
    }
}
