* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: white;
    background-color: #0a0a0f;
}

.gradient-bg {
    min-height: 100vh;
    background: linear-gradient(125deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glass Navbar */
.glass-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(20, 20, 30, 0.5);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1rem;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.logo span {
    color: #f97316;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-wrapper input {
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 20, 30, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
}

.search-dropdown.active {
    display: block;
}

.search-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.8rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-item img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.3rem;
}

.search-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-item-title {
    font-weight: 600;
}

.search-item-type {
    font-size: 0.7rem;
    color: #f97316;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #f97316;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

.mobile-search {
    display: none;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .search-wrapper {
        display: block;
        max-width: none;
        margin: 0.5rem 0;
    }
    .mobile-menu-btn {
        display: block;
    }
    .mobile-menu {
        display: none;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        background: rgba(20, 20, 30, 0.9);
        backdrop-filter: blur(12px);
        margin-top: 1rem;
        border-radius: 1rem;
    }
    .mobile-menu a {
        color: white;
        text-decoration: none;
        padding: 0.5rem;
    }
    .mobile-menu:not(.hidden) {
        display: flex;
    }
    .mobile-search {
        display: none;
    }
}

.hidden {
    display: none;
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    height: 60vh;
    overflow: hidden;
    margin-bottom: 2rem;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 2rem 3rem 2rem;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide .hero-glass {
    background: rgba(20, 20, 30, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
    margin: 0;
}

.carousel-slide .hero-glass h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.hero-meta {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #ddd;
}

.carousel-slide .hero-glass p {
    margin: 0.8rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.glass-btn:hover {
    background: rgba(249, 115, 22, 0.5);
    transform: scale(1.05);
    border-color: #f97316;
}

.carousel-btn {
    display: none;
}

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.dot.active {
    background: #f97316;
    width: 24px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .hero-carousel {
        height: 45vh;
        min-height: 280px;
    }
    .carousel-slide {
        align-items: flex-end;
        justify-content: center;
        padding: 0 1rem 1.5rem 1rem;
    }
    .carousel-slide .hero-glass {
        text-align: center;
        padding: 0.8rem;
        max-width: 90%;
    }
    .carousel-slide .hero-glass h1 {
        font-size: 1rem;
    }
    .hero-meta {
        font-size: 0.7rem;
        justify-content: center;
    }
    .carousel-slide .hero-glass p {
        font-size: 0.7rem;
    }
    .hero-buttons {
        justify-content: center;
        gap: 0.5rem;
    }
    .hero-buttons .glass-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }
    .carousel-dots {
        bottom: 0.5rem;
    }
    .dot {
        width: 6px;
        height: 6px;
    }
    .dot.active {
        width: 16px;
    }
}

/* Row sections */
.row-section {
    padding: 0 1rem 2rem;
}

.row-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.slider-container {
    position: relative;
    display: flex;
    align-items: center;
}

.slider-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.slider-btn {
    position: absolute;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.slider-btn.left { left: 0; }
.slider-btn.right { right: 0; }
.slider-btn:hover { background: #f97316; }

/* Movie Card */
.movie-card {
    flex-shrink: 0;
    width: 160px;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}
.movie-card:hover { transform: translateY(-8px); }
.card-inner {
    background: rgba(20, 20, 30, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.card-inner:hover {
    background: rgba(30, 30, 45, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}
.movie-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}
.card-info {
    padding: 0.6rem;
}
.card-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-info p {
    font-size: 0.7rem;
    color: #aaa;
}
.fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    cursor: pointer;
}
.fav-btn:hover { transform: scale(1.1); }

/* Genres Grid */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.genre-card {
    background: rgba(20, 20, 30, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.genre-card:hover {
    transform: scale(1.05);
    background: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
}

/* Browse Page */
.browse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    gap: 1rem;
    padding: 0 1rem;
}
.media-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(20,20,30,0.5);
    padding: 0.3rem;
    border-radius: 2rem;
}
.toggle-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}
.toggle-btn.active {
    background: #f97316;
}
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}
.load-more {
    display: block;
    margin: 2rem auto;
    padding: 0.8rem 2rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2rem;
    color: white;
    cursor: pointer;
}

/* Play Page */
.play-container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
}
.back-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    color: white;
    cursor: pointer;
    margin-bottom: 1rem;
}
.video-wrapper {
    aspect-ratio: 16/9;
    background: black;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
}
.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.player-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.detail-panel {
    background: rgba(20,20,30,0.5);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.cast-row, .rec-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}
.cast-card {
    flex-shrink: 0;
    width: 100px;
    text-align: center;
}
.cast-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}
.seasons-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}
.season-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    color: white;
    cursor: pointer;
}
.season-btn.active, .season-btn:hover {
    background: #f97316;
}
.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.episode-card {
    background: rgba(20,20,30,0.4);
    backdrop-filter: blur(8px);
    border-radius: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
    padding: 0.5rem;
}
.episode-card:hover {
    transform: scale(1.02);
    background: rgba(249,115,22,0.3);
}
.episode-card img {
    width: 100%;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}
