/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Cairo" ; 
}

body {
    font-family: "Cairo", sans-serif;
    background: #0a0a0a;
    color: #fff;
    line-height: 1.6;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E50914 0%, #ff0a16 50%, #E50914 100%);
    z-index: 1001;
    transform-origin: left;
    display: none;
}

/* ===== SITE HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid #E50914;
}

.site-header.scrolled {
    background: rgba(10, 10, 10, 0.98);
}

.header-left {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #222;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.logo svg {
    transition: transform 0.3s ease;
}

.logo:hover svg {
    transform: scale(1.1);
}

/* ===== GENRE STRIP ===== */
.genre-strip {
    display: flex;
    padding: 12px 20px;
    gap: 10px;
    overflow-x: auto;
    background: linear-gradient(90deg, #141414 0%, #1a1a1a 100%);
    border-bottom: 1px solid #222;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.genre-strip::-webkit-scrollbar {
    display: none;
}

.genre-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background: #222;
    border: 2px solid transparent;
    border-radius: 25px;
    color: #ccc;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.genre-btn:hover {
    background: #333;
    color: #fff;
    transform: translateY(-2px);
}

.genre-btn.active {
    background: linear-gradient(135deg, #E50914 0%, #B81D24 100%);
    color: white;
    border-color: #E50914;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.more-genres-btn {
    flex-shrink: 0;
    padding: 10px 15px;
    background: transparent;
    border: 2px dashed #444;
    border-radius: 25px;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.more-genres-btn:hover {
    border-color: #E50914;
    color: #E50914;
    background: rgba(229, 9, 20, 0.1);
}

/* ===== DROPDOWN TOGGLE ===== */
.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #222;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-toggle:hover {
    background: #333;
}

.dropdown-toggle.active {
    background: #E50914;
}

.dropdown-text {
    margin-left: 5px;
}

/* ===== PAGE SWITCH BUTTON ===== */
.page-switch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #222;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-switch-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

/* ===== GENRE NAV ===== */
.genre-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #141414;
    padding: 20px;
    border-top: 1px solid #222;
    z-index: 999;
}

.genre-nav.open {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.genre-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #ccc;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.genre-nav a:hover,
.genre-nav a.active {
    background: #222;
    color: #fff;
}

.watchlist-count {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #E50914;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ===== NAV BACKDROP ===== */
.nav-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 998;
}

.nav-backdrop.active {
    display: block;
}

/* ===== SEARCH CONTAINER ===== */
.search-container {
    max-width: 800px;
    margin: 140px auto 20px;
    padding: 0 20px;
}

.search-container input {
    width: 100%;
    padding: 15px 20px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 25px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #E50914;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

/* ===== AD CONTAINER ===== */
.ad-container {
    text-align: center;
    margin: 20px auto;
    max-width: 468px;
    padding: 10px;
    border-radius: 8px;
    background: #1a1a1a;
    border: 1px solid #333;
    overflow: hidden;
}

.ad-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
    font-family: "Cairo";
}

/* ===== BANNER SECTION ===== */
.banner-section {
    padding: 0 20px;
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.section-title i {
    color: #E50914;
}

.banner-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.banner-container {
    display: flex;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.banner-card {
    min-width: 100%;
    position: relative;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.5s ease;
}

.banner-card.active {
    opacity: 1;
    transform: scale(1);
}

.banner-card img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 15px;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    border-radius: 0 0 15px 15px;
}

.banner-overlay h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #fff;
}

.banner-overlay p {
    color: #ccc;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
}

.banner-actions {
    display: flex;
    gap: 15px;
}

.banner-play-btn,
.banner-save-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner-play-btn {
    background: #E50914;
    color: white;
}

.banner-play-btn:hover {
    background: #ff0a16;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.banner-save-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.banner-save-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.banner-save-btn.saved {
    background: #E50914;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(229, 9, 20, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    right: 20px;
}

.next-btn {
    left: 20px;
}

.banner-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #444;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #E50914;
    transform: scale(1.2);
}

/* ===== MOVIES SECTIONS ===== */
.movies-section {
    padding: 0 20px;
    margin-bottom: 50px;
}

