:root {
    --primary-color: #E50914;
    --secondary-color: #141414;
    --dark-color: #000000;
    --light-color: #FFFFFF;
    --gray-color: #757575;
    --gray-dark-color: #181818;
    --overlay-color: rgba(0, 0, 0, 0.7);
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--dark-color);
    color: var(--light-color);
    overflow-x: hidden;
    overflow-y: scroll !important; /* FORCE vertical scrolling */
    height: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: auto !important; /* Allow all touch actions by default */
    position: relative; /* Needed for proper scrolling */
    overscroll-behavior-y: none; /* Prevent pull-to-refresh */
}

/* Header Styles */
.navbar {
    background-color: var(--secondary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.navbar-brand .site-logo {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    color: var(--light-color);
    margin: 0 10px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

.dropdown-menu {
    background-color: var(--gray-dark-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item {
    color: var(--light-color);
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}

/* Form Controls */
.form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light-color);
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--light-color);
    border-color: var(--primary-color);
    box-shadow: none;
}

/* Fix for input number in homepage management */
input[type=number].form-control {
    color: var(--light-color);
    font-weight: bold;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #f40612;
    border-color: #f40612;
}

.btn-outline-light:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Main Banner */
.main-banner {
    position: relative;
    height: 80vh;
    margin-bottom: 50px;
    overflow: hidden;
}

.main-banner .banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: flex-end;
}

.banner-content {
    padding: 40px;
    width: 50%;
}

.banner-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.banner-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.banner-info span {
    margin-right: 15px;
}

.banner-info .rating {
    color: #ffc107;
}

.banner-description {
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
}

.banner-buttons .btn {
    margin-right: 10px;
    padding: 10px 20px;
}

/* Content Sections */
.section-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 20px;
    padding-left: 15px;
    position: relative;
    color: #fff;
}

.section-title:after {
    content: '';
    position: absolute;
    left: 15px;
    bottom: -8px;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.content-slider {
    position: relative;
    margin-bottom: 60px;
    padding: 0 15px;
    overflow-x: visible;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
}

/* Swiper container */
.swiper-container {
    padding: 20px 0;
    position: relative;
    overflow: visible;
    z-index: 1;
    touch-action: auto !important;
}

.swiper-wrapper {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding-bottom: 10px;
    width: 100%;
    height: 100%;
    z-index: 1;
    touch-action: auto;
    -webkit-tap-highlight-color: transparent;
}

.swiper-slide {
    width: auto !important;
    flex: 0 0 auto;
}

.content-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    height: 320px;
    width: 200px;
    background-color: #0f1016;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.content-item a {
    display: block;
    height: 100%;
    width: 100%;
    position: relative;
    text-decoration: none;
    color: var(--light-color);
}

.content-item:hover {
    transform: translateY(-10px) scale(1.03);
    z-index: 2;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.content-item img {
    width: 100%;
    height: 75%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.content-item:hover img {
    filter: brightness(1.1);
}

.content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: #0f1016;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 25%;
}

.content-item:hover .content-overlay {
    height: 30%;
}

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

.content-info {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
}

.content-info span {
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.content-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 3px;
    z-index: 2;
    text-transform: capitalize;
}

/* Status-specific badge styles */
.content-badge.status-released {
    background-color: #28a745; /* Green for Released */
}

.content-badge.status-in-production {
    background-color: #fd7e14; /* Orange for In Production */
}

.content-badge.status-planned {
    background-color: #6c757d; /* Grey for Planned */
}

.content-badge.status-cancelled {
    background-color: #dc3545; /* Red for Cancelled */
}

.content-badge.status-ended {
    background-color: #007bff; /* Blue for Ended */
}

.content-badge.status-returning {
    background-color: #17a2b8; /* Teal for Returning */
}

.content-badge.status-unknown {
    background-color: #6c757d; /* Grey for Unknown */
}

.content-badge.movie {
    background-color: var(--primary-color);
}

.content-badge.series {
    background-color: #19b466;
}

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffc107;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 3;
    display: flex;
    align-items: center;
}

.rating-badge i {
    margin-right: 4px;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--light-color);
    background-color: rgba(0, 0, 0, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-top: -20px;
    z-index: 10;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background-color: var(--primary-color);
    opacity: 1;
}

