:root {
    --bg: #050505;
    --bg-soft: #0f0f0f;
    --panel: #171717;
    --panel-2: #1d1d1d;
    --text: #f5f5f5;
    --muted: #b0b0b0;
    --line: rgba(255, 255, 255, 0.08);
    --red: #e50914;
    --bright-red: #ff1a1a;
    --red-dark: #8b0008;
    --shadow: rgba(229, 9, 20, 0.35);
    --radius: 18px;
    --transition: all 0.35s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: "Cairo", sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    overflow-x: hidden;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; outline: none; }
button { cursor: pointer; border: none; }
img { max-width: 100%; display: block; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #070707; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--bright-red), var(--red-dark));
    border-radius: 20px;
}

/* SPACE BACKGROUND */
.space-background {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(156, 0, 0, 0.28), transparent 35%),
                linear-gradient(180deg, #090909, #040404 35%, #000 100%);
    z-index: -2;
    pointer-events: none;
}
.stars, .stars-two {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.8) 1px, transparent 1px);
    background-size: 70px 70px;
    opacity: 0.2;
}
.stars-two {
    background-image: radial-gradient(rgba(229,9,20,0.5) 1px, transparent 1px);
    background-size: 130px 130px;
    opacity: 0.14;
}
.nebula {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180, 0, 0, 0.18), transparent 65%);
    filter: blur(30px);
}
.nebula-one { top: -200px; right: -150px; }
.nebula-two { bottom: -250px; left: -150px; }

/* LOADING SCREEN */
#loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    background: radial-gradient(circle at center, rgba(120, 0, 0, 0.22), rgba(0,0,0,0.95));
    z-index: 99999;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}
#loading-screen.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}
.loading-planet-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    display: grid;
    place-items: center;
}
.loading-orbit, .loading-orbit-two {
    position: absolute;
    border: 1px solid rgba(255, 0, 0, 0.35);
    border-radius: 50%;
}
.loading-orbit { width: 200px; height: 90px; transform: rotate(-20deg); }
.loading-orbit-two { width: 240px; height: 110px; transform: rotate(35deg); }
.loading-planet {
    width: 150px; height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #ff8c8c, #e00000 30%, #700000 62%, #170000 100%);
    box-shadow: 0 0 30px rgba(229,9,20,0.55), inset -15px -15px 25px rgba(0,0,0,0.6);
}
.loading-title {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4rem);
    background: linear-gradient(90deg, #fff, #ff4d4d, #fff);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: titleShine 2.8s linear infinite;
}
@keyframes titleShine { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }
.loading-subtitle { color: rgba(255,255,255,0.68); margin: 0; font-size: 14px; }
.loading-bar-container {
    width: min(300px, 80vw); height: 6px; border-radius: 20px; overflow: hidden; background: rgba(255,255,255,0.08);
}
.loading-bar {
    height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #7d0000, #ff0000, #ff7c7c);
}
.powered-loading { font-family: "Orbitron", sans-serif; font-size: 11px; letter-spacing: 1px; color: rgba(255, 255, 255, 0.45); }
.powered-loading span { color: var(--bright-red); }

/* HEADER */
header {
    position: fixed; top: 0; right: 0; left: 0;
    z-index: 1200; background: rgba(5,5,5,0.85); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); transition: var(--transition);
}
.navbar {
    width: min(1400px, 92%); margin: 0 auto; height: 80px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-planet {
    width: 42px; height: 42px; border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #ff8e8e, #df0000 32%, #610000 72%, #120000 100%);
    box-shadow: 0 0 20px rgba(229,9,20,0.7);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 1.4rem; }
.logo-text span { font-family: "Orbitron", sans-serif; font-size: 0.65rem; letter-spacing: 2px; color: #ff6a6a; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 28px; }
.nav-links a { position: relative; color: var(--muted); font-size: 0.98rem; font-weight: 600; transition: 0.25s ease; cursor: pointer; }
.nav-links a.active, .nav-links a:hover { color: var(--text); }
.nav-links a::after {
    content: ""; position: absolute; right: 0; bottom: -8px; width: 0; height: 2px; background: var(--red); border-radius: 10px; transition: width 0.25s ease;
}
.nav-links a.active::after, .nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
    width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,0.05); color: var(--text); display: grid; place-items: center; transition: 0.25s ease;
}
.icon-button:hover { background: var(--red); box-shadow: 0 10px 22px var(--shadow); transform: translateY(-2px); }
.menu-button { display: none; }

/* VIEWS & HERO */
.view { display: none; }
.view.active { display: block; }

