/* =========================================================
   DLE Actors — тёмная тема
   Все цвета меняются здесь, в блоке :root
   ========================================================= */
:root {
    --ra-bg:          #232323;   /* фон блоков (профиль, карточки) */
    --ra-bg-2:        #1b1b1b;   /* фон шапки профиля / подложки */
    --ra-bg-3:        #2c2c2c;   /* фон карточек фильмов, фактов, кнопок */
    --ra-border:      #333333;   /* рамки и разделители */
    --ra-text:        #e6e6e6;   /* основной текст */
    --ra-text-2:      #a8a8a8;   /* второстепенный текст */
    --ra-muted:       #7a7a7a;   /* подписи (ДАТА РОЖДЕНИЯ и т.п.) */
    --ra-title:       #ffffff;   /* заголовки, имя актёра */
    --ra-accent:      #e53935;   /* акцент: ссылки при наведении, активная страница */
    --ra-accent-text: #ffffff;   /* текст на акцентном фоне */
    --ra-radius:      10px;      /* скругление углов */
    --ra-shadow:      0 6px 24px rgba(0,0,0,.45);
}

/* ---------- Страница актёра ---------- */
.actor-profile { background: var(--ra-bg); border: 1px solid var(--ra-border); border-radius: var(--ra-radius); box-shadow: var(--ra-shadow); overflow: hidden; margin-bottom: 30px; color: var(--ra-text); }
.profile-header { display: flex; padding: 30px; gap: 40px; background: linear-gradient(135deg, var(--ra-bg-2) 0%, var(--ra-bg) 100%); border-bottom: 1px solid var(--ra-border); }
.profile-left { flex-shrink: 0; }
.main-poster { width: 300px; position: relative; border-radius: var(--ra-radius); overflow: hidden; box-shadow: var(--ra-shadow); background: var(--ra-bg-3); }
.main-poster img { width: 100%; display: block; }
.zoom-btn { position: absolute; bottom: 15px; right: 15px; width: 40px; height: 40px; background: rgba(0,0,0,.65); color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 50%; opacity: 0; transition: .3s; }
.main-poster:hover .zoom-btn { opacity: 1; }
.zoom-btn:hover { background: var(--ra-accent); color: var(--ra-accent-text); }
.profile-right { flex: 1; min-width: 0; }
.profile-title { font-size: 36px; font-weight: 800; color: var(--ra-title); margin: 0 0 5px 0; letter-spacing: -.5px; }
.profile-subtitle { font-size: 18px; color: var(--ra-text-2); 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: var(--ra-muted); text-transform: uppercase; letter-spacing: .5px; }
.grid-value { font-size: 16px; color: var(--ra-text); font-weight: 500; }
.profile-section { padding: 30px; border-bottom: 1px solid var(--ra-border); }
.profile-section:last-child { border-bottom: 0; }
.section-title { font-size: 22px; font-weight: 700; color: var(--ra-title); margin: 0 0 20px 0; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--ra-border); }
.biography-text { font-size: 16px; line-height: 1.8; color: var(--ra-text); white-space: pre-line; }
.facts-list { list-style: none; padding: 0; color: var(--ra-text); white-space: pre-line; line-height: 1.7; }
.facts-list li { padding: 12px 15px; background: var(--ra-bg-3); border-radius: 8px; margin-bottom: 10px; border-left: 4px solid var(--ra-accent); font-size: 15px; color: var(--ra-text); }

/* ---------- Фильмография (actors-films.tpl) ---------- */
.filmography-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.film-item { background: var(--ra-bg-3); border: 1px solid var(--ra-border); border-radius: var(--ra-radius); overflow: hidden; transition: .3s; }
.film-item:hover { transform: translateY(-5px); box-shadow: var(--ra-shadow); border-color: var(--ra-accent); }
.film-poster { aspect-ratio: 2 / 3; position: relative; overflow: hidden; display: block; text-decoration: none; background: var(--ra-bg-2); }
.film-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-rating-wrap { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; z-index: 2; }
.film-rating { background: rgba(0,0,0,.75); color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 800; width: fit-content; }
.film-rating.kp { background: rgba(255,102,0,.92); }
.film-rating.imdb { background: rgba(245,197,24,.95); color: #000; }
.film-content { padding: 12px 14px 14px; }
.film-title { font-weight: 600; color: var(--ra-title); font-size: 15px; display: block; margin-bottom: 5px; text-decoration: none; line-height: 1.3; }
.film-title:hover { color: var(--ra-accent); }
.film-meta { font-size: 12px; color: var(--ra-muted); line-height: 1.5; }
.film-meta a { color: var(--ra-text-2); text-decoration: none; }
.film-meta a:hover { color: var(--ra-accent); }

/* ---------- Список актёров/режиссёров в новости ({actors-list}, {directors-list} — actors.tpl) ---------- */
:root {
    --ra-card-width: 120px;   /* ширина карточки актёра в новости */
    --ra-card-radius: 10px;   /* скругление фото */
}
.actor-card { display: inline-block; width: var(--ra-card-width); margin: 0 12px 16px 0; text-align: center; vertical-align: top; }
.actor-card a, .actor-card a:hover { text-decoration: none !important; border: 0 !important; }
.actor-avatar { width: 100%; aspect-ratio: 2 / 3; margin: 0 0 8px; border-radius: var(--ra-card-radius); overflow: hidden; border: 2px solid var(--ra-border); background: var(--ra-bg-3); box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: .3s; }
.actor-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: .4s; }
.actor-card a:hover .actor-avatar { border-color: var(--ra-accent); transform: translateY(-4px); }
.actor-card a:hover .actor-avatar img { transform: scale(1.04); }
.no-avatar { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--ra-muted); padding: 8px; text-align: center; }
.actor-name { font-size: 13px; font-weight: 600; color: var(--ra-text) !important; display: block; line-height: 1.25; text-decoration: none !important; }
.actor-card a:hover .actor-name { color: var(--ra-accent) !important; }
@media (max-width: 768px) {
    :root { --ra-card-width: 96px; }
    .actor-card { margin: 0 8px 12px 0; }
}

