/* 
   DETAIL PAGES STYLES (Series & Movies)
   This file manages the layout and components specific to the detailing pages.
*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ---------------------------------------------------------
   DETAIL PAGE BACKDROP (Pirate Play Style - Refined)
   --------------------------------------------------------- */

.detail-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px; 
    z-index: -1;
    overflow: hidden;
    background: #0c0d0f;
}

.backdrop-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; 
    filter: blur(1px) saturate(140%) brightness(0.4); /* Minimal blur as requested */
    transform: scale(1.05); 
    opacity: 0.5; /* Slightly lowered to maintain readability with low blur */
}

.backdrop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(12, 13, 15, 0.1) 0%, 
        rgba(12, 13, 15, 0.6) 40%, 
        #0c0d0f 95%,
        #0c0d0f 100%);
}

/* ---------------------------------------------------------
   CENTERED DETAIL LAYOUT
   --------------------------------------------------------- */

.detail-full-width-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.centered-detail-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 8rem; /* Final adjustment to 8rem */
    position: relative;
    z-index: 2;
    padding: 0 15px;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

.movie-detail-layout {
    margin-top: 8rem !important; /* Corrected to prevent header overlap */
    padding: 0 !important; /* Full width edge-to-edge finish */
}

.movie-detail-layout .entry-title,
.movie-detail-layout .entry-title-image {
    margin-bottom: -0.01rem !important; /* Gap subtly adjusted */
}

@media (min-width: 992px) {
    .centered-detail-layout {
        padding: 0 40px;
    }
}

.post-thumbnail-centered {
    width: 145px;
    margin-bottom: 0.8rem; /* Reduced gap between poster and title */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.9);
    border: 1px solid rgba(255,255,255,0.08);
    background: transparent; 
}

.post-thumbnail-centered figure {
    margin: 0;
    padding: 0;
    line-height: 0;
    display: block;
}

.post-thumbnail-centered figure img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

.detail-content-centered {
    width: 100%;
    max-width: 1000px; /* Constrained for balanced PC look */
    margin: 0 auto;
}

@media (max-width: 768px) {
    .detail-content-centered {
        max-width: 100% !important;
        align-self: stretch; /* Breaks out for Mobile */
    }
}

/* Additional Info (Audio, Quality) */
.ott-additional-info {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.2rem;
}

.ott-additional-info .info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.ott-additional-info .label {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    min-width: 60px;
}

.ott-additional-info .value {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

/* Action Bar (Watchlist, Share, Rate) */
.ott-action-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 1.5rem;
    width: 100%;
    padding-bottom: 0.5rem;
}

.ott-action-bar .action-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    padding: 0;
}

.ott-action-bar .action-btn i {
    font-size: 1.3rem;
}

.ott-action-bar .action-btn span {
    font-size: 0.8rem;
    font-weight: 500;
}

.ott-action-bar .action-btn:hover {
    color: #fff;
    transform: translateY(-2px);
}

.ott-network-logo {
    height: 18px; /* Balanced height for metadata row */
    width: auto;
    max-width: 80px;
    object-fit: contain;
    filter: brightness(1.2);
    opacity: 0.95;
    transition: opacity 0.2s, transform 0.2s;
    margin-top: -2px; /* Visual baseline centering */
}

