/* Improved Details Page Styles with Glassmorphism */
.details-page {
    min-height: 100vh;
    background: #020205;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Background Blobs */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.6;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0) 70%);
    filter: blur(80px);
    border-radius: 50%;
    animation: blobFloat 20s infinite alternate;
}

.blob-1 { top: -10%; left: -10%; background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0) 70%); }
.blob-2 { bottom: -10%; right: -10%; background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0) 70%); animation-delay: -5s; }
.blob-3 { top: 40%; left: 30%; background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, rgba(236, 72, 153, 0) 70%); animation-delay: -10s; }

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* Glassmorphism Base Card */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* 1. Back Button - Premium Glass */
.back-to-browse {
    position: fixed;
    top: 30px;
    left: 100px; /* Offset for navbar */
    z-index: 1000;
    background: rgba(15, 8, 32, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 10px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-browse:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-3px);
}

/* 2. Hero Section - Cinematic Fade */
.details-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 20%;
    filter: brightness(0.6);
}

.hero-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, 
        rgba(2, 2, 5, 0) 0%,
        rgba(2, 2, 5, 0.2) 40%,
        rgba(2, 2, 5, 0.8) 80%,
        #020205 100%);
}

/* 3. Main Content Layout */
.details-main {
    display: flex;
    gap: 60px;
    padding: 0 10% 0 14%;
    margin-top: -240px;
    position: relative;
    z-index: 10;
}

.details-poster-section {
    flex: 0 0 300px;
}

.poster-container {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease;
}

.poster-container:hover {
    transform: translateY(-10px) scale(1.02);
}

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

/* 4. Info Section Typography */
.details-info-section {
    flex: 1;
    padding-top: 20px;
}

.details-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.1;
    letter-spacing: -1.5px;
    background: linear-gradient(to right, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.details-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    font-size: 1rem;
}

.meta-rating {
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
}

.details-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.genre-tag {
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.genre-tag:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    color: #fff;
}

.details-tagline {
    font-size: 1.2rem;
    font-style: italic;
    color: #a78bfa;
    margin-bottom: 15px;
    font-weight: 500;
    opacity: 0.8;
}

.details-overview {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 35px;
    max-width: 800px;
}

/* 5. Action Buttons */
.details-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 45px;
}

