/**
 * Основные стили для темы Кинопоиск
 * Добавьте этот код в style.css вашей темы или в отдельный файл стилей
 */

/* Общие стили */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    margin: 0 !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 500;
    line-height: 1.3;
}


.main-content {
    background-color: var(--background-color);
}

.movies-filter {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.filter-btn movies-link {
    background-color: var(--background-color);
}

.movies-filter-btn {
    background-color: #4caf50;
    color: white;
    padding: 8px 12px;
    margin-right: 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.movies-filter-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.movies-filter-tab {
    text-decoration: none;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.movies-filter-tab.active {
    background-color: #f0f0f0;
    color: #333;
    font-weight: bold;
}

.movies-filter-tab:hover {
    background-color: #f0f0f0;
}

/* Стили для постера и рейтинга */
.movie-poster-container {
    width: 100%;
    max-width: 350px;
    /* Максимальная ширина постера */
}

/* Стили для точного воспроизведения рейтинга как на референсе */
#movie-poster-container.movie-poster-fixed {
    position: relative !important;
    border-radius: 12px !important;
    overflow: visible !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 70px !important;
    /* Фиксированный отступ */
    padding: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    z-index: 1 !important;
}

@media screen and (max-width: 767px) {
    #movie-poster-container.movie-poster-fixed {
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
        max-width: 50% !important;
    }
}

.movie-poster-fixed .movie-poster-image {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
}

/* Зеленый круг с фиксированным позиционированием */
/* Добавьте эти стили в блок <style> рядом с существующими стилями для рейтинга */

/* Стили для числа рейтинга в круге */
.rating-value-fixed {
    color: white !important;
    font-size: 28px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    text-align: center !important;
}

/* Обновленные стили для круга с рейтингом */
#rating-circle-fixed.rating-circle-fixed {
    position: absolute !important;
    width: 70px !important;
    height: 70px !important;
    bottom: -35px !important;
    /* Точно половина высоты */
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-radius: 50% !important;
    background-color: #4CAF50 !important;
    /* Зеленый фон */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    z-index: 1000 !important;
    /* Очень высокий z-index */
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.dark-mode #rating-card-fixed.rating-card-fixed {
    background: #282626 !important;
}

body.dark-mode .vote-count-fixed {
    color: #fff !important;
}


.vote-container-fixed {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

/* Счетчик голосов */
.vote-count-fixed {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #333 !important;
}

/* Счетчик лайков */
.likes-count-fixed {
    margin-left: 5px !important;
}

/* Счетчик дизлайков */
.dislikes-count-fixed {
    margin-right: 5px !important;
}

/* Белая карточка с фиксированным позиционированием */
#rating-card-fixed.rating-card-fixed {
    position: absolute !important;
    height: 70px !important;
    width: 100% !important;
    max-width: 100% !important;
    bottom: -70px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #fff !important;
    padding: 8px 15px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    z-index: 999 !important;
    box-sizing: border-box !important;
}

@media screen and (max-width: 767px) {
    #rating-card-fixed.rating-card-fixed {
        justify-content: center !important;
    }
}

/* Кнопки с фиксированным позиционированием */
.rating-button-fixed {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    /* Предотвращает сжатие */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1001 !important;
}

.thumb-icon-fixed {
    font-size: 28px !important;
    line-height: 1 !important;
    text-align: center !important;
}

.content-filters {
    margin: 0 !important;
    padding: 15px 0 !important;
    width: 100% !important;
}

.filter-tabs {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 0 15px !important;
}

