/* =========================================================
   СТРАНИЦА ФИЛЬМА (MOVIE PAGE STYLES)
   ========================================================= */

/* Контейнер страницы фильма */
.movie-page-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
}

/* ---------------------------------------------------------
   ОПИСАНИЕ И ХАРАКТЕРИСТИКИ ФИЛЬМА
   --------------------------------------------------------- */
.movie-details {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.movie-poster {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.movie-poster-large {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    object-fit: cover;
}

#mTitleHeading {
    margin-bottom: 5px;
    font-size: 24px;
    line-height: 1.3;
}

#mOrigTitleRow {
    color: #94a3b8;
    margin-bottom: 15px;
    font-style: italic;
    display: none;
}

.movie-tags {
    margin-bottom: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Бейджи характеристик */
#mQualityVal {
    background: #e11d48;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

#mTypeVal {
    background: #2563eb;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

#mAgeVal {
    background: #334155;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

#mTranslationVal {
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.movie-desc-label {
    margin-top: 15px;
}

#mDescVal {
    line-height: 1.6;
    color: #cbd5e1;
}

/* Скрываемые строки характеристик */
#mIdsRow,
#mEpisodesRow,
#mDurationRow,
#mDirectorRow,
#mActorsRow {
    display: none;
}

/* Рекламный баннер под инфой / над плеером */
#adUnderPlayerBanner {
    margin-top: 25px;
    text-align: center;
}

/* ---------------------------------------------------------
   ПЛЕЕР И ИН-ПЛЕЕР МЕНЮ / РЕКЛАМНЫЕ ОВЕРЛЕИ
   --------------------------------------------------------- */
.player-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
    border: 1px solid #334155;
    margin-top: 20px;
}

.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 1;
}

/* Профессиональное ин-плеер меню (Alloha Style) */
#playerTopControls {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 30;
    display: none;
    gap: 8px;
    align-items: center;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#playerSeasonSelect,
#playerEpisodeSelect {
    display: none;
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

#playerTrailerBtn {
    display: none;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

/* Оверлей преролла */
.player-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.yt-ad-link {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 120;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    display: none;
}

.yt-ad-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.yt-ad-link .yt-arrow {
    margin-left: 4px;
    font-size: 11px;
}

.yt-ad-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 120;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.yt-ad-badge .yt-ad-tag {
    font-weight: bold;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.skip-ad-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 120;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 9px 18px;
    border-radius: 8px;
    cursor: not-allowed;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    user-select: none;
}

.skip-ad-btn.active {
    cursor: pointer;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.skip-ad-btn.active:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* Нижняя рекламная плашка поверх видео */
.player-ad-bottom {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 6px 10px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
}

.player-ad-bottom img,
.player-ad-bottom video {
    max-height: 85px;
    max-width: 100%;
    width: auto;
    border-radius: 4px;
    display: block;
}

.close-ad-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 26px;
    height: 26px;
    background: #ef4444;
    color: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 50%;
    font-size: 16px;
    line-height: 22px;
    font-weight: bold;
    cursor: pointer;
    z-index: 95;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    transition: background 0.2s;
}

.close-ad-btn:hover {
    background: #dc2626;
}

/* ---------------------------------------------------------
   КНОПКИ ДЕЙСТВИЙ ПОД ПЛЕЕРОМ (СОВРЕМЕННЫЙ ИНТЕРФЕЙС)
   --------------------------------------------------------- */
.movie-actions-btns {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}

/* Единый стиль всех интерактивных кнопок */
.action-btn,
#mTrailerBtn,
#mBookmarkBtn,
#mPlaylistBtn,
#mLikeBtn,
#mDislikeBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.action-btn:hover,
#mBookmarkBtn:hover,
#mPlaylistBtn:hover {
    background: #334155;
    border-color: #475569;
    color: #ffffff;
}

/* Векторная иконка SVG inside button */
.action-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
}

/* Кнопка Трейлер */
#mTrailerBtn {
    display: none;
    background: #2563eb;
    border-color: #3b82f6;
    color: #ffffff;
}