.episode-title {
    font-size: 0.8rem;
    font-weight: 600;
}
.episode-date {
    font-size: 0.7rem;
    color: #aaa;
}
.loading-spinner {
    text-align: center;
    padding: 2rem;
}

/* Trailer Modal */
.trailer-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}
.trailer-modal-content {
    position: relative;
    background-color: #000;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
}
.trailer-modal-content iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}
.trailer-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trailer-modal-close:hover {
    background: #f97316;
}
@media (max-width: 768px) {
    .trailer-modal-content {
        width: 95%;
        margin: 20% auto;
    }
}

/* Bottom Tab Bar - Mobile first (full width) */
.bottom-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0 0.8rem;
    z-index: 100;
    transition: all 0.3s ease;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
    gap: 0.2rem;
}

.tab-item.active {
    color: #f97316;
}

.tab-icon {
    font-size: 1.5rem;
}

.tab-label {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Desktop: make it an "island" (centered, rounded, not full width) */
@media (min-width: 768px) {
    .bottom-tab-bar {
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        min-width: 400px;
        max-width: 80%;
        border-radius: 2rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
        bottom: 1rem;
        background: rgba(20, 20, 30, 0.85);
        backdrop-filter: blur(20px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        padding: 0.4rem 1rem;
    }
    
    .bottom-tab-bar .tab-item {
        padding: 0.2rem 0.8rem;
        border-radius: 2rem;
        transition: background 0.2s;
    }
    
    .bottom-tab-bar .tab-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    main {
        padding-bottom: 5rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .bottom-tab-bar {
        min-width: 320px;
        padding: 0.3rem 0.8rem;
    }
    .tab-icon {
        font-size: 1.2rem;
    }
    .tab-label {
        font-size: 0.65rem;
    }
}

main {
    padding-bottom: 70px;
}

.empty-library {
    text-align: center;
    padding: 3rem 1rem;
    background: rgba(20,20,30,0.4);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    margin: 2rem;
}
.empty-library h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.empty-library p {
    margin-bottom: 1.5rem;
    color: #ccc;
}
.glass-tag {
    background: rgba(255,255,255,0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    margin-right: 0.3rem;
}

/* ===== ORIGINAL GENRE GRID CENTERING (restored) ===== */
/* Center genre grid on browse page (desktop only) */
.browse-container:has(> .genres-grid) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
}
.browse-container:has(> .genres-grid) .genres-grid {
    width: 100%;
}

/* Desktop only: center genre grid with 6 columns */
@media (min-width: 769px) {
    .browse-container:first-child:last-child {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: calc(100vh - 180px);
    }
    
    .browse-container:first-child:last-child .genres-grid {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 1rem;
    }
}

/* On desktop (768px and wider), hide the emoji */
@media (min-width: 769px) {
    .heading-emoji {
        display: none;
    }
}

/* Genre cards inside horizontal slider row */
#genresRow .genre-card {
    flex-shrink: 0;
    width: 140px;
    text-align: center;
    background: rgba(20, 20, 30, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

#genresRow .genre-card:hover {
    transform: scale(1.05);
    background: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
}

/* Mobile: Popular Genres as 2-column grid, full width, no empty space */
@media (max-width: 768px) {
    .row-section:has(#genresRow) .slider-btn {
        display: none;
    }

    #genresRow {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        overflow-x: visible;
        width: 100%;
        padding: 0;
    }

    #genresRow .genre-card {
        width: 100%;
        margin: 0;
        padding: 0.8rem;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    #genresRow {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hide all slider arrows on mobile – users can swipe */
@media (max-width: 768px) {
    .slider-btn {
        display: none;
    }
}

/* Desktop: improve arrow positioning to avoid overlapping posters */
@media (min-width: 769px) {
    .slider-container {
        margin: 0 2rem;
        position: relative;
    }
    .slider-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(4px);
        border: none;
        color: white;
        font-size: 1.5rem;
        padding: 0.5rem 0.8rem;
        border-radius: 50%;
        cursor: pointer;
        z-index: 10;
    }
    .slider-btn.left {
        left: -1.5rem;
    }
    .slider-btn.right {
        right: -1.5rem;
    }
    .slider-btn:hover {
        background: #f97316;
    }
}

/* Mobile: 3‑column grid for Trending and Browse pages only (index page untouched) */
@media (max-width: 768px) {
    .content-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
        padding: 0 0.5rem;
    }
    
    .content-grid .movie-card {
        width: 100%;
        min-width: 0;
    }
    
    .content-grid .card-info h3 {
        font-size: 0.7rem;
        white-space: normal;
        line-height: 1.2;
    }
    .content-grid .card-info p {
        font-size: 0.6rem;
    }
    .content-grid .fav-btn {
        width: 24px;
        height: 24px;
        font-size: 1rem;
        top: 4px;
        right: 4px;
    }
}

@media (max-width: 360px) {
    .content-grid {
        gap: 0.4rem;
    }
}

/* FIX BROWSER PAGE RESULTS GRID – ensures content-grid works like Trending page */
@media (min-width: 769px) {
    .browse-container .content-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.5rem;
        padding: 0 1rem;
        width: 100%;
        max-width: 1400px;
        margin: 0 auto;
    }
}
/* ===== FIX: Only center the genre grid, not the results view ===== */

