/* الإعدادات العامة */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #141414;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* النافبار العلوي */
.top-navbar {
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-text {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
}

.logo-text span {
    color: #e50914;
}

.logo-icon {
    background-color: #e50914;
    color: #ffffff;
    padding: 5px;
    border-radius: 4px;
    font-size: 14px;
}

.desktop-menu {
    display: flex;
    gap: 20px;
}

.desktop-menu a {
    color: #e5e5e5;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.desktop-menu a:hover, .desktop-menu a.active {
    color: #ffffff;
    font-weight: bold;
}

.search-container {
    position: relative;
    width: 250px;
}

.search-container input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    border: 1px solid #333333;
    padding: 7px 12px 7px 35px;
    border-radius: 4px;
    color: #ffffff;
    font-size: 13px;
    outline: none;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #808080;
    font-size: 13px;
}

/* تنسيقات زر الكرة الأرضية المصغّر والأنيق في الهيدر العلوي */
.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-switcher-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.language-switcher-header:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.globe-icon {
    font-size: 16px;
    pointer-events: none; /* ضمان سلاسة اللمس والنقر فوق الزر */
}

/* جعل قائمة الـ select شفافة وتغطي الزر بالكامل لتفتح عند اللمس */
.language-switcher-header select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    outline: none;
}

.language-switcher-header select option {
    background-color: #181818;
    color: #ffffff;
    padding: 10px;
}

/* قسم الهيرو الرئيسي */
.hero-section {
    position: relative;
    height: 75vh;
    min-height: 480px;
    background-image: url('https://images.unsplash.com/photo-1536440136628-849c177e76a1?w=1200');
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    padding: 0 40px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, #141414 0%, rgba(20,20,20,0.4) 50%, rgba(0,0,0,0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin-top: 60px;
}

.hero-badge {
    background-color: #e50914;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 15px;
}

.hero-title {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-description {
    font-size: 15px;
    color: #d2d2d2;
    line-height: 1.6;
    margin-bottom: 25px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-play {
    background-color: #ffffff;
    color: #000000;
}

.btn-play:hover {
    background-color: rgba(255, 255, 255, 0.75);
    transform: scale(1.03);
}

.btn-info {
    background-color: rgba(109, 109, 110, 0.7);
    color: #ffffff;
}

.btn-info:hover {
    background-color: rgba(109, 109, 110, 0.4);
    transform: scale(1.03);
}

/* الأقسام الأساسية */
.categories-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -15px 40px 15px 40px;
    position: relative;
    z-index: 10;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
}

.categories-bar::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    background-color: rgba(24, 24, 24, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #b3b3b3;
    border: 1px solid #2e2e2e;
    padding: 9px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    outline: none;
}

.cat-btn:hover {
    background-color: #262626;
    color: #ffffff;
    border-color: #4d4d4d;
    transform: translateY(-1px);
}

.cat-btn.active {
    background-color: #e50914;
    color: #ffffff;
    border-color: #e50914;
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
}

/* تصنيفات المسلسلات الفرعية */
.series-sub-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 40px 15px 40px;
    position: relative;
    z-index: 9;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
    animation: fadeIn 0.3s ease-in-out;
}

.series-sub-bar::-webkit-scrollbar {
    display: none;
}

.series-sub-btn {
    background-color: rgba(20, 20, 20, 0.9);
    color: #aaaaaa;
    border: 1px solid #2a2a2a;
    padding: 7px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    outline: none;
}

.series-sub-btn:hover {
    background-color: #2a2a2a;
    color: #ffffff;
    border-color: #555555;
}

.series-sub-btn.active {
    background-color: #e50914;
    color: #ffffff;
    border-color: #e50914;
    box-shadow: 0 2px 10px rgba(229, 9, 20, 0.3);
}

/* تصنيفات IMDb والقائمة المنسدلة */
.sub-categories-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 0 40px 25px 40px;
    position: relative;
    z-index: 8;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
    animation: fadeIn 0.3s ease-in-out;
}

.sub-categories-bar::-webkit-scrollbar {
    display: none;
}