/* HERO SECTION WITH CINEMA AUDIENCE BACKGROUND & WATERMARK */
.hero {
    position: relative;
    min-height: 95vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
    background: linear-gradient(180deg, rgba(5,5,5,0.75) 0%, rgba(5,5,5,0.85) 60%, var(--bg) 100%),
                url('https://images.unsplash.com/photo-1517604931442-7e0c8ed2963c?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
}

.hero-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3.5rem, 11vw, 13rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.025);
    letter-spacing: 12px;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.hero-inner {
    width: min(1400px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 5;
}

.hero-copy { padding: 40px 0 60px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 10px; background: rgba(229,9,20,0.14); border: 1px solid rgba(255,90,90,0.35); color: #ffb7b7; border-radius: 999px; padding: 8px 18px; margin-bottom: 20px; font-size: 0.85rem; backdrop-filter: blur(8px);
}
.hero-title { margin: 0 0 16px; font-size: clamp(2.5rem, 4.8vw, 5.5rem); line-height: 1.15; font-weight: 900; }
.hero-title .line-2 { display: block; color: var(--bright-red); text-shadow: 0 0 25px rgba(255, 0, 0, 0.55); }
.hero-description { max-width: 600px; margin: 0 0 24px; color: #d0d0d0; font-size: 1.05rem; line-height: 1.9; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; color: #d5d5d5; font-size: 0.85rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta i { color: var(--red); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.primary-button, .secondary-button {
    display: inline-flex; justify-content: center; align-items: center; gap: 10px; padding: 13px 28px; border-radius: 12px; font-weight: 700; transition: var(--transition);
}
.primary-button { background: linear-gradient(135deg, #ff1d1d, #a00000); color: #fff; box-shadow: 0 10px 25px rgba(229,9,20,0.4); }
.primary-button:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(255, 0, 0, 0.5); }
.secondary-button { background: rgba(255,255,255,0.08); border: 1px solid var(--line); color: #fff; backdrop-filter: blur(8px); }
.secondary-button:hover { background: rgba(255,255,255,0.16); transform: translateY(-3px); }

/* FLOATING PLANET & CINEMA ICONS */
.hero-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 480px;
}

.planet-wrap {
    position: relative;
    width: 380px;
    height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-orbit {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.hero-orbit-one {
    width: 380px;
    height: 140px;
    border: 2px solid rgba(255, 50, 50, 0.4);
    transform: rotate(-25deg);
    animation: orbitSpinHero 18s linear infinite;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
}
.hero-orbit-two {
    width: 440px;
    height: 180px;
    border: 1.5px solid rgba(255, 0, 0, 0.2);
    transform: rotate(35deg);
    animation: orbitSpinHero 26s linear infinite reverse;
}

.main-planet {
    position: relative;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 30% 25%, #ff8c8c, #e00000 28%, #700000 63%, #160000 100%);
    box-shadow: 0 0 45px rgba(229, 9, 20, 0.7), inset -25px -25px 35px rgba(0, 0, 0, 0.75);
    animation: floatPlanetHero 5s ease-in-out infinite alternate;
    z-index: 3;
}

.planet-light {
    position: absolute; top: 25px; left: 35px; width: 80px; height: 80px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent 70%); filter: blur(6px);
}
.planet-crater { position: absolute; border-radius: 50%; background: rgba(50, 0, 0, 0.5); box-shadow: inset 6px 6px 8px rgba(0,0,0,0.4); }
.crater-one { width: 60px; height: 22px; top: 55px; right: 35px; transform: rotate(-25deg); }
.crater-two { width: 40px; height: 18px; bottom: 55px; left: 45px; transform: rotate(25deg); }
.crater-three { width: 32px; height: 14px; bottom: 35px; right: 48px; transform: rotate(-10deg); }

@keyframes floatPlanetHero {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-22px) rotate(6deg); }
}
@keyframes orbitSpinHero {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.float-icon {
    position: absolute; width: 55px; height: 55px; border-radius: 16px; display: grid; place-items: center;
    background: rgba(15,15,15,0.7); border: 1px solid rgba(255,0,0,0.25); font-size: 1.6rem; backdrop-filter: blur(8px);
    box-shadow: 0 0 20px rgba(0,0,0,0.6); z-index: 10;
}
.float-one { top: 15px; left: 15px; animation: floatY 5s ease-in-out infinite; }
.float-two { bottom: 20px; right: 10px; animation: floatY 6.5s ease-in-out infinite; }
.float-three { top: 60px; right: 15px; animation: floatY 5.5s ease-in-out infinite; }
.float-four { bottom: 30px; left: 60px; animation: floatY 7s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }

/* SCROLL INDICATOR */
.scroll-indicator {
    position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%);
    z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: rgba(255, 255, 255, 0.6); font-size: 13px; font-weight: 600; text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
.scroll-mouse {
    width: 22px; height: 38px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 15px; position: relative;
}
.scroll-mouse::before {
    content: ""; position: absolute; width: 4px; height: 7px; top: 6px; left: 50%; transform: translateX(-50%); border-radius: 4px; background: var(--red); animation: scrollDotAnim 2s infinite;
}
@keyframes scrollDotAnim { 0% { opacity: 0; transform: translate(-50%, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 14px); } }

/* NETFLIX ROWS */
.content-section { width: min(1400px, 92%); margin: 0 auto; padding: 20px 0 50px; }
.netflix-row { position: relative; margin-bottom: 35px; }
.row-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.row-heading h3 { font-size: 1.4rem; font-weight: 800; display: inline-flex; align-items: center; gap: 10px; }
.row-heading h3 i { color: var(--red); }
.row-link {
    display: inline-flex; align-items: center; gap: 8px; color: var(--muted); background: rgba(255,255,255,0.04); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px;
}
.row-link:hover { color: #fff; background: var(--red); }
.row-track { position: relative; padding: 0 40px; }
.row-container {
    display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth; padding: 8px 0 14px; scrollbar-width: none;
}
.row-container::-webkit-scrollbar { display: none; }
.scroll-btn {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 38px; height: 110px; border-radius: 10px; background: rgba(0,0,0,0.75); color: #fff; font-size: 1.5rem; display: grid; place-items: center;
}
.scroll-btn.left { left: 0; }
.scroll-btn.right { right: 0; }

.media-card {
    min-width: 180px; width: 180px; background: #111; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; overflow: hidden; transition: var(--transition); cursor: pointer; flex-shrink: 0;
}
.media-card:hover { transform: translateY(-8px) scale(1.03); border-color: rgba(229,9,20,0.5); box-shadow: 0 15px 30px rgba(0,0,0,0.6); }
.media-card img { width: 100%; height: 260px; object-fit: cover; background: #1a1a1a; }
.media-card-body { padding: 10px 12px; }
.media-card h4 { font-size: 0.92rem; color: #f2f2f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.media-card .meta { display: flex; justify-content: space-between; align-items: center; color: #b8b8b8; font-size: 0.75rem; }
.media-card .meta .rate { color: #ffd166; font-weight: 700; }

/* CATEGORY VIEW & FILTERS */
.section-page { width: min(1400px, 92%); margin: 0 auto; padding: 110px 0 60px; }
.category-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 30px; }
.category-title { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; border-right: 4px solid var(--bright-red); padding-right: 12px; }
.category-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.category-actions input, .category-actions select {
    background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 200px;
}
.category-actions select option { background: #171717; color: #fff; }
.category-actions button { background: var(--red); color: white; border-radius: 12px; padding: 12px 20px; font-weight: 700; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 18px; }
.empty-state { grid-column: 1 / -1; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 18px; padding: 40px; text-align: center; color: var(--muted); font-size: 1.1rem; }

/* FOOTER */
.site-footer {
    width: 100%; padding: 40px 20px; background: linear-gradient(180deg, transparent, #000); border-top: 1px solid rgba(255, 255, 255, 0.05); text-align: center; position: relative; z-index: 10;
}
.footer-container { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.powered-text { font-family: "Orbitron", sans-serif; font-size: 13px; letter-spacing: 2px; color: #c7c7c7; }
.powered-text span { color: var(--red); font-weight: 800; text-shadow: 0 0 12px rgba(229, 9, 20, 0.6); }
.copyright-text { font-size: 12px; color: #666; }

/* SEARCH MODAL */
.search-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 10000;
    display: none; justify-content: center; align-items: flex-start; padding-top: 100px; backdrop-filter: blur(10px);
}
.search-modal.active { display: flex; }
.search-box { width: min(700px, 90%); position: relative; }
.search-input {
    width: 100%; padding: 18px 25px; border-radius: 40px; background: #171717;
    border: 2px solid var(--bright-red); color: #fff; font-size: 18px; box-shadow: 0 0 25px rgba(255, 0, 0, 0.4);
}
.close-search { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 22px; color: #a8a8a8; cursor: pointer; }

/* MOBILE DRAWER */
.mobile-drawer {
    position: fixed; top: 0; right: -320px; width: 300px; height: 100vh; background: #0d0d0d; border-left: 1px solid var(--line); z-index: 2200; padding: 24px 20px; transition: 0.28s ease;
}
.mobile-drawer.active { right: 0; }
.drawer-close { font-size: 1.5rem; margin-bottom: 26px; color: #fff; cursor: pointer; }
.mobile-nav { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.mobile-nav a { color: #d5d5d5; font-size: 1.1rem; }

@media (max-width: 980px) {
    .nav-links { display: none; }
    .menu-button { display: grid; }
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-panel { min-height: 360px; }
    .hero-actions, .hero-meta { justify-content: center; }
}