.filter-btn {
    height: 40px !important;
    /* Фиксированная высота */
    min-width: auto !important;
    padding: 0 20px !important;
    border-radius: 6px !important;
    border: none !important;
    font-size: 16px !important;
    cursor: pointer !important;
    background: transparent !important;
    color: #333 !important;
    font-weight: normal !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.actor-header {
    padding: 20px !important;
}

.filmography-title {
    padding: 20px !important;
}

.filter-btn.movies-link {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    font-weight: 500 !important;
    justify-content: space-between !important;
}

.fa-chevron-right:before {
    color: white;
}

.filter-btn:not(.movies-link) {
    background-color: #fff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.filter-btn i {
    margin-left: 5px !important;
    font-size: 12px !important;
}

/* Адаптивность для маленьких экранов */
@media (max-width: 768px) {
    .filter-tabs {
        justify-content: center !important;
    }

    .filter-btn {
        height: 36px !important;
        padding: 0 15px !important;
        font-size: 14px !important;
    }

    .content-filters {
        width: 90% !important;
    }
}

/* Хлебные крошки */
.breadcrumbs {
    padding: 20px;
    font-size: 16px;
    color: #555;
    background-color: var(--secondary-background-color);

}

.breadcrumbs a {
    color: var(--primary-color) !important;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumb-delimiter {
    margin: 0 5px;
    color: #aaa;
}

.breadcrumbs .current {
    color: var(--primary-color) !important;
    font-weight: 500;
}

/* Стили для фильтра типов постов на страницах жанров */
.post-type-filter {
    display: flex;
    margin: 20px 0;
    border-bottom: 1px solid #eee;
}

.post-type-filter .filter-option {
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.post-type-filter .filter-option:hover {
    color: #0073aa;
}

.post-type-filter .filter-option.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

/* Стили для заголовка страницы */
.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 24px;
    margin-bottom: 10px;
    padding: 20px !important;
}

.archive-description {
    color: #666;
    margin-bottom: 20px;
}

/* Сетки для фильмов и сериалов */
.movie-grid,
.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.actor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

@media (max-width: 768px) {

    .movie-grid,
    .series-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .actor-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

/* Стили для пагинации */
.pagination {
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
}

.pagination .page-numbers.current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.pagination .page-numbers:hover {
    background-color: #f9f9f9;
}

.pagination .prev,
.pagination .next {
    padding: 8px 15px;
}

/* Стили для карточек фильмов/сериалов */
.movie-card,
.series-card,
.actor-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.movie-card:hover,
.series-card:hover,
.actor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    overflow: hidden;
}

.movie-card .card-image,
.series-card .card-image {
    aspect-ratio: 2/3;
}

.actor-card .card-image {
    aspect-ratio: 1/1;
}

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

.card-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.card-body {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 16px;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.card-meta {
    font-size: 13px;
    color: #666;
    margin-top: auto;
}

/* Стили для страницы фильма/сериала */
.movie-header,
.series-header {
    display: flex;
    margin-bottom: 40px;
}

.movie-poster,
.series-poster {
    flex: 0 0 300px;
    margin-right: 30px;
    position: relative;
}

.movie-poster img,
.series-poster img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.movie-details,
.series-details {
    flex: 1;
}

.movie-title,
.series-title {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 10px;
}

.movie-original-title,
.series-original-title {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
}

.movie-slogan,
.series-slogan {
    font-style: italic;
    margin-bottom: 20px;
    font-size: 16px;
}

.movie-meta span,
.series-meta span {
    display: block;
    margin-bottom: 8px;
}

.ratings {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.rating {
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
}

.rating-kp {
    background-color: #f2c94c;

}

.rating-imdb {
    background-color: #333;

}

/* Стили для возрастного ограничения */
.age-rating {
    display: inline-block;
    padding: 3px 6px;
    background-color: #e74c3c;
    color: white;
    font-weight: bold;
    border-radius: 3px;
    font-size: 12px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

/* Стили для блока "Где смотреть" */
.watch-services {
    margin: 30px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.watch-services-title {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.service-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: white;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.service-logo {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.service-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-name {
    font-weight: 500;
}

/* Стили для трейлера */
.movie-trailer,
.series-trailer {
    margin: 30px 0;
}

.trailer-container {
    position: relative;
    aspect-ratio: 16/9;
    min-height: 200px;
    border-radius: 8px;
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Стили для плеера */
.movie-player,
.series-player {
    margin: 30px 0;
}

.player-container {
    position: relative;
    aspect-ratio: 16/9;
    min-height: 200px;
    border-radius: 8px;
}

.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Стили для фактов и наград */
.movie-facts,
.series-facts,
.movie-awards,
.series-awards {
    margin: 30px 0;
}

.facts-title,
.awards-title {
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.facts-content,
.awards-content {
    line-height: 1.6;
}

/* Стили для галереи скриншотов */
.screenshots-gallery {
    margin: 30px 0;
}

.screenshots-title {
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.screenshot-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Стили для информации о сезонах */
.series-seasons-info {
    margin: 30px 0;
}

.seasons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.season-item {
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

.season-number {
    font-weight: 500;
    margin-bottom: 5px;
}

.episodes-count {
    font-size: 13px;
    color: #666;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {

    .movie-header,
    .series-header {
        flex-direction: column;
    }

    .movie-poster,
    .series-poster {
        flex: none;
        margin-right: 0;
        margin-bottom: 20px;
        max-width: 250px;
    }
}

/* Стили для метки стримингового сервиса на постере */
.streaming-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #E50914;
    /* Цвет фона в стиле Netflix */
    color: white;
    font-weight: bold;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 3;
    text-transform: uppercase;
}

/* Стили для персонала фильма/сериала */
.series-meta .series-screenplay,
.series-meta .series-cinematography,
.series-meta .series-editing,
.series-meta .series-composer,
.series-meta .series-producers,
.movie-meta .movie-screenplay,
.movie-meta .movie-cinematography,
.movie-meta .movie-editing,
.movie-meta .movie-composer,
.movie-meta .movie-producers {
    display: block;
    margin-bottom: 8px;
    color: #444;
}

/* Улучшенные стили для блока информации о сезонах */
.series-seasons-info {
    margin: 30px 0;
}

.series-seasons-info h2 {
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.seasons-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.season-item {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.season-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.season-number {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 16px;
}

.episodes-count {
    display: block;
    font-size: 14px;
    color: #666;
}

/* Улучшенные стили для плеера */
.movie-player,
.series-player {
    margin: 30px 0;
}

.movie-player h2,
.series-player h2 {
    font-size: 20px;
    margin-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    /* Еле заметный черный цвет */
    padding-bottom: 8px;
    text-align: center;
    padding-top: 10px;
    width: 100%;
    /* Полная ширина */
    display: block;
    /* Обеспечивает полную ширину */
}

body.dark-mode .movie-player h2,
body.dark-mode .series-player h2 {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Еле заметный белый цвет для темного режима */
}

.player-container {
    position: relative;
    aspect-ratio: 16/9;
    min-height: 200px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-top: 15px;
}

.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Стили для дополнительной информации */
.series-directors,
.series-screenplay,
.series-cinematography,
.series-editing,
.series-producers,
.movie-directors,
.movie-screenplay,
.movie-cinematography,
.movie-editing,
.movie-producers {
    margin-top: 30px;
}

.series-directors h3,
.series-screenplay h3,
.series-cinematography h3,
.series-editing h3,
.series-producers h3,
.movie-directors h3,
.movie-screenplay h3,
.movie-cinematography h3,
.movie-editing h3,
.movie-producers h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.movie-header {
    display: flex;
    margin-bottom: 30px;
    gap: 30px;
}

.movie-poster {
    flex: 0 0 400px;
    position: relative;
}

.movie-poster img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.movie-details {
    flex: 1;
}

.movie-details h1 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 28px;
    line-height: 1.2;
}

.movie-original-title {
    color: #666;
    font-size: 18px;
    margin-bottom: 10px;
}

.movie-slogan {
    font-style: italic;
    margin-bottom: 15px;
    border-left: 3px solid #ddd;
    padding-left: 10px;
}

/* Стили для рейтингов */
.ratings {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.rating {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.rating-kp {
    background: #f60;
}

.rating-imdb {
    background: #f5c518;
}

/* Стили для метаданных */
.movie-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    padding-bottom: 8px;
}

.meta-label {
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
    color: #555;
}

/* Стили для блока с возрастными ограничениями */
.age-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.mpaa-rating {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

/* Стили для информации о зрителях */
.viewers-countries {
    margin-top: -8px;
}

.viewers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.viewer-country {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    white-space: nowrap;
}


.player-container,
.trailer-container {
    position: relative;
    aspect-ratio: 16/9;
    min-height: 200px;
    border-radius: 0px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.player-container iframe,
.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Стили для блоков истории и фактов */
.movie-description,
.movie-facts,
.movie-awards {
    padding: 0 20px;
    position: relative;
    /* Добавляем позиционирование для абсолютного позиционирования псевдоэлементов */
}

/* Используем псевдоэлемент для линии под заголовком */
.movie-description h2,
.movie-facts h2,
.movie-awards h2,
.screenshots-gallery h2,
.movie-cast-section h2 {
    font-size: 22px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    position: relative;
    /* Для позиционирования псевдоэлемента */
    border-bottom: none;
    /* Убираем оригинальную границу */
}

.movie-description h2:after,
.movie-facts h2:after,
.movie-awards h2:after,
.screenshots-gallery h2:after,
.movie-cast-section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -20px;
    /* Компенсация padding родителя */
    right: -20px;
    /* Компенсация padding родителя */
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    /* Еле заметный черный цвет */
}



/* Стили для темного режима */
body.dark-mode .movie-description h2:after,
body.dark-mode .movie-facts h2:after,
body.dark-mode .movie-awards h2:after,
body.dark-mode .screenshots-gallery h2:after,
body.dark-mode .movie-cast-section h2:after,
body.dark-mode .movie-player h2:before,
body.dark-mode .series-player h2:before {
    background-color: rgba(255, 255, 255, 0.1);
    /* Еле заметный белый цвет для темного режима */
}

.facts-content,
.awards-content {
    line-height: 1.6;
}

/* Стили для галереи скриншотов */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.screenshot-item {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.screenshot-item:hover {
    transform: scale(1.02);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Стили для списка актеров */
.actor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.actor-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
}

.actor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.actor-card .card-image {
    height: 200px;
    overflow: hidden;
}

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

.actor-card .card-body {
    padding: 12px;
}

.actor-card .card-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    line-height: 1.3;
}

.actor-card .card-meta {
    color: #666;
    font-size: 14px;
}

.actor-card a {
    text-decoration: none;
    color: inherit;
}

/* Адаптивность */
@media (max-width: 768px) {
    .movie-header {
        flex-direction: column;
    }

    .movie-poster {
        flex: none;
        max-width: 250px;
        margin: 0 auto 20px;
    }

    .meta-label {
        width: 100%;
        margin-bottom: 5px;
    }

    .viewers-countries {
        padding-left: 0;
    }

    .viewers-list {
        flex-direction: column;
    }

    .screenshots-grid,
    .actor-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .movie-meta {
        grid-template-columns: 1fr 1fr;
    }
}

.movie-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.movie-poster-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.movie-poster {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.movie-poster img {
    width: 100%;
    height: auto;
    display: block;
}

/* Стили для рейтингов и меток на постере */
.age-rating,
.mpaa-rating {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.age-rating {
    top: 10px;
    right: 10px;
}

.mpaa-rating {
    bottom: 10px;
    right: 10px;
}

/* Круговой рейтинг с градиентом */
.user-rating-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
}

.rating-circle {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
}

.rating-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--circle-color) 0% var(--percentage),
            #ddd var(--percentage) 100%);
}

.rating-circle::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 50%;
    background: white;
}

.rating-value {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Кнопки лайков/дизлайков */
.rating-buttons {
    display: flex;
    gap: 15px;
}

.rating-button {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid #ddd;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.rating-button:hover {
    background-color: #f0f0f0;
}

.like-button {
    color: #4CAF50;
}

.like-button:hover {
    border-color: #4CAF50;
}

.dislike-button {
    color: #F44336;
}

.dislike-button:hover {
    border-color: #F44336;
}

.rating-button.voted {
    opacity: 0.7;
    cursor: default;
}

.rating-button.active {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* Сообщение о голосовании */
.rating-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.rating-message.success {
    background-color: #e8f5e9;
    color: #388e3c;
}

.rating-message.error {
    background-color: #ffebee;
    color: #d32f2f;
}

/* Стили для трейлера */
.movie-trailer {
    margin-top: 15px;
}

.movie-trailer h3 {
    font-size: 18px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.trailer-container {
    position: relative;
    aspect-ratio: 16/9;
    min-height: 200px;
    border-radius: 8px;
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Стили для редакторов содержимого */
.movie-editor-content {
    margin: 20px 0;
    line-height: 1.6;
}

.movie-editor-content p {
    margin-bottom: 10px;
}

.movie-seo-description {
    padding: 0 180px;
    line-height: 1.6;
}

/* Стили для системы реакций */
.movie-reactions-container {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.reactions-header {
    margin-bottom: 15px;
}

.reactions-list {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-radius: 8px;
}

.reaction-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--primary-color) !important;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 5px 10px;
}

.reaction-item:hover {
    transform: translateY(-5px);
}

.reaction-item.reacted .reaction-emoji {
    animation: pulse 0.5s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.reaction-emoji {
    font-size: 24px;
}

.reaction-count {
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px;
}

/* Стили для кнопок социальных сетей */
.social-share {
    display: flex;
    margin: 15px 0;
}

.share-button {
    flex: 1;
    text-align: center;
    padding: 10px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: opacity 0.2s;
}

.share-button:hover {
    opacity: 0.9;
}

.share-button.vk {
    background-color: #4a76a8;
}

.share-button.ok {
    background-color: #ee8208;
}

.share-button.tg {
    background-color: #0088cc;
}

.share-button.vb {
    background-color: #7360f2;
}

.share-button.sk {
    background-color: #00aff0;
}

.share-button.wa {
    background-color: #25d366;
}

.share-button.rd {
    background-color: #ff4500;
}

/* Стили для секции комментариев */
.movie-comments-section {
    margin-top: 30px;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    margin-bottom: 15px;
}

.comments-filter {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.sort-option {
    text-decoration: none;
    color: #666;
    margin-left: 10px;
    transition: color 0.2s;
}

.sort-option:hover {
    color: #333;
}

.sort-option.active {
    color: #333;
    font-weight: bold;
}

/* Форма комментариев */
.comments-form {
    margin-bottom: 30px;
}

.comment-name {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.comment-editor {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.comment-textarea {
    width: 99%;
    height: 150px;
    padding: 10px;
    border: none;
    resize: none;
    font-size: 16px;
    line-height: 1.5;
}

.comment-textarea:focus {
    outline: 1px solid #red;
    box-shadow: 0 0 3px #red;
}

.comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
}

.comment-emojis {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-right: 10px;
}

.emoji-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 3px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.emoji-btn:hover {
    background-color: #ececec;
}

.comment-chars {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
}

.comment-submit {
    background-color: #ff6600;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    font-size: 16px;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.comment-submit:hover {
    background-color: #e55c00;
}

/* Стили для отображения комментариев */
.comments-list {
    margin-top: 30px;
}

.comment {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-author .avatar {
    border-radius: 50%;
}

.author-name {
    font-weight: bold;
    color: #333;
}

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

.comment-content {
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-content p {
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.comment-reply,
.comment-like,
.comment-report {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: color 0.2s;
}

.comment-reply:hover,
.comment-like:hover,
.comment-report:hover {
    color: #333;
}

.no-comments {
    text-align: center;
    padding: 30px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
}

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

    .movie-seo-description {
        padding: 0 20px;
    }

    .movie-poster-container {
        max-width: 300px;
        margin: 0 auto;
    }

    .reactions-list {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .social-share {
        flex-wrap: wrap;
        gap: 5px;
    }

    .share-button {
        flex-basis: calc(25% - 5px);
    }

    .movie-meta {
        display: block;
    }

    .meta-item {
        margin-bottom: 15px;
    }

    .meta-label {
        display: block;
        margin-bottom: 5px;
    }
}

/**
 * Добавьте эти стили в ваш файл style.css или создайте новый файл assets/css/header-footer.css 
 * и подключите его в functions.php через wp_enqueue_style()
 */

/* Стили для шапки */
.site-header {
    padding: 15px 0;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.site-branding {
    display: flex;
    align-items: center;
}

.custom-logo-link {
    display: block;
    max-width: 200px;
}

.custom-logo {
    max-height: 80px;
    width: auto;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-title a {
    color: var(--primary-color, #3490dc);
    text-decoration: none;
}

/* Стили для навигации */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
    margin-right: 20px;
}

.main-navigation a {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 0;
    display: block;
    position: relative;
}

.main-navigation a:hover {
    color: var(--primary-color, #3490dc);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color, #3490dc);
    transition: width 0.3s;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Стили для кнопки переключения темы */
.dark-mode-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 15px;
    color: #333;
    position: relative;
}

.dark-mode-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode-toggle .sun,
.dark-mode-toggle .moon {
    position: absolute;
    transition: opacity 0.3s, transform 0.3s;
}

.dark-mode-toggle .sun {
    opacity: 1;
    transform: scale(1);
}

.dark-mode-toggle .moon {
    opacity: 0;
    transform: scale(0.5);
}

/* Стили для поиска в шапке */
.header-search {
    position: relative;
    margin-left: 10px;
}

.search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
}

.search-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.search-form-container {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
}

.search-form-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-form {
    display: flex;
    width: 100%;
}

.search-input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    padding: 8px 12px;
    font-size: 14px;
}

.search-submit {
    background-color: var(--primary-color, #3490dc);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0 12px;
    cursor: pointer;
}

/* Стили для шапки в разных режимах */
/* Закрепленная шапка */
.header-sticky .site-header {
    position: sticky;
    top: 0;
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.header-sticky.admin-bar .site-header {
    top: 32px;
}

/* Прозрачная шапка */
.header-transparent .site-header {
    background-color: transparent;
    box-shadow: none;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
}

.header-transparent .site-title a,
.header-transparent .main-navigation a,
.header-transparent .dark-mode-toggle,
.header-transparent .search-toggle {
    color: white;
}

.header-transparent .main-navigation a::after {
    background-color: white;
}

.header-transparent.scrolled .site-header {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.header-transparent.scrolled .site-title a,
.header-transparent.scrolled .main-navigation a,
.header-transparent.scrolled .dark-mode-toggle,
.header-transparent.scrolled .search-toggle {
    color: #333;
}

.header-transparent.scrolled .main-navigation a::after {
    background-color: var(--primary-color, #3490dc);
}

/* Стили для футера */
.site-footer {
    background-color: #222;
    color: #e1e1e1;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-heading {
    font-size: 18px;
    margin: 0 0 15px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color, #3490dc);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.footer-widget-area {
    margin-bottom: 20px;
}

.footer-widget-area .widget {
    margin-bottom: 20px;
}

.footer-widget-area .widget-title {
    font-size: 18px;
    margin: 0 0 15px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget-area .widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color, #3490dc);
}

.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-navigation li {
    margin-bottom: 8px;
}

.footer-navigation a {
    color: #e1e1e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-navigation a:hover {
    color: var(--primary-color, #3490dc);
}

.footer-social .social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    transition: background-color 0.3s, transform 0.3s;
}

.social-icon:hover {
    background-color: var(--primary-color, #3490dc);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-info {
    font-size: 14px;
}

.footer-secondary-menu ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-secondary-menu a {
    color: #a0a0a0;
    font-size: 14px;
    text-decoration: none;
}

.footer-secondary-menu a:hover {
    color: #fff;
}

/* Адаптивность */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-branding {
        margin-bottom: 15px;
    }

    .main-navigation {
        width: 100%;
        margin-top: 10px;
    }

    .main-navigation ul {
        flex-direction: column;
    }

    .main-navigation li {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .dark-mode-toggle,
    .header-search {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .search-form-container {
        width: calc(100vw - 30px);
        right: -15px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .site-info {
        margin-bottom: 15px;
    }
}

/* Темный режим */
body.dark-mode .site-header {
    background-color: var(--dark-mode-card-color, #1e1e1e);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .site-title a {
    color: var(--dark-mode-text-color, #e1e1e1);
}

body.dark-mode .main-navigation a {
    color: var(--dark-mode-text-color, #e1e1e1);
}

body.dark-mode .dark-mode-toggle,
body.dark-mode .search-toggle {
    color: var(--dark-mode-text-color, #e1e1e1);
}

body.dark-mode .dark-mode-toggle:hover,
body.dark-mode .search-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .dark-mode-toggle .sun {
    opacity: 0;
    transform: scale(0.5);
}

body.dark-mode .dark-mode-toggle .moon {
    opacity: 1;
    transform: scale(1);
}

body.dark-mode .search-form-container {
    background-color: var(--dark-mode-card-color, #1e1e1e);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .search-input {
    background-color: var(--dark-mode-background, #121212);
    border: 1px solid var(--dark-mode-border-color, #333);
    color: var(--dark-mode-text-color, #e1e1e1);
}

body.dark-mode.header-transparent.scrolled .site-header {
    background-color: rgba(30, 30, 30, 0.9);
}

body.dark-mode.header-transparent.scrolled .site-title a,
body.dark-mode.header-transparent.scrolled .main-navigation a,
body.dark-mode.header-transparent.scrolled .dark-mode-toggle,
body.dark-mode.header-transparent.scrolled .search-toggle {
    color: var(--dark-mode-text-color, #e1e1e1);
}

body.dark-mode .site-footer {
    background-color: var(--dark-mode-background, #121212);
    border-top: 1px solid var(--dark-mode-border-color, #333);
}

/**
 * Стили для шапки LORDFILM точно как на референсе (картинка 2)
 */

/* Обертка для центрирования шапки */
.header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #000;
    width: 100%;
}

/* Базовые стили для страницы */
html,
body {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    position: relative !important;
}

/* Фоновое изображение */
.site-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    z-index: -1 !important;
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%) !important;
}

/* ПРИНУДИТЕЛЬНО создаем шапку поверх всего */
body::before {
    content: "" !important;
    display: block !important;
    height: 60px !important;
    /* Высота шапки */
    width: 100% !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    /* Очень высокий z-index */
}

/* Основной контейнер сайта - отступ сверху для видимости фона */
#page {
    max-width: 1200px !important;
    margin: 250px auto 0 !important;
    /* 200px отступ сверху */
    background-color: var(--dark-mode-background) !important;
    position: relative !important;
    z-index: 1 !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5) !important;
}

/* Стиль для оригинальной шапки, если она существует */
.header-wrapper {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Меню внутри шапки */
.menu-bar {
    display: block !important;
    width: 100% !important;
}

/* Темная панель внизу баннера */
.menu-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(34, 34, 34, 0.8);
    backdrop-filter: blur(5px);
    height: 60px;
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Стили для логотипа */
.site-branding {
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-square {
    width: 36px;
    height: 36px;
    background-color: #3490dc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 15px;
    border-radius: 4px;
    margin-right: 10px;
}

.logo-text {
    color: white;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.custom-logo {
    height: 36px;
    width: auto;
}

/* Стили для навигации */
.main-navigation {
    flex: 1;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin-right: 30px;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: #3490dc;
}

/* Стили для правой части (поиск и темы) */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Стили для поиска */
.header-search {
    position: relative;
    width: 250px;
}

.search-form {
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    height: 36px;
    padding: 0 40px 0 15px;
    border-radius: 18px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-submit {
    position: absolute;
    right: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background-color: #3490dc;
    border: none;
    border-radius: 0 18px 18px 0;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стили для переключателя тем */
.light_dark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #3490dc;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
}

.light_dark .icon {
    position: absolute;
    width: 24px;
    height: 24px;
    color: white;
    transition: all 0.3s ease;
}

.light_dark .icon:first-child {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.light_dark .icon:last-child {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.light_dark.dark .icon:first-child {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.light_dark.dark .icon:last-child {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-banner {
        height: auto;
        min-height: 200px;
    }

    .menu-bar {
        height: auto;
        position: relative;
    }

    .menu-container {
        flex-direction: column;
        padding: 15px;
    }

    .site-branding {
        margin-bottom: 15px;
        margin-right: 0;
    }

    .main-navigation {
        width: 100%;
        margin-bottom: 15px;
        order: 3;
    }

    .main-navigation ul {
        flex-wrap: wrap;
    }

    .main-navigation li {
        margin-bottom: 10px;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
        order: 2;
    }

    .header-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-right {
        flex-direction: column;
        gap: 10px;
    }

    .theme-switcher {
        align-self: flex-end;
    }
}

/* Тёмная панель внизу баннера */
.menu-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(5px);
    height: 60px;
    z-index: 2;
}

.menu-container {
    max-width: 1180px;
    /* Чуть меньше, чем баннер */
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Стили для логотипа */
.site-branding {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-square {
    width: 40px;
    height: 40px;
    background-color: #3490dc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    border-radius: 4px;
    margin-right: 10px;
}

.logo-text {
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
}

.custom-logo {
    height: 40px;
    width: auto;
}

/* Стили для навигации */
.main-navigation {
    flex: 1;
    margin-left: 30px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin-right: 30px;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: #3490dc;
}

/* Стили для правой части */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Стили для поиска */
.header-search {
    position: relative;
    width: 250px;
}

.search-form {
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    height: 36px;
    padding: 0 40px 0 15px;
    border-radius: 18px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-submit {
    position: absolute;
    right: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background-color: #3490dc;
    border: none;
    border-radius: 0 18px 18px 0;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стили для кнопки переключения темы */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #3490dc;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.theme-icons {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-icons i {
    position: absolute;
    font-size: 16px;
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

/* Анимация вращения при клике */
.theme-toggle.clicked {
    animation: spin 0.5s ease;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-banner {
        height: auto;
        min-height: 160px;
    }

    .menu-bar {
        position: relative;
        height: auto;
    }

    .menu-container {
        flex-direction: column;
        padding: 15px;
    }

    .site-branding {
        margin-bottom: 15px;
    }

    .main-navigation {
        width: 100%;
        margin-left: 0;
        margin-bottom: 15px;
        order: 2;
    }

    .main-navigation ul {
        flex-wrap: wrap;
    }

    .main-navigation li {
        margin-bottom: 10px;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
        order: 3;
    }

    .header-search {
        width: calc(100% - 60px);
    }
}

/* Стили для футера */
.site-footer {
    background-color: #0a1424;
    color: #a0a0a0;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-heading {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #3490dc;
}

.footer-text {
    line-height: 1.6;
}

.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-navigation li {
    margin-bottom: 8px;
}

.footer-navigation a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-navigation a:hover {
    color: #fff;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #3490dc;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

/**
 * Добавьте эти стили в ваш основной файл стилей (style.css)
 * Эти стили обеспечивают правильное отображение эмодзи-реакций и диалога ссылок в светлой теме
 */

/* Стили для эмодзи-реакций в светлой теме */
.reactions-container {
    background-color: #f5f5f5;
    /* Светлый фон для светлой темы */
    border-radius: 8px;
}

.reactions-container h3 {
    color: #333;
    /* Тёмный цвет текста для светлой темы */
    margin-top: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 18px;
}

.reactions-list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.reaction-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.reaction-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    /* Светлый оттенок при наведении */
    transform: translateY(-5px);
}

.reaction-emoji {
    font-size: 24px;
    margin-bottom: 5px;
}

.reaction-count {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    /* Тёмный цвет текста для светлой темы */
}

.reaction-item.selected {
    background-color: rgba(52, 144, 220, 0.1);
    /* Светлый оттенок primary-color */
    border: 1px solid #3490dc;
}

/* Стили для модального окна вставки ссылки в светлой теме */
.link-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.link-dialog {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.link-dialog h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.link-dialog label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    color: #555;
}

.link-dialog input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.link-dialog button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.link-dialog #cancel-link {
    background-color: #eee;
    color: #333;
}

.link-dialog #insert-link {
    background-color: #4682B4;
    color: white;
    font-weight: bold;
}

/* Обновленные стили для карточек фильмов и сериалов */
.movie-card,
.series-card {
    position: relative !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    height: 100% !important;
    margin-bottom: 20px !important;
}

.card-link {
    display: block !important;
    text-decoration: none !important;
    color: white !important;
    height: 100% !important;
}

.card-image {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}

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

/* Бейдж года в стиле референса - теперь синего цвета */
.year-badge {
    position: absolute !important;
    top: 10px !important;
    /* Увеличенный отступ сверху */
    left: 10px !important;
    /* Увеличенный отступ слева */
    background-color: var(--primary-color) !important;
    /* Теперь синий цвет как для сезона */
    color: white !important;
    padding: 5px 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 5px;

}

.fa-classic,
.fa-regular,
.far,
.fas {
    color: var(--primary-color) !important;
}

.fa-solid {
    color: #fff;
}

/* Бейдж сезона в стиле референса с отступами */
.season-badge {
    position: absolute !important;
    top: 10px !important;
    /* Увеличенный отступ сверху */
    left: 10px !important;
    /* Увеличенный отступ слева */
    background-color: var(--primary-color) !important;
    /* Синий цвет */
    color: white !important;
    padding: 5px 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    z-index: 2 !important;
}

/* Остальные стили остаются без изменений */
.card-gradient {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 50% !important;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.7) 40%,
            rgba(0, 0, 0, 0.2) 80%,
            transparent 100%) !important;
}

.card-info-bottom {
    position: absolute !important;
    bottom: 10px !important;
    left: 0 !important;
    right: 0 !important;
    text-align: center !important;
    padding: 0 10px !important;

}

.card-title-overlay {
    margin: 0 0 8px 0 !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
    font-weight: 500 !important;
}

.card-ratings-bottom {
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
}

.rating-bottom {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.kp-rating .rating-label {
    color: #f60 !important;
    font-weight: bold !important;
}

.kp-rating .rating-value {
    color: #f60 !important;
    font-weight: bold !important;
}

.imdb-rating .rating-label {
    color: #f5c518 !important;
    font-weight: bold !important;
}

.imdb-rating .rating-value {
    color: #fff !important;
    font-weight: bold !important;
}

/* Скрываем старый стиль карточек */
.card-info {
    display: none !important;
}

/* Стили для сетки карточек */
.content-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 20px !important;
}

/* Основные стили для эффекта наведения */
.card-image {
    position: relative;
    overflow: hidden;
}

/* Оверлей при наведении */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* Стиль для кнопки воспроизведения */
.play-button {
    width: 64px;
    height: 64px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}



.play-button svg {
    width: 30px;
    height: 30px;
    fill: #ffffff;
}

/* Эффект при наведении */
.movie-card:hover .card-overlay,
.series-card:hover .card-overlay {
    opacity: 1;
}

.movie-card:hover .play-button,
.series-card:hover .play-button {
    transform: scale(1);
}

/* Чтобы бейджи и другая информация оставались видимыми при наведении */
.year-badge,
.season-badge,
.premium-badge,
.series-status-badge {
    position: absolute;
    z-index: 3;
}

/* Убираем эффект карточки, так как у нас будет свой эффект */
.card-hover-lift:hover {
    transform: none;
    box-shadow: none;
}

/* Информация о фильме - теперь не ограничиваем высоту */
.card-info {
    position: absolute !important;
    bottom: -15px !important;
    /* Смещаем вниз за пределы карточки */
    left: 0 !important;
    width: 100% !important;
    padding: 0 5px !important;
    /* Уменьшаем горизонтальные отступы */
    z-index: 2 !important;
    background-color: transparent !important;
}

/* Заголовок фильма - существенно уменьшаем размер шрифта */
.card-title {
    margin: 0 0 5px 0 !important;
    font-size: 12px !important;
    /* Уменьшил размер шрифта */
    line-height: 1.2 !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    /* Ограничиваем двумя строками */
    -webkit-box-orient: vertical !important;
    font-weight: normal !important;
    /* Уменьшаем жирность */
    word-break: break-word !important;
    /* Разрешаем переносы в любом месте */
    text-align: center !important;
    /* Центрируем текст */
}

/* Рейтинги - делаем компактнее и выносим их ниже карточки */
.card-ratings {
    display: flex !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin-top: 2px !important;
    padding: 0 5px !important;
}

.rating {
    display: flex !important;
    align-items: center !important;
    background-color: transparent !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    /* Запрещаем сжиматься */
}

.kp-rating .rating-label {
    color: #f60 !important;
    margin-right: 2px !important;
    font-size: 14px !important;
    /* Уменьшил размер шрифта */
    font-weight: bold !important;
}

.kp-rating .rating-value {
    color: #fff !important;
    font-size: 14px !important;
    /* Уменьшил размер шрифта */
    font-weight: bold !important;
    white-space: nowrap !important;
}

.imdb-rating {
    margin-left: auto !important;
}

.imdb-rating .rating-label {
    color: #f5c518 !important;
    margin-right: 2px !important;
    font-size: 14px !important;
    /* Уменьшил размер шрифта */
    font-weight: bold !important;
}

.imdb-rating .rating-value {
    color: #fff !important;
    font-size: 14px !important;
    /* Уменьшил размер шрифта */
    font-weight: bold !important;
    white-space: nowrap !important;
}

/* Убираем лишние элементы и серый фон */
.card-body,
.card-meta {
    display: none !important;
    background-color: transparent !important;
}

.movie-card .card-body,
.series-card .card-body {
    display: none !important;
}

/* Увеличиваем отступы между карточками */
.content-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 40px 20px !important;
    /* Увеличиваем вертикальный отступ */
    margin: 0 -10px !important;
    padding: 20px !important;
}

/* Анимации */
@keyframes cardFadeIn {
    from {
        opacity: 0 !important;
        transform: translateY(10px) !important;
    }

    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

.movie-card,
.series-card {
    animation: cardFadeIn 0.3s ease-out !important;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .card-title {
        font-size: 11px !important;
    }

    .rating-label,
    .rating-value {
        font-size: 10px !important;
    }
}

.cast-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cast-container h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 0 10px;
}

.cast-item {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-in-out;
}

.cast-item:hover {
    transform: translateY(-5px);
}

.cast-photo {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 10px;
    background: #f5f5f5;
}

.cast-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
}

.photo-placeholder .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.cast-info {
    padding: 15px 0;
    text-align: center;
}

.cast-name {
    font-size: 1.1rem;
    margin: 0 0 5px 0;

    font-weight: 600;
}

.cast-role {
    font-size: 0.9rem;

    font-weight: 400;
}

/* Адаптивность */
@media (max-width: 768px) {
    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .cast-photo {
        height: 225px;
    }

    .cast-name {
        font-size: 1rem;
    }

    .cast-role {
        font-size: 0.85rem;
    }
}


/* Стили для живого поиска */
.header-search {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    z-index: 2147483646 !important;
    /* Максимально возможный z-index - 1 */
}

.search-form {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2147483646 !important;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    color: #333;
    position: relative;
    z-index: 2147483646 !important;
}

.search-input:focus {
    border-color: #4e7de1;
    box-shadow: 0 2px 10px rgba(78, 125, 225, 0.1);
}

.search-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    background: none;
    border: none;
    font-size: 18px;
    color: #555;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    z-index: 2147483646 !important;
}

.search-submit:hover {
    color: #4e7de1;
}

/* Стили для выпадающих результатов поиска */
.search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #fff !important;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2) !important;
    margin-top: 5px;
    z-index: 2147483647 !important;
    /* Максимально возможный z-index */
    max-height: 70vh;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Делаем все элементы внутри выпадающего списка с максимальным z-index */
.search-results * {
    z-index: 2147483647 !important;
}

.search-loading {
    padding: 15px;
    text-align: center;
    color: #888;
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-results-list li {
    border-bottom: 1px solid #f0f0f0;
}

.search-results-list li:last-child {
    border-bottom: none;
}

.search-results-list a {
    display: flex;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.search-results-list a:hover {
    background-color: #f8f9fa;
}

.search-thumbnail {
    width: 70px;
    height: 100px;
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    background-color: #f0f0f0;
    /* Фон на случай, если картинка не загрузится */
}

.search-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.search-rating {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #4e7de1;
    color: white;
    border-radius: 3px;
    padding: 1px 6px;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.search-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-content h4 {
    margin: 0 0 5px;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.search-year {
    background-color: #f0f0f0;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.search-genres {
    color: #777;
}

.view-all-results {
    padding: 12px 15px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background-color: #f8f9fa;
}

.view-all-results a {
    color: #4e7de1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: block;
    transition: color 0.2s;
}

.view-all-results a:hover {
    color: #3d63b6;
}

/* Отключение стилей автозаполнения браузера */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Темный режим */
body.dark-mode .search-input {
    background-color: #1f1f1f;
    border-color: #333;
    color: #e0e0e0;
}

body.dark-mode .search-submit {
    color: #bbb;
}

body.dark-mode .search-results {
    background-color: #1a1a1a !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
    border-color: #333 !important;
}

body.dark-mode .search-results-list li {
    border-bottom-color: #333;
}

body.dark-mode .search-results-list a {
    color: #e0e0e0;
}

body.dark-mode .search-results-list a:hover {
    background-color: #252525;
}

body.dark-mode .search-content h4 {
    color: #e0e0e0;
}

body.dark-mode .search-year {
    background-color: #333;
    color: #ddd;
}

body.dark-mode .search-genres {
    color: #bbb;
}

body.dark-mode .view-all-results {
    border-top-color: #333;
    background-color: #252525;
}

body.dark-mode .view-all-results a {
    color: #4e7de1;
}

body.dark-mode .search-loading {
    color: #bbb;
}

body.dark-mode input:-webkit-autofill,
body.dark-mode input:-webkit-autofill:hover,
body.dark-mode input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #1f1f1f inset !important;
    -webkit-text-fill-color: #e0e0e0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .search-thumbnail {
        width: 60px;
        height: 90px;
    }

    .search-content h4 {
        font-size: 14px;
    }

    .search-meta {
        font-size: 12px;
    }
}

/* Стили для страницы поиска */
.search-page {
    padding: 40px 0;
}

.search-page-header {
    margin-bottom: 20px;
    text-align: center;
}

.search-results-count {
    font-size: 16px;
    color: #777;
    margin-top: 5px;
    padding: 10px;
}

.search-page-form {
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Стили контента карточек в стиле front-page */
.content-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.content-card-poster {
    position: relative;
    overflow: hidden;
    padding-top: 150%;
    /* Соотношение сторон постера 2:3 */
}

.content-card-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.content-card:hover .content-card-poster img {
    transform: scale(1.05);
}

.content-card-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4e7de1;
    color: white;
    border-radius: 4px;
    padding: 2px 8px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.content-card-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.content-card-title {
    font-size: 16px;
    margin: 0 0 8px;
    line-height: 1.3;
    font-weight: 600;
}

.content-card-title a {
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.content-card-meta {
    font-size: 13px;
    color: #777;
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.content-card-meta .year {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    color: #555;
    font-weight: 500;
}

.content-card-meta .genres {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.search-pagination {
    margin-top: 30px;
    text-align: center;
}

.search-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.search-pagination .page-numbers.current {
    background-color: #4e7de1;
    color: #fff;
}

.search-pagination .page-numbers:hover:not(.current) {
    background-color: #f0f0f0;
}

.suggestion-grid {
    margin-top: 20px;
}

/* Переопределение некоторых стилей для соответствия front-page */
.no-content {
    text-align: center;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.no-content h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.no-content p {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 25px;
}

.search-suggestions {
    margin-top: 30px;
}

.search-suggestions h3 {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: left;
}

/* Обновленные стили для страницы актеров (без поиска) */

/* Сетка актеров - улучшенная версия */
.actors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin: 30px 0 40px;
}

.actor-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.actor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.actor-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.actor-card-photo {
    position: relative;
    padding-top: 150%;
    /* Соотношение сторон 2:3 */
    overflow: hidden;
}

.actor-card-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.actor-card-info {
    padding: 15px;
}

.actor-card-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    /* Ограничение на 2 строки */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.actor-card-original-name {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    /* Ограничение на 1 строку */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actor-card-movies-count {
    font-size: 13px;
    color: #3490dc;
    font-weight: 500;
}

/* Заголовок страницы */
.page-header {
    margin-bottom: 20px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.page-title {
    font-size: 28px;
    margin-bottom: 10px;
    padding: 20px !important;
}

.archive-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Сообщение об отсутствии актеров */
.no-actors {
    padding: 40px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
}

.no-actors p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Уникальная горизонтальная пагинация для страницы актеров */
.actors-pagination {
    margin: 40px 0;
    text-align: center;
    width: 100%;
}

.actors-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
}

.actors-pagination li {
    margin: 0;
    display: inline-block;
}

.actors-pagination a,
.actors-pagination span.current {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #2a2a2a;
    border: 1px solid #333;
    color: #ccc;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 500;
}

.actors-pagination a:hover {
    background-color: #3a3a3a;
    border-color: #444;
}

.actors-pagination span.current {
    background-color: #3490dc;
    color: white;
    border-color: #3490dc;
}

.actors-pagination .prev,
.actors-pagination .next {
    width: auto;
    padding: 0 15px;
}

/* Кнопка "Следующая" */
.actors-pagination .next {
    background-color: #222;
    border-color: #333;
}

.actors-pagination .next:hover {
    background-color: #333;
}

/* Стиль для многоточия */
.actors-pagination .dots {
    background-color: transparent;
    border: none;
    color: #ccc;
}

/* Адаптивность */
@media (max-width: 480px) {
    .actors-pagination ul {
        gap: 3px;
    }

    .actors-pagination a,
    .actors-pagination span.current {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }

    .actors-pagination .prev,
    .actors-pagination .next {
        padding: 0 10px;
    }
}

/* Адаптивность */
@media (max-width: 1200px) {
    .actors-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
}

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

    .actor-card-name {
        font-size: 14px;
    }

    .actor-card-info {
        padding: 10px;
    }

    .page-title {
        font-size: 24px;
    }


}

@media (max-width: 480px) {
    .actors-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .actor-card-name {
        font-size: 13px;
    }

    .actor-card-original-name,
    .actor-card-movies-count {
        font-size: 12px;
    }

    .actor-card-info {
        padding: 8px;
    }


}

/* Темный режим */
body.dark-mode .actor-card {
    background-color: #1e1e1e;
}

body.dark-mode .actor-card-name {
    color: #e0e0e0;
}

body.dark-mode .actor-card-original-name {
    color: #bbb;
}

body.dark-mode .actor-card-movies-count {
    color: #56a0f8;
}

body.dark-mode .page-title {
    color: #e0e0e0;
}

body.dark-mode .archive-description {
    color: #bbb;
}

body.dark-mode .no-actors {
    background-color: #1e1e1e;
}

body.dark-mode .no-actors p {
    color: #bbb;
}

.actors-pagination .dots {
    display: none !important;
}

/* Сверхпростое решение для слогана и других элементов */

/* Базовый стиль сетки */
@media (min-width: 992px) {
    .movie-meta {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 5px !important;
    }
}

/* Тонкие линии-разделители для всех элементов кроме блока с актерами */
.movie-meta .meta-item:not([class*="role"]):not([id*="role"]) {
    padding-bottom: 3px !important;
    margin-bottom: 3px !important;
}

/* Стиль для всех меток с двоеточием */
.movie-meta .meta-label {
    font-weight: bold !important;
}


/* Главное исправление для слогана */
.movie-meta span[id*="slogan"] {
    display: inline !important;
}

/* Или альтернативный вариант для всей строки слогана */
.meta-item:has([id*="slogan"]),
.meta-item:has(.meta-label:contains("Слоган")) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
}

/* Прямое решение для элемента с ID, содержащего слоган */
#movie_slogan,
.movie_slogan,
span[id*="slogan"],
div[id*="slogan"] {
    display: inline !important;
    white-space: normal !important;
}

body.dark-mode .movie-meta .meta-label {
    color: #e0e0e0 !important;
}

/* Гарантированный переключатель темы */
#theme-switcher-emergency {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    width: 60px !important;
    height: 30px !important;
    border-radius: 15px !important;
    background: #333 !important;
    cursor: pointer !important;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

h2.section-title {
    padding: 10px;
    padding-top: 20px;
}

.load-more-button {
    margin-bottom: 20px;
}

.footer-widgets {
    padding: 10px;
    max-width: 1180px;
    margin: 0 auto;
}

@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    * {
        max-width: 100%;
    }
}


.footer-bottom {
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px;
}

@media (max-width: 768px) {

    /* Можно изменить 768px на нужный breakpoint */
    body::before {
        display: none !important;
    }

    #page {
        margin: 0px auto !important;
    }

    .site-background {
        display: none;
    }
}

/* Стили для вложенных комментариев без бордера */
.child-comments {
    margin-top: 15px;
    padding-top: 5px;
}

.child-comment {
    margin-top: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    /* Слегка отличающийся фон для отличия */
}

/* Упоминание автора в начале комментария */
.comment-mention {
    color: #3498db;
    font-weight: bold;
}

.comment-content p {
    word-break: break-word;
}

.movie-parts-container h2,
.movie-player h2 {
    font-size: 20px;
    margin: 0px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 8px;
    text-align: center;
    padding-top: 10px;
    width: 100%;
    display: block;
    margin: 0px !important;
}

.movie-player-with-parts {
    margin-top: 5px !important
}

.player-container {
    margin-top: 5px !important;
}