.content-slider:hover .swiper-button-next,
.content-slider:hover .swiper-button-prev {
    opacity: 1;
}

.swiper-pagination {
    position: relative;
    margin-top: 15px;
    text-align: center;
    z-index: 9;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #999;
    opacity: 0.5;
    margin: 0 5px;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color);
}

/* Footer Styles */
footer {
    background-color: var(--secondary-color);
    padding: 50px 0 20px;
    margin-top: 50px;
}

footer h5 {
    color: var(--light-color);
    font-weight: bold;
}

footer ul li {
    margin-bottom: 10px;
}

footer a {
    color: var(--gray-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

footer .social-icons a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    transition: background-color 0.3s ease;
}

footer .social-icons a:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

/* Media Queries */
@media (max-width: 991px) {
    .banner-content {
        width: 70%;
    }
    
    .banner-title {
        font-size: 2.5rem;
    }
    
    .content-item {
        height: 300px;
    }
}

@media (max-width: 767px) {
    /* Enable smooth scrolling */
    html {
        scroll-behavior: smooth;
    }
    
    /* Fix body scrolling */
    body {
        overflow-y: scroll !important;
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix content sliders */
    .content-slider {
        margin-bottom: 30px;
        padding: 0 10px;
        position: relative;
        z-index: 1;
    }
    
    /* Style cards */
    .content-item {
        height: 280px;
        width: 160px;
        position: relative;
        transition: transform 0.2s ease;
        will-change: transform;
    }
    
    /* Navigation buttons */
    .swiper-button-next, 
    .swiper-button-prev {
        opacity: 0.7;
        transform: scale(0.8);
        background-color: rgba(0,0,0,0.5);
        border-radius: 50%;
        padding: 30px;
    }
    
    .main-banner {
        height: 60vh;
    }
    
    .banner-content {
        width: 90%;
        padding: 30px;
    }
    
    .banner-title {
        font-size: 2rem;
    }
    
    .content-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%);
    }
    
    .content-title {
        font-size: 0.9rem;
    }
    
    .content-item {
        height: 250px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .content-badge {
        opacity: 1;
        transform: translateX(0);
    }
    
    .cast-image {
        height: 150px;
    }
    
    .cast-name {
        font-size: 0.9rem;
        display: block;
    }
    
    .cast-character {
        font-size: 0.8rem;
        display: block;
    }
    
    /* Make container scrollable */
    .content-slider {
        pointer-events: auto !important;
        touch-action: auto !important;
        overflow-y: visible !important;
    }
    
    /* Fix touch handling for swiper */
    .swiper-container, 
    .swiper-wrapper, 
    .swiper-slide {
        touch-action: auto !important;
        pointer-events: auto !important;
    }
    
    /* Allow scrolling through content items */
    .content-item, 
    .content-item a {
        touch-action: auto !important;
    }
    
    .content-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 11px;
        pointer-events: none;
    }
    
    .content-info span {
        margin-right: 0;
        color: rgba(255,255,255,0.7);
    }
    
    .content-badge {
        font-size: 10px;
        padding: 2px 6px;
        top: 5px;
        left: 5px;
        border-radius: 3px;
        opacity: 0.9;
        text-transform: uppercase;
        pointer-events: none;
    }
    
    .rating-badge {
        font-size: 10px;
        padding: 2px 6px;
        top: 5px;
        right: 5px;
        border-radius: 3px;
        background-color: rgba(0,0,0,0.6);
        opacity: 0.9;
        pointer-events: none;
    }
    
    .section-title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 10px;
        padding-left: 15px;
        letter-spacing: 0.5px;
    }
    
    .section-title:after {
        width: 35px;
        height: 2px;
        bottom: -5px;
        background-color: #E50914;
    }
    
    .swiper-button-next, 
    .swiper-button-prev {
        display: none;
    }
    
    .swiper-pagination {
        display: none;
    }
}

