/* ==========================================================================
   1. АНКЕТА И БИОГРАФИЯ АКТЕРА (АДАПТАЦИЯ ПОД ТЕМНУЮ ТЕМУ CINEMAX)
   ========================================================================== */
.actor-profile { 
    background: transparent !important; /* Убран белый фон */
    border-radius: 12px; 
    box-shadow: none !important; 
    overflow: hidden; 
    margin-bottom: 30px; 
    font-family: 'Inter', sans-serif; 
}
.profile-header { 
    display: flex; 
    padding: 30px; 
    gap: 40px; 
    background: rgba(255, 255, 255, 0.02) !important; /* Легкая темная подложка */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important; 
}
.profile-left { flex-shrink: 0; }
.main-poster { 
    width: 300px; 
    position: relative; 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.main-poster img { width: 100%; display: block; }
.zoom-btn { 
    position: absolute; 
    bottom: 15px; 
    right: 15px; 
    width: 40px; 
    height: 40px; 
    background: rgba(0,0,0,0.6); 
    color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    backdrop-filter: blur(5px); 
    opacity: 0; 
    transition: 0.3s; 
}
.main-poster:hover .zoom-btn { opacity: 1; }
.profile-right { flex: 1; }
.profile-title { 
    font-size: 36px; 
    font-weight: 800; 
    color: #ffffff !important; /* Текст имени стал белым */
    margin: 0 0 5px 0; 
    letter-spacing: -0.5px; 
}
.profile-subtitle { 
    font-size: 18px; 
    color: rgba(255, 255, 255, 0.5) !important; /* Оригинальное имя — серое */
    margin-bottom: 25px; 
}
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.grid-item { display: flex; flex-direction: column; gap: 4px; }
.grid-label { font-size: 13px; color: rgba(255, 255, 255, 0.4) !important; text-transform: uppercase; letter-spacing: 0.5px; }
.grid-value { font-size: 16px; color: rgba(255, 255, 255, 0.85) !important; font-weight: 500; }
.profile-section { padding: 30px; border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important; }
.section-title { font-size: 22px; font-weight: 700; color: #ffffff !important; margin: 0 0 20px 0; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.08) !important; }

/* ==========================================================================
   ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ АДАПТИВНОЙ АНГЛИЙСКОЙ БИОГРАФИИ
   ========================================================================== */
.biography-header-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
/* Компактный заголовок без лишних линий */
.biography-header-inline .section-title {
    margin-bottom: 0 !important;
}
.biography-header-inline .section-title::after {
    display: none !important; /* Убираем полосу, чтобы плашка встала рядом */
}
/* Стильный оранжевый маркер языка рядом с заголовоком */
.lang-badge-inline {
    background: #ff9800;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
/* Текст разворачивается на 100% ширины на любых экранах */
.biography-text-full {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75) !important;
    text-align: justify;
}

/* Избавляемся от старых неиспользуемых мобильных правил в самом низу */
@media (max-width: 768px) {
    .biography-text-full {
        text-align: left; /* На телефонах выравнивание по левому краю для удобства чтения */
        font-size: 14px;  /* Чуть аккуратнее шрифт на смартфонах */
    }
}


/* Интересные факты */
.facts-list { list-style: none; padding: 0; }
.facts-list li { 
    padding: 12px 15px; 
    background: rgba(255, 255, 255, 0.02) !important; 
    border-radius: 8px; 
    margin-bottom: 10px; 
    border-left: 4px solid #ff9800 !important; /* Маркер изменен на оранжевый под тему */
    font-size: 15px; 
    color: rgba(255, 255, 255, 0.75) !important; 
}

/* ==========================================================================
   2. КАРТОЧКИ ФИЛЬМОГРАФИИ И ПЛАШКИ РЕЙТИНГОВ (СОХРАНЕНО И НАСТРОЕНО)
   ========================================================================== */
.filmography-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.film-item { 
    background: rgba(255, 255, 255, 0.02) !important; /* Убран белый фон */
    border: 1px solid rgba(255, 255, 255, 0.05) !important; 
    border-radius: 10px; 
    overflow: hidden; 
    transition: 0.3s; 
}
.film-item:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.5); 
    border-color: #ff9800 !important; /* Оранжевый фокус при наведении */
}


/* Контейнер постера — ИСПРАВЛЕНИЕ ОБРЕЗАНИЯ КАРТИНКИ */
.film-poster {
    width: 100% !important;
    height: auto !important; /* Убираем жесткие 280px, чтобы высота подстраивалась сама */
    aspect-ratio: 2 / 3 !important; /* Жестко задаем идеальное соотношение сторон кинопостера */
    display: block;
    overflow: hidden;
    background: #0f172a;
}
.film-poster img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* Картинка теперь полностью вписывается в рамки без обрезки краев */
}