/* Remove any flex or centering from the browse container when it contains more than the genre grid */
.browse-container:not(:has(> .genres-grid)) {
    display: block !important;
    min-height: auto !important;
    padding: 0 !important;
}

/* Keep the genre grid centered (only when it's the only child) */
.browse-container:has(> .genres-grid) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

/* Ensure results view header is properly aligned */
.browse-container .browse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 1rem auto 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

/* Fix Load More button alignment */
.browse-container .load-more {
    display: block;
    width: fit-content;
    margin: 2rem auto;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2rem;
    color: white;
    cursor: pointer;
    padding: 0.8rem 2rem;
}

/* Ensure content grid is centered and full width */
.browse-container .content-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}
/* Make Trending page grid look exactly like Browse page results */
.trending-container .content-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Also align the header and toggle the same way */
.trending-container .browse-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}
/* Make Trending page header spacing match genre page exactly */
.trending-container .browse-header {
    max-width: 1400px;
    margin: 1rem auto 2rem auto;   /* same as .browse-container .browse-header */
    padding: 0 1rem;
}

/* Ensure the grid container has the same padding and max-width */
.trending-container .content-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}
/* Desktop: push arrows further outside to avoid overlapping any card */
@media (min-width: 769px) {
    .slider-container {
        margin: 0 4rem !important;   /* more space on sides */
    }
    .slider-btn.left {
        left: -4rem !important;      /* arrow outside the left edge */
    }
    .slider-btn.right {
        right: -4rem !important;     /* arrow outside the right edge */
    }
}
/* Fade effect on edges of horizontal scroll rows to hide abrupt cut-off */
.slider-row {
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 80%, transparent);
}
/* ===== FIX: Trending page mobile header (same as browse genre results) ===== */
@media (max-width: 768px) {
    .trending-container .browse-header {
        display: flex;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem;
        padding: 0 1rem;
    }
    .trending-container .browse-header h1 {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60%;
        margin: 0;
    }
    .trending-container .media-toggle {
        flex-shrink: 0;
    }
    .trending-container .toggle-btn {
        padding: 0.3rem 0.7rem;
        font-size: 0.7rem;
    }
}
.library-section-title {
    text-align: center;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.6rem;
}
/* Warning Banner – glassmorphic style */
.warning-banner {
    background: rgba(255, 80, 80, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 1rem;
    padding: 0.8rem 1rem;
    margin: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffdddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.warning-banner::before {
    content: "⚠️";
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .warning-banner {
        font-size: 0.75rem;
        padding: 0.6rem;
        margin: 0.5rem 0;
    }
}
/* Rating stars inline version */
.rating-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.rating-stars {
    display: inline-flex;
    gap: 0.2rem;
}
.star {
    font-size: 1.4rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
}
.rating-stars:hover .star {
    color: #ffc107;
}
.rating-stars .star:hover ~ .star {
    color: #ccc;
}
.star.filled {
    color: #ffc107;
}
.avg-rating {
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* On mobile, the row might wrap – keep stars readable */
@media (max-width: 768px) {
    .player-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    .rating-wrapper {
        margin-top: 0.5rem;
    }
}
/* Custom horizontal scrollbar for cast and recommendation rows */
.cast-row::-webkit-scrollbar,
.rec-row::-webkit-scrollbar {
    height: 6px;
}
.cast-row::-webkit-scrollbar-track,
.rec-row::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.cast-row::-webkit-scrollbar-thumb,
.rec-row::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 10px;
}
.cast-row::-webkit-scrollbar-thumb:hover,
.rec-row::-webkit-scrollbar-thumb:hover {
    background: #fdba74;
}

/* Firefox */
.cast-row,
.rec-row {
    scrollbar-width: thin;
    scrollbar-color: #f97316 rgba(255, 255, 255, 0.1);
}



/* Confirmation Modal */
.confirm-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    max-width: 90%;
    width: 350px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1.5rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: none;
}
.confirm-modal p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}
.confirm-modal .modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.confirm-modal .modal-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 600;
}
.confirm-modal .modal-btn-yes {
    background: #f97316;
    color: white;
}
.confirm-modal .modal-btn-no {
    background: rgba(255,255,255,0.2);
    color: white;
}
.confirm-modal .modal-btn-yes:hover {
    background: #e05a00;
}
.confirm-modal .modal-btn-no:hover {
    background: rgba(255,255,255,0.4);
}