@media (max-width: 575px) {
    .main-banner {
        height: 50vh;
    }
    
    .banner-content {
        padding: 20px;
    }
    
    .banner-title {
        font-size: 1.8rem;
    }
    
    .banner-description {
        display: none;
    }
    
    .content-item {
        height: 200px;
    }
    
    .content-details {
        display: none;
    }
    
    .content-info {
        font-size: 0.8rem;
    }
    
    .content-info span {
        margin-right: 8px;
    }
    
    .content-overlay {
        height: 35%;
        background: rgba(15, 16, 22, 0.9);
        padding: 10px;
    }
    
    .content-title {
        font-size: 0.9rem;
        font-weight: 700;
        display: block !important;
        visibility: visible !important;
        white-space: normal;
        line-height: 1.2;
        max-height: none;
        overflow: visible;
        margin-bottom: 3px;
    }
    
    .swiper-button-next, .swiper-button-prev {
        width: 30px;
        height: 30px;
        opacity: 1;
    }
    
    .swiper-button-next:after, .swiper-button-prev:after {
        font-size: 14px;
    }
    
    .swiper-container {
        overflow: visible !important;
        padding: 15px 0;
    }
    
    .swiper-wrapper {
        touch-action: pan-x;
    }
    
    .cast-image {
        height: 130px;
    }
    
    .cast-name {
        font-size: 0.85rem;
        display: block;
    }
    
    .cast-character {
        font-size: 0.75rem;
        display: block;
    }
}

@media (max-width: 400px) {
    .content-item {
        height: 200px;
        width: 130px;
    }
    
    .content-overlay {
        padding: 8px 6px;
    }
    
    .content-title {
        font-size: 12px;
    }
    
    .content-info {
        font-size: 10px;
    }
    
    .content-badge,
    .rating-badge {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .section-title {
        font-size: 16px;
        padding-left: 10px;
    }
    
    .content-slider {
        margin-bottom: 25px;
    }
    
    .swiper-wrapper {
        gap: 6px;
        padding: 0 10px;
    }
}

/* Login & Register Styles */
.auth-container {
    max-width: 450px;
    margin: 50px auto;
    padding: 30px;
    background-color: var(--gray-dark-color);
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    background-color: var(--secondary-color);
    color: var(--gray-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.auth-form-container {
    padding: 20px 0;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* Admin Panel Styles */
.admin-container {
    display: flex;
    min-height: calc(100vh - 76px);
}

.admin-sidebar {
    width: 250px;
    background-color: var(--secondary-color);
    padding: 20px 0;
}

.admin-sidebar .list-group-item {
    background-color: transparent;
    color: var(--light-color);
    border: none;
    border-radius: 0;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.admin-sidebar .list-group-item:hover,
.admin-sidebar .list-group-item.active {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.admin-content {
    flex: 1;
    padding: 20px;
}

.admin-card {
    background-color: var(--gray-dark-color);
    border: none;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    color: var(--light-color);
}

.admin-card .card-header {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    color: var(--light-color);
}

.admin-card .card-body {
    padding: 20px;
    color: var(--light-color);
}

.admin-table {
    color: var(--light-color);
}

.admin-table th {
    border-color: rgba(255, 255, 255, 0.1);
}

.admin-table td {
    border-color: rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

/* Admin Dashboard Statistics */
.admin-card .card-title {
    color: var(--light-color);
    font-weight: 600;
}

.admin-card .card-text {
    color: var(--light-color);
}

.admin-card .display-4 {
    color: var(--light-color);
    font-weight: 700;
}

/* Admin Panel Buttons */
.admin-card .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--light-color);
}

.admin-card .btn-primary:hover {
    background-color: #f40612;
    border-color: #f40612;
    color: var(--light-color);
}

.admin-card .btn-danger {
    color: var(--light-color);
}

.admin-card .btn-sm {
    font-weight: 500;
}

/* Detail Page Styles */
.detail-container {
    margin-bottom: 50px;
    color: var(--light-color);
}

.detail-banner {
    position: relative;
    height: 70vh;
    margin-bottom: 30px;
    overflow: hidden;
}

.detail-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.9) 100%);
    display: flex;
    align-items: flex-end;
    padding-bottom: 20px;
}

.detail-content {
    display: flex;
    align-items: flex-end;
    position: relative;
}

.detail-poster {
    position: absolute;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease;
    left: 50%;
    transform: translateX(-50%) translateY(-40%);
    z-index: 10;
    width: 240px;
    height: 360px;
}

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

.detail-poster:hover {
    transform: translateX(-50%) translateY(-40%) scale(1.03);
}

.detail-info {
    padding: 200px 20px 0;
    width: 100%;
    text-align: center;
}

/* Fix for desktop view to match mobile layout but optimized for desktop */
@media (min-width: 992px) {
    /* Banner layout */
    .detail-banner {
        height: auto;
    }
    
    .detail-banner img {
        height: 400px;
        width: 100%;
        object-fit: cover;
    }
    
    .detail-overlay {
        position: relative;
        background: var(--dark-color);
        height: auto;
        padding-bottom: 30px;
    }
    
    .detail-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        max-width: 1140px;
        margin: 0 auto;
    }
    
    /* Poster styling */
    .detail-poster {
        position: relative;
        width: 270px;
        height: 400px;
        margin: -180px 0 30px 0;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 5px 20px rgba(0,0,0,0.8);
        left: auto;
        transform: none;
        z-index: 10;
    }
    
    .detail-poster img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .detail-poster:hover {
        transform: scale(1.03);
    }
    
    /* Info section */
    .detail-info {
        padding: 0;
        text-align: center;
        width: 100%;
    }
    
    .detail-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    }
    
    .detail-meta {
        justify-content: center;
        margin-bottom: 20px;
    }
    
    .detail-description {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 25px;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Adjust container margin */
    .container.mt-5 {
        margin-top: 40px !important;
    }
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
}

.detail-meta span {
    margin-right: 15px;
    margin-bottom: 10px;
    white-space: nowrap;
}

.detail-meta .rating {
    color: #ffc107;
}

.detail-description {
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.detail-genres {
    margin-bottom: 20px;
}

.detail-genres h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.genre-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    padding: 5px 15px;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.genre-badge:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
    cursor: pointer;
}

.trailer-btn {
    margin-bottom: 20px;
}

.trailer-btn .btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(229, 9, 20, 0.5);
    transition: all 0.3s ease;
}

