* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #080808;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ДЕСКТОПНЫЕ СТИЛИ */
@media (min-width: 1025px) {
    html, body {
        overflow: hidden;
    }

    .video-container {
        position: relative;
        width: 100vw;
        height: 91vh;
        background: #000;
    }

    .video-frame {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
        background: #000;
    }

    .video-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.3);
        font-size: 24px;
        z-index: 1;
    }

    .control-panel {
        top: 0;
        left: 0;
        right: 0;
        z-index: 10;
        background: rgb(0 0 0);
        backdrop-filter: blur(8px);
        padding: 12px 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: opacity 0.3s ease;
    }

    .mobile-content,
    .mobile-bottom-nav {
        display: none;
    }
}

/* МОБИЛЬНЫЕ СТИЛИ */
@media (max-width: 1024px) {
    html, body {
        overflow: visible;
        height: auto;
        min-height: 100vh;
        position: relative;
        font-size: 14px;
    }

    body {
        background: #000;
        touch-action: pan-y;
    }

    .video-container {
        display: block;
        width: 100%;
        min-height: 100vh;
        background: #000;
        position: relative;
        overflow: visible;
    }

    .video-frame {
        position: relative;
        width: 100%;
        height: 220px;
        border: none;
        background: #000;
        display: block;
    }

    .video-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 220px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.3);
        font-size: 20px;
        z-index: 1;
    }

    .control-panel {
        display: none;
    }

    .episodes-panel {
        display: none;
    }

    .mobile-content {
        display: block;
        width: 100%;
        min-height: calc(100vh - 220px);
        background: #000;
        position: relative;
    }

    .mobile-bottom-nav {
        display: flex;
        position: sticky;
        bottom: 0;
        width: 100%;
        z-index: 20;
    }

    /* УДАЛЕНЫ КНОПКИ ЛАЙКОВ И ПОДЕЛИТЬСЯ ИЗ CSS, так как они полностью удалены из HTML для мобильной версии */
    .rating-buttons, .share-btn {
        display: none !important;
    }

    /* ДОБАВЛЕННЫЕ СТИЛИ ДЛЯ КНОПОК ДЕЙСТВИЙ В МОБИЛЬНОЙ ВЕРСИИ */
    .mobile-episode-item {
        position: relative;
        /* Увеличиваем правый отступ для размещения кнопок действий */
        padding-right: 90px;
        display: flex; /* Делаем элемент флекс-контейнером */
        align-items: center; /* Выравниваем элементы по центру по вертикали */
    }

    .mobile-episode-content {
        flex: 1;
        margin-right: 10px; /* Отступ между контентом и кнопками */
    }

    .mobile-action-button {
        background: none;
        border: none;
        color: #888;
        cursor: pointer;
        padding: 5px;
        margin-left: 5px; /* Отступ между кнопками */
        transition: color 0.2s ease, transform 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0; /* Предотвращаем сжатие кнопок */
    }

    .mobile-action-button:hover {
        color: white;
        transform: scale(1.1);
    }

    .mobile-action-button svg {
        width: 18px;
        height: 18px;
    }

    /* Стили для закрепленного эпизода */
    .mobile-episode-item.pinned {
        background: #1a1a1a; /* Немного другой фон для закрепленного эпизода */
        border-top: 2px solid #4a90e2; /* Подсветка верхней границы */
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 1024px) and (orientation: landscape) {
    .video-frame {
        height: 160px;
    }
    
    .video-background {
        height: 160px;
    }
    
    .mobile-content {
        min-height: calc(100vh - 160px);
    }
    
    .mobile-next-episode {
        padding: 6px 10px;
    }
    
    .anime-info {
        padding: 6px 10px;
    }
    
    .mobile-episodes-header {
        padding: 6px 10px;
    }
    
    .mobile-episode-item {
        padding: 6px 10px;
    }
    
    .mobile-bottom-nav {
        padding: 2px 0;
        padding-bottom: calc(2px + env(safe-area-inset-bottom));
    }
    
    .mobile-episodes-list {
        min-height: 25vh;
        padding-bottom: 40px;
    }
}

.mobile-header {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 20;
}

