 :root {
            --primary-color: #e60023;
            --primary-light: #ff3e55;
            --primary-dark: #d00020;
            --accent-color: #3ecbff;
            --accent-dark: #00a5db;
            --text-color: #ffffff;
            --text-secondary: rgba(255, 255, 255, 0.7);
            --text-muted: rgba(255, 255, 255, 0.5);
            --dark-bg: #131722;
            --darker-bg: #0c0f16;
            --light-bg: #1b223f;
            --card-bg: rgba(27, 34, 63, 0.5);
            --border-radius-sm: 8px;
            --border-radius: 12px;
            --border-radius-lg: 20px;
            --border-radius-xl: 30px;
            --transition-fast: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.1);
            --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.15);
            --shadow-lg: 0 15px 50px rgba(0, 0, 0, 0.25);
            --glass-bg: rgba(27, 34, 63, 0.7);
            --glass-border: 1px solid rgba(255, 255, 255, 0.05);
            --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
            --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
            --gradient-dark: linear-gradient(135deg, var(--dark-bg), var(--darker-bg));
            --gradient-glow: linear-gradient(135deg, var(--primary-color), var(--accent-color));
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Tajawal', sans-serif;
            background-color: var(--dark-bg);
            color: var(--text-color);
            line-height: 1.6;
            overflow-x: hidden;
            background-image: 
                radial-gradient(circle at 20% 90%, rgba(62, 203, 255, 0.1) 0%, transparent 20%),
                radial-gradient(circle at 90% 10%, rgba(230, 0, 35, 0.1) 0%, transparent 20%);
            background-attachment: fixed;
        }

        .serie-btn, .mobile-nav-btn {
        font-family: 'Cairo', sans-serif !important;
        letter-spacing: 0.5px;
        font-weight: 700;
    }

        /* Barre de navigation mobile */
  .mobile-nav-bar {
    display: block !important;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    background: rgba(15, 17, 26, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50px;
    padding: 0;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 
                0 2px 8px rgba(255, 255, 255, 0.06) inset;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

       .mobile-nav-bar .nav-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0 5px;
}

   .mobile-nav-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                background-color 0.3s ease;
    padding: 0;
    margin: 5px;
}

    .mobile-nav-btn i {
    font-size: 20px;
    color: #fff;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                color 0.3s ease;
}

    .mobile-nav-btn span {
    display: none;
}

.mobile-nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.mobile-nav-btn:active::before {
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.15);
}

    .mobile-nav-btn:hover i {
        transform: translateY(-3px);
    }

  .mobile-nav-btn.watch {
    background: linear-gradient(135deg, #e60023 0%, #ff3e55 100%);
    box-shadow: 0 5px 15px rgba(230, 0, 35, 0.3);
}

.mobile-nav-btn.watch::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff3e55 0%, #e60023 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-btn.watch:active::after {
    opacity: 1;
}

.mobile-nav-btn.watch i {
    transform: scale(1);
}

.mobile-nav-btn.watch:active i {
    transform: scale(0.85);
}

    .mobile-nav-btn.favorite {
    background: rgba(255, 255, 255, 0.1);
}

   .mobile-nav-btn.favorite.is-favorite {
    background: linear-gradient(135deg, #ff3e55, #d00020);
}

@keyframes heartBeatModern {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(0.95); }
    45% { transform: scale(1.2); }
    60% { transform: scale(1); }
}

.mobile-nav-btn.favorite i {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                color 0.3s ease;
}

    .mobile-nav-btn.favorite.is-favorite i {
    color: white;
    animation: heartBeatModern 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1;
}

   .mobile-nav-btn.share {
    background: linear-gradient(135deg, #3ecbff 0%, #00a5db 100%);
    box-shadow: 0 5px 15px rgba(62, 203, 255, 0.3);
}


.mobile-nav-btn.share::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a5db 0%, #3ecbff 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}


.mobile-nav-btn.share:active::after {
    opacity: 1;
}

.mobile-nav-btn .ripple {
    position: absolute;
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

.mobile-nav-btn .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-nav-btn.favorite.is-favorite .badge {
    transform: scale(1);
}


       .mobile-nav-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    }

 .toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 30, 30, 0.85);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4),
                0 2px 8px rgba(255, 255, 255, 0.06) inset;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

  .toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

  .toast-notification i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

@keyframes pulse-modern {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(var(--pulse-color, 230, 0, 35), 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(var(--pulse-color, 230, 0, 35), 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(var(--pulse-color, 230, 0, 35), 0.3);
    }
}

        @keyframes heartPulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.2); }
            100% { transform: scale(1); }
        }

        /* Styles existants */
     

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 1.5rem;
        }

        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            background: rgba(19, 23, 34, 0.85);
            backdrop-filter: blur(10px);
            border-bottom: var(--glass-border);
            transition: var(--transition-fast);
        }

        .header.scrolled {
            background: rgba(12, 15, 22, 0.95);
            box-shadow: var(--shadow-md);
        }

        .header-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 2rem;
            max-width: 1600px;
            margin: 0 auto;
        }

        .logo {
            display: flex;
            align-items: center;
            text-decoration: none;
        }

        .logo img {
            height: 40px;
            margin-left: 0.8rem;
            filter: drop-shadow(0 0 8px rgba(230, 0, 35, 0.4));
        }

        .logo-text {
            font-size: 1.6rem;
            font-weight: 700;
            color: var(--text-color);
            position: relative;
        }

        .logo-text::before {
            content: '';
            position: absolute;
            width: 105%;
            height: 8px;
            background-color: var(--primary-color);
            bottom: 5px;
            left: -2px;
            z-index: -1;
            border-radius: 4px;
            transform: skewX(-10deg);
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 1.5rem;
        }

        .nav-menu li {
            position: relative;
        }

        .nav-menu a {
            color: var(--text-color);
            text-decoration: none;
            font-weight: 500;
            font-size: 1rem;
            padding: 0.5rem 0.2rem;
            position: relative;
            transition: var(--transition-fast);
        }

        .nav-menu a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            background: var(--primary-color);
            bottom: 0;
            right: 0;
            transition: width 0.3s ease;
        }

        .nav-menu a:hover {
            color: var(--primary-light);
        }

        .nav-menu a:hover::after {
            width: 100%;
        }

        .actions-container {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        #search-results-section {
            display: block !important;
            visibility: visible !important;
            padding: 4rem 0;
            background-color: var(--darker-bg);
            position: relative;
            z-index: 100;
            margin-bottom: 2rem;
        }

        #search-results-grid {
            display: block !important;
            visibility: visible !important;
            min-height: 200px;
        }

        #search-results-grid .series-grid {
            display: grid !important;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
            gap: 1.5rem;
        }

        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: var(--text-color);
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 1001;
        }

        .main-content {
          
            padding: 4rem 0;
            min-height: calc(100vh - 80px);
        }

        .serie-hero {
            position: relative;
            width: 100%;
            height: 70vh;
            min-height: 500px;
            max-height: 700px;
            overflow: hidden;
            margin-bottom: 3rem;
        }

        .serie-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            opacity: 0.4;
            filter: blur(3px);
        }

        .serie-backdrop::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(0deg, var(--dark-bg) 0%, transparent 100%),
                        linear-gradient(-90deg, transparent 60%, var(--dark-bg) 100%);
        }

        .serie-hero-content {
            
            position: relative;
            height: 100%;
            display: flex;
            align-items: center;
            z-index: 2;
        }

        .serie-info-container {
            
            display: flex;
            gap: 2.5rem;
            align-items: flex-start;
            max-width: 1200px;
        }

        .serie-poster-container {
            flex-shrink: 0;
            width: 300px;
            height: 450px;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow-lg);
            position: relative;
            transform: translateY(0);
            transition: var(--transition-bounce);
        }

        .serie-poster-container:hover {
            transform: translateY(-10px);
        }

        .serie-poster {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition-fast);
        }

        .serie-poster-container:hover .serie-poster {
            transform: scale(1.05);
        }

        .serie-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 1.5rem;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
            display: flex;
            justify-content: center;
            opacity: 0;
            transition: var(--transition-fast);
        }

        .serie-poster-container:hover .serie-overlay {
            opacity: 1;
        }

        .watch-trailer-btn {
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: 50px;
            padding: 0.6rem 1.2rem;
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            transition: var(--transition-bounce);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .watch-trailer-btn:hover {
            background: var(--primary-light);
            transform: scale(1.05);
        }

        .watch-trailer-btn i {
            font-size: 0.8rem;
        }

        .serie-details {
            flex-grow: 1;
        }

        .serie-title {
            font-size: 3rem;
            font-weight: 800;
            margin-bottom: 1rem;
            line-height: 1.2;
            color: var(--text-color);
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .serie-original-title {
            font-size: 1.2rem;
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
            font-weight: 400;
        }

        .serie-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 1.5rem;
            color: var(--text-secondary);
        }

        .serie-meta-item {
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        .serie-meta-item i {
            color: var(--primary-color);
            font-size: 0.9rem;
        }

        .serie-rating {
            display: inline-flex;
            align-items: center;
            background: rgba(255, 200, 0, 0.2);
            padding: 0.3rem 0.8rem;
            border-radius: 50px;
            color: var(--text-color);
            font-weight: 600;
            margin-right: 1rem;
        }

        .serie-rating i {
            color: #FFC800;
            margin-left: 0.4rem;
        }

        .serie-genres {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .serie-genre {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text-color);
            padding: 0.3rem 0.8rem;
            border-radius: 50px;
            font-size: 0.9rem;
            transition: var(--transition-fast);
        }

        .serie-genre:hover {
            background: var(--primary-color);
            transform: translateY(-3px);
        }

        .serie-overview {
            margin-bottom: 2rem;
            color: var(--text-secondary);
            font-size: 1.05rem;
            max-width: 700px;
            line-height: 1.7;
        }

        .serie-actions {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }

         .serie-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.7rem;
        padding: 0.9rem 1.8rem;
        border-radius: 12px;
        font-size: 1.05rem;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        text-decoration: none;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        border: none;
        position: relative;
        overflow: hidden;
        z-index: 1;
    }

    .serie-btn::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 0;
        background: rgba(255, 255, 255, 0.1);
        z-index: -1;
        transition: height 0.35s ease;
    }

    .serie-btn:hover::after {
        height: 100%;
    }

    .serie-btn:hover {
        transform: translateY(-6px);
    }

    .serie-btn:active {
        transform: translateY(-2px);
    }

        .btn-primary {
        background: linear-gradient(135deg, #e60023 0%, #ff3e55 100%);
        color: white;
        box-shadow: 0 8px 25px rgba(230, 0, 35, 0.3);
    }

    .btn-primary:hover {
        box-shadow: 0 12px 30px rgba(230, 0, 35, 0.5);
    }

    .btn-primary i {
        font-size: 1.2rem;
    }

       .btn-secondary {
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-color);
        border: 2px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(5px);
    }

    .btn-secondary i {
        font-size: 1.1rem;
        transition: transform 0.5s ease;
    }

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
    }


       .btn-secondary.is-favorite {
        background: linear-gradient(135deg, #ff3e55, #d00020);
        border: none;
        color: white;
    }

    .btn-secondary.is-favorite i {
        color: white;
        transform: scale(1.2);
        animation: heartBeat 1.5s infinite;
    }

      @keyframes heartBeat {
        0% { transform: scale(1); }
        15% { transform: scale(1.3); }
        30% { transform: scale(1); }
        45% { transform: scale(1.2); }
        60% { transform: scale(1); }
        100% { transform: scale(1); }
    }

        .btn-secondary.is-favorite i {
            color: #ff3e55;
            animation: heartPulse 1.5s infinite;
        }

        .btn-accent {
        background: linear-gradient(135deg, #3ecbff 0%, #00a5db 100%);
        color: white;
        box-shadow: 0 8px 25px rgba(62, 203, 255, 0.3);
    }



        .serie-btn:hover {
            transform: translateY(-5px);
        }

        .btn-primary:hover {
            box-shadow: 0 7px 25px rgba(230, 0, 35, 0.5);
        }

        .btn-secondary:hover {
            background: rgba(230, 0, 35, 0.1);
        }

        .btn-accent:hover {
        box-shadow: 0 12px 30px rgba(62, 203, 255, 0.5);
    }
        .seasons-section {
            padding: 3rem 0;
        }

        .section-title {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: var(--text-color);
            display: flex;
            align-items: center;
            gap: 0.8rem;
        }

        .section-title i {
            color: var(--primary-color);
        }

        .seasons-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 2rem;
            flex-wrap: wrap;
            padding-bottom: 1rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .season-tab {
            padding: 0.6rem 1.2rem;
            border-radius: var(--border-radius);
            background: var(--card-bg);
            color: var(--text-secondary);
            border: var(--glass-border);
            font-weight: 500;
            font-size: 0.95rem;
            cursor: pointer;
            transition: var(--transition-fast);
            backdrop-filter: blur(10px);
        }

        .season-tab:hover {
            background: rgba(255, 255, 255, 0.15);
            color: var(--text-color);
        }

        .season-tab.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        .episodes-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
        }

        .episode-card {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            overflow: hidden;
            transition: var(--transition-fast);
            border: var(--glass-border);
            backdrop-filter: blur(5px);
        }

        .episode-card:hover {
            transform: translateY(-8px);
            box-shadow: var(--shadow-md);
            border-color: rgba(255, 255, 255, 0.1);
        }

        .episode-thumbnail {
            position: relative;
            width: 100%;
            height: 0;
            padding-bottom: 56.25%;
            overflow: hidden;
        }

        .episode-img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition-fast);
        }

        .episode-card:hover .episode-img {
            transform: scale(1.1);
        }

   .episode-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 70%);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 1 !important; /* Force l'affichage permanent */
            transition: var(--transition-fast);
            pointer-events: none; /* Permet de cliquer à travers l'overlay */
        }


     .episode-card:hover .episode-overlay {
            background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 70%);
        }

      .episode-play {
            pointer-events: auto;
        }

       .episode-card:hover .episode-play {
       animation: none;
            transform: scale(1.1);
            background: var(--primary-light);
            box-shadow: 0 8px 25px rgba(230, 0, 35, 0.5);
        }

 .episode-play i {
            margin-left: 3px; /* Décalage pour centrage visuel parfait */
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        }

         @keyframes playPulse {
            0% {
                transform: scale(1);
                box-shadow: 0 5px 15px rgba(230, 0, 35, 0.3);
            }
            50% {
                transform: scale(1.05);
                box-shadow: 0 8px 20px rgba(230, 0, 35, 0.5);
            }
            100% {
                transform: scale(1);
                box-shadow: 0 5px 15px rgba(230, 0, 35, 0.3);
            }
        }


        .episode-number {
            position: absolute;
            top: 10px;
            right: 10px;
            background: var(--dark-bg);
            color: var(--text-color);
            padding: 0.3rem 0.8rem;
            border-radius: 50px;
            font-weight: 600;
            font-size: 0.9rem;
            z-index: 2;
        }

        .episode-content {
            padding: 1.2rem;
        }

        .episode-title {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--text-color);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .episode-meta {
            display: flex;
            justify-content: space-between;
            color: var(--text-secondary);
            font-size: 0.9rem;
            margin-bottom: 0.8rem;
        }

        .episode-date i, .episode-duration i {
            color: var(--primary-color);
            margin-left: 0.3rem;
        }

        .episode-description {
            color: var(--text-muted);
            font-size: 0.9rem;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            margin-bottom: 1rem;
        }

        .episode-servers {
            display: flex;
            gap: 0.5rem;
        }

        .server-btn {
            padding: 0.4rem 0.8rem;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            border-radius: var(--border-radius-sm);
            color: var(--text-secondary);
            font-size: 0.8rem;
            cursor: pointer;
            transition: var(--transition-fast);
        }

        .server-btn:hover {
            background: var(--primary-color);
            color: white;
        }

        .cast-section {
            padding: 3rem 0;
        }

        .cast-slider {
            display: flex;
            gap: 1.5rem;
            overflow-x: auto;
            padding: 1rem 0;
            scroll-behavior: smooth;
            scrollbar-width: thin;
            scrollbar-color: var(--primary-color) var(--dark-bg);
        }

        .cast-slider::-webkit-scrollbar {
            height: 8px;
        }

        .cast-slider::-webkit-scrollbar-track {
            background: var(--darker-bg);
            border-radius: 4px;
        }

        .cast-slider::-webkit-scrollbar-thumb {
            background-color: var(--primary-color);
            border-radius: 4px;
        }

        .cast-card {
            flex: 0 0 180px;
            border-radius: var(--border-radius);
            overflow: hidden;
            background: var(--card-bg);
            transition: var(--transition-fast);
            border: var(--glass-border);
            backdrop-filter: blur(5px);
        }

        .cast-card:hover {
            transform: translateY(-8px);
            box-shadow: var(--shadow-md);
        }

        .cast-image {
            width: 100%;
            height: 200px;
            object-fit: cover;
            transition: var(--transition-fast);
        }

        .cast-card:hover .cast-image {
            transform: scale(1.05);
        }

        .cast-info {
            padding: 1rem;
            text-align: center;
        }

        .cast-name {
            font-weight: 600;
            margin-bottom: 0.3rem;
            color: var(--text-color);
        }

        .cast-character {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .related-section {
            padding: 3rem 0;
        }

        .related-slider {
            display: flex;
            gap: 1.5rem;
            overflow-x: auto;
            padding: 1rem 0;
            scroll-behavior: smooth;
            scrollbar-width: thin;
            scrollbar-color: var(--primary-color) var(--dark-bg);
        }

        .related-slider::-webkit-scrollbar {
            height: 8px;
        }

        .related-slider::-webkit-scrollbar-track {
            background: var(--darker-bg);
            border-radius: 4px;
        }

        .related-slider::-webkit-scrollbar-thumb {
            background-color: var(--primary-color);
            border-radius: 4px;
        }

        .related-card {
            flex: 0 0 220px;
            border-radius: var(--border-radius);
            overflow: hidden;
            background: var(--card-bg);
            transition: var(--transition-fast);
            border: var(--glass-border);
            backdrop-filter: blur(5px);
            position: relative;
        }

        .related-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: var(--shadow-md);
            border-color: rgba(255, 255, 255, 0.1);
        }

        .related-poster {
            width: 100%;
            height: 330px;
            object-fit: cover;
            transition: var(--transition-fast);
        }

        .related-card:hover .related-poster {
            transform: scale(1.05);
        }

        .related-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 4rem 1rem 1rem;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
            transition: var(--transition-fast);
        }

        .related-title {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: white;
        }

        .related-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.85rem;
        }

        .related-year {
            background: rgba(255, 255, 255, 0.2);
            padding: 0.3rem 0.6rem;
            border-radius: 4px;
        }

        .related-rating {
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }

        .related-rating i {
            color: #FFC800;
        }

        .related-play {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0);
            width: 50px;
            height: 50px;
            background: var(--primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.2rem;
            opacity: 0;
            transition: var(--transition-bounce);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .related-card:hover .related-play {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
        }

        .comments-section {
            padding: 3rem 0;
            position: relative;
        }

        .comments-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        }

        .comment-form {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 1.5rem;
            margin-bottom: 2rem;
            border: var(--glass-border);
            backdrop-filter: blur(5px);
        }

        .comment-input {
            width: 100%;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--border-radius-sm);
            padding: 1rem;
            color: var(--text-color);
            font-family: 'Tajawal', sans-serif;
            font-size: 1rem;
            resize: none;
            margin-bottom: 1rem;
            transition: var(--transition-fast);
        }

        .comment-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(230, 0, 35, 0.1);
        }

        .comment-submit {
            background: var(--gradient-primary);
            color: white;
            border: none;
            border-radius: var(--border-radius-sm);
            padding: 0.7rem 1.5rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition-fast);
            float: left;
        }

        .comment-submit:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(230, 0, 35, 0.3);
        }

        .comments-list {
            margin-top: 3rem;
        }

        .comment-card {
            background: var(--card-bg);
            border-radius: var(--border-radius);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            border: var(--glass-border);
            backdrop-filter: blur(5px);
            transition: var(--transition-fast);
        }

        .comment-card:hover {
            background: rgba(27, 34, 63, 0.7);
            border-color: rgba(255, 255, 255, 0.1);
        }

        .comment-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }

        .comment-user {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .comment-avatar {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--primary-color);
        }

        .comment-user-info {
            display: flex;
            flex-direction: column;
        }

        .comment-username {
            font-weight: 600;
            color: var(--text-color);
        }

        .comment-date {
            font-size: 0.85rem;
            color: var(--text-muted);
        }

        .comment-rating {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--text-muted);
        }

        .comment-stars {
            display: flex;
            gap: 0.2rem;
        }

        .comment-star {
            color: #FFC800;
            font-size: 0.9rem;
        }

        .comment-content {
            color: var(--text-secondary);
            line-height: 1.7;
            margin-bottom: 1rem;
        }

        .comment-actions {
            display: flex;
            gap: 1.5rem;
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        .comment-action {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            cursor: pointer;
            transition: var(--transition-fast);
        }

        .comment-action:hover {
            color: var(--primary-color);
        }

        .loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem;
            text-align: center;
        }

        .loading i {
            font-size: 2rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            100% {
                transform: rotate(360deg);
            }
        }

        .error {
            background-color: rgba(230, 0, 35, 0.1);
            color: var(--text-color);
            padding: 1.5rem;
            border-radius: var(--border-radius);
            text-align: center;
            border-right: 4px solid var(--primary-color);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1rem;
        }

        .error i {
            font-size: 2rem;
            color: var(--primary-color);
        }

        .footer {
            background-color: var(--darker-bg);
            padding: 4rem 0 1rem;
            position: relative;
            margin-top: 5rem;
        }

        .footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
        }

        .footer-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 1.5rem;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 3rem;
            padding-bottom: 3rem;
        }

        .footer-column h3 {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: var(--text-color);
            position: relative;
            display: inline-block;
        }

        .footer-column h3::after {
            content: '';
            position: absolute;
            bottom: -8px;
            right: 0;
            width: 40px;
            height: 3px;
            background: var(--primary-color);
            border-radius: 2px;
        }

        .footer-links {
            list-style: none;
        }

        .footer-links li {
            margin-bottom: 1rem;
        }

        .footer-links a {
            color: var(--text-secondary);
            text-decoration: none;
            transition: var(--transition-fast);
            position: relative;
            padding-right: 1.5rem;
            display: inline-block;
        }

        .footer-links a::after {
            content: '\f054';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.7rem;
            color: var(--primary-color);
            opacity: 0;
            transition: var(--transition-fast);
        }

        .footer-links a:hover {
            color: var(--primary-color);
            transform: translateX(-5px);
        }

        .footer-links a:hover::after {
            opacity: 1;
            transform: translate(5px, -50%);
        }

        .footer-bottom {
            text-align: center;
            padding: 2rem 0;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            color: var(--text-muted);
        }

        .footer-social {
            display: flex;
            gap: 1rem;
            margin: 1.5rem 0;
            justify-content: center;
        }

        .footer-social-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 50%;
            color: var(--text-color);
            font-size: 1.1rem;
            transition: var(--transition-bounce);
        }

        .footer-social-icon:hover {
            background: var(--primary-color);
            transform: translateY(-5px);
            color: white;
        }

        .back-to-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 50px;
            height: 50px;
            background: var(--primary-color);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            cursor: pointer;
            z-index: 99;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition-fast);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }

        .back-to-top.active {
            opacity: 1;
            visibility: visible;
        }

        .back-to-top:hover {
            background: var(--primary-light);
            transform: translateY(-5px);
        }

        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition-fast);
        }

        .modal.active {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            width: 90%;
            max-width: 900px;
            background: var(--dark-bg);
            border-radius: var(--border-radius);
            position: relative;
            transform: scale(0.9);
            transition: var(--transition-fast);
            overflow: hidden;
        }

        .modal.active .modal-content {
            transform: scale(1);
        }

        .modal-close {
            position: absolute;
            top: 15px;
            right: 15px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.5);
            border: none;
            color: white;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 2;
            transition: var(--transition-fast);
        }

        .modal-close:hover {
            background: var(--primary-color);
        }

        .modal-video {
            width: 100%;
            height: 0;
            padding-bottom: 56.25%;
            position: relative;
        }

        .modal-video iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }

        @media (max-width: 1200px) {
            .serie-title {
                font-size: 2.5rem;
            }
            
            .serie-poster-container {
                width: 250px;
                height: 375px;
            }
            
            .footer-content {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 992px) {
            .serie-info-container {
                flex-direction: column;
                align-items: center;
                text-align: center;
                   margin-top: 2rem;
            }
            
            .serie-details {
                margin-top: 2rem;
            }
            
            .serie-meta, .serie-genres, .serie-actions {
                justify-content: center;
            }
            
            .section-title {
                font-size: 1.8rem;
            }
            
            .footer-content {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {

       .mobile-nav-bar {
        display: block !important;
    }

   .main-content {
        padding-bottom: 100px;
    }
            .header-container {
                padding: 1rem;
            }
            
            .logo-text {
                font-size: 1.4rem;
            }
            
            .nav-menu {
                position: fixed;
                top: 0;
                right: -100%;
                flex-direction: column;
                background-color: var(--darker-bg);
                width: 300px;
                height: 100vh;
                transition: 0.3s;
                box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
                padding: 6rem 2rem 2rem;
                z-index: 999;
            }
            
            .nav-menu.active {
                right: 0;
            }
            
            .mobile-menu-btn {
                display: block;
            }
            
            .serie-title {
                font-size: 2rem;
            }
            
            .serie-original-title {
                font-size: 1.1rem;
            }
            
            .serie-poster-container {
                width: 200px;
                height: 300px;
                margin-top: -3rem;
            }
            
           

            .serie-details {
                margin-top: 0rem;
            }
            
            /* Masquer les boutons originaux sur mobile */
            .serie-actions {
                display: none !important;
            }
            
            /* Afficher la barre de navigation mobile */
           .seasons-tabs {
                overflow-x: auto;
                padding-bottom: 1rem;
                scrollbar-width: thin;
                scrollbar-color: var(--primary-color) var(--dark-bg);
            }
            
            .seasons-tabs::-webkit-scrollbar {
                height: 6px;
            }
            
            .seasons-tabs::-webkit-scrollbar-track {
                background: var(--darker-bg);
                border-radius: 4px;
            }
            
            .seasons-tabs::-webkit-scrollbar-thumb {
                background-color: var(--primary-color);
                border-radius: 4px;
            }
            
            .episodes-grid {
                grid-template-columns: 1fr;
            }
            
            .search-popup {
                padding: 1.5rem;
            }
            
            .search-title {
                font-size: 1.5rem;
            }
            
            .search-popup-input {
                padding: 1rem 3.5rem 1rem 1rem;
                font-size: 1rem;
            }
            
            .search-popup-btn {
                width: 40px;
                height: 40px;
            }
            
            .popup-result-image {
                width: 60px;
                height: 90px;
            }
            
            .popup-result-title {
                font-size: 1rem;
            }
            
            /* Ajouter du padding pour la barre de navigation mobile */
           
        }

        @media (max-width: 576px) {

             .mobile-nav-bar {
        width: calc(100% - 40px);
        max-width: 280px;
    }

    .mobile-nav-btn {
        width: 50px;
        height: 50px;
    }
    
    .mobile-nav-btn i {
        font-size: 18px;
    }
            #search-results-grid .series-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }
            
            .serie-hero {
                height: auto;
                min-height: auto;
                padding: 2rem 0;
            }
            
            .serie-backdrop {
                position: fixed;
                opacity: 0.2;
            }
            
            .serie-poster-container {
                width: 180px;
                height: 270px;
            }
            
            .serie-title {
                font-size: 1.8rem;
            }
            
            .footer-content {
                grid-template-columns: 1fr;
            }
            
            .back-to-top {
                bottom: 80px;
                right: 20px;
                width: 40px;
                height: 40px;
            }
            
        
            
            .mobile-nav-btn span {
                font-size: 0.7rem;
            }
        }

        @media (min-width: 769px) {
.mobile-nav-bar {
        display: none !important;
    }

            .serie-actions {
        display: flex !important;
        gap: 1rem;
        flex-wrap: wrap;
    }
            
            .serie-btn {
        flex: 0 1 auto;
    }
            
   
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @keyframes fadeInRight {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        @keyframes fadeInLeft {
            from {
                opacity: 0;
                transform: translateX(20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        @keyframes pulse {
            0% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(230, 0, 35, 0.7);
            }
            70% {
                transform: scale(1.05);
                box-shadow: 0 0 0 10px rgba(230, 0, 35, 0);
            }
            100% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(230, 0, 35, 0);
            }
        }

        .mobile-nav-btn.watch,
.mobile-nav-btn.watch:hover,
.mobile-nav-btn.watch:active {
    text-decoration: none !important;
}