.trailer-btn .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(229, 9, 20, 0.6);
    background-color: #f40612;
    border-color: #f40612;
}

.trailer-btn .btn i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.movie-details, .series-details {
    background-color: rgba(20, 20, 20, 0.5);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.movie-details strong, .series-details strong {
    display: block;
    color: var(--light-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.movie-details p, .series-details p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.similar-content {
    margin-top: 50px;
    margin-bottom: 60px;
}

.similar-content .section-title {
    margin-bottom: 30px;
}

.similar-content .content-item {
    height: 300px;
    width: 190px;
}

.similar-content .content-item:hover {
    transform: translateY(-10px);
}

/* Cast Section Styles */
.cast-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.cast-section .section-title {
    margin-bottom: 25px;
}

.cast-container {
    position: relative;
    width: 100%;
}

.cast-container .row {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.1);
}

.cast-container .row::-webkit-scrollbar {
    height: 6px;
}

.cast-container .row::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.cast-container .row::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.cast-container .row::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.cast-item {
    text-align: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

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

.cast-image {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: var(--gray-dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

.cast-image:hover {
    box-shadow: 0 6px 12px rgba(229, 9, 20, 0.4);
}

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

.cast-image.no-image {
    color: var(--gray-color);
    font-size: 40px;
}

.cast-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--light-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cast-character {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Media queries for cast section */
@media (max-width: 767px) {
    .cast-image {
        height: 150px;
    }
    
    .cast-name {
        font-size: 0.9rem;
    }
    
    .cast-character {
        font-size: 0.8rem;
    }
}

@media (max-width: 575px) {
    .cast-image {
        height: 130px;
    }
    
    .cast-name {
        font-size: 0.85rem;
    }
    
    .cast-character {
        font-size: 0.75rem;
    }
}

/* Accordion styles for seasons */
.accordion-item {
    background-color: var(--gray-dark-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-button {
    background-color: var(--gray-dark-color) !important;
    color: var(--light-color) !important;
    padding: 15px 20px;
    box-shadow: none !important;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color) !important;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23E50914'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

.accordion-body {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
}

/* Modal styling */
.modal-content {
    background-color: var(--gray-dark-color);
    border: none;
    border-radius: 10px;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
}

.modal-title {
    color: var(--light-color);
    font-weight: 600;
}

.modal-body {
    padding: 0;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 991px) {
    .detail-banner {
        height: auto;
        min-height: 450px;
    }
    
    .detail-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-poster {
        width: 220px;
        height: 330px;
    }
    
    .detail-info {
        padding: 220px 15px 0;
    }
    
    .detail-meta {
        justify-content: center;
    }
    
    .detail-genres div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .trailer-btn {
        text-align: center;
    }
}

@media (max-width: 767px) {
    .detail-banner {
        height: auto;
    }
    
    .detail-banner img {
        min-height: 350px;
    }
    
    .detail-overlay {
        position: relative;
        background: var(--gray-dark-color);
        padding: 20px 0;
    }
    
    .detail-poster {
        position: relative;
        top: -175px;
        width: 200px;
        height: 300px;
        margin: 0 auto;
        transform: none;
        left: 0;
    }
    
    .detail-poster:hover {
        transform: scale(1.03);
    }
    
    .detail-info {
        padding: 0 15px;
        margin-top: -150px;
    }
    
    .detail-title {
        font-size: 1.8rem;
    }
    
    .detail-meta span {
        font-size: 0.9rem;
        margin-right: 10px;
    }
    
    .genre-badge {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
    
    .similar-content .content-item {
        height: 260px;
        width: 160px;
    }
}

@media (max-width: 575px) {
    .detail-banner img {
        min-height: 250px;
    }
    
    .detail-poster {
        width: 180px;
        height: 270px;
        top: -150px;
    }
    
    .detail-info {
        margin-top: -130px;
    }
    
    .detail-title {
        font-size: 1.5rem;
    }
    
    .detail-description {
        font-size: 0.9rem;
    }
    
    .detail-meta span {
        font-size: 0.85rem;
        margin-right: 8px;
    }
    
    .movie-details, .series-details {
        padding: 15px;
    }
    
    .movie-details strong, .series-details strong {
        font-size: 0.9rem;
    }
    
    .movie-details p, .series-details p {
        font-size: 0.85rem;
    }
    
    .similar-content .content-item {
        height: 220px;
        width: 140px;
    }
    
    .accordion-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .accordion-body {
        padding: 15px;
        font-size: 0.85rem;
    }
}

/* Custom scrollbar styles */
.content-slider::-webkit-scrollbar {
    height: 6px;
}

.content-slider::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.content-slider::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.content-slider::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: var(--light-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: fadeInOut 4s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* All Movies and Series Pages */
.filters-container {
    background-color: var(--gray-dark-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.filters-container .form-control {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-color);
}

.filters-container .form-control:focus {
    background-color: rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

/* Custom Dropdown Styling */
.custom-dropdown .btn {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    text-align: left;
    padding: 0.375rem 0.75rem;
}

.custom-dropdown .btn:hover,
.custom-dropdown .btn:focus {
    background-color: rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.custom-dropdown .dropdown-menu {
    background-color: var(--gray-dark-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.custom-dropdown .dropdown-item {
    color: var(--light-color);
    padding: 0.5rem 1rem;
}

.custom-dropdown .dropdown-item:hover,
.custom-dropdown .dropdown-item:focus {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--primary-color);
}

.custom-dropdown .dropdown-item.active {
    background-color: var(--primary-color);
    color: var(--light-color);
}

/* Improve dropdown visibility */
#genre-filter {
    color: var(--light-color);
}

#genre-filter option {
    background-color: var(--gray-dark-color);
    color: var(--light-color);
    padding: 10px;
}

.movies-grid, .series-grid {
    margin: 0 -10px;
}

.movies-grid .col-6, .series-grid .col-6,
.movies-grid .col-sm-4, .series-grid .col-sm-4,
.movies-grid .col-md-3, .series-grid .col-md-3 {
    padding: 0 10px;
}

/* Pagination Styling */
.pagination {
    margin-top: 30px;
    margin-bottom: 50px;
}

.pagination .page-link {
    background-color: var(--gray-dark-color);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
    margin: 0 3px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--light-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-item.disabled .page-link {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
}

/* Enhanced Mobile Responsiveness for Movie/Series Grid */
@media (max-width: 767px) {
    .content-item {
        height: 280px;
        margin-bottom: 20px;
    }
    
    .filters-container {
        padding: 15px;
    }
}

@media (max-width: 575px) {
    .content-item {
        height: 230px;
    }
    
    .movies-grid .col-6, .series-grid .col-6 {
        padding: 0 5px;
    }
    
    .movies-grid, .series-grid {
        margin: 0 -5px;
    }
    
    .pagination .page-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .content-item {
        height: 200px;
    }
}

/* Additional mobile scrolling fixes */
@media (max-width: 767px) {
    /* Main container scrolling */
    .container-fluid {
        overflow-y: visible !important;
        touch-action: pan-y !important;
    }
    
    /* Ensure proper spacing between sections for scrolling */
    .content-slider + .content-slider {
        margin-top: 20px;
    }
    
    /* Fix for any potential overflow issues */
    html, body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        height: auto !important;
        min-height: 100vh;
    }
    
    /* Ensure swiper slides don't interfere with vertical scroll */
    .swiper-slide {
        touch-action: pan-x !important;
        overflow: visible !important;
    }
}

/* Style for when vertical scrolling is detected */
.vertical-scrolling .swiper-wrapper {
    touch-action: pan-y !important;
    pointer-events: auto !important;
}

/* Special handling for mobile */
@media (max-width: 767px) {
    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: manipulation;
        overscroll-behavior-y: none;
        height: 100%;
    }
    
    /* Fix for swiper container to allow vertical scrolling */
    .swiper-container, 
    .swiper-wrapper,
    .swiper-slide {
        overflow: visible !important;
        touch-action: pan-x pan-y !important;
    }
    
    /* Override swiper's touch behavior */
    .allow-vertical-scroll {
        touch-action: pan-x pan-y !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
    }
    
    /* The container itself should allow scrolling through */
    .content-slider {
        margin-bottom: 30px;
        padding: 0 10px;
        overflow-x: auto;
        overflow-y: auto !important; /* Allow vertical scrolling */
        touch-action: pan-x pan-y !important; /* Allow both directions */
        -webkit-overflow-scrolling: touch;
        pointer-events: auto !important; /* Ensure touch events work */
        -webkit-tap-highlight-color: transparent;
    }
    
    .swiper-touching .content-item {
        pointer-events: none;
    }
    
    .content-item {
        height: 280px;
        width: 160px;
        touch-action: pan-x pan-y; /* Allow both directions */
    }
    
    .content-item a {
        touch-action: pan-x pan-y; /* Allow both directions */
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Allow vertical scrolling through the slider area */
    .allow-vertical-scroll {
        overflow-y: auto !important;
        touch-action: pan-x pan-y !important;
    }
    
    /* Override any touch-action restrictions */
    .vertical-scrolling * {
        touch-action: pan-y !important;
    }
}

/* Swiper container core styles */
.swiper-container {
    padding: 20px 0;
    width: 100%;
    position: relative;
    overflow: visible !important;
    touch-action: pan-x pan-y;
}

/* Horizontal swiping style */
.horizontal-swiping .swiper-wrapper {
    touch-action: pan-x !important;
    pointer-events: auto !important;
}

/* Vertical scrolling style */
.vertical-scrolling .swiper-wrapper {
    touch-action: pan-y !important;
    pointer-events: auto !important;
}

/* Fix for mobile view */
@media (max-width: 767px) {
    html, body {
        overflow-x: hidden;
        overflow-y: auto !important; /* Force vertical scrolling */
        height: 100% !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y !important; /* Prioritize vertical scrolling */
        overscroll-behavior-y: none;
    }
    
    /* Core container styles for mobile */
    .content-slider {
        margin-bottom: 30px;
        padding: 0 10px;
        overflow-x: auto;
        overflow-y: auto !important; /* Allow vertical scrolling */
        touch-action: pan-x pan-y !important; /* Allow both directions */
        -webkit-overflow-scrolling: touch;
        pointer-events: auto !important; /* Ensure touch events work */
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Core swiper components */
    .swiper-container {
        overflow: visible !important;
        padding: 15px 0;
        touch-action: pan-x pan-y !important; /* Allow both directions */
        pointer-events: auto !important;
    }
    
    .swiper-wrapper {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        touch-action: pan-x pan-y !important; /* Allow both directions */
    }
    
    .swiper-slide {
        width: auto !important;
        flex: 0 0 auto;
        touch-action: pan-x pan-y !important; /* Allow both directions */
    }
    
    /* Card item styles - allow vertical scrolling */
    .content-item {
        height: 280px;
        width: 160px;
        touch-action: pan-x pan-y; /* Allow both directions */
    }
    
    .content-item a {
        touch-action: pan-x pan-y; /* Allow both directions */
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Allow vertical scrolling through the slider area */
    .allow-vertical-scroll {
        overflow-y: auto !important;
        touch-action: pan-x pan-y !important;
    }
    
    /* Override any touch-action restrictions */
    .vertical-scrolling * {
        touch-action: pan-y !important;
    }
}

/* View All Button Styles */
.view-all-item {
    background-color: rgba(40, 40, 40, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    height: 320px;
    width: 200px;
    position: relative;
}

.view-all-item:hover {
    background-color: rgba(60, 60, 60, 0.9);
    border-color: var(--primary-color);
}

.view-all-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    text-decoration: none;
}

.view-all-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.view-all-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.view-all-text {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--light-color);
}

.view-all-item:hover .view-all-icon {
    transform: translateX(5px);
}

.view-all-slide {
    flex: 0 0 auto;
    width: auto !important;
}

@media (max-width: 767px) {
    .view-all-item {
        height: 280px;
        width: 180px;
    }
    
    .view-all-icon {
        font-size: 2rem;
    }
    
    .view-all-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 400px) {
    .view-all-item {
        height: 240px;
        width: 150px;
    }
    
    .view-all-icon {
        font-size: 1.8rem;
    }
}

/* Views Badge */
.views-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.views-badge i {
    color: #4ca1ff;
    font-size: 14px;
}

@media (max-width: 767px) {
    .views-badge {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .views-badge i {
        font-size: 12px;
    }
}

/* Custom Navigation Buttons for Desktop */
.content-slider {
    position: relative;
}

.custom-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.custom-nav-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.custom-prev-btn {
    left: 10px;
}

.custom-next-btn {
    right: 10px;
}

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

@media (max-width: 767px) {
    .custom-nav-btn {
        display: none;
    }
}

/* Additional Desktop Swiper Enhancements */
@media (min-width: 768px) {
    .swiper-container {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 20px 0;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.2);
    }
    
    .swiper-container::-webkit-scrollbar {
        height: 8px;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }
    
    .swiper-container::-webkit-scrollbar-thumb {
        background-color: var(--primary-color);
        border-radius: 4px;
    }
    
    .swiper-container::-webkit-scrollbar-thumb:hover {
        background-color: #f40612;
    }
    
    .swiper-wrapper {
        transition-timing-function: ease-out !important;
        flex-wrap: nowrap !important;
        display: flex !important;
        will-change: transform;
        user-select: none;
    }
    
    .content-slider {
        position: relative;
        overflow: visible !important;
    }
    
    .content-item {
        cursor: pointer;
    }
    
    /* Hide default swiper buttons on desktop */
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
    
    /* Make horizontal scrolling more obvious */
    .section-title::after {
        content: "";
        position: absolute;
        font-size: 12px;
        font-weight: normal;
        opacity: 0.7;
        right: 15px;
        bottom: -4px;
        letter-spacing: 1px;
        font-style: italic;
    }
}

/* Desktop Native Scrolling */
@media (min-width: 768px) {
    .desktop-scroll {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: scroll !important;
        overflow-y: hidden !important;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding: 10px 0;
        gap: 20px;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.2);
        /* Ensure container takes full width */
        width: 100% !important;
        /* Remove any Swiper transform */
        transform: none !important;
    }
    
    .desktop-scroll .swiper-slide {
        /* Set flex-shrink to 0 to prevent shrinking */
        flex: 0 0 auto;
        width: auto !important;
        height: auto !important;
        /* Ensure transform is removed */
        transform: none !important;
    }
    
    .desktop-scroll::-webkit-scrollbar {
        height: 8px;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }
    
    .desktop-scroll::-webkit-scrollbar-thumb {
        background-color: var(--primary-color);
        border-radius: 4px;
    }
    
    .desktop-scroll::-webkit-scrollbar-thumb:hover {
        background-color: #f40612;
    }
} 