:root {
    --primary: #e50914;
    --black: #000000;
    --dark-grey: #121212;
    --glass: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background: var(--black);
    color: white;
    overflow-x: hidden;
}

/* الاسم المركزي */
.center-brand {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
}

.center-brand h1 {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(to bottom, #ffffff, #666666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar التنسيق الاحترافي */
.sidebar {
    width: 300px;
    height: 100vh;
    background: var(--black);
    position: fixed;
    right: -300px;
    top: 0;
    z-index: 2000;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid #222;
    padding: 40px 20px;
}

.sidebar.active {
    right: 0;
}

.search-box {
    background: #1a1a1a;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.search-box input {
    background: none;
    border: none;
    color: white;
    margin-left: 10px;
    width: 100%;
    outline: none;
    text-align: left;
}

.nav-item {
    width: 100%;
    background: none;
    border: none;
    color: #888;
    padding: 15px;
    text-align: right;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 10px;
    margin-bottom: 8px;
}

.nav-item i {
    margin-left: 15px;
    width: 20px;
}

.nav-item:hover,
.nav-item.active {
    background: var(--glass);
    color: white;
    box-shadow: -3px 0 var(--primary);
}

/* الأبعاد والبوسترات */
.section-main-title {
    padding: 40px 5% 0;
    font-size: 1.6rem;
    font-weight: 900;
}

.content-grid {
    display: grid;
    padding: 30px 5%;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.card {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.4s;
    background: var(--dark-grey);
    aspect-ratio: 2/3;
    position: relative;
}

.card:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}

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

/* زر المنيو */
.menu-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2100;
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
}

.viewing-page {
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 3000;
    overflow-y: auto;
}

.video-section {
    width: 90%;
    max-width: 1100px;
    aspect-ratio: 16/9;
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
}

#main-player {
    width: 100%;
    height: 100%;
}

.hidden {
    display: none !important;
}
:root {
    --primary: #e50914;
    --black: #000000;
    --dark-bg: #111111;
    --glass: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background: var(--black);
    color: white;
    overflow-x: hidden;
}

/* --- الاسم في منتصف الموقع --- */
.center-brand {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

.center-brand h1 {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(to right, #ffffff, #888888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* --- Sidebar System --- */
.sidebar {
    width: 320px;
    height: 100vh;
    background: var(--dark-bg);
    position: fixed;
    right: -320px;
    top: 0;
    z-index: 2000;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid #222;
    padding: 40px 20px;
}

.sidebar.active {
    right: 0;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
}

.menu-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2100;
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.logo-side {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary);
}

/* --- البحث الذكي --- */
.search-container {
    position: relative;
    margin-bottom: 30px;
}

.search-box {
    background: #1a1a1a;
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    border: 1px solid #333;
}

.search-box input {
    background: none;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-size: 1rem;
    margin-right: 10px;
}

.search-results {
    position: absolute;
    top: 110%;
    right: 0;
    width: 100%;
    background: #1a1a1a;
    border-radius: 10px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 2500;
    border: 1px solid #333;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: 0.3s;
}

.search-item:hover {
    background: #2a2a2a;
}

.search-item img {
    width: 45px;
    height: 65px;
    object-fit: cover;
    border-radius: 5px;
    margin-left: 15px;
}

.search-item-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    direction: ltr;
}

.search-item-info h4 {
    font-size: 0.9rem;
    color: white;
    margin-bottom: 5px;
}

.search-item-info span {
    font-size: 0.75rem;
    color: var(--primary);
}

/* --- Navigation --- */
.nav-links p {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.nav-item {
    width: 100%;
    background: transparent;
    border: none;
    color: #aaa;
    padding: 15px;
    text-align: right;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 1.05rem;
    font-weight: 600;
}

.nav-item i {
    margin-left: 15px;
    font-size: 1.2rem;
}

.nav-item:hover,
.nav-item.active {
    background: var(--primary);
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

/* --- Main Content & Grid --- */
.hero {
    height: 60vh;
    width: 100%;
    background-size: cover !important;
    background-position: top center !important;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--black) 5%, transparent);
}

.section-main-title {
    padding: 40px 5% 10px;
    font-size: 1.8rem;
    font-weight: 900;
    direction: ltr;
    text-align: left;
}

.content-grid {
    display: grid;
    padding: 20px 5%;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.4s;
    aspect-ratio: 2/3;
    position: relative;
    border: 2px solid transparent;
}

.card:hover {
    transform: scale(1.08) translateY(-10px);
    border-color: var(--primary);
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
}

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

/* --- Viewing Page --- */
.viewing-page {
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 3000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.view-header {
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a0a0a;
}

.back-btn {
    background: #222;
    border: 1px solid #444;
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

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

.video-section {
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    margin: 30px auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

#main-player {
    width: 100%;
    height: 100%;
    background: #000;
}

/* --- Seasons & Episodes --- */
.series-ui {
    padding: 20px 5% 50px;
}

.seasons-bar {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    margin-bottom: 25px;
    padding-bottom: 10px;
    direction: ltr;
}

.season-btn {
    padding: 12px 30px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: bold;
    transition: 0.3s;
}

.season-btn.active,
.season-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    direction: ltr;
}

.ep-btn {
    background: #111;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #333;
    transition: 0.3s;
    font-weight: bold;
    color: #ddd;
}

.ep-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.hidden {
    display: none !important;
}