#mTrailerBtn:hover {
    background: #1d4ed8;
}

/* Лайк и Дизлайк подсветка */
#mLikeBtn:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
    color: #4ade80;
}

#mDislikeBtn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #f87171;
}

/* ---------------------------------------------------------
   БЛОК СЛУЧАЙНЫХ ФИЛЬМОВ (СМОТРИТЕ ТАКЖЕ)
   --------------------------------------------------------- */
.random-movies-section {
    margin-top: 30px;
}

.random-movies-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.movie-card {
    background: #1e293b;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #334155;
}

.movie-card-link {
    text-decoration: none;
    color: #fff;
}

.movie-card-poster-wrap {
    position: relative;
}

.movie-card-poster {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
}

.movie-card-rating {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(15, 23, 42, 0.85);
    color: #f59e0b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.movie-card-title {
    margin-top: 8px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #f8fafc;
}

.movie-card-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
}

/* ---------------------------------------------------------
   БЛОК КОММЕНТАРИЕВ И РЕАКЦИЙ
   --------------------------------------------------------- */
.comments-section {
    margin-top: 35px;
    background: #1e293b;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #334155;
}

.comments-header {
    margin-top: 0;
    margin-bottom: 20px;
    color: #f8fafc;
    font-size: 20px;
    border-bottom: 1px solid #334155;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-comment-form {
    margin-bottom: 30px;
}

.comment-textarea {
    width: 100%;
    box-sizing: border-box;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    resize: vertical;
    outline: none;
}

.comment-submit-wrapper {
    text-align: right;
    margin-top: 10px;
}

.btn-submit-comment {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.load-more-comments-wrap {
    text-align: center;
    margin-top: 15px;
    display: none;
}

.btn-load-more-comments {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: 0.2s;
}

/* ---------------------------------------------------------
   МОДАЛЬНОЕ ОКНО ПЛЕЙЛИСТА
   --------------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1e293b;
    padding: 20px;
    border-radius: 10px;
    width: 320px;
    max-width: 90%;
    color: #fff;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.modal-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.modal-list-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.btn-modal-cancel {
    margin-top: 15px;
    width: 100%;
    background: #475569;
    color: #fff;
    border: none;
    padding: 9px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* ---------------------------------------------------------
   АДАПТИВНОСТЬ ДЛЯ СТРАНИЦЫ ФИЛЬМА (MEDIA QUERIES)
   --------------------------------------------------------- */
@media (max-width: 768px) {
    .movie-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Ограничиваем слишком огромный постер на смартфонах */
    .movie-poster-large {
        max-width: 220px;
        margin: 0 auto;
        display: block;
    }

    .yt-ad-link {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 11px;
    }

    .yt-ad-badge {
        bottom: 10px;
        left: 10px;
        padding: 4px 8px;
        font-size: 11px;
    }

    .skip-ad-btn {
        bottom: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 11px;
    }

    .player-ad-bottom {
        bottom: 8px;
        padding: 6px 8px;
        max-width: 96%;
    }

    .player-ad-bottom img,
    .player-ad-bottom video {
        max-height: 75px;
    }
}

/* Мобильная сетка для кнопок действий */
@media (max-width: 600px) {
    .movie-actions-btns {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .action-btn,
    #mBookmarkBtn,
    #mPlaylistBtn,
    #mTrailerBtn,
    #mLikeBtn,
    #mDislikeBtn {
        width: 100%;
        padding: 11px 8px;
        font-size: 13px;
        box-sizing: border-box;
    }
}

/* ---------------------------------------------------------
   КНОПКА «В ИЗБРАННОЕ» (СЕРДЕЧКО) НА КАРТОЧКАХ ФИЛЬМОВ
   --------------------------------------------------------- */
.movie-card {
    position: relative;
}

.btn-bookmark {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-bookmark:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.btn-bookmark-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #ffffff;
    transition: all 0.2s ease;
}

/* Активное состояние (когда фильм добавлен в избранное) */
.btn-bookmark.active {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
}

.btn-bookmark.active .btn-bookmark-icon {
    fill: #ef4444;
    stroke: #ef4444;
}