/* СОХРАНЕННЫЕ ПЛАШКИ ОЦЕНОК ПОВЕРХ ПОСТЕРА */
.film-rating-wrap { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; z-index: 10; }
.film-rating { background: rgba(0, 0, 0, 0.8); color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 800; display: flex; align-items: center; gap: 4px; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1); width: fit-content; }
.film-rating.kp { background: rgba(255, 102, 0, 0.9); } /* Оранжевый Кинопоиск */
.film-rating.imdb { background: rgba(245, 197, 24, 0.9); color: #000; } /* Желтый IMDb */

.film-content { padding: 15px; }
.film-title { 
    font-weight: 600; 
    color: #ffffff !important; /* Название фильма стало белым */
    font-size: 15px; 
    display: block; 
    margin-bottom: 5px; 
    text-decoration: none; 
}
.film-title:hover { color: #ff9800 !important; }

/* СТИЛИ ДЛЯ ИСПРАВЛЕНИЯ ЦВЕТА НАШЕЙ КАСТОМНОЙ РОЛИ */
.film-role {
    font-size: 13px;
    color: #ff9800 !important; /* Золотистый оттенок строки */
    margin-bottom: 5px;
}
.film-role b { color: #ffffff !important; font-weight: 600; }

.film-meta { font-size: 12px; color: rgba(255, 255, 255, 0.4) !important; }

/* Старый служебный класс оригинального плагина */
.actor-card { display: inline-block; width: 100px; margin-right: 15px; text-align: center; vertical-align: top; }
.actor-avatar { width: 80px; height: 80px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 3px solid #fff; }
.actor-name { font-size: 13px; font-weight: 600; color: #555; display: block; line-height: 1.2; }

/* ==========================================================================
   3. СТИЛИ ОБЩЕЙ СТРАНИЦЫ ВСЕХ АКТЕРОВ И ПАГИНАЦИИ (/actors/)
   ========================================================================== */
.actors-list-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; padding: 10px 0; }
.actor-index-item { 
    background: rgba(255, 255, 255, 0.02) !important; /* Убран белый фон плиток каталога */
    border: 1px solid rgba(255, 255, 255, 0.05) !important; 
    border-radius: 8px; 
    overflow: hidden; 
    transition: 0.3s; 
}
.actor-index-item:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.5); border-color: #ff9800 !important; }
.actor-index-item a { text-decoration: none; display: block; }
.actor-index-poster { height: 240px; background: #0f172a; overflow: hidden; position: relative; }
.actor-index-poster img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.actor-index-item:hover .actor-index-poster img { transform: scale(1.05); }
.no-poster { height: 100%; display: flex; align-items: center; justify-content: center; background: #1e293b; color: #64748b; text-align: center; padding: 20px; font-size: 12px; text-transform: uppercase; }
.actor-index-info { padding: 15px; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.actor-index-name { margin: 0 0 5px 0; font-size: 16px; font-weight: 700; color: #ffffff !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actor-index-item:hover .actor-index-name { color: #ff9800 !important; } /* Подсветка имени оранжевым */
/* Оригинальное имя на английском в плитках общего каталога актеров */
.actor-index-fullname {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4) !important; /* Делаем его аккуратным приглушенным серым */
    margin-top: 2px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Три точки, если имя окажется слишком длинным */
}

/* При наведении мышки на карточку, английское имя можно слегка подсветить (по желанию) */
.actor-index-item:hover .actor-index-fullname {
    color: rgba(255, 255, 255, 0.7) !important;
}

.actor-index-prof { font-size: 12px; color: rgba(255, 255, 255, 0.4) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Пагинация (Переключатель страниц 1, 2, 3...) */
.actors-pagination .pagination { display: flex; justify-content: center; gap: 5px; list-style: none; padding: 0; margin: 30px 0; }
.actors-pagination .pagination li a, .actors-pagination .pagination li span { 
    display: block; 
    padding: 8px 16px; 
    background: rgba(255, 255, 255, 0.02) !important; /* Кнопки стали темными */
    border: 1px solid rgba(255, 255, 255, 0.05) !important; 
    color: rgba(255, 255, 255, 0.6) !important; 
    border-radius: 4px; 
    text-decoration: none; 
    transition: 0.3s; 
    font-weight: 600; 
}
.actors-pagination .pagination li.active span { 
    background: #ff9800 !important; /* Активная страница — оранжевая */
    color: #fff !important; 
    border-color: #ff9800 !important; 
}
.actors-pagination .pagination li a:hover { background: rgba(255, 255, 255, 0.08) !important; border-color: #ff9800 !important; color: #ff9800 !important; }
.actors-pagination .pagination li.disabled span { color: rgba(255, 255, 255, 0.2) !important; cursor: not-allowed; }

@media (max-width: 768px) {
    .profile-header { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
    .main-poster { width: 220px; }
    .section-title::after { display: none; }
    .filmography-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ==========================================================================
   ФИНАЛЬНЫЕ СТИЛИ ДЛЯ ИНТЕРАКТИВНОГО КАСТА И ТЕМНОЙ ТЕМЫ CINEMAX
   ========================================================================== */

/* 1. ЗАГОЛОВКИ И ОБЩИЕ СЕКЦИИ */
.movie-director-section,
.movie-cast-section-wrapper {
    margin-top: 25px;
    width: 100%;
    display: block !important;
}
.cast-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.cast-section-title {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 2. КРАСИВЫЙ РЕЖИССЕР (В один ряд, без скролла) */
.director-single-wrap {
    display: flex;
    gap: 12px;
}
.director-single-wrap .actor-card {
    display: block !important;
    width: 105px !important;
    text-align: center;
}

/* 3. ОБНОВЛЕННЫЙ КОНТЕЙНЕР ДЛЯ АКТЕРОВ (Добавляем отступы по бокам для кнопок) */
.interactive-cast-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    
    /* ВАЖНО: Добавляем внутренние защитные отступы, чтобы кнопки не резало краем сайта */
    padding: 0 20px !important; 
    box-sizing: border-box !important;
}

.movie-cast-scroll {
    display: flex !important;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) rgba(255, 255, 255, 0.02) !important;
    width: 100%;
}

/* Тонкий незаметный скроллбар для Chrome/Safari */
.movie-cast-scroll::-webkit-scrollbar {
    height: 4px !important;
}
.movie-cast-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02) !important;
}
.movie-cast-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 2px !important;
}

/* 4. ОФОРМЛЕНИЕ КАРТОЧКИ (АКТЕРЫ И РЕЖИССЕРЫ) */
.movie-cast-section-wrapper .actor-card {
    display: block !important;
    flex: 0 0 105px !important;
    text-align: center;
    margin-right: 0 !important;
}
.movie-cast-section-wrapper .actor-avatar,
.movie-director-section .actor-avatar {
    width: 75px;
    height: 75px;
    margin: 0 auto 6px;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4) !important;
}
.movie-cast-section-wrapper .actor-avatar img,
.movie-director-section .actor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Глобальные текстовые стили модуля (Без дублей) */
.actor-name {
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 600;
    line-height: 1.2;
    display: block;
}
.actor-name-eng {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 11px !important;
    line-height: 1.2;
    display: block;
    margin-top: 2px;
}
.actor-role {
    color: #ff9800 !important; /* Красивый золотистый цвет для ролей */
    font-size: 11px !important;
    line-height: 1.2;
    display: block;
    margin-top: 4px;
    font-style: italic;
}

/* 5. ИСПРАВЛЕННЫЕ КНОПКИ-СТРЕЛКИ (Идеальный круг и исправленный Base64 код стрелок) */
.cast-arrow-btn {
    position: absolute;
    top: 38px; /* Ровно по центру круглых лиц */
    transform: translateY(-50%);
    width: 32px !important;
    height: 32px !important;
    background-color: #ff9800 !important; /* Яркий фирменный оранжевый цвет */
    border: none !important;
    border-radius: 50% !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 16px !important;
    z-index: 100 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5) !important;
    cursor: pointer !important;
    outline: none !important;
    padding: 0 !important;
    
    /* Запрещаем браузеру сжимать или деформировать круглую форму кнопок */
    flex-shrink: 0 !important; 
}

.cast-arrow-btn:hover {
    background-color: #e68a00 !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* Левая кнопка — Тонкая, изящная и острая стрелочка назад */
.cast-arrow-btn.arrow-left {
    left: 2px !important; 
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTE1IDZsLTYgNiA2IDYiLz48L3N2Zz4=") !important;
}

/* Правая кнопка — ИСПРАВЛЕННАЯ, ОСТРАЯ И ТОНКАЯ СТРЕЛОЧКА ВПЕРЕД (Как на Netflix) */
.cast-arrow-btn.arrow-right {
    right: 2px !important; 
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTkgNmw2IDYtNiA2Ii8+PC9zdmc+") !important;
}


/* ПОЛНАЯ ПОДДЕРЖКА СТРЕЛОЧЕК НА МОБИЛЬНЫХ (Ничего не скрываем!) */
@media (max-width: 590px) {
    .interactive-cast-container {
        padding: 0 12px !important; /* Легкие боковые отступы, чтобы кнопки не прижимало к краям экрана */
    }
    .cast-arrow-btn {
        display: block !important; /* Жестко фиксируем отображение на мобилках */
        width: 28px !important;    /* Делаем их слегка компактнее под мобильный палец */
        height: 28px !important;
        top: 38px;
        background-size: 14px !important;
    }
    .cast-arrow-btn.arrow-left { left: -2px !important; }
    .cast-arrow-btn.arrow-right { right: -2px !important; }
}