/* ---------- Каталог /actors/ (actors-page.tpl, actors-item.tpl) ---------- */
.actors-container { color: var(--ra-text); }
.actors-header-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; margin-bottom: 15px; }
.actors-page-title { color: var(--ra-title); margin: 0; font-size: 26px; }
.actors-search-box { position: relative; flex: 0 1 320px; }
.actors-search-box input { width: 100%; padding: 10px 38px 10px 14px; background: var(--ra-bg-3); border: 1px solid var(--ra-border); border-radius: 8px; color: var(--ra-text); outline: none; }
.actors-search-box input:focus { border-color: var(--ra-accent); }
.actors-search-box .search-icon { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--ra-muted); }
.actors-list-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; padding: 10px 0; }
.actor-index-item { background: var(--ra-bg-3); border: 1px solid var(--ra-border); border-radius: var(--ra-radius); overflow: hidden; transition: .3s; }
.actor-index-item:hover { transform: translateY(-5px); box-shadow: var(--ra-shadow); border-color: var(--ra-accent); }
.actor-index-item a { text-decoration: none; display: block; }
.actor-index-poster { aspect-ratio: 2 / 3; background: var(--ra-bg-2); overflow: hidden; position: relative; }
.actor-index-poster img { width: 100%; height: 100%; object-fit: cover; transition: .5s; display: block; }
.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: var(--ra-bg-2); color: var(--ra-muted); text-align: center; padding: 20px; font-size: 12px; text-transform: uppercase; }
.actor-index-info { padding: 12px; text-align: center; border-top: 1px solid var(--ra-border); }
.actor-index-name { margin: 0 0 4px 0; font-size: 15px; font-weight: 700; color: var(--ra-title); transition: .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actor-index-item:hover .actor-index-name { color: var(--ra-accent); }
.actor-index-prof { font-size: 12px; color: var(--ra-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.no-actors-found { color: var(--ra-muted) !important; }

/* ---------- Пагинация ---------- */
.actors-pagination .pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; list-style: none; padding: 0; margin: 30px 0 0; }
.actors-pagination .pagination li a, .actors-pagination .pagination li span { display: block; padding: 8px 15px; background: var(--ra-bg-3); border: 1px solid var(--ra-border); color: var(--ra-text); border-radius: 6px; text-decoration: none; transition: .3s; font-weight: 600; }
.actors-pagination .pagination li a:hover { border-color: var(--ra-accent); color: var(--ra-accent); }
.actors-pagination .pagination li.active span { background: var(--ra-accent); color: var(--ra-accent-text); border-color: var(--ra-accent); }
.actors-pagination .pagination li.disabled span { color: var(--ra-muted); cursor: not-allowed; }

/* ---------- Мобильные ---------- */
@media (max-width: 768px) {
    .profile-header { flex-direction: column; align-items: center; text-align: center; gap: 20px; padding: 20px; }
    .main-poster { width: 220px; }
    .profile-title { font-size: 28px; }
    .profile-section { padding: 20px; }
    .section-title::after { display: none; }
    .filmography-list, .actors-list-wrap { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

/* ---------- Роли ---------- */
/* в фильмографии на странице актёра */
.film-role { font-size: 12px; color: var(--ra-text-2); margin: -2px 0 6px; line-height: 1.35; }
.film-role b { color: var(--ra-text); font-weight: 600; }
/* под фото актёра в новости */
.actor-role { display: block; font-size: 11px; color: var(--ra-muted); line-height: 1.25; margin-top: 3px; }