.ott-network-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.network-name {
    font-size: 0.75rem;
    padding: 1px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-content-centered .entry-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.detail-content-centered .entry-title-image {
    max-height: 50px; /* Reduced to 50px as requested */
    width: auto;
    margin: 0 auto 0.7rem; /* Final adjustment to 0.7rem */
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

/* ---------------------------------------------------------
   OTT-STYLE META & CTA (Tightened Spacing)
   --------------------------------------------------------- */

.ott-meta-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 18px; /* Increased gap for larger text */
    margin-top: 0.2rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem; /* Matches Screen 2's bolder feel */
    letter-spacing: 0.3px;
    width: 100%;
}

.ott-meta-row .meta-item {
    white-space: nowrap;
    font-weight: 700; /* Bolder weight as seen in Screen 2 */
}

.ott-meta-row .meta-item.bold {
    font-weight: 700;
    color: #fff;
    opacity: 1;
}

.ott-network-logo {
    height: 20px; /* Scaled proportionally */
    width: auto;
    filter: brightness(1.2);
    margin-top: -2px;
}

@media (max-width: 480px) {
    .ott-meta-row {
        gap: 6px;
        font-size: 0.75rem;
    }
    .meta-separator {
        margin: 0 4px;
    }
}

.meta-separator {
    display: inline-block;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    margin: 0 4px;
    vertical-align: middle;
}

.ott-cta-row {
    margin: 0.5rem 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-watch-first {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 500px;
    padding: 12px 15px; /* Balanced padding */
    background: #ffffff;
    color: #14161a;
    font-size: 1rem; /* Slightly larger button text */
    font-weight: 800; /* Extra bold for premium feel */
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-watch-first:hover {
    transform: scale(1.02);
    background: #f8f8f8;
    box-shadow: 0 6px 25px rgba(255,255,255,0.1);
}

.btn-watch-first span {
    opacity: 0.6;
    font-weight: 600;
    font-size: 0.85rem;
    margin-left: 15px;
    color: #000;
    border-left: 1px solid rgba(0,0,0,0.1);
    padding-left: 15px;
}

.ott-genres-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.82rem;
    scrollbar-width: none;
    opacity: 0.8;
}

.ott-genres-row a {
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.ott-genres-row a:hover {
    opacity: 0.7;
}

.ott-genres-row .sep {
    color: rgba(255,255,255,0.2);
    font-weight: 300;
}

.entry-rating-centered {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.entry-rating-centered .rating {
    display: inline-block;
    color: #4285f4; 
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.entry-rating-centered .rating::before {
    content: "TMDB ";
    font-size: 0.85rem;
    color: #4285f4; /* Made the prefix blue too */
    opacity: 1; /* More visible */
}

/* ---------------------------------------------------------
   OVERVIEW BOX (Full Width & Compact)
   --------------------------------------------------------- */

.detail-content-centered .entry-content {
    background: transparent;
    padding: 0;
    border: none;
    margin: 0.5rem 0 1.5rem; /* Reduced top margin to close gap */
    text-align: left !important;
    box-shadow: none;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 105px; /* Limits content height to roughly 5 lines */
    overflow-y: auto;
    padding-top: 10px; /* Fixes clipping of the first line */
    padding-right: 12px; /* Space for the custom scroller */
}

/* Custom Thin Scrollbar for Description */
.detail-content-centered .entry-content::-webkit-scrollbar {
    width: 3px;
}

.detail-content-centered .entry-content::-webkit-scrollbar-track {
    background: transparent;
}

.detail-content-centered .entry-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.detail-content-centered .entry-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.detail-content-centered .entry-content p {
    color: rgba(255, 255, 255, 0.85); /* Brighter for premium feel */
    font-size: 1.05rem; /* Slightly larger */
    line-height: 1.7; /* More breathing room */
    margin: 0;
    width: 100%;
    text-align: justify; /* Perfect square edges for PC */
    text-justify: inter-word;
    letter-spacing: 0.1px;
}

@media (max-width: 768px) {
    .detail-content-centered .entry-content {
        text-align: justify !important; /* Force justify on Mobile */
        width: 100% !important;
    }
    .detail-content-centered .entry-content p {
        text-align: justify !important; /* Edge-to-edge finish for Mobile */
        text-justify: inter-word;
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.95rem; /* Optimized mobile size */
    }
}

.detail-content-centered .entry-content::before {
    display: none; /* Hide Overview label entirely */
}

/* ---------------------------------------------------------
   CUSTOM YOUTUBE TRAILER PLAYER (Hidden for now)
   --------------------------------------------------------- */
#player-wrap { 
    display: none; 
}

/* ---------------------------------------------------------
   OTT SEASONS & EPISODES (Horizontal Layout)
   --------------------------------------------------------- */
.ott-seasons-wrapper {
    margin-top: 1.5rem;
    width: 100vw !important; 
    position: relative !important; 
    left: 50% !important; 
    margin-left: -50vw !important; 
    padding: 0 !important; 
    display: block !important; 
    overflow-x: hidden !important;
}

/* Tab Row */
.ott-season-tabs {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); /* Contained border */
    padding-left: 15px !important;
    padding-right: 15px !important;
    scroll-padding-left: 15px !important;
}
.ott-season-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.ott-season-tab {
    font-size: 1.1rem;
    font-weight: 600; /* Bolder as requested */
    color: rgba(255, 255, 255, 0.6); /* Lighter grey for unselected */
    text-decoration: none;
    padding-bottom: 15px;
    white-space: nowrap;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px; /* Overlaps active line exactly on container border */
    transition: color 0.3s, border-color 0.3s;
}

.ott-season-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.ott-season-tab.active {
    color: #f1f5f9; /* Soft white */
    border-bottom-color: #f1f5f9;
}

/* Episode List */
.ott-episode-list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Increased gap for airy ditto feel */
    margin: 0;
    padding: 0 15px;
    list-style: none;
}

.ott-epi-item {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent; /* Removes mobile tap container box */
}

.ott-epi-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    padding: 5px 0;
}

/* Thumbnail */
.ott-epi-thumb {
    position: relative;
    width: 100px; /* Miniaturized to user request */
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
}

.ott-epi-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 100%);
    pointer-events: none;
}

.ott-epi-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.3s;
}

.ott-epi-item:hover .ott-epi-thumb img {
    opacity: 1;
}

.ott-play-icon {
    position: absolute;
    bottom: 5px;
    left: 5px;
    font-size: 13px; /* Smaller icon tucked tightly into corner */
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
    z-index: 2; /* Ensure it stays above gradient */
}

/* Info */
.ott-epi-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0; /* for truncation */
}

.ott-epi-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #cbd5e1; /* Greyish-white per user request to not be pure white */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ott-epi-meta {
    font-size: 0.85rem;
    color: #94a3b8; /* Exact distinct grey from screenshot */
    font-weight: 500;
}

.meta-dot {
    margin: 0 4px;
}



@media (max-width: 768px) {
    .ott-epi-link {
        align-items: flex-start;
    }
    .ott-epi-thumb {
        width: 85px; /* Smaller mobile footprint */
    }
    .ott-epi-title {
        font-size: 0.95rem;
        white-space: normal; /* allow wrapping on mobile */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .ott-season-tab {
        font-size: 1rem;
    }
}