.mobile-back-button {
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.mobile-next-episode {
    padding: 12px 14px;
    background: #000;
    border-bottom: 1px solid #333;
}

.mobile-next-btn {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-next-btn:hover {
    background: #2a2a2a;
    border-color: #444;
}

.mobile-next-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mobile-next-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mobile-next-label {
    color: #888;
    font-size: 12px;
    margin-bottom: 2px;
}

.mobile-next-title {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.mobile-next-thumbnail {
    width: 50px;
    height: 30px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.mobile-next-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.anime-info {
    background: #000;
    padding: 12px 14px;
    border-bottom: 1px solid #333;
}

.anime-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
}

.anime-meta {
    color: #888;
    font-size: 12px;
    margin-bottom: 12px;
}

.rating-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-btn {
    background: rgba(42, 42, 42, 0.8);
    border: none;
    color: #888;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.rating-btn:hover {
    background: rgba(60, 60, 60, 0.8);
    color: white;
}

.share-btn {
    background: rgba(42, 42, 42, 0.8);
    border: none;
    color: #888;
    padding: 6px 12px;
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    transition: all 0.2s ease;
    margin-left: auto;
}

.share-btn:hover {
    background: rgba(60, 60, 60, 0.8);
    color: white;
}

.mobile-episodes-section {
    background: #000;
    min-height: 60vh;
    width: 100%;
    position: relative;
}

.mobile-episodes-header {
    padding: 12px 14px;
    border-bottom: 1px solid #333;
    background: #000;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-episodes-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.mobile-voice-selector {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x;
}

.mobile-voice-selector::-webkit-scrollbar {
    display: none;
}

.mobile-voice-button {
    background: #2a2a2a;
    border: none;
    color: #888;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.mobile-voice-button.active {
    background: white;
    color: #000;
}

.mobile-episodes-list {
    background: #000;
    width: 100%;
    min-height: 50vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 70px;
}

.mobile-episodes-list::-webkit-scrollbar {
    display: none;
}

.mobile-episode-item {
    /* Existing style updated for padding-right and display flex for buttons, moved to @media query block for mobile specific styles */
    align-items: flex-start;
    padding: 12px 14px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
    background: #000;
    touch-action: manipulation;
}

.mobile-episode-item:hover {
    background: #1a1a1a;
}

.mobile-episode-item.active {
    background: #1a1a1a;
}

.mobile-episode-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: white; /* CHANGED from #ff6b6b */
}

.mobile-episode-item.recording::after {
    content: '●';
    position: absolute;
    right: 14px;
    top: 16px;
    color: white; /* CHANGED from #ff6b6b */
    font-size: 10px;
}

.mobile-episode-number {
    color: white; /* CHANGED from #ff6b6b */
    font-size: 14px;
    font-weight: 600;
    margin-right: 12px;
    min-width: 20px;
    margin-top: 1px;
}

.mobile-episode-content {
    flex: 1;
}

.mobile-episode-title {
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.3;
}

.mobile-episode-description {
    color: #888;
    font-size: 12px;
    line-height: 1.4;
}

/* ADDED: Style for watched episode indicator */
.mobile-episode-item.watched .mobile-episode-title::after {
    content: '●';
    color: #888; /* Grey dot for watched episodes */
    font-size: 10px;
    margin-left: 8px;
    vertical-align: middle;
    display: inline-block;
}


.mobile-bottom-nav {
    background: #000;
    border-top: 1px solid #333;
    padding: 6px 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: sticky;
    bottom: 0;
    width: 100%;
    z-index: 20;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 6px;
    transition: color 0.2s ease;
    text-decoration: none;
    touch-action: manipulation;
}

.mobile-nav-item.active {
    color: white;
}

.mobile-nav-icon {
    width: 20px;
    height: 20px;
}

.mobile-nav-label {
    font-size: 10px;
}

.control-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

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

.next-episode {
    display: flex;
    align-items: center;
    gap: 12px;
}

.episode-info {
    text-align: right;
}

.episode-title {
    color: white;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
}

.episode-details {
    color: #ccc;
    font-size: 12px;
}

.episode-thumbnail {
    width: 77px;
    height: 46px;
    background: #444;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Стили для панели эпизодов (только десктоп) */
.episodes-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    max-height: 80vh;
    overflow: hidden;
}

.episodes-panel.show {
    transform: translateY(0);
}

.episodes-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.episodes-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.voice-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.voice-selector label {
    color: #ccc;
    font-size: 14px;
    font-weight: 500;
}

.voice-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.voice-button {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    padding: 7px 9px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    min-width: 100px;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.voice-button:hover {
    background: rgba(40, 40, 40, 0.95);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.voice-button.active {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3), rgba(116, 185, 255, 0.25));
    border-color: #4a91e200;
    color: #74b9ff;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

.episodes-container {
    position: relative;
    padding: 0 24px;
    overflow: hidden;
    max-height: 50vh;
}

.episodes-scroll-desktop {
    display: flex;
    gap: 12px;
    overflow: visible;
    scroll-behavior: smooth;
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    padding: 0 60px;
}

.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 25;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.scroll-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

.scroll-button:active {
    transform: translateY(-50%) scale(1.05);
}

.scroll-button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.scroll-left {
    left: 10px;
}

.scroll-right {
    right: 10px;
}

.episode-card {
    flex-shrink: 0;
    width: 280px;
    cursor: pointer;
    border-radius: 8px;
    padding: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.episode-card:hover {
    background-color: rgba(54, 54, 54, 0.1);
    transform: translateY(-2px);
}

.episode-card-image {
    width: 100%;
    height: 135px;
    background: #333;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

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

.episode-card-title {
    color: white;
    font-size: 14px;
    font-weight: 400;
    padding: 0 8px;
}

.close-episodes {
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    position: absolute;
    top: 16px;
    right: 24px;
    z-index: 30;
}

.close-episodes:hover {
    background: rgba(60, 60, 60, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.episode-card.active {
    position: relative;
}

.episode-card.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid #4a90e2;
    border-radius: 8px;
    pointer-events: none;
}

.episode-card.watched .episode-card-image::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #4a90e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* МОБИЛЬНЫЕ СТИЛИ (дублирование для специфичности) */
@media (max-width: 1024px) {
    .mobile-header {
        position: absolute;
        top: 16px;
        left: 16px;
        z-index: 15;
    }

    .mobile-back-button {
        background: rgba(0, 0, 0, 0.6);
        border: none;
        color: white;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(10px);
        margin-top: -224px;
    }

    .auth-banner {
        background: #000;
        padding: 20px 16px;
        text-align: center;
        border-bottom: 1px solid #333;
    }

    .auth-title {
        color: white; /* CHANGED from #ff6b6b */
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .auth-subtitle {
        color: #888;
        font-size: 14px;
    }

    .anime-info {
        background: #000;
        padding: 16px;
        border-bottom: 1px solid #333;
    }

    .anime-title {
        color: white;
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .anime-meta {
        color: #888;
        font-size: 14px;
        margin-bottom: 16px;
    }

    /* REMOVED .rating-buttons & .share-btn from mobile CSS, handled globally for mobile */

    .mobile-episodes-section {
        background: #000;
        min-height: 60vh;
        width: 100%;
        position: relative;
    }

    .mobile-episodes-header {
        padding: 16px;
        border-bottom: 1px solid #333;
        background: #000;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .mobile-episodes-title {
        color: white;
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 12px;
    }

    .mobile-voice-selector {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        touch-action: pan-x;
    }

    .mobile-voice-selector::-webkit-scrollbar {
        display: none;
    }

    .mobile-voice-button {
        background: #2a2a2a;
        border: none;
        color: #888;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 14px;
        cursor: pointer;
        white-space: nowrap;
        flex-shrink: 0;
        transition: all 0.2s ease;
        touch-action: manipulation;
    }

    .mobile-voice-button.active {
        background: white;
        color: #000;
    }

    .mobile-episodes-list {
        background: #000;
        width: 100%;
        min-height: 50vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 80px;
    }

    .mobile-episodes-list::-webkit-scrollbar {
        display: none;
    }

    .mobile-episode-item {
        /* Already modified above for buttons */
        padding: 16px;
        border-bottom: 1px solid #000000;
        cursor: pointer;
        transition: background-color 0.2s ease;
        position: relative;
        background: #000;
        touch-action: manipulation;
        border-radius: 23px;
    }

    .mobile-episode-item:hover {
        background: #1a1a1a;
    }

    .mobile-episode-item.active {
        background: #1a1a1a;
    }

    .mobile-episode-item.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: white; /* CHANGED from #ff6b6b */
    }

    .mobile-episode-item.recording::after {
        content: '●';
        position: absolute;
        right: 16px;
        top: 20px;
        color: white; /* CHANGED from #ff6b6b */
        font-size: 12px;
    }

    .mobile-episode-number {
        color: white; /* CHANGED from #ff6b6b */
        font-size: 16px;
        font-weight: 600;
        margin-right: 16px;
        min-width: 24px;
        margin-top: 2px;
    }

    .mobile-episode-content {
        flex: 1;
    }

    .mobile-episode-title {
        color: white;
        font-size: 16px;
        font-weight: 500;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .mobile-episode-description {
        color: #888;
        font-size: 14px;
        line-height: 1.4;
    }

    .mobile-bottom-nav {
        background: #000;
        border-top: 1px solid #333;
        padding: 8px 0;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: sticky;
        bottom: 0;
        width: 100%;
        z-index: 20;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        color: #888;
        cursor: pointer;
        padding: 8px;
        transition: color 0.2s ease;
        text-decoration: none;
        touch-action: manipulation;
    }

    .mobile-nav-item.active {
        color: white;
    }

    .mobile-nav-icon {
        width: 24px;
        height: 24px;
    }

    .mobile-nav-label {
        font-size: 12px;
    }
}

/* Ландшафтная ориентация - больше видео */
@media (max-width: 1024px) and (orientation: landscape) {
    .video-frame {
        height: 280px;
    }
    
    .video-background {
        height: 280px;
    }
    
    .mobile-content {
        min-height: calc(100vh - 280px);
    }
    
    .mobile-next-episode {
        padding: 6px 10px;
    }
    
    .anime-info {
        padding: 6px 10px;
    }
    
    .mobile-episodes-header {
        padding: 6px 10px;
    }
    
    .mobile-episode-item {
        padding: 6px 10px;
    }
    
    .mobile-bottom-nav {
        padding: 2px 0;
        padding-bottom: calc(2px + env(safe-area-inset-bottom));
    }
    
    .mobile-episodes-list {
        min-height: 25vh;
        padding-bottom: 40px;
    }
}

/* === НОВЫЕ СТИЛИ ДЛЯ ПЛАНШЕТОВ (ИСПРАВЛЕНИЕ) === */
@media (min-width: 768px) and (max-width: 1200px) {
    /* Применяем эти стили только к десктопной панели эпизодов, когда она активна на планшетах */
    .episodes-panel {
        padding: 12px 0; /* Уменьшаем вертикальные отступы */
        max-height: 70vh; /* Панель будет занимать меньше места по высоте */
    }

    .episodes-header {
        padding: 0 16px 12px; /* Уменьшаем отступы */
        margin-bottom: 12px;
        gap: 12px;
    }

    .episodes-title {
        font-size: 16px; /* Уменьшаем заголовок */
    }

    .voice-button {
        padding: 6px 8px; /* Кнопки озвучки поменьше */
        font-size: 13px;
        min-width: 80px;
    }

    .episodes-container {
        padding: 0 16px; /* Уменьшаем боковые отступы */
        max-height: 45vh; /* Ограничиваем высоту списка */
    }

    .episodes-scroll-desktop {
        padding: 0 45px; /* Меньше места для кнопок прокрутки */
        gap: 8px; /* Меньше отступ между карточками */
    }

    .episode-card {
        width: 220px; /* УМЕНЬШАЕМ ШИРИНУ КАРТОЧКИ ЭПИЗОДА */
    }

    .episode-card-image {
        height: 110px; /* Пропорционально уменьшаем высоту картинки */
    }
    
    .scroll-button {
        width: 40px; /* Кнопки прокрутки поменьше */
        height: 40px;
    }

    .scroll-left {
        left: 5px;
    }

    .scroll-right {
        right: 5px;
    }
}

    .custom-confirm-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(14, 14, 14, 0.7);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        display: none; /* Скрыто по умолчанию */
        justify-content: center;
        align-items: center;
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .custom-confirm-overlay.show {
        display: flex;
        opacity: 1;
    }

    .custom-confirm-box {
        background: #1a1a1a;
        padding: 24px;
        border-radius: 12px;
        border: 1px solid #333;
        text-align: center;
        max-width: 400px;
        width: 90%;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        transform: scale(0.95);
        transition: transform 0.3s ease;
    }
    
    .custom-confirm-overlay.show .custom-confirm-box {
        transform: scale(1);
    }

    #customConfirmMessage {
        margin: 0 0 20px;
        font-size: 16px;
        line-height: 1.5;
        color: #f0f0f0;
    }

    .custom-confirm-buttons {
        display: flex;
        justify-content: center;
        gap: 12px;
    }

    .custom-confirm-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 31px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    min-width: 100px;
    }

    .custom-confirm-buttons button:hover {
        transform: translateY(-2px);
    }
    
    .custom-confirm-buttons .btn-yes {
      background-color: #ffffff;
    color: #000000;
    }
    
    .custom-confirm-buttons .btn-yes:hover {
        background-color: #818181;
    }
    
    .custom-confirm-buttons .btn-no {
        background-color: #444;
        color: #f0f0f0;
    }
    .custom-confirm-buttons .btn-no:hover {
        background-color: #555;
    }