.genres-scroll {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.genres-scroll::-webkit-scrollbar {
    display: none;
}

.sub-cat-btn {
    background-color: rgba(20, 20, 20, 0.9);
    color: #999999;
    border: 1px solid #222222;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    outline: none;
}

.sub-cat-btn:hover {
    background-color: #222222;
    color: #ffffff;
    border-color: #444444;
}

.sub-cat-btn.active {
    background-color: #333333;
    color: #ffffff;
    border-color: #e50914;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

.netflix-dropdown {
    background-color: rgba(20, 20, 20, 0.95);
    color: #ffffff;
    border: 1px solid #333333;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.netflix-dropdown:hover, .netflix-dropdown:focus {
    border-color: #e50914;
    background-color: #1a1a1a;
}

.netflix-dropdown option {
    background-color: #181818;
    color: #ffffff;
    padding: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* حاوية المحتوى والصفوف */
.content-container {
    padding: 0 20px;
    margin-bottom: 50px;
    flex: 1;
}

.row-section {
    margin-bottom: 35px;
}

.row-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #e5e5e5;
}

.row-cards {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
}

.row-cards::-webkit-scrollbar {
    display: none;
}

.movie-card {
    min-width: 160px;
    width: 160px;
    background-color: #181818;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 5;
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
}

.poster-wrapper {
    position: relative;
    width: 100%;
    padding-top: 140%;
}

.poster-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-hd {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: #e50914;
    color: #ffffff;
    font-size: 8px;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
}

.movie-title {
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #181818;
}

/* صفحة المشاهدة */
.ad-banner {
    background: linear-gradient(135deg, #171821 0%, #0d0e14 100%);
    border: 1px solid #e50914;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.15);
}

.ad-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ad-icon {
    font-size: 26px;
    color: #e50914;
}

.ad-info h3 {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
}

.ad-info p {
    font-size: 11px;
    color: #8c8f9a;
}

.ad-btn {
    background-color: #e50914;
    color: #ffffff;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.video-player-box {
    width: 100%;
    background-color: #000000;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border: 1px solid #1f2230;
}

.video-player-box video {
    width: 100%;
    display: block;
    max-height: 550px;
}

.movie-description-section {
    margin-bottom: 30px;
}

.watch-title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 12px;
}

.watch-text {
    font-size: 14px;
    line-height: 1.8;
    color: #d1d5db;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #171821;
    border: 1px solid #262838;
    color: #ffffff;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    background-color: #e50914;
    border-color: #e50914;
}

.related-section {
    margin-top: 30px;
    border-top: 1px solid #1f2230;
    padding-top: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 16px;
}

/* الشريط السفلي للهاتف */
.bottom-nav {
    display: none;
}

/* التجاوب مع شاشات الهواتف */
@media (max-width: 768px) {
    .top-navbar {
        padding: 12px 15px;
    }

    .desktop-menu {
        display: none;
    }

    .search-container {
        width: 130px;
    }

    .hero-section {
        height: 55vh;
        padding: 0 15px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-description {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .categories-bar {
        margin: 10px 15px;
        gap: 8px;
    }

    .cat-btn {
        padding: 7px 16px;
        font-size: 13px;
    }

    .series-sub-bar {
        margin: 5px 15px 10px 15px;
        gap: 6px;
    }

    .series-sub-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .sub-categories-bar {
        margin: 5px 15px 15px 15px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .sub-cat-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .netflix-dropdown {
        width: 100%;
        text-align: center;
    }

    .content-container {
        padding: 0 10px;
        margin-bottom: 70px;
    }

    .row-title {
        font-size: 15px;
    }

    .row-cards {
        display: flex;
        gap: 10px;
    }

    .movie-card {
        min-width: 130px;
        width: 130px;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #000000;
        border-top: 1px solid #1a1a1a;
        display: flex;
        justify-content: space-around;
        padding: 8px 0;
        z-index: 1000;
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #777777;
        font-size: 10px;
        gap: 3px;
    }

    .nav-item i {
        font-size: 18px;
    }

    .nav-item.active {
        color: #ffffff;
    }
}