.action-btn {
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn.primary {
    background: #fff;
    color: #000;
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn:hover {
    transform: translateY(-4px);
    filter: brightness(1.1);
}

/* 6. Extra Info - Simplified */
.details-extra-info {
    display: flex;
    gap: 40px;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
    letter-spacing: 1px;
}

.info-value {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* 7. Sources Section */
.sources-container {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    margin-top: 20px;
}

.sources-empty {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.sources-empty svg {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.2);
}

.sources-empty p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
}

.search-sources-btn {
    margin-top: 10px;
    padding: 10px 25px;
    background: #8b5cf6;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-sources-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

/* Source Item Placeholder Styles */
.source-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.source-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(5px);
}

.source-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.source-name {
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

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

.source-play-btn {
    width: 40px;
    height: 40px;
    background: #8b5cf6;
    border: none;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.source-play-btn:hover {
    transform: scale(1.1);
    background: #7c3aed;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

/* 8. Secondary Sections - Improved Spacing */
.details-section {
    padding: 60px 10% 20px 14%;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title svg {
    width: 24px !important;
    height: 24px !important;
    color: #8b5cf6;
}

/* Cast, Similar, Screenshots - Unified Styles */
.cast-slider, .similar-grid, .screenshots-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 30px;
    scrollbar-width: none;
}

.cast-slider::-webkit-scrollbar, 
.similar-grid::-webkit-scrollbar, 
.screenshots-grid::-webkit-scrollbar {
    display: none;
}

.similar-card {
    flex: 0 0 180px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.similar-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
}

.similar-poster {
    width: 100%;
    height: 270px;
}

.similar-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.similar-info {
    padding: 12px;
}

.similar-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.similar-rating { color: #fbbf24; }

/* Cast Cards - Circles */
.cast-card {
    flex: 0 0 140px;
    text-align: center;
    cursor: pointer;
}

.cast-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.cast-card:hover .cast-photo {
    border-color: #8b5cf6;
    transform: scale(1.05);
}

.cast-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.cast-character { font-size: 11px; color: rgba(255, 255, 255, 0.4); }

/* Screenshots */
.screenshot-item {
    flex: 0 0 280px;
    border-radius: 14px;
    overflow: hidden;
    height: 160px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.screenshot-item:hover {
    transform: scale(1.03);
    border-color: rgba(139, 92, 246, 0.3);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Season Selector */
.season-btn {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.season-btn.active {
    background: #8b5cf6;
    color: #fff;
    border-color: #8b5cf6;
}

/* Modals & Loading */
.details-loading {
    position: fixed;
    inset: 0;
    background: #020205;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner-large {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile Adaptations */
@media (max-width: 1024px) {
    .details-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 5%;
        margin-top: -160px;
    }
    .details-title { font-size: 2.5rem; }
    .details-actions { justify-content: center; }
    .details-extra-info { justify-content: center; flex-wrap: wrap; }
    .back-to-browse { left: 20px; }
}

/* Improved Grids/Sliders */
.slider-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(15, 8, 32, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    opacity: 0;
}

.slider-container:hover .slider-nav-btn {
    opacity: 1;
}

.slider-nav-btn:hover {
    background: #8b5cf6;
    border-color: #8b5cf6;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.slider-nav-btn.prev { left: -22px; }
.slider-nav-btn.next { right: -22px; }

.cast-slider, .similar-grid, .screenshots-grid {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding: 20px 0 40px;
    scrollbar-width: none;
    cursor: grab;
    scroll-behavior: smooth;
    width: 100%;
}

.cast-slider::-webkit-scrollbar, 
.similar-grid::-webkit-scrollbar, 
.screenshots-grid::-webkit-scrollbar {
    display: none;
}

/* 8. Similar Content Cards - CRITICAL IMPROVEMENT */
.similar-card {
    flex: 0 0 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    position: relative;
}

.similar-card:hover {
    transform: translateY(-15px) scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.similar-poster {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.similar-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.similar-card:hover .similar-poster img {
    transform: scale(1.1);
}

.similar-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 8, 12, 0.9) 0%, transparent 60%);
    opacity: 0.8;
}

.similar-info {
    padding: 15px;
}

.similar-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.similar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.similar-rating {
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 9. Cast Cards Improvements */
.cast-card {
    flex: 0 0 160px;
    text-align: center;
    cursor: pointer;
}

.cast-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    transition: all 0.4s ease;
    background: #1a1a20;
}

.cast-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This ensures the photo fills the circle properly */
    display: block;
}

.cast-card:hover .cast-photo {
    border-color: #8b5cf6;
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
}

.cast-name { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.cast-character { font-size: 12px; color: rgba(255, 255, 255, 0.5); font-weight: 500; }

/* 10. Screenshot Items */
.screenshot-item {
    flex: 0 0 320px;
    border-radius: 16px;
    overflow: hidden;
    height: 180px;
    background: #1a1a20;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.screenshot-item:hover {
    transform: scale(1.05);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    filter: brightness(1.1);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 11. Lightbox Fixes */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    user-select: none;
}

.lightbox-nav:hover {
    background: #8b5cf6;
    border-color: #8b5cf6;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev { left: 40px; }
.lightbox-nav.next { right: 40px; }

.lightbox img {
    max-width: 85%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    object-fit: contain;
}
/* Season Selector Styles */
.seasons-navigation-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 35px;
}

.season-nav-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.season-nav-arrow svg {
    width: 24px;
    height: 24px;
}

.season-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.05);
}

.season-nav-arrow:active {
    transform: scale(0.95);
}

.season-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.seasons-selector {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    scroll-behavior: smooth;
}

.seasons-selector::-webkit-scrollbar {
    display: none;
}

.season-btn {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.season-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

.season-btn.active {
    background: #8b5cf6;
    border-color: #8b5cf6;
    color: #fff;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.episode-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.episode-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3);
}

.episode-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
}

.episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.episode-card:hover .episode-play-overlay {
    opacity: 1;
}

.episode-play-btn {
    width: 50px;
    height: 50px;
    background: #8b5cf6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.episode-card:hover .episode-play-btn {
    transform: scale(1);
}

.episode-number {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.episode-runtime {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(139, 92, 246, 0.8);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.episode-info {
    padding: 20px;
}

.episode-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.episode-overview {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modals & Loading */
.spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(139, 92, 246, 0.1);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile Adaptations */
@media (max-width: 1024px) {
    .details-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 5%;
        margin-top: -200px;
    }
    .back-to-browse { left: 20px; }
    .details-title { font-size: 3rem; }
    .details-actions { justify-content: center; }
}

/* 8. Modals & Lightbox (CRITICAL FIX) */
.trailer-modal, .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    display: none; /* Controlled by JS .active class */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.trailer-modal.active, .lightbox.active {
    display: flex;
}

.trailer-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.3);
}

.trailer-modal-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

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

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

.trailer-modal-close, .lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 35px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

/* Lightbox Nav Buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-nav:hover { background: #8b5cf6; }
.lightbox-nav.prev { left: 30px; }
.lightbox-nav.next { right: 30px; }

/* Global Spinner */
.spinner-large {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 1024px) {
    .details-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -100px;
    }
    .details-actions { justify-content: center; }
}