.movies-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.movie-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    height: 320px; /* اختار القياس لي بغيتي */
}

.movie-card:hover {    
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* مهم بزاف */
    display: block;
}


.movie-card:hover img {
    transform: scale(1.05);
}

.movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-overlay {
    transform: translateY(0);
}

.movie-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.movie-header h3 {
    font-size: 16px;
    color: #fff;
    flex: 1;
    margin-right: 10px;
}

.movie-rating {
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.movie-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    height: 60px;
    overflow: hidden;
}

.movie-actions {
    display: flex;
    gap: 10px;
}

.play-btn-sm,
.save-btn-sm {
    flex: 1;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.play-btn-sm {
    background: #E50914;
    color: white;
}

.play-btn-sm:hover {
    background: #ff0a16;
}

.save-btn-sm {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.save-btn-sm:hover {
    background: rgba(255, 255, 255, 0.2);
}

.save-btn-sm.saved {
    background: #E50914;
}

/* ===== MORE BUTTON ===== */
.more-btn {
    display: block;
    margin: 25px auto;
    padding: 12px 35px;
    background: linear-gradient(135deg, #E50914 0%, #B81D24 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.4);
    background: linear-gradient(135deg, #FF0A16 0%, #C91F26 100%);
}

.more-btn i {
    margin-left: 8px;
}

/* ===== SITE FOOTER ===== */
.site-footer {
    background: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);
    padding: 50px 20px 30px;
    margin-top: 50px;
    border-top: 2px solid #E50914;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-content .logo {
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.footer-content p {
    color: #aaa;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #E50914;
    transform: translateY(-3px);
}

.copyright {
    color: #777;
    font-size: 14px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #333;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .movies-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
    
    .banner-card img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .header-left {
        padding: 12px 15px;
    }
    
    .genre-strip {
        padding: 10px 15px;
        gap: 8px;
    }
    
    .genre-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .more-genres-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .search-container {
        margin-top: 150px;
        padding: 0 15px;
    }
    
    .banner-section,
    .movies-section {
        padding: 0 15px;
    }
    
    .movies-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .movie-card img {
        height: 250px;
    }
    
    .banner-card img {
        height: 300px;
    }
    
    .banner-overlay {
        padding: 25px;
    }
    
    .banner-overlay h2 {
        font-size: 24px;
    }
    
    .banner-overlay p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .banner-play-btn,
    .banner-save-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .ad-container {
        max-width: 100%;
        margin: 15px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .genre-strip {
        padding: 8px 12px;
    }
    
    .genre-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .more-genres-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .movies-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .movie-card img {
        height: 200px;
    }
    
    .banner-card img {
        height: 250px;
    }
    
    .banner-overlay {
        padding: 20px;
    }
    
    .banner-overlay h2 {
        font-size: 20px;
    }
    
    .banner-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .more-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}/* في نهاية style.css أضف */

/* ===== SERIES SECTION ===== */
.series-section {
    padding: 0 20px;
    margin-bottom: 50px;
}

.series-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.series-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.series-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.series-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.series-card:hover img {
    transform: scale(1.05);
}

.series-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.series-card:hover .series-overlay {
    transform: translateY(0);
}

.series-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.series-header h3 {
    font-size: 16px;
    color: #fff;
    flex: 1;
    margin-right: 10px;
}

.series-rating {
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.series-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    height: 60px;
    overflow: hidden;
}

.series-actions {
    display: flex;
    gap: 10px;
}

.series-play-btn,
.series-save-btn {
    flex: 1;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.series-play-btn {
    background: #E50914;
    color: white;
}

.series-play-btn:hover {
    background: #ff0a16;
}

.series-save-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.series-save-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.series-save-btn.saved {
    background: #E50914;
}

/* فصل المسلسل */
.season-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(229, 9, 20, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}/* ===== PAGE SWITCH BUTTON ACTIVE STATE ===== */
.page-switch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #222;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.page-switch-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.page-switch-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.page-switch-btn:hover::after {
    left: 100%;
}

/* ===== NAV-SWITCH LINK IN GENRE-NAV ===== */
.genre-nav .nav-switch {
    background: rgba(229, 9, 20, 0.1) !important;
    border: 1px solid rgba(229, 9, 20, 0.3) !important;
    color: #E50914 !important;
    font-weight: bold !important;
}

.genre-nav .nav-switch:hover {
    background: rgba(229, 9, 20, 0.2) !important;
    border-color: rgba(229, 9, 20, 0.5) !important;
}

/* ===== ACTIVE STATE FOR CURRENT PAGE ===== */
.genre-nav a[href="index.html"]:not(.nav-switch),
.genre-nav a[href="tv.html"]:not(.nav-switch) {
    position: relative;
}

.genre-nav a[href="index.html"]:not(.nav-switch)::before,
.genre-nav a[href="tv.html"]:not(.nav-switch)::before {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #E50914;
    border-radius: 50%;
    display: none;
}

/* عندما تكون الصفحة الحالية هي الأفلام */
body:not([class*="tv-"]) .genre-nav a[href="index.html"]:not(.nav-switch)::before {
    display: block;
}

/* عندما تكون الصفحة الحالية هي المسلسلات */
body[class*="tv-"] .genre-nav a[href="tv.html"]:not(.nav-switch)::before {
    display: block;
}/* ===== SITE HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid #E50914;
}

/* إضافة مساحة للمحتوى تحت الهيدر */
.main-container {
    margin-top: 180px; /* تعديل حسب ارتفاع الهيدر */
}

/* عند التمرير */
.site-header.scrolled {
    background: rgba(10, 10, 10, 0.99);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.7);
}

/* تحسين شريط التصنيفات */
.genre-strip {
    display: flex;
    padding: 12px 20px;
    gap: 10px;
    overflow-x: auto;
    background: linear-gradient(90deg, #141414 0%, #1a1a1a 100%);
    border-bottom: 1px solid #222;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 1001;
}

/* منع التداخل مع القائمة المنسدلة */
.genre-nav {
    display: none;
    position: fixed; /* تغيير من absolute إلى fixed */
    top: 120px; /* تعديل حسب ارتفاع الهيدر */
    left: 0;
    right: 0;
    background: #141414;
    padding: 20px;
    border-top: 1px solid #222;
    z-index: 1002; /* أعلى من الهيدر */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

/* خلفية ضبابية */
.nav-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1001; /* تحت القائمة وفوق الهيدر */
}

.nav-backdrop.active {
    display: block;
}

/* تحسين search-container */
.search-container {
    max-width: 800px;
    margin: 200px auto 40px; /* زيادة الهامش العلوي */
    padding: 0 20px;
}

/* تعديل البانر */
.banner-section {
    padding: 0 20px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E50914 0%, #ff0a16 50%, #E50914 100%);
    z-index: 1003; /* أعلى من كل شيء */
    transform-origin: left;
    display: none;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    .main-container {
        margin-top: 160px; /* تقليل للجوال */
    }
    
    .search-container {
        margin-top: 170px;
        padding: 0 15px;
    }
    
    .genre-nav {
        top: 110px;
    }
}

@media (max-width: 480px) {
    .main-container {
        margin-top: 140px;
    }
    
    .search-container {
        margin-top: 150px;
    }
}/* ===== FIXED HEADER SOLUTION ===== */

/* الهيدر الثابت */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid #E50914;
}

/* هذه هي الحل الرئيسي: إضافة padding-top للمحتوى */
.main-container {
 /* ارتفاع الهيدر بالكامل */
    position: relative;
    z-index: 1;
}

/* تحسين شريط التصنيفات */
.genre-strip {
    display: flex;
    padding: 12px 20px;
    gap: 10px;
    overflow-x: auto;
    background: linear-gradient(90deg, #141414 0%, #1a1a1a 100%);
    border-bottom: 1px solid #222;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* إصلاح القائمة المنسدلة */
.genre-nav {
    display: none;
    position: absolute;
    top: 100%; /* تحت الهيدر مباشرة */
    left: 0;
    right: 0;
    background: #141414;
    padding: 20px;
    border-top: 1px solid #222;
    z-index: 1002; /* أعلى من الهيدر */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

/* خلفية ضبابية */
.nav-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1001;
}

.nav-backdrop.active {
    display: block;
}

/* ===== SEARCH CONTAINER ===== */
.search-container {
    max-width: 800px;
    margin: 40px auto 40px; /* تعديل */
    padding: 0 20px;
}

.search-container input {
    width: 100%;
    padding: 15px 20px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 25px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #E50914;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

/* ===== SERIES SECTION ===== */
.series-section {
    padding: 0 20px;
    margin-bottom: 50px;
}

.series-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.series-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.series-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.series-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.series-card:hover img {
    transform: scale(1.05);
}

.series-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.series-card:hover .series-overlay {
    transform: translateY(0);
}

.series-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.series-header h3 {
    font-size: 16px;
    color: #fff;
    flex: 1;
    margin-right: 10px;
}

.series-rating {
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.series-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    height: 60px;
    overflow: hidden;
}

.series-actions {
    display: flex;
    gap: 10px;
}

.series-play-btn,
.series-save-btn {
    flex: 1;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.series-play-btn {
    background: #E50914;
    color: white;
}

.series-play-btn:hover {
    background: #ff0a16;
}

.series-save-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.series-save-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.series-save-btn.saved {
    background: #E50914;
}

/* فصل المسلسل */
.season-badge {
    position: absolute;
    top: 10px;
    right: 10px; /* تعديل لاتجاه RTL */
    background: rgba(229, 9, 20, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

/* ===== PAGE SWITCH BUTTON ACTIVE STATE ===== */
.page-switch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #222;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.page-switch-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.page-switch-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.page-switch-btn:hover::after {
    left: 100%;
}

/* ===== NAV-SWITCH LINK IN GENRE-NAV ===== */
.genre-nav .nav-switch {
    background: rgba(229, 9, 20, 0.1) !important;
    border: 1px solid rgba(229, 9, 20, 0.3) !important;
    color: #E50914 !important;
    font-weight: bold !important;
}

.genre-nav .nav-switch:hover {
    background: rgba(229, 9, 20, 0.2) !important;
    border-color: rgba(229, 9, 20, 0.5) !important;
}

/* ===== MORE GENRES MODAL STYLES ===== */
.genres-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1003;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.genres-modal .modal-content {
    background: #1a1a1a;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    border: 2px solid #333;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.genres-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #222;
    border-bottom: 1px solid #333;
}

.genres-modal .modal-header h3 {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.genres-modal .close-modal {
    background: none;
    border: none;
    color: #ccc;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.genres-modal .close-modal:hover {
    color: #E50914;
}

.genres-modal .modal-body {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.genre-modal-btn {
    padding: 15px;
    background: #222;
    border: 2px solid transparent;
    border-radius: 10px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: "Cairo";
    font-size: 14px;
}

.genre-modal-btn:hover {
    background: #333;
    color: #fff;
    border-color: #444;
}

.genre-modal-btn i {
    font-size: 20px;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    .main-container {
        padding-top: 200px;
    }
    
    .search-container {
        margin-top: 30px;
    }
    
    .genre-strip {
        padding: 10px 15px;
    }
    
    .genre-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .series-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .series-card img {
        height: 250px;
    }
    
    .genres-modal .modal-body {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .main-container {
        padding-top: 180px;
    }
    
    .series-container {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .series-card img {
        height: 200px;
    }
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E50914 0%, #ff0a16 50%, #E50914 100%);
    z-index: 1004;
    transform-origin: left;
    display: none;
}/* إصلاح نهائي للبانر */
.banner-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto 40px;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
}

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

.banner-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.banner-card.active {
    opacity: 1;
    z-index: 2;
}

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

/* تحسينات للجوال */
@media (max-width: 768px) {
    .banner-carousel {
        height: 350px;
        margin: 0 auto 30px;
    }
}

@media (max-width: 480px) {
    .banner-carousel {
        height: 250px;
        margin: 0 auto 20px;
    }
}/* ===== FIXED HEADER + GENRE STRIP + SEARCH ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px; /* ارتفاع الهيدر */
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 2px solid #E50914;
}

/* شريط التصنيفات فوق المحتوى */
.genre-strip {
    position: fixed;
    top: 60px; /* تحت الهيدر مباشرة */
    left: 0;
    right: 0;
    height: 50px; /* ارتفاع الشريط */
    display: flex;
    gap: 10px;
    padding: 10px 20px;
    overflow-x: auto;
    background: linear-gradient(90deg, #141414 0%, #1a1a1a 100%);
    border-bottom: 1px solid #222;
    z-index: 1001;
    scrollbar-width: none;
}

.genre-strip::-webkit-scrollbar {
    display: none;
}

/* البحث تحت الهيدر + شريط التصنيفات بمسافة */
.search-container {
    position: relative;
    z-index: 1002; /* فوق كلشي */
    max-width: 800px;
    margin: 130px auto 40px; /* ارتفاع الهيدر + شريط التصنيفات + مسافة إضافية */
    padding: 0 20px;
}

.search-container input {
    width: 100%;
    padding: 15px 20px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 25px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #E50914;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

/* المحتوى الرئيسي */
.main-container {
    margin-top: 180px; /* ضمان أن المحتوى تحت search-container */
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .genre-strip {
        top: 50px;
    }
    .search-container {
        margin: 110px auto 30px;
    }
    .main-container {
        margin-top: 160px;
    }
}

@media (max-width: 480px) {
    .genre-strip {
        top: 45px;
    }
    .search-container {
        margin: 100px auto 20px;
    }
    .main-container {
        margin-top: 150px;
    }
}
/* أضف هذا الكود في نهاية الملف */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px; /* ارتفاع الهيدر */
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 2px solid #E50914;
}

.genre-strip {
    position: fixed;
    top: 60px; /* تحت الهيدر مباشرة */
    left: 0;
    right: 0;
    height: 50px; /* ارتفاع الشريط */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    overflow-x: auto;
    background: linear-gradient(90deg, #141414 0%, #1a1a1a 100%);
    border-bottom: 1px solid #222;
    z-index: 1001;
    scrollbar-width: none;
}

.genre-strip::-webkit-scrollbar {
    display: none;
}

/* تعديل الهيدر اليساري ليصبح داخل الهيدر الأساسي */
.header-left {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: none;
}

/* البحث تحت الهيدر + شريط التصنيفات */
.search-container {
    position: relative;
    z-index: 1002;
    max-width: 800px;
    margin: 130px auto 40px; /* 60 + 50 + 20 */
    padding: 0 20px;
}

.search-container input {
    width: 100%;
    padding: 15px 20px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 25px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #E50914;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

/* تعديل القائمة المنسدلة */
.genre-nav {
    top: 110px; /* تحت الهيدر + شريط التصنيفات */
}

/* المحتوى الرئيسي */
.main-container {
    margin-top: 180px; /* إضافة مسافة إضافية */
}

/* تعديلات الجوال */
@media (max-width: 768px) {
    .site-header {
        height: 50px;
    }
    
    .genre-strip {
        top: 50px;
        height: 45px;
    }
    
    .search-container {
        margin: 115px auto 30px; /* 50 + 45 + 20 */
    }
    
    .genre-nav {
        top: 95px;
    }
    
    .main-container {
        margin-top: 165px;
    }
}

@media (max-width: 480px) {
    .site-header {
        height: 45px;
    }
    
    .genre-strip {
        top: 45px;
        height: 40px;
    }
    
    .search-container {
        margin: 105px auto 20px; /* 45 + 40 + 20 */
    }
    
    .genre-nav {
        top: 85px;
    }
    
    .main-container {
        margin-top: 155px;
    }
}@media (max-width: 480px) {
    .movie-card {
        height: 240px;
    }
}
/* ===== FIX MOVIE CARD ON MOBILE ===== */
@media (max-width: 768px) {

    .movie-card {
        position: relative;
        width: 100%;
        height: 260px; /* مهم بزاف */
        overflow: hidden;
        border-radius: 12px;
        background: #000;
    }

    .movie-card img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        display: block;
    }

}
/* ===== MOVIE CARDS – MOBILE FIX (ALL PAGES) ===== */
@media (max-width: 768px) {

    .movie-card,
    .film-card,
    .movies-card {
        position: relative;
        width: 100%;
        height: 260px;
        overflow: hidden;
        border-radius: 12px;
        background: #000;
    }

    .movie-card img,
    .film-card img,
    .movies-card img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        display: block;
    }

}
  /* ===== SERIES CARD STYLES ===== */
.series-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    height: 320px; /* قابل للتعديل */
}

.series-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.series-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* مهم بزاف باش الصورة تملا الكارد */
    display: block;
    transition: transform 0.3s ease;
}

.series-card:hover img {
    transform: scale(1.05);
}

.series-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.series-card:hover .series-overlay {
    transform: translateY(0);
}

.series-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.series-header h3 {
    font-size: 16px;
    color: #fff;
    flex: 1;
    margin-right: 10px;
}

.series-rating {
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.series-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    height: 60px;
    overflow: hidden;
}

.series-actions {
    display: flex;
    gap: 10px;
}

.series-play-btn,
.series-save-btn {
    flex: 1;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.series-play-btn {
    background: #E50914;
    color: white;
}

.series-play-btn:hover {
    background: #ff0a16;
}

.series-save-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.series-save-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.series-save-btn.saved {
    background: #E50914;
}

/* فصل المسلسل */
.season-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(229, 9, 20, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .series-card {
        height: 260px; /* تقليل ارتفاع للجوال */
    }
    
    .series-card img {
        object-position: center top; /* تحسين التركيز للجوال */
    }
}

@media (max-width: 480px) {
    .series-card {
        height: 240px;
    }
    
    .series-overlay {
        padding: 15px;
    }
    
    .series-header h3 {
        font-size: 14px;
    }
    
    .series-description {
        font-size: 13px;
        height: 55px;
    }
    
    .series-play-btn,
    .series-save-btn {
        padding: 7px 12px;
        font-size: 13px;
    }
}/* ===== BANNER RATING STYLES ===== */
.banner-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.8);
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #ffd700;
}

.banner-rating i {
    color: #ffd700;
}

/* ===== ARABIC TEXT SUPPORT ===== */
.banner-overlay h2 {
    font-family: inherit; /* سيستخدم Cairo تلقائيًا */
    font-size: 32px;
    margin-bottom: 15px;
    color: #fff;
    text-align: right;
    direction: ltr; /* العنوان بالإنجليزية من اليسار لليمين */
}

.banner-overlay p {
    font-family: "Cairo", sans-serif;
    color: #ccc;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
    text-align: right;
    direction: rtl; /* الوصف بالعربية من اليمين لليسار */
}

/* ===== BANNER BUTTONS ===== */
.banner-play-btn,
.banner-save-btn {
    font-family: "Cairo", sans-serif;
    font-weight: 600;
}

.banner-play-btn i,
.banner-save-btn i {
    margin-left: 8px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .banner-overlay h2 {
        font-size: 24px;
        text-align: right;
    }
    
    .banner-overlay p {
        font-size: 14px;
        text-align: right;
        direction: rtl;
    }
    
    .banner-rating {
        font-size: 14px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .banner-overlay h2 {
        font-size: 20px;
        text-align: right;
    }
    
    .banner-overlay p {
        font-size: 13px;
        text-align: right;
        direction: rtl;
    }
    
    .banner-actions {
        flex-direction: column;
        gap: 10px;
    }
}/* في قسم CSS الخاص بالصفحة */
.server-btn.default {
    border-width: 2px !important;
    border-style: solid !important;
}

.server-btn.backup {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    color: white !important;
}

.server-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #3498db;
    color: white;
    margin-top: 4px;
    display: inline-block;
}

.server-btn.default .server-badge {
    background: #e74c3c;
}

.server-btn.backup .server-badge {
    background: #d35400;
}