/* الخطوط تُحمّل عبر <link> من HTML للسرعة (preconnect + preload) */

:root {
  --bg-base: #16161d; /* رمادي مريح أفتح */
  --bg-surface: #1e1e26;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --gold-primary: #F59E0B; /* Sunset Amber Accent */
  --gold-light: #FBBF24;   /* Lighter Amber */
  --gold-gradient: linear-gradient(135deg, #F59E0B, #EA580C);
  --text-main: #FFFFFF;
  --text-muted: #a1a1aa; /* Updated for WCAG AA contrast */
  --font-arabic: 'Cairo', sans-serif;
  --font-english: 'Outfit', sans-serif;
  --ease-premium: cubic-bezier(0.85, 0, 0.15, 1);
  --sidebar-width: 75px;
  
  /* Shape Consistency Lock */
  --radius-base: 14px;
  --radius-pill: 50px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  height: auto;
}

html { overflow-x: hidden; }
body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-arabic);
  overflow-x: hidden;
  max-width: 100%;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════
   SHASHA — Luxury Background Layers (Static)
   ═══════════════════════════════════════════════════════════ */

/* Layer 1 — Matte Black Surface */
.lux-surface {
  position: fixed; inset: 0; z-index: -10;
  background:
    repeating-conic-gradient(#0a0a0a 0% 25%, #050505 0% 50%) 0 0 / 4px 4px,
    linear-gradient(178deg, #050505 0%, #070707 30%, #0a0a0a 60%, #060606 100%);
  opacity: 0.95;
}
.lux-surface::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 1px, rgba(255,255,255,0.008) 1px, rgba(255,255,255,0.008) 2px);
  opacity: 0.4;
}

/* Layer 2 — Fog (Removed for Visual Noise Reduction) */
/* Layer 3 — Ribbons (Removed for Visual Noise Reduction) */
.lux-ribbons { position: fixed; inset: 0; z-index: -8; pointer-events: none; overflow: hidden; }
.ambient-bg {
  position: fixed;
  inset: -100px; /* Bleed to avoid blurry edge cutoffs */
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  filter: blur(45px) saturate(140%); transform: translateZ(0); will-change: opacity, filter;
  opacity: 0; /* Changed dynamically by JS */
  z-index: 0;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), background-image 1.2s ease-in-out;
  pointer-events: none;
  /* mix-blend-mode: screen removed for performance */
}
.ambient-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(2,2,2,0.6) 0%, rgba(2,2,2,0.9) 100%);
}
/* Layer 4, 5 — Gold Highlights, Rim Lights, Particles (Removed for Visual Noise Reduction) */

/* Layer 6 — Vignette */
.lux-vignette {
  position: fixed; inset: 0; z-index: -5; pointer-events: none;
  background:
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 0%, rgba(2,2,2,0.2) 50%, rgba(2,2,2,0.7) 80%, rgba(2,2,2,0.95) 100%),
    linear-gradient(to bottom, rgba(2,2,2,0.6) 0%, transparent 15%),
    linear-gradient(to top, rgba(2,2,2,0.5) 0%, transparent 12%);
}

/* Responsive background */
@media (max-width: 1024px) {
}
@media (max-width: 600px) {
  .lux-ribbon-c, .lux-ribbon-d, .lux-gold-c, .lux-gold-a2, .lux-gold-b2 { display: none; }
  .lux-rim-3, .lux-rim-5 { display: none; }
  .lux-fog-3 { display: none; }
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* Mixed Language Support */
.eng-text {
  font-family: var(--font-english);
  direction: ltr;
  display: inline-block;
  font-weight: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: #222; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-primary); }

/* ═══════════════════════════════════════════════
   TOPBAR — شريط علوي أنيق (للصفحة الرئيسية)
   ═══════════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 5px 20px;
  background: rgba(10, 10, 12, 0.45);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px; /* Pill shape for navbar only */
  width: max-content;
  max-width: 95%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transition: transform 0.4s var(--ease-premium), opacity 0.4s;
}

/* Hide topbar when scrolling down, show on up (handled via JS) */
.topbar.is-hidden {
  transform: translate(-50%, -150%);
  opacity: 0;
}

/* Logo يمين */
.topbar-logo {
  font-family: var(--font-arabic);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--gold-primary);
  background: linear-gradient(135deg, #f3d97a, var(--gold-primary) 60%, #8a6914);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.5px;
  text-decoration: none;
  position: relative;
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
}
.topbar-logo::before { content: none; }
.topbar-logo:hover { transform: scale(1.03); }

/* Nav الوسط */
.topbar-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.topbar-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  font-size: .95rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  border-radius: 999px;
  transition: color .3s ease, background .3s ease, transform .3s ease;
}
.topbar-link i { font-size: .9em; color: var(--gold-primary); transition: color .3s ease; }
.topbar-link:hover { color: #fff; transform: translateY(-1px); }
.topbar-link.is-active i { color: #0a0a0c; }
.topbar-link.is-active {
  color: #0a0a0c;
  background: var(--gold-gradient);
  box-shadow: 0 4px 15px -4px rgba(245,158,11,.6);
}

/* Actions يسار */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f1f23, #0a0a0c);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.topbar-avatar i { font-size: 1.1rem; }
.topbar-avatar:hover {
  transform: scale(1.08) translateY(-2px);
  border-color: rgba(245,158,11,.6);
  box-shadow: 0 5px 15px -3px rgba(245,158,11,.25);
  color: var(--gold-primary);
}

/* أخفي الـ sidebar عند الـ topbar */
body.has-topbar .sidebar { display: none; }
body.has-topbar .main-content { margin-right: 0; }

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; gap: 12px; }
  .topbar-logo { font-size: 1.35rem; }
  .topbar-link { padding: 8px 18px; font-size: .85rem; }
  .topbar-avatar { width: 36px; height: 36px; }
}

/* Sleek Dawwirli-Style Sidebar */
.sidebar {
  position: fixed;
  top: 0; right: 0;
  width: var(--sidebar-width);
  height: 100vh; height: 100dvh;
  background: var(--bg-base); /* Pure black blends perfectly */
  border-left: 1px solid rgba(255, 255, 255, 0.03); /* Extremely subtle border */
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
}

.sidebar .logo {
  font-family: var(--font-arabic);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 50px;
  text-align: center;
}

.nav-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  align-items: center;
  flex: 1;
}

.nav-links li {
  width: 100%;
  display: flex;
  justify-content: center;
}

.nav-links li a {
  display: flex;
  flex-direction: column; /* Stack icon and text vertically */
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem; /* Small elegant text */
  font-weight: 600;
  padding: 15px 0;
  width: 85%;
  border-radius: 12px;
  transition: all 0.4s var(--ease-premium);
}

.nav-links li a i {
  font-size: 1.5rem;
}

.nav-links li a:hover, .nav-links li a.active {
  color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.05); /* Very subtle hover */
  transform: scale(1.05); /* Slight pop instead of moving left */
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.03);
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Main Content Area */
.main-content {
  margin-right: var(--sidebar-width);
  min-height: 100vh; min-height: 100dvh;
  padding-bottom: 100px;
}

/* ═══════════════════════════════════════════════
   HERO v2 — Cinematic (Netflix/Apple TV+ inspired)
   ═══════════════════════════════════════════════ */
.hero-v2 {
  position: relative;
  margin: 0 0 60px;
  padding: 0;
  outline: none;
  border: 1px solid rgba(245,158,11,.22);
  background: #050505;
}
.hero-v2::after { display: none; }
.hero-v2:focus-visible { box-shadow: inset 0 0 0 2px var(--gold-primary); }

.hero-stage {
  position: relative;
  width: 100%;
  height: clamp(560px, 92dvh, 1100px);
  overflow: hidden;
  background: #050505;
}

.hero-skeleton {
  width: 100%;
  height: clamp(560px, 92dvh, 1100px);
  background: linear-gradient(110deg, #0a0a0c 30%, #15151a 50%, #0a0a0c 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 900ms cubic-bezier(.22,.61,.36,1), visibility 900ms;
}
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 2; }

.hero-bg, .hero-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.hero-bg img {
  object-fit: cover;
  object-position: center 20%;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition-duration: 200ms; }
}

/* Scrim: تدرج قوي يضمن قراءة النص فوق أي صورة */
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to left, rgba(20,20,25,.12) 0%, rgba(20,20,25,.03) 30%, transparent 50%),
    linear-gradient(to top,  rgba(10,10,12,.22) 0%, transparent 38%);
  z-index: 1;
}
.hero-vignette { display: none; }

.hero-body {
  position: absolute;
  top: 50%;
  right: clamp(20px, 6vw, 80px);
  transform: translateY(-50%);
  z-index: 3;
  max-width: min(540px, 90vw);
  text-align: right;
  opacity: 0;
  transform: translate(0, calc(-50% + 20px));
  transition: opacity 800ms ease 200ms, transform 800ms cubic-bezier(.22,.61,.36,1) 200ms;
}
.hero-slide.is-active .hero-body {
  opacity: 1;
  transform: translate(0, -50%);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  min-width: 64px;
  padding: 0 14px;
  font-size: .82rem;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(20,20,24,.55);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  letter-spacing: .2px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.08);
}
.hero-pill i { color: var(--gold-primary); font-size: .8rem; }
.hero-pill-gold i { color: var(--gold-primary); }

.hero-title {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.5px;
  margin: 0 0 18px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,.8), 0 1px 3px rgba(0,0,0,.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-title.eng-text {
  font-family: var(--font-english);
  direction: ltr;
  text-align: right;
  letter-spacing: -1.5px;
}

.hero-overview {
  font-size: clamp(.95rem, 1.1vw, 1.08rem);
  line-height: 1.7;
  color: rgba(255,255,255,.82);
  margin: 0 0 28px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-base);
  cursor: pointer;
  border: none;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  font-family: inherit;
}
.hero-btn i { font-size: .95rem; }
.hero-btn-primary {
  background: var(--gold-primary);
  color: #1a1206;
  box-shadow: 0 10px 30px -8px rgba(245,158,11,.45);
}
.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -6px rgba(245,158,11,.6);
}
.hero-btn-ghost {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hero-btn-ghost:hover {
  background: rgba(255,255,255,.22);
  transform: translateY(-2px);
}

/* Progress bar أعلى الصفحة */
.hero-progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,.08);
  z-index: 5;
}
.hero-progress-fill {
  height: 100%;
  width: 0;
  background: var(--gold-gradient);
  box-shadow: 0 0 12px rgba(245,158,11,.6);
}

/* أزرار التنقل الجانبية */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 4;
  opacity: 0;
  transition: opacity .3s ease, background .25s ease, transform .25s ease;
}
.hero-v2:hover .hero-nav,
.hero-v2:focus-within .hero-nav { opacity: 1; }
.hero-nav:hover { background: var(--gold-primary); color: #1a1206; transform: translateY(-50%) scale(1.08); }
.hero-nav-prev { right: 20px; }
.hero-nav-next { left: 20px; }

/* Dots — تحت تفاصيل العمل، أنيقة وناعمة */
.hero-dots {
  position: absolute;
  bottom: clamp(40px, 6vh, 70px);
  right: clamp(20px, 6vw, 80px);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(540px, 90vw);
  flex-wrap: nowrap;
}
.hero-dot {
  width: 7px; height: 7px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  cursor: pointer;
  position: relative;
  transition: all .5s cubic-bezier(.22,.61,.36,1);
  flex: 0 0 auto;
}
.hero-dot:hover {
  background: rgba(255,255,255,.55);
  transform: scale(1.3);
}
.hero-dot.is-active {
  width: 28px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.hero-dot.is-active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-gradient);
  box-shadow: 0 0 10px rgba(245,158,11,.6), inset 0 0 6px rgba(255,255,255,.2);
  border-radius: inherit;
  animation: heroDotFill 7s linear forwards;
  transform-origin: right center;
}
@keyframes heroDotFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-dot.is-active::after { animation: none; transform: scaleX(1); }
}

@media (max-width: 768px) {
  .hero-dots { bottom: 22px; right: 20px; left: 20px; gap: 8px; }
  .hero-dot { width: 6px; height: 6px; }
  .hero-dot.is-active { width: 22px; }
}

/* Responsive — Mobile */
@media (max-width: 768px) {
  /* الهيرو بنسبة الصورة نفسها (16:9) → البوستر يظهر كاملاً بلا قصّ ولا تقريب */
  .hero-stage { height: auto; aspect-ratio: 16 / 9; min-height: 0; max-height: none; }
  .hero-bg img { object-fit: cover; object-position: center; }
  /* تعتيم سفلي خفيف فقط لقراءة النص */
  .hero-scrim { background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.25) 22%, transparent 45%) !important; }
  .hero-body { top: auto; bottom: 12px; transform: none; right: 14px; left: 14px; width: auto; max-width: none; padding-right: 0; }
  .hero-slide.is-active .hero-body { transform: none; }
  .hero-eyebrow { margin-bottom: 6px; }
  .hero-title { font-size: 1.5rem; margin-bottom: 4px; text-shadow: 0 2px 8px rgba(0,0,0,1); }
  .hero-title.eng-text { font-size: 1.55rem; letter-spacing: -.5px; }
  .hero-overview { display: none; }
  .hero-nav { display: none; }
  .hero-btn { padding: 8px 14px; font-size: 0.85rem; }
  .hero-dots { bottom: 8px; }
  .hero-thumb { width: 110px; height: 62px; }
  .hero-thumbs { margin-top: -45px; padding: 10px; }
  
  /* Sections Fix */
  .hero-v2 { margin-bottom: 34px; }
  section { padding: 0 15px; margin-bottom: 40px; }
  .section-header { margin-bottom: 15px; align-items: center; }
  .section-title { font-size: 1.25rem; }
  .section-kicker { font-size: 0.65rem; }
  .view-all-link { padding: 6px 12px; font-size: 0.8rem; }
  .view-all-link i { width: 20px; height: 20px; font-size: 0.6rem; }
  .movie-slider { gap: 15px; padding-right: 0; padding-bottom: 15px; }
  .movie-card { width: 158px; min-width: 158px; }
  .movie-card[data-rank] .movie-card-poster::before { font-size: 90px; right: -25px; bottom: -15px; }
}

/* Hero Section Carousel - The Shattered Monolith */
.hero {
  height: 90vh;
  position: relative;
  overflow: hidden;
  background: #050505;
  display: flex;
  align-items: center;
}

.hero-slides {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  align-items: center;
  padding: 0 5%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s var(--ease-premium), visibility 1s;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, #050505 0%, rgba(5,5,5,0.9) 35%, transparent 75%);
  z-index: 2;
  pointer-events: none;
}

.bg-blur {
  position: absolute; inset: -50px; width: 120%; height: 120%;
  object-fit: cover; filter: blur(60px) opacity(0.3); z-index: 0;
}

.shard {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  z-index: 1;
  transition: transform 0.8s var(--ease-premium);
  transform: translateX(-50px) scale(0.95);
  opacity: 0;
}

.shard img {
  width: 100%; height: 100%; object-fit: cover;
}

.hero-slide.active .shard {
  transform: translateX(0) scale(1);
  opacity: 1;
}
.hero-slide.active .shard:hover {
  transform: scale(1.02);
}

.hero-content {
  position: relative; z-index: 3; width: 35%; min-width: 400px; max-width: 500px; margin-right: 6%;
  opacity: 0;
  transform: translateX(30px);
  transition: all 1.2s var(--ease-premium) 0.3s;
  text-align: right;
}

.hero-slide.active .hero-content {
  opacity: 1;
  transform: translateX(0);
}

/* Hero Indicators */
.hero-indicators {
  position: absolute;
  bottom: 40px;
  right: 5%;
  display: flex;
  gap: 10px;
  z-index: 10;
}
.hero-dot {
  width: 10px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.4s var(--ease-premium);
}
.hero-dot.active {
  width: 30px;
  background: var(--gold-primary);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}
.hero-meta-badge {
  background: linear-gradient(135deg, var(--gold-primary), #EA580C);
  color: #000;
  padding: 6px 18px;
  font-weight: 700;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  box-shadow: 0 5px 15px rgba(245, 158, 11, 0.2);
}
.hero-meta-badge.dark {
  background: rgba(20, 20, 25, 0.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: none;
}

/* Details Page V5 Override (Golden Spotlight) */
.v5-bg {
  position: fixed; top: 0; left: 0; right: 0; width: 100%; height: 100vh; height: 100dvh;
  background-position: center;
  background-size: cover;
  filter: grayscale(80%) blur(10px) brightness(0.3);
  z-index: 0;
}
.v5-container {
  position: relative; z-index: 5; padding: 80px 5%; display: flex; gap: 50px;
}

/* ════ Bento Grid Layout (Phase 6) ════ */
.bento-dashboard {
  position: relative;
  z-index: 5;
  padding: 100px 5% 50px 5%;
  display: grid;
  grid-template-columns: 340px 1fr 1fr;
  grid-template-areas: 
    "poster info info"
    "poster stats stats"
    "poster content content";
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.bento-cell {
  background: rgba(15, 15, 18, 0.4);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.bento-poster {
  grid-area: poster;
  padding: 12px;
  gap: 16px;
}
.bento-info { grid-area: info; justify-content: center; }
.bento-stats { grid-area: stats; justify-content: center; }
.bento-content { grid-area: content; }

@media (max-width: 1024px) {
  .bento-dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "poster"
      "info"
      "stats"
      "content";
    padding-top: 80px;
  }
}

/* ── الهواتف: تقليص البوستر والمحتوى ليناسب الشاشة ── */
@media (max-width: 600px) {
  .bento-dashboard { padding: 70px 14px 40px; gap: 16px; }
  .bento-cell { padding: 16px; border-radius: 18px; }
  .bento-poster .v5-poster,
  .bento-poster { max-width: 220px; margin-left: auto; margin-right: auto; }
  .v5-poster { max-width: 220px; }
  .v5-title, .v5-poster-title { font-size: 1.4rem !important; }
  .v5-overview { font-size: 1rem; padding: 16px; }
  .bento-content, .bento-info, .bento-stats { min-width: 0; }
}
.v5-poster-wrapper {
  width: 340px; flex-shrink: 0; position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.v5-poster {
  width: 100%; border-radius: var(--radius-base); box-shadow: 0 24px 60px -10px rgba(0,0,0,.8), 0 0 0 1px rgba(245, 158, 11, 0.3);
  display: block;
  aspect-ratio: 2/3;
  object-fit: cover;
}

/* Poster Card — العنوان والتفاصيل تحت البوستر */
.v5-poster-card {
  background: linear-gradient(180deg, rgba(20,20,25,.65) 0%, rgba(10,10,12,.85) 100%);
  border: 1px solid rgba(245,158,11,.18);
  border-radius: var(--radius-base);
  padding: 22px 20px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.6);
  position: relative;
  overflow: hidden;
}
.v5-poster-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: .6;
}

.v5-poster-card .v5-title {
  font-size: 1.6rem;
  line-height: 1.2;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 6px;
  letter-spacing: -.5px;
}
.v5-poster-card .v5-title.eng-text {
  font-family: var(--font-english);
  direction: ltr;
  text-align: right;
}
.v5-subtitle {
  font-size: .85rem;
  color: var(--text-muted);
  margin: 0 0 18px;
  font-weight: 500;
}
.v5-subtitle:empty { display: none; }

/* أزرار المكتبة في صفحة التفاصيل */
.v5-actions {
  display: flex;
  gap: 8px;
  margin: 16px 0 4px;
  flex-wrap: wrap;
}
.v5-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-premium);
  flex: 1;
  justify-content: center;
  min-width: 140px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.v5-action-btn:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 4px;
}
.v5-action-btn i {
  color: var(--gold-primary);
  font-size: 1.1rem;
  transition: all 0.3s var(--ease-premium);
}
.v5-action-btn:hover {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.05);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -5px rgba(245, 158, 11, 0.15);
}
.v5-action-btn:hover i {
  transform: scale(1.15) rotate(5deg);
}
.v5-action-btn:active {
  transform: translateY(1px);
}
.v5-action-btn.is-active {
  background: var(--gold-gradient);
  color: #1a1206;
  border-color: transparent;
  box-shadow: 0 8px 25px -8px rgba(245, 158, 11, 0.6);
  font-weight: 700;
}
.v5-action-btn.is-active i {
  color: #1a1206;
}

/* Divider ذهبي ناعم بين الأقسام داخل البطاقة */
.v5-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0;
  position: relative;
}
.v5-divider::before,
.v5-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,.25), transparent);
}
.v5-divider span {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold-primary);
  margin: 0 10px;
  box-shadow: 0 0 8px rgba(245,158,11,.6);
}

/* Overview داخل البطاقة */
.v5-overview-wrap { padding: 2px 0; }
.v5-overview-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-family: var(--font-english);
  margin-bottom: 10px;
  opacity: .9;
}
.v5-overview-kicker i { font-size: .7rem; }
.v5-poster-card .v5-overview {
  font-size: .92rem;
  line-height: 1.85;
  color: rgba(255,255,255,.82);
  background: transparent;
  padding: 0;
  border: none;
  margin: 0;
  font-weight: 400;
  text-align: justify;
}

.v5-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px 10px;
}
.v5-meta-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.v5-meta-cell.v5-meta-wide { grid-column: span 3; }
.v5-meta-cell > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.2);
  color: var(--gold-primary);
  font-size: .85rem;
  flex-shrink: 0;
}
.v5-meta-cell > div { min-width: 0; flex: 1; }
.v5-meta-label {
  font-size: .65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: var(--font-english);
  margin-bottom: 2px;
}
.v5-meta-value {
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v5-meta-value.eng-text { font-family: var(--font-english); }

@media (max-width: 900px) {
  .v5-container { flex-direction: column; padding: 30px 15px; gap: 30px; overflow-x: hidden; }
  .v5-poster-wrapper { width: 100%; max-width: 260px; margin: 0 auto; }
  .player-shell { margin-bottom: 30px; }
  .player-stage { width: 100%; aspect-ratio: 16 / 9; }
}
.v5-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 120%; height: 120%; background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
  z-index: -1; pointer-events: none;
}
.v5-content {
  flex: 1; padding-top: 20px;
  min-width: 0;   /* يمنع الأطفال من تمديد العمود */
}
/* v5-meta القديم في v5-content لم يعد مستخدماً */
.v5-overview { font-size: 1.15rem; line-height: 1.9; color: #ddd; background: rgba(0,0,0,0.4); padding: 25px; border-radius: 15px; border-right: 4px solid var(--gold-primary); margin-bottom: 40px; }
/* ═══════════════════════════════════════════════
   CAST CARD — بطاقة طاقم العمل
   ═══════════════════════════════════════════════ */
.v5-cast-wrap {
  background: linear-gradient(180deg, rgba(20,20,25,.65) 0%, rgba(10,10,12,.85) 100%);
  border: 1px solid rgba(245,158,11,.18);
  border-radius: 16px;
  padding: 22px 22px 26px;
  min-width: 0;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.6);
  position: relative;
  overflow: hidden;
}
.v5-cast-wrap::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: .6;
}

.v5-cast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.v5-cast-header-kicker {
  font-family: var(--font-english);
  font-size: .68rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-weight: 700;
  margin-bottom: 6px;
  opacity: .9;
}
.v5-cast-header-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
  margin: 0;
}
.v5-cast-header-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(245,158,11,.05));
  border: 1px solid rgba(245,158,11,.35);
  color: var(--gold-primary);
  font-size: 1.15rem;
}

/* Horizontal scroller — 4 بطاقات ظاهرة */
.v5-cast-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 4px 4px 10px;
  margin: 0 -4px;
  -webkit-mask-image: linear-gradient(to left, #000 90%, transparent);
          mask-image: linear-gradient(to left, #000 90%, transparent);
}
.v5-cast-grid::-webkit-scrollbar { display: none; }

/* Individual cast card — أنيق وفخم */
.v5-cast-card {
  position: relative;
  flex: 0 0 calc((100% - 14px * 3) / 4);
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  transition: all .4s cubic-bezier(.22,.61,.36,1);
  overflow: hidden;
  isolation: isolate;
}
/* خط ذهبي رفيع أعلى البطاقة يتمدد عند hover */
.v5-cast-card::before {
  content: '';
  position: absolute;
  top: 0; right: 50%; left: 50%;
  height: 1px;
  background: var(--gold-gradient);
  transition: right .4s cubic-bezier(.22,.61,.36,1), left .4s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 0 8px rgba(245,158,11,.5);
}
/* glow ذهبي خفيف خلف الصورة عند hover */
.v5-cast-card::after {
  content: '';
  position: absolute;
  top: -10px; right: 50%;
  width: 100px; height: 100px;
  transform: translateX(50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.35), transparent 70%);
  filter: blur(20px);
  opacity: 0;
  z-index: -1;
  transition: opacity .4s ease;
}

.v5-cast-img-wrap {
  position: relative;
  width: 78px; height: 78px;
  margin-bottom: 14px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, rgba(245,158,11,.45), rgba(245,158,11,.1));
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
}
.v5-cast-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 2px solid #0a0a0c;
  background: #0a0a0c;
  margin: 0;
}

.v5-cast-name {
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.v5-cast-name.eng-text {
  font-family: var(--font-english);
  direction: ltr;
  unicode-bidi: plaintext;
}
.v5-cast-role {
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  font-weight: 500;
}
.v5-cast-role::before {
  content: '« ';
  color: var(--gold-primary);
  opacity: .55;
}
.v5-cast-role::after {
  content: ' »';
  color: var(--gold-primary);
  opacity: .55;
}
/* بطاقة كادر (مخرج/كاتب) — تمييز ذهبي خفيف */
.v5-cast-card.is-crew .v5-cast-role {
  color: var(--gold-primary);
  font-weight: 700;
}
.v5-cast-card.is-crew .v5-cast-role::before,
.v5-cast-card.is-crew .v5-cast-role::after { display: none; }

/* Hover */
.v5-cast-card:hover {
  background: linear-gradient(180deg, rgba(245,158,11,.06), rgba(245,158,11,.01));
  border-color: rgba(245,158,11,.35);
  transform: translateY(-6px);
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.5);
}
.v5-cast-card:hover::before { right: 15%; left: 15%; }
.v5-cast-card:hover::after { opacity: 1; }
.v5-cast-card:hover .v5-cast-img-wrap {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  transform: scale(1.06) rotate(-3deg);
}

@media (max-width: 768px) {
  .v5-cast-card { flex-basis: calc((100% - 12px * 2) / 3); }
  .v5-cast-grid { gap: 12px; }
  .v5-cast-img-wrap { width: 68px; height: 68px; }
}
/* ═══════════════════════════════════════════════
   PREMIUM PLAYER — تحفة سينمائية
   ═══════════════════════════════════════════════ */
.player-shell {
  position: relative;
  width: 100%;
  margin-bottom: 50px;
  padding: 3px;
  background:
    linear-gradient(135deg,
      rgba(245,158,11,.5) 0%,
      rgba(245,158,11,.1) 25%,
      rgba(245,158,11,.05) 50%,
      rgba(245,158,11,.1) 75%,
      rgba(245,158,11,.5) 100%);
  border-radius: 14px;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,.95),
    0 0 60px rgba(245,158,11,.08);
  isolation: isolate;
}
/* زوايا ذهبية سينمائية */
.player-frame-corner {
  position: absolute;
  width: 22px; height: 22px;
  border: 2px solid var(--gold-primary);
  z-index: 10;
  pointer-events: none;
  opacity: .9;
}
.player-frame-corner.tl { top: -8px;    right: -8px;  border-left: 0; border-bottom: 0; }
.player-frame-corner.tr { top: -8px;    left: -8px;   border-right: 0; border-bottom: 0; }
.player-frame-corner.bl { bottom: -8px; right: -8px;  border-left: 0; border-top: 0; }
.player-frame-corner.br { bottom: -8px; left: -8px;   border-right: 0; border-top: 0; }

.player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 11px;
  overflow: hidden;
  background: #050505;
}
.player-backdrop {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.7) saturate(1.05);
}
.player-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.2) 35%, transparent 55%),
    linear-gradient(to bottom, rgba(0,0,0,.7) 0%, transparent 30%),
    radial-gradient(ellipse 80% 60% at 50% 50%, transparent 0%, rgba(0,0,0,.55) 100%);
  z-index: 1;
}

/* Top bar */
.player-topbar {
  position: absolute;
  top: 18px; right: 22px; left: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
}
.player-now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.player-now-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ff3a3a;
  box-shadow: 0 0 8px #ff3a3a;
  animation: liveBlink 1.5s ease-in-out infinite;
}
@keyframes liveBlink { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.player-quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(245,158,11,.06));
  border: 1px solid rgba(245,158,11,.4);
  border-radius: 999px;
  font-family: var(--font-english);
  font-size: .72rem;
  font-weight: 800;
  color: var(--gold-primary);
  letter-spacing: 1.5px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.player-quality-badge i { font-size: .7rem; }

/* Center Big Play */
.player-big-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 96px; height: 96px;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.player-big-play-inner {
  position: relative;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1206;
  font-size: 1.8rem;
  box-shadow: 0 16px 40px -8px rgba(245,158,11,.7), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .3s cubic-bezier(.22,.61,.36,1);
}
.player-big-play-inner i { margin-left: 5px; }
.player-big-play:hover .player-big-play-inner { transform: scale(1.08); }
.player-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(245,158,11,.4);
  border-radius: 50%;
  pointer-events: none;
}
.player-ring.r1 { animation: ringPulse 2.5s ease-out infinite; }
.player-ring.r2 { animation: ringPulse 2.5s ease-out infinite .8s; }
.player-ring.r3 { animation: ringPulse 2.5s ease-out infinite 1.6s; }
@keyframes ringPulse {
  0%   { transform: scale(1);   opacity: .7; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Title block */
.player-titleblock {
  position: absolute;
  bottom: 110px;
  right: 28px;
  z-index: 3;
  text-align: right;
  max-width: 75%;
}
.player-titleblock-kicker {
  font-family: var(--font-english);
  font-size: .68rem;
  letter-spacing: 3.5px;
  color: var(--gold-primary);
  font-weight: 700;
  margin-bottom: 6px;
  opacity: .9;
}
.player-titleblock-name {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,.8);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -.3px;
}

/* Controls */
.player-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 18px 22px 16px;
  z-index: 4;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%);
}
.player-timeline {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,.15);
  border-radius: 999px;
  cursor: pointer;
  margin-bottom: 14px;
  overflow: visible;
}
.player-buffer {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  background: rgba(255,255,255,.25);
  border-radius: inherit;
}
.player-progress {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  background: var(--gold-gradient);
  border-radius: inherit;
  box-shadow: 0 0 10px rgba(245,158,11,.5);
}
.player-marker {
  position: absolute;
  top: 50%;
  width: 3px; height: 8px;
  background: rgba(255,255,255,.5);
  transform: translateY(-50%);
  border-radius: 1px;
}
.player-thumb {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gold-primary);
  transform: translate(50%, -50%);
  box-shadow: 0 4px 12px rgba(0,0,0,.5);
  cursor: grab;
}
.player-timeline:hover { height: 6px; }
.player-timeline:hover .player-thumb { width: 16px; height: 16px; }

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.player-side {
  display: flex;
  align-items: center;
  gap: 6px;
}
.player-btn {
  position: relative;
  background: transparent;
  border: none;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  cursor: pointer;
  transition: all .25s ease;
}
.player-btn:hover { background: rgba(255,255,255,.12); color: var(--gold-primary); }
.player-btn sup {
  position: absolute;
  bottom: 8px; right: 8px;
  font-size: .55rem;
  font-weight: 800;
  font-family: var(--font-english);
}
.player-btn-main {
  width: 42px; height: 42px;
  background: rgba(245,158,11,.18);
  color: var(--gold-primary);
  font-size: 1.05rem;
  border: 1px solid rgba(245,158,11,.3);
}
.player-btn-main:hover { background: var(--gold-primary); color: #1a1206; }
.player-btn-pill {
  width: auto;
  padding: 0 12px;
  font-family: var(--font-english);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 1px;
  border: 1px solid rgba(255,255,255,.18);
}
.player-time {
  font-family: var(--font-english);
  font-size: .82rem;
  color: rgba(255,255,255,.85);
  font-weight: 600;
  margin-right: 10px;
  letter-spacing: .5px;
}
.player-time-sep { opacity: .35; margin: 0 6px; }
.player-duration { opacity: .65; }

.player-volume {
  display: flex;
  align-items: center;
  gap: 4px;
}
.player-volume-bar {
  width: 0;
  height: 3px;
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  overflow: hidden;
  transition: width .35s ease;
}
.player-volume-bar span {
  display: block;
  height: 100%;
  background: var(--gold-gradient);
}
.player-volume:hover .player-volume-bar { width: 60px; }

/* Watermark */
.player-watermark {
  position: absolute;
  top: 50%;
  left: 30px;
  transform: translateY(-50%);
  font-family: var(--font-arabic);
  font-size: 1.4rem;
  font-weight: 800;
  color: rgba(255,255,255,.08);
  letter-spacing: 1px;
  z-index: 2;
  pointer-events: none;
  writing-mode: vertical-rl;
}

@media (max-width: 768px) {
  .player-titleblock { bottom: 90px; right: 16px; }
  .player-big-play { width: 70px; height: 70px; }
  .player-big-play-inner { width: 60px; height: 60px; font-size: 1.3rem; }
  .player-watermark { display: none; }
  .player-quality-badge span { display: none; }
}

/* When trailer iframe is shown */
.player-shell.is-playing .player-stage { display: none; }
.player-shell.is-playing > iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 11px;
}

.title-massive {
  font-size: 3.8rem;
  margin-bottom: 20px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -1px;
  text-shadow: 0 20px 40px rgba(0,0,0,0.8);
  word-wrap: break-word;
  text-align: right;
  display: block;
}
/* عنوان لاتيني داخل hero (eng-text) — اتجاهه LTR وبخط Outfit */
.title-massive.eng-text {
  font-family: var(--font-english);
  direction: ltr;
  text-align: right; /* يبقى محاذي ليمين الـ hero في RTL */
  letter-spacing: -1.5px;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
  margin-bottom: 35px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary-soft {
  padding: 12px 35px;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  background: linear-gradient(135deg, var(--gold-primary), #bf801a);
  box-shadow: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding-bottom: 50px;
}
.category-grid .movie-card {
  width: 100%;
}

.btn-primary-soft i {
  margin-left: 10px;
  font-size: 1.1rem;
}

.btn-primary-soft:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(245, 158, 11, 0.5);
}

.btn-secondary-soft {
  padding: 12px 35px;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary-soft i {
  margin-left: 10px;
  font-size: 1.1rem;
}

.btn-secondary-soft:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════
   CINEMATIC SEARCH — بطل بصري قوي
   ═══════════════════════════════════════════════ */
.advanced-search {
  margin: 60px 4%;
  position: relative;
  z-index: 10;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  display: block;
}
.advanced-search > .btn-primary-soft { display: none; }

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 28px 22px 80px;
  background:
    linear-gradient(135deg, rgba(245,158,11,.05) 0%, rgba(20,20,25,.6) 50%, rgba(245,158,11,.05) 100%),
    rgba(10,10,12,.7);
  border: 1px solid rgba(245,158,11,.18);
  border-radius: 6px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 24px 60px -20px rgba(0,0,0,.9),
    inset 0 1px 0 rgba(255,255,255,.05);
  transition: all .5s cubic-bezier(.22,.61,.36,1);
  overflow: hidden;
  cursor: text;
}
/* خط ذهبي علوي + سفلي يتمددان عند التركيز */
.search-input-wrapper::before,
.search-input-wrapper::after {
  content: '';
  position: absolute;
  right: 0; left: 0;
  height: 2px;
  background: var(--gold-gradient);
  transform: scaleX(0);
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.search-input-wrapper::before { top: 0;    transform-origin: right; }
.search-input-wrapper::after  { bottom: 0; transform-origin: left;  }

.advanced-search:focus-within .search-input-wrapper {
  border-color: rgba(245,158,11,.5);
  box-shadow:
    0 30px 80px -20px rgba(245,158,11,.25),
    0 0 0 1px rgba(245,158,11,.4),
    inset 0 1px 0 rgba(255,255,255,.08);
  transform: translateY(-2px);
}
.advanced-search:focus-within .search-input-wrapper::before,
.advanced-search:focus-within .search-input-wrapper::after {
  transform: scaleX(1);
}

/* أيقونة عدسة كبيرة بدائرة ذهبية */
.search-icon {
  position: relative;
  flex-shrink: 0;
  width: 46px; height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--gold-primary);
  background: radial-gradient(circle, rgba(245,158,11,.18), rgba(245,158,11,.05) 70%);
  border: 1px solid rgba(245,158,11,.35);
  border-radius: 50%;
  transition: all .5s cubic-bezier(.22,.61,.36,1);
}
.search-icon::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.4), transparent 70%);
  opacity: 0;
  filter: blur(8px);
  transition: opacity .4s ease;
  z-index: -1;
}
.advanced-search:focus-within .search-icon {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: #1a1206;
  border-color: var(--gold-primary);
  transform: rotate(-8deg) scale(1.08);
}
.advanced-search:focus-within .search-icon::after { opacity: 1; }

.search-input {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  font-family: var(--font-arabic);
  font-weight: 600;
  outline: none;
  letter-spacing: -.2px;
  caret-color: var(--gold-primary);
}
.search-input::placeholder {
  color: rgba(255,255,255,.35);
  font-weight: 400;
  font-style: italic;
}

/* شارة الاختصار يسار */
.search-shortcut {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: .7rem;
  font-weight: 700;
  font-family: var(--font-english);
  color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  letter-spacing: 1.5px;
  pointer-events: none;
  transition: opacity .3s ease;
}
.search-shortcut kbd {
  font-family: inherit;
  padding: 2px 5px;
  background: rgba(0,0,0,.4);
  border-radius: 3px;
  font-size: .65rem;
}
.advanced-search:focus-within .search-shortcut { opacity: 0; }

/* زوايا ذهبية صغيرة (Cinema corners) */
.search-input-wrapper > .corner {
  position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid var(--gold-primary);
  opacity: .55;
  transition: opacity .3s ease, width .4s ease, height .4s ease;
  pointer-events: none;
}
.search-input-wrapper > .corner.tr { top: 8px;    right: 8px;  border-left: 0;  border-bottom: 0; }
.search-input-wrapper > .corner.tl { top: 8px;    left: 8px;   border-right: 0; border-bottom: 0; }
.search-input-wrapper > .corner.br { bottom: 8px; right: 8px;  border-left: 0;  border-top: 0;    }
.search-input-wrapper > .corner.bl { bottom: 8px; left: 8px;   border-right: 0; border-top: 0;    }
.advanced-search:focus-within .corner {
  opacity: 1;
  width: 20px; height: 20px;
}

@media (max-width: 768px) {
  .search-input-wrapper { padding: 16px 18px 16px 14px; gap: 14px; }
  .search-icon { width: 38px; height: 38px; font-size: 1rem; }
  .search-input { font-size: 1rem; }
  .search-shortcut { display: none; }
}

/* ─── Suggestions Dropdown ─── */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0; left: 0;
  background: rgba(10,10,12,.94);
  border: 1px solid rgba(245,158,11,.18);
  border-radius: 6px;
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow:
    0 24px 60px -10px rgba(0,0,0,.9),
    0 0 0 1px rgba(245,158,11,.06) inset;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,158,11,.4) transparent;
  z-index: 100;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .3s ease, transform .3s cubic-bezier(.22,.61,.36,1);
}
.search-suggestions[hidden] { display: none; }
.search-suggestions.is-open { opacity: 1; transform: translateY(0); }

/* Header */
.suggest-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 14px 6px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.suggest-header-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-family: var(--font-english);
}
.suggest-header-label::before {
  content: '';
  width: 14px; height: 1px;
  background: var(--gold-primary);
  opacity: .5;
}
.suggest-header-count {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  font-family: var(--font-english);
}

/* Item */
.suggest-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  position: relative;
  transition: background .2s ease, padding .25s cubic-bezier(.22,.61,.36,1);
}
.suggest-item::before {
  content: '';
  position: absolute;
  right: 0; top: 50%;
  height: 0;
  width: 3px;
  background: var(--gold-gradient);
  transform: translateY(-50%);
  transition: height .25s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 0 10px rgba(245,158,11,.6);
}
.suggest-item:hover,
.suggest-item.is-active {
  background: rgba(245,158,11,.06);
  padding-right: 24px;
}
.suggest-item:hover::before,
.suggest-item.is-active::before { height: 60%; }

.suggest-poster {
  flex-shrink: 0;
  width: 52px; height: 78px;
  border-radius: 4px;
  overflow: hidden;
  background: #1a1a1f;
  border: 1px solid rgba(255,255,255,.06);
}
.suggest-poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.suggest-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.suggest-title {
  font-size: .92rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.1px;
  text-align: right;
}
.suggest-title.eng-text {
  font-family: var(--font-english);
  direction: ltr;
  text-align: right;  /* يبقى يمين (جنب البوستر) حتى لو لاتيني */
  unicode-bidi: plaintext;
}
.suggest-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  color: rgba(255,255,255,.55);
  justify-content: flex-start;
}
.suggest-meta .dot { opacity: .4; }
.suggest-meta i { color: var(--gold-primary); font-size: .7rem; margin-left: 3px; }
.suggest-meta .type-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.25);
  border-radius: 999px;
  color: var(--gold-primary);
  font-size: .65rem;
  font-weight: 700;
}

.suggest-arrow {
  flex-shrink: 0;
  color: rgba(255,255,255,.25);
  font-size: .85rem;
  transition: transform .3s ease, color .3s ease;
}
.suggest-item:hover .suggest-arrow,
.suggest-item.is-active .suggest-arrow {
  color: var(--gold-primary);
  transform: translateX(-4px);
}

/* View-all in header */
.suggest-viewall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-primary);
  font-weight: 700;
  font-size: .78rem;
  padding: 4px 12px;
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 999px;
  background: rgba(245,158,11,.06);
  transition: all .25s ease;
}
.suggest-viewall:hover {
  background: var(--gold-primary);
  color: #1a1206;
  border-color: var(--gold-primary);
}
.suggest-viewall i { font-size: .7rem; }

/* Loading / empty */
.suggest-loading,
.suggest-empty {
  padding: 30px 18px;
  text-align: center;
  color: rgba(255,255,255,.6);
  font-size: .9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.suggest-loading i,
.suggest-empty i {
  color: var(--gold-primary);
  font-size: 1.4rem;
  opacity: .7;
}

.search-results-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  margin-top: 10px;
  background: rgba(10, 10, 12, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.search-results-dropdown::-webkit-scrollbar {
  width: 6px;
}
.search-results-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  gap: 15px;
  transition: background 0.3s;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.search-result-item img {
  width: 40px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
}
.search-result-info {
  display: flex;
  flex-direction: column;
}
.search-result-title {
  font-weight: 600;
  color: #fff;
  font-size: 1.05rem;
}
.search-result-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.search-input::placeholder {
  color: rgba(255,255,255,0.3);
  font-weight: 300;
}

.search-filters {
  display: flex;
  gap: 20px;
  border-right: 1px solid rgba(255,255,255,0.1);
  padding-right: 25px;
}

.filter-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-icon-btn:hover {
  color: var(--gold-primary);
  transform: translateY(-3px);
}

.search-submit-btn {
  background: var(--gold-gradient);
  color: #000;
  border: none;
  padding: 14px 35px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-arabic);
  cursor: pointer;
  transition: all 0.4s var(--ease-premium);
}

.search-submit-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

/* Sections */
section {
  padding: 0 4%;
  margin-bottom: 90px;
  position: relative;
}

/* Cinematic Separator */
section:not(.hero)::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 5%;
  width: 90%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.15), transparent);
}
section:last-of-type::after {
  display: none;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  padding-right: 18px;
  padding-bottom: 14px;
  position: relative;
}
/* خط ذهبي تحت العنوان يمتد إلى زر عرض الكل */
.section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.15), transparent);
}
.section-header::before {
  content: '';
  position: absolute;
  right: 0;
  top: 30%;
  width: 4px;
  height: 60%;
  background: var(--gold-gradient);
  border-radius: 4px;
  box-shadow: 0 0 14px rgba(245,158,11,.5);
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-english);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-primary);
  opacity: .85;
}
.section-kicker::before {
  content: '';
  width: 18px; height: 1px;
  background: var(--gold-primary);
  opacity: .5;
}
.section-kicker i { font-size: .7rem; }

.section-title {
  font-size: 1.85rem;
  margin: 0;
  display: flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: -.3px;
  line-height: 1.1;
}

/* View-all Pill — زر أنيق بانيميشن سهم */
.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 14px;
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all .35s cubic-bezier(.22,.61,.36,1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.view-all-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-primary), #8a6914);
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
  z-index: -1;
}
.view-all-link i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(245,158,11,.18);
  color: var(--gold-primary);
  font-size: .68rem;
  transition: all .35s cubic-bezier(.22,.61,.36,1);
}
.view-all-link:hover {
  color: #1a1206;
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -8px rgba(245,158,11,.5);
}
.view-all-link:hover::before { transform: translateX(0); }
.view-all-link:hover i {
  background: #1a1206;
  color: var(--gold-primary);
  transform: translateX(-3px);
}

/* ═══════════════════════════════════════════════
   MOVIE CARD v2 — Cinematic
   ═══════════════════════════════════════════════ */
.movie-slider {
  display: flex;
  gap: 40px;          /* مساحة كافية لرقم الـ rank */
  overflow-x: auto;
  overflow-y: visible;
  padding: 10px 50px 30px 0;  /* hint للرقم على الجانب الأيمن */
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.movie-slider::-webkit-scrollbar { display: none; }

.movie-card {
  flex: 0 0 auto;
  width: 200px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
  perspective: 1000px;
  position: relative;
}
/* Rank number (للأقسام الرائجة) */
.movie-card[data-rank] .movie-card-poster::before {
  content: attr(data-rank);
  position: absolute;
  bottom: -20px;
  right: -38px;
  font-size: 130px;
  font-weight: 900;
  font-family: var(--font-english);
  color: transparent;
  -webkit-text-stroke: 2.5px rgba(245,158,11,.7);
  line-height: 1;
  z-index: 6;
  pointer-events: none;
  letter-spacing: -8px;
  text-shadow: 0 6px 20px rgba(0,0,0,.6);
  transition: all .5s cubic-bezier(.22,.61,.36,1);
}
.movie-card[data-rank]:hover .movie-card-poster::before {
  -webkit-text-stroke: 3px var(--gold-primary);
  transform: translateX(-6px) scale(1.05);
}
@media (max-width: 768px) {
  .movie-card { width: 175px; min-width: 175px; }
}

/* Chrome Edge Frame — حواف كروم لامعة */
.movie-card-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-base);
  padding: 3px;
  background:
    linear-gradient(135deg,
      #f5f5f5 0%,
      #707070 12%,
      #2a2a2a 25%,
      #707070 38%,
      #f0f0f0 50%,
      #707070 62%,
      #2a2a2a 75%,
      #707070 88%,
      #f5f5f5 100%);
  background-size: 200% 200%;
  background-position: 0% 0%;
  box-shadow: 0 14px 36px -10px rgba(0,0,0,.8);
  transition: background-position 1.2s ease, box-shadow .35s ease, transform .25s ease-out;
  transform-style: preserve-3d;
  isolation: isolate;
}
.movie-card:hover .movie-card-poster { will-change: transform; }

.movie-card-inner {
  position: relative;
  background-color: var(--charcoal-soft);
  width: 100%; height: 100%;
  border-radius: calc(var(--radius-base) - 3px);
  overflow: hidden;
  background: #000;
}

.movie-card-poster img.poster {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s cubic-bezier(.22,.61,.36,1);
}

/* Glare يجتاح البوستر عند hover */
.movie-card-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 35%, rgba(255,255,255,.42) 50%, transparent 65%);
  transform: translateX(-100%);
  pointer-events: none;
  z-index: 7;
  transition: transform 1.1s cubic-bezier(.22,.61,.36,1);
}
@media (hover: hover) and (pointer: fine) {
  .movie-card:hover .movie-card-glare { transform: translateX(100%); }
}

/* Glow خلف البطاقة عند hover */
.movie-card::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.25), transparent 70%);
  opacity: 0;
  filter: blur(22px);
  transition: opacity .4s ease;
  z-index: -1;
}
@media (hover: hover) and (pointer: fine) {
  .movie-card:hover::before { opacity: 1; }
}

/* Hover overlay (gradient + play + meta) */
.movie-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 45%, transparent 80%);
  opacity: 0;
  transition: opacity .35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  pointer-events: none;
}
.movie-card-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.7);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: #0a0a0c;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity .35s ease, transform .35s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.movie-card-play i { margin-left: 3px; }
.movie-card-overlay-meta {
  position: absolute;
  top: 50%; left: 0; right: 0;
  margin-top: 40px; /* أسفل زر التشغيل مباشرة */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .74rem;
  color: rgba(255,255,255,.92);
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
}
.movie-card-overlay-meta .dot { opacity: .4; }
.movie-card-overlay-meta .rating i { color: var(--gold-primary); margin-left: 3px; }

/* Hover state */
@media (hover: hover) and (pointer: fine) {
  .movie-card:hover .movie-card-poster {
    background-position: 100% 100%;
    box-shadow: 0 28px 60px -10px rgba(0,0,0,.95), 0 0 24px rgba(255,255,255,.12);
  }
  .movie-card:hover .movie-card-poster img.poster { transform: scale(1.02); }
  .movie-card:hover .movie-card-overlay { opacity: 1; }
  .movie-card:hover .movie-card-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Badges (top corners) */
.card-badge {
  position: absolute;
  top: 10px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .3px;
  border-radius: 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.card-badge-rating {
  left: 10px;
  background: rgba(15,15,18,.7);
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
}
.card-badge-rating i { color: var(--gold-primary); }
.card-badge-new {
  right: 10px;
  background: linear-gradient(135deg, #FBBF24, #B8881C);
  color: #1a1206;
}
.card-badge-trending {
  right: 10px;
  background: linear-gradient(135deg, #ff4d4d, #b81b1b);
  color: #fff;
}
.card-badge-4k {
  right: 10px;
  background: rgba(15,15,18,.85);
  color: var(--gold-primary);
  border: 1px solid rgba(245,158,11,.4);
}

/* Title + meta below poster (دائماً ظاهرة) */
.movie-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px;
}
.movie-card-title {
  font-size: .92rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}
.movie-card-title.eng-text {
  font-family: var(--font-english);
  direction: ltr;
  text-align: right;
}
.movie-card-sub {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Progress bar (continue watching) — أنيق */
.movie-card-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(0,0,0,.5);
  z-index: 3;
}
.movie-card-progress-fill {
  height: 100%;
  background: var(--gold-gradient);
  box-shadow: 0 0 8px rgba(245,158,11,.5);
}

/* Skeleton موحّد */
.skeleton-card {
  flex: 0 0 auto;
  width: 200px;
  min-width: 200px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(110deg, #0e0e12 30%, #1a1a20 50%, #0e0e12 70%);
  background-size: 200% 100%;
  border-radius: 12px;
  animation: shimmer 1.4s linear infinite;
}
@media (max-width: 768px) {
  .skeleton-card { width: 145px; min-width: 145px; }
}

/* Top 10 Overlay Architecture */
.top10-slider {
  padding-right: 40px; 
  overflow: visible;
}
.top10-card {
  overflow: visible;
}
.top10-card .movie-card-inner {
  width: 100%; height: 100%;
  border-radius: 10px;
  position: relative;
}
.top10-number {
  position: absolute;
  bottom: -10px;
  right: -25px;
  font-size: 80px;
  font-weight: 900;
  font-family: var(--font-english);
  color: var(--bg-base);
  -webkit-text-stroke: 2px var(--text-muted);
  z-index: 15;
  pointer-events: none;
  transition: all 0.5s var(--ease-premium);
}
.top10-card:hover .top10-number {
  -webkit-text-stroke: 3px var(--gold-primary);
  transform: scale(1.05) translateX(-5px);
}

/* Studio Collections */
.studio-card {
  min-width: 300px;
  height: 160px;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s var(--ease-premium);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.studio-card img {
  width: 50%;
  height: auto;
  object-fit: contain;
  opacity: 0.6;
  transition: all 0.5s var(--ease-premium);
}
.studio-card:hover {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.1);
  transform: translateY(-8px);
}
.studio-card:hover img {
  opacity: 1;
  transform: scale(1.1);
}

/* Page Headers */
.page-header {
  padding: 60px 5% 30px;
}
.page-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.filter-tabs {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.filter-tabs button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  padding-bottom: 15px;
  cursor: pointer;
  position: relative;
}
.filter-tabs button.active { color: var(--gold-primary); }
.filter-tabs button.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 3px; background: var(--gold-primary); border-radius: 3px 3px 0 0;
}

/* Grid Layout */
.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.grid-gallery .movie-card { min-width: 100%; height: 300px; }

/* Profile Layout */
.profile-wrap {
  display: flex;
  gap: 50px;
  padding: 60px 5%;
}
.profile-stats { flex: 1; }
.stat-box {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 25px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.stat-number { font-family: var(--font-english); font-size: 3rem; color: var(--gold-primary); font-weight: 700; }
.stat-label { font-size: 1.1rem; font-weight: 600; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1024px) {
  .sidebar { width: 70px; }
  .nav-links li a span { display: none; }
  .nav-links li a i { font-size: 1.6rem; }
  .main-content { margin-right: 70px; }
  .quick-filter { flex-direction: column; gap: 20px; align-items: stretch; }
  .filter-group { border-left: none; padding-left: 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
}


/* Category Grid Layout */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 28px 18px;
  padding: 20px 0;
}
.category-grid .movie-card {
  width: 100%;
  min-width: 0;
}


.movie-info {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  padding: 15px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.4s var(--ease-premium);
  pointer-events: none;
  border-radius: 0 0 10px 10px;
}

.movie-card:hover .movie-info {
  transform: translateY(0);
  opacity: 1;
}

.movie-info h3 {
  font-size: 1rem;
  margin: 0 0 5px 0;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.movie-meta {
  display: flex; justify-content: space-between; font-size: 0.85rem; color: #ccc;
}
.movie-meta .movie-rating i { color: var(--gold-primary); margin-left: 3px; }


/* Cleaned Up UI Classes */
.btn-full-lg { width: 100%; justify-content: center; margin-top: 25px; font-size: 1.2rem; padding: 15px; }
.btn-full-md { width: 100%; justify-content: center; margin-top: 15px; font-size: 1.1rem; padding: 12px; }
.text-white { color: #fff; }
.section-heading-gold { color: var(--gold-primary); margin-bottom: 20px; font-size: 1.5rem; }
.mt-50 { margin-top: 50px; }
.similar-section { position: relative; z-index: 5; padding: 0 5% 50px; }
.category-main { padding-top: 50px; }
.category-section { padding: 0 5%; }
.category-header { margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 20px; }
.category-title { font-size: 2rem; }
.loading-container { text-align: center; padding: 50px; display: block; }
.loading-spinner { font-size: 2rem; color: var(--gold-primary); }


/* ═══════════════════════════════════════════════
   PERSON PAGE — صفحة الفنان
   ═══════════════════════════════════════════════ */
.person-section { padding: 60px 5%; }

.person-card {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(20,20,25,.65) 0%, rgba(10,10,12,.85) 100%);
  border: 1px solid rgba(245,158,11,.18);
  border-radius: 20px;
  padding: 32px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 24px 60px -10px rgba(0,0,0,.7);
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.person-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: .6;
}

.person-photo-wrap {
  position: relative;
  width: 240px;
  flex-shrink: 0;
  padding: 3px;
  background: linear-gradient(135deg, rgba(245,158,11,.55), rgba(245,158,11,.1));
  border-radius: 16px;
}
.person-photo {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  border: 2px solid #0a0a0c;
  background: #0a0a0c;
}

.person-info { flex: 1; min-width: 0; }

.person-kicker {
  font-family: var(--font-english);
  font-size: .7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-weight: 700;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: .9;
}

.person-name {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 4px;
  letter-spacing: -.5px;
  line-height: 1.15;
}
.person-name.eng-text {
  font-family: var(--font-english);
  direction: ltr;
  text-align: right;
}
.person-name-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 22px;
}
.person-name-sub:empty { display: none; }

.person-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 18px;
  background: rgba(0,0,0,.25);
  border-radius: 12px;
  margin-bottom: 22px;
}
.person-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  text-align: right;
}
.person-stat-label {
  font-size: .65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: var(--font-english);
  width: 100%;
  text-align: right;
}
.person-stat-value {
  font-size: .92rem;
  font-weight: 700;
  color: #fff;
  width: 100%;
  text-align: right;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}
.person-stat-value.eng-text {
  font-family: var(--font-english);
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: right;
}

.person-bio-wrap { padding-top: 6px; }
.person-bio {
  font-size: .92rem;
  line-height: 1.85;
  color: rgba(255,255,255,.82);
  margin: 0;
  text-align: justify;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.person-bio.is-expanded {
  -webkit-line-clamp: unset;
  display: block;
}
.person-bio-toggle {
  margin-top: 10px;
  background: transparent;
  border: 1px solid rgba(245,158,11,.3);
  color: var(--gold-primary);
  padding: 7px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .25s ease;
}
.person-bio-toggle:hover {
  background: var(--gold-primary);
  color: #1a1206;
}

@media (max-width: 768px) {
  .person-card { flex-direction: column; padding: 22px; gap: 24px; }
  .person-photo-wrap { width: 180px; margin: 0 auto; }
  .person-info { text-align: center; }
  .person-kicker, .person-stats { text-align: right; }
}

/* ═══════════════════════════════════════════════
   LIBRARY PAGE — صفحة مكتبتي
   ═══════════════════════════════════════════════ */
.library-section { padding: 50px 4% 70px; }

/* HERO CARD */
.lib-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 30px;
  padding: 32px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 30%, rgba(245,158,11,.18), transparent 55%),
    linear-gradient(135deg, rgba(20,20,25,.7) 0%, rgba(10,10,12,.88) 100%);
  border: 1px solid rgba(245,158,11,.2);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 28px 60px -16px rgba(0,0,0,.7);
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
}
.lib-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  opacity: .6;
}
.lib-hero-info { flex: 1; min-width: 260px; }
.lib-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-english);
  font-size: .72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-primary);
  font-weight: 700;
  margin-bottom: 14px;
  opacity: .9;
}
.lib-hero-title {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 8px;
  line-height: 1.15;
  letter-spacing: -.5px;
}
.lib-hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
  font-weight: 500;
}

.lib-hero-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-self: center;
}
.lib-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  min-width: 160px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  transition: all .3s ease;
}
.lib-stat:hover {
  border-color: rgba(245,158,11,.35);
  background: rgba(245,158,11,.06);
  transform: translateY(-3px);
}
.lib-stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245,158,11,.22), rgba(245,158,11,.06));
  border: 1px solid rgba(245,158,11,.3);
  color: var(--gold-primary);
  font-size: 1.1rem;
}
.lib-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-family: var(--font-english);
  letter-spacing: -.5px;
}
.lib-stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

/* TOOLBAR */
.lib-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 36px 0 28px;
  flex-wrap: wrap;
}

.lib-tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lib-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.6);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all .3s var(--ease-premium);
  white-space: nowrap;
}
.lib-tab:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: -2px; /* Inner outline for pill segmented controls */
}
.lib-tab i { font-size: 1.05rem; transition: all .3s var(--ease-premium); }
.lib-tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.lib-tab.is-active {
  background: var(--gold-gradient);
  color: #1a1206;
  box-shadow: 0 4px 15px -4px rgba(245,158,11,.5);
}
.lib-tab.is-active i { color: #1a1206; }
.lib-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  background: rgba(0,0,0,.15);
  color: inherit;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  font-family: var(--font-english);
}
.lib-tab.is-active .lib-tab-count {
  background: rgba(0,0,0,.2);
}

.lib-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lib-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  min-width: 220px;
  transition: all .3s ease;
}
.lib-search:focus-within {
  border-color: rgba(245,158,11,.4);
  background: rgba(245,158,11,.05);
}
.lib-search i { color: var(--gold-primary); font-size: .85rem; }
.lib-search input {
  flex: 1;
  background: transparent;
  border: 0;
  color: #fff;
  font-family: inherit;
  font-size: .88rem;
  outline: 0;
}
.lib-search input::placeholder { color: rgba(255,255,255,.4); }

.lib-sort {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lib-sort select {
  padding: 9px 36px 9px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  color: #fff;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: 0;
  transition: all .3s ease;
}
.lib-sort select:hover { border-color: rgba(245,158,11,.3); }
.lib-sort i {
  position: absolute;
  left: 14px;
  pointer-events: none;
  color: var(--gold-primary);
  font-size: .7rem;
}
.lib-sort option { background: #0a0a0c; color: #fff; }

/* REMOVE BUTTON on card */
.lib-remove {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 20;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  font-size: .75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all .3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.movie-card:hover .lib-remove { opacity: 1; }
.lib-remove:hover {
  background: #ff3a3a;
  border-color: #ff3a3a;
  transform: scale(1.1);
}

/* EMPTY STATE */
.lib-empty {
  text-align: center;
  padding: 70px 30px;
  background: linear-gradient(180deg, rgba(20,20,25,.5) 0%, rgba(10,10,12,.7) 100%);
  border: 1px dashed rgba(245,158,11,.2);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.lib-empty-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(245,158,11,.04));
  border: 1px solid rgba(245,158,11,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.lib-empty h3 {
  font-size: 1.4rem;
  color: #fff;
  font-weight: 800;
  margin: 0;
}
.lib-empty p {
  color: var(--text-muted);
  font-size: .95rem;
  margin: 0 0 18px;
}
.lib-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  border-radius: var(--radius-base);
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: #1a1206;
  font-weight: 800;
  font-size: .9rem;
  text-decoration: none;
  box-shadow: 0 10px 28px -8px rgba(245,158,11,.5);
  transition: all .3s ease;
}
.lib-empty-btn:hover { transform: translateY(-3px); box-shadow: 0 14px 32px -6px rgba(245,158,11,.6); }

@media (max-width: 720px) {
  .lib-hero { padding: 22px; }
  .lib-hero-stats { width: 100%; }
  .lib-toolbar { flex-direction: column; align-items: stretch; }
  /* الجوال: أيقونة + رقم فقط (الأسماء تختفي) لتتوزّع بالتساوي بلا هروب */
  .lib-tabs { width: 100%; gap: 4px; }
  .lib-tab { flex: 1; justify-content: center; padding: 10px 4px; gap: 6px; }
  .lib-tab i { font-size: 1rem; }
  .lib-tab-label { display: none; }
  .lib-tab-count { font-size: .7rem; padding: 1px 7px; }
  .lib-tools { width: 100%; }
  .lib-search { flex: 1; min-width: 0; }
}

/* Empty State */
.empty-state { color:#aaa; text-align:center; padding: 50px; display: flex; flex-direction: column; align-items: center; gap: 15px; font-size: 1.2rem; }
.empty-state i { font-size: 3rem; color: var(--gold-primary); margin-bottom: 10px; opacity: 0.8; }
.empty-state-btn { margin-top: 15px; padding: 10px 20px; font-size: 1rem; }

/* Skeleton Loaders */
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.skeleton-card { background: rgba(255, 255, 255, 0.05); border-radius: 12px; width: 100%; aspect-ratio: 2/3; animation: pulse 1.5s ease-in-out infinite; }

/* Accessibility Focus */
*:focus-visible { outline: 2px solid var(--gold-primary); outline-offset: 3px; border-radius: 4px; }

/* Visually-hidden — مخفي بصرياً لكنه يبقى متاحاً لقارئات الشاشة و SEO */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Typography */
.v5-overview { line-height: 1.7; }

/* ==========================================================================
   SEASONS SELECTOR (Details Page)
   ========================================================================== */

.seasons-selector-wrapper {
  display: flex;
  justify-content: flex-start; /* Align right in RTL */
  margin-bottom: 15px;
  position: relative;
  z-index: 50; /* Above player */
}

.btn-seasons {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 6px;
  font-family: var(--font-arabic);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.back-icon-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
}
.back-icon-btn:hover {
  background: var(--gold-primary);
  color: #000;
  transform: scale(1.05);
}


.btn-seasons:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.btn-seasons i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.btn-seasons.is-open i {
  transform: rotate(180deg);
}

/* Popover container */
.seasons-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  background: rgba(10, 10, 12, 0.85); /* surface color with opacity */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.seasons-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Views Management inside popover */
.popover-view {
  display: none;
  flex-direction: column;
  max-height: 400px;
}

.popover-view.active-view {
  display: flex;
}

.popover-header {
  padding: 15px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  color: var(--gold-primary);
  flex-shrink: 0;
}

.popover-back-btn {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 15px 20px;
  color: var(--text-muted);
  font-family: var(--font-arabic);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s ease;
  flex-shrink: 0;
  text-align: right;
  width: 100%;
}

.popover-back-btn:hover {
  color: var(--text-main);
}

/* Scrollable lists */
.popover-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px 0;
}

/* Custom Scrollbar for Popover */
.popover-list::-webkit-scrollbar {
  width: 6px;
}
.popover-list::-webkit-scrollbar-track {
  background: transparent;
}
.popover-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

/* Season/Episode item */
.popover-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
  color: var(--text-main);
  border: none;
  background: transparent;
  width: 100%;
  text-align: right;
  font-family: var(--font-arabic);
}

.popover-item:hover, .popover-item:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.popover-item-img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  background: #222;
  flex-shrink: 0;
}

.popover-item-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.popover-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popover-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 🎬 Custom Video Player & Close Button Styling */
/* ═══════════════════════════════════════════════
   SERVERS CONTAINER (MULTI-EMBED)
   ═══════════════════════════════════════════════ */
.servers-container {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  width: 90%;
  max-width: 600px;
}

/* إخفاء السيرفرات إذا لم يكن هناك نشاط في المشغل (مثل شريط التحكم) */
.player-shell.is-playing.is-idle .servers-container {
  opacity: 0;
  visibility: hidden;
}

.servers-title {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.servers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 100%;
}

.server-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.server-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.server-btn.active {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #000;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.player-stage iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* End Servers Container */

.shasha-video-player {
  width: 100%;
  height: 100%;
  border: none;
  background-color: var(--bg-base, #020202);
  outline: none;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  object-fit: contain;
}

/* Hide video element when hidden attribute is present */
.shasha-video-player[hidden] {
  display: none;
}

/* Wrapper and layout for playing state */
.player-shell.is-playing .player-stage {
  display: none;
}

.player-shell.is-playing .player-container {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  background: #000;
  border-radius: 11px;
  overflow: hidden;
}

/* Close Player Button */
.close-player {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main, #ffffff);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.close-player:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.close-player:active {
  transform: scale(0.95);
}

/* Ensure close button is only visible when playing */
.player-shell:not(.is-playing) .close-player {
  display: none;
}

/* ═══════════════════════════════════════════════
   SERVERS SELECTOR (Multi Servers)
   ═══════════════════════════════════════════════ */
.servers-section {
  width: 100%;
  margin-top: 25px;
  padding: 0 5px;
  animation: slideDownServers 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes slideDownServers {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.server-selection-header {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.server-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.server-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.server-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--gold-primary);
  color: #fff;
  transform: translateY(-2px);
}

.server-btn.active {
  background: linear-gradient(135deg, #F59E0B, #EA580C);
  color: #000;
  border-color: #F59E0B;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

@media (max-width: 768px) {
  .servers-section {
    margin-top: 0;
    padding: 0;
  }
  .server-btn {
    padding: 7px 12px;
    font-size: 0.78rem;
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
}

/* ═══════════════════════════════════════════════════════════
   📱 MOBILE RESPONSIVE — إصلاحات شاملة للجوال
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── الصفحة الرئيسية: الهيرو ── */
  .hero-stage {
    height: 48dvh !important;
    min-height: 290px !important;
    max-height: 400px !important;
  }
  .hero-bg img {
    object-position: center top;
  }
  .hero-body {
    bottom: 40px !important;
    right: 12px !important;
    left: 12px !important;
    padding-right: 0 !important;
  }
  .hero-title {
    font-size: 1.6rem !important;
    margin-bottom: 6px !important;
  }
  .hero-title.eng-text {
    font-size: 1.8rem !important;
  }
  .hero-overview {
    font-size: 0.8rem !important;
    -webkit-line-clamp: 2 !important;
    margin-bottom: 10px !important;
    line-height: 1.6 !important;
  }
  .hero-eyebrow {
    margin-bottom: 6px !important;
  }
  .hero-pill {
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
    gap: 4px !important;
  }
  .hero-btn {
    padding: 8px 14px !important;
    font-size: 0.82rem !important;
    gap: 6px !important;
  }
  .hero-cta {
    gap: 8px !important;
  }
  .hero-dots {
    bottom: 12px !important;
  }

  /* ── أقسام المحتوى: العناوين والبطاقات ── */
  section {
    padding: 0 12px !important;
    margin-bottom: 30px !important;
  }
  .section-header {
    margin-bottom: 12px !important;
    padding-right: 12px !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  .section-header::before {
    width: 3px !important;
  }
  .section-title {
    font-size: 1.1rem !important;
    letter-spacing: 0 !important;
  }
  .section-kicker {
    font-size: 0.55rem !important;
    letter-spacing: 1.5px !important;
    gap: 4px !important;
  }
  .section-kicker::before {
    width: 10px !important;
  }
  .view-all-link {
    padding: 5px 10px 5px 8px !important;
    font-size: 0.72rem !important;
    gap: 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .view-all-link i {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.55rem !important;
  }

  /* ── بطاقات الأفلام ── */
  .movie-slider {
    gap: 15px !important;
    padding: 5px 15px 15px 0 !important;
  }
  .movie-card {
    width: 135px !important;
    min-width: 135px !important;
  }
  .movie-card-poster {
    border-radius: 10px !important;
  }
  .movie-card-poster img {
    border-radius: 10px !important;
  }
  .movie-card-title {
    font-size: 0.78rem !important;
  }
  .movie-card[data-rank] .movie-card-poster::before {
    font-size: 70px !important;
    right: -18px !important;
    bottom: -10px !important;
  }

  /* ── شريط البحث ── */
  .search-bar-wrap {
    margin: 0 12px !important;
    padding: 8px 14px !important;
  }
  .search-bar-wrap input {
    font-size: 0.85rem !important;
  }

  /* ═══════════════════════════════════════════════
     📱 صفحة التفاصيل: ترتيب خاص للجوال
     المشغل في البداية → ثم بوستر العمل (شكل الحاسوب) → ثم طاقم العمل
     ═══════════════════════════════════════════════ */
  .v5-container {
    display: flex !important;
    flex-direction: column !important;
    padding: 15px 12px !important;
    gap: 24px !important;
  }

  .v5-content {
    display: contents !important;
  }

  .content-controls-row {
    order: 1 !important;
    width: 100% !important;
    margin-bottom: 0 !important;
  }

  .player-shell {
    order: 2 !important;
    width: 100% !important;
  }

  .v5-poster-wrapper {
    order: 3 !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
  }
  
  .v5-poster {
    width: 100% !important;
    min-width: 0 !important;
  }
  
  /* تصغير بعض نصوص التفاصيل على الجوال لكن مع الحفاظ على التصميم العام */
  .v5-poster-card {
    padding: 18px !important;
  }
  .v5-poster-card .v5-title {
    font-size: 1.3rem !important;
  }
  .v5-poster-card .v5-overview {
    font-size: 0.88rem !important;
    padding: 15px !important;
    margin-bottom: 20px !important;
    -webkit-line-clamp: 5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .v5-action-btn {
    padding: 10px 14px !important;
    font-size: 0.8rem !important;
  }
  .v5-meta-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  .v5-meta-cell.v5-meta-wide {
    grid-column: span 2 !important;
  }

  .v5-cast-wrap {
    order: 4 !important;
    width: 100% !important;
    margin-top: 10px !important;
  }

  /* ── المشغل في الجوال ── */
  .player-shell {
    margin-bottom: 0 !important;
    border-radius: 10px !important;
  }
  .player-stage {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    min-height: unset !important;
    height: auto !important;
  }

  /* أزرار المشغلات والموسم */
  .content-controls-row {
    gap: 6px !important;
    margin-bottom: 10px !important;
  }
  .btn-seasons {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
  }

  /* ── طاقم العمل ── */
  .v5-cast-wrap {
    padding: 14px !important;
    border-radius: 12px !important;
  }
  .v5-cast-header-title {
    font-size: 1.1rem !important;
  }
  .v5-cast-header-kicker {
    font-size: 0.6rem !important;
  }
  .v5-cast-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
  }
  .v5-cast-card {
    gap: 6px !important;
  }
  .v5-cast-name {
    font-size: 0.7rem !important;
  }
  .v5-cast-role {
    font-size: 0.6rem !important;
  }

  /* ── زر العودة ── */
  .back-icon-btn {
    top: 10px !important;
    right: 10px !important;
    width: 34px !important;
    height: 34px !important;
    font-size: 0.9rem !important;
  }

  /* ── الأعمال المشابهة ── */
  .similar-section {
    padding: 0 12px !important;
  }
  .similar-section .section-title {
    font-size: 1.1rem !important;
  }

  /* ── التوب بار ── */
  .topbar {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .topbar-logo {
    font-size: 1.2rem !important;
  }
  .topbar-link {
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
  }

  /* ── 1. قائمة الحلقات (seasons-popover) — تفيض عن الشاشة ── */
  .seasons-popover {
    width: calc(100vw - 24px) !important;
    max-width: 340px !important;
    right: -10px !important;
  }
  .popover-view {
    max-height: 55vh !important;
  }
  .popover-item {
    padding: 10px 12px !important;
    gap: 10px !important;
  }
  .popover-item-img {
    width: 50px !important;
    height: 34px !important;
  }

  /* ── 2. شبكة المكتبة والتصنيف ── */
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 14px 10px !important;
    padding: 12px 0 !important;
  }

  /* ── 3. طبقات الخلفية الفاخرة — إخفاء للأداء ── */
  .lux-ribbon-c,
  .lux-ribbon-d,
  .lux-gold-a2,
  .lux-gold-b2,
  .lux-gold-c,
  .lux-rim-2,
  .lux-rim-3,
  .lux-rim-4,
  .lux-rim-5,
  .lux-corner,
  .lux-dust {
    display: none !important;
  }
  .lux-fog-zone {
    filter: blur(60px) !important;
  }
  .lux-fog-2,
  .lux-fog-3 {
    display: none !important;
  }

  /* ── 5. بطاقة المكتبة (lib-stat) ── */
  .lib-hero {
    padding: 16px !important;
    gap: 16px !important;
    flex-direction: column !important;
  }
  .lib-hero-title {
    font-size: 1.4rem !important;
  }
  .lib-hero-sub {
    font-size: 0.85rem !important;
  }
  .lib-hero-kicker {
    font-size: 0.6rem !important;
    letter-spacing: 1.5px !important;
  }
  .lib-hero-stats {
    width: 100% !important;
    gap: 8px !important;
  }
  .lib-stat {
    min-width: 0 !important;
    flex: 1 1 calc(33.33% - 6px) !important;
    padding: 10px !important;
    gap: 8px !important;
  }
  .lib-stat-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
  }
  .lib-stat-value {
    font-size: 1.15rem !important;
  }
  .lib-stat-label {
    font-size: 0.65rem !important;
  }

  /* ── المكتبة: التابات والأدوات ── */
  .library-section {
    padding: 25px 12px 50px !important;
  }
  .lib-toolbar {
    margin: 20px 0 16px !important;
    gap: 10px !important;
  }
  .lib-tab {
    padding: 7px 12px !important;
    font-size: 0.78rem !important;
    gap: 5px !important;
  }
  .lib-tab i {
    font-size: 0.75rem !important;
  }
  .lib-tab-count {
    min-width: 18px !important;
    height: 16px !important;
    font-size: 0.6rem !important;
  }
  .lib-search {
    min-width: 0 !important;
  }
  .lib-search input {
    font-size: 0.82rem !important;
  }
  .lib-sort select {
    padding: 7px 28px 7px 12px !important;
    font-size: 0.78rem !important;
  }

  /* ── حالة المكتبة الفارغة ── */
  .lib-empty {
    padding: 40px 20px !important;
  }
  .lib-empty-icon {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.3rem !important;
  }
  .lib-empty h3 {
    font-size: 1.1rem !important;
  }
  .lib-empty p {
    font-size: 0.82rem !important;
  }

  /* ── زر الحذف (مرئي دائماً على اللمس) ── */
  .lib-remove {
    opacity: 1 !important;
  }

  /* ── 6. نتائج البحث ── */
  .advanced-search {
    margin: 30px 12px !important;
  }
  .search-results-dropdown {
    max-height: 60vh !important;
    border-radius: 12px !important;
  }
  .search-result-item {
    padding: 10px 14px !important;
  }
  .search-result-item img {
    width: 45px !important;
    height: 65px !important;
  }

  /* ── صفحة الممثل ── */
  .person-section {
    padding: 25px 12px 50px !important;
  }
  .person-card {
    padding: 16px !important;
    gap: 16px !important;
  }
  .person-photo-wrap {
    width: 140px !important;
  }
  .person-name {
    font-size: 1.4rem !important;
  }
  .person-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .person-stat {
    padding: 8px 10px !important;
  }
  .person-stat-label {
    font-size: 0.7rem !important;
  }
  .person-stat-value {
    font-size: 0.82rem !important;
  }
  .person-bio {
    font-size: 0.85rem !important;
    line-height: 1.7 !important;
  }

  /* ── صفحة التصنيف ── */
  .category-section {
    padding: 20px 12px !important;
  }
  .category-header {
    margin-bottom: 10px !important;
  }
  .category-title {
    font-size: 1.1rem !important;
  }

  /* ── أزرار المشغل — تكبير لللمس ── */
  .player-btn {
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .player-timeline {
    height: 6px !important;
  }

  /* ── تقليل استهلاك backdrop-filter على الجوال للأداء ── */
  .seasons-popover,
  .search-results-dropdown,
  .lib-hero,
  .person-card,
  .v5-container {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }
}

/* ── شاشات صغيرة جداً (أقل من 400px) ── */
@media (max-width: 400px) {
  .hero-title {
    font-size: 1.3rem !important;
  }
  .hero-title.eng-text {
    font-size: 1.5rem !important;
  }
  .movie-card {
    width: 105px !important;
    min-width: 105px !important;
  }
  .server-btn {
    flex: 1 1 calc(50% - 3px) !important;
    padding: 6px 8px !important;
    font-size: 0.72rem !important;
  }
  .v5-poster {
    width: 110px !important;
    min-width: 110px !important;
  }
  .v5-poster-card .v5-title {
    font-size: 1rem !important;
  }
  .lib-stat {
    flex: 1 1 100% !important;
  }
  .lib-tab {
    padding: 6px 10px !important;
    font-size: 0.72rem !important;
  }
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
  }
  
  /* تعطيل الخلفيات الضبابية تماماً للأجهزة الضعيفة جداً */
  .seasons-popover,
  .search-results-dropdown,
  .lib-hero,
  .person-card,
  .v5-container {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #0a0a0c !important; /* لون ثابت بدلاً من الشفافية لتسهيل القراءة */
  }
}

/* ═══════════════════════════════════════════════════════════
   4. Safe Area — دعم iPhone Notch/Dynamic Island
   ═══════════════════════════════════════════════════════════ */
@supports (padding: env(safe-area-inset-top)) {
  .topbar {
    padding-top: max(10px, env(safe-area-inset-top)) !important;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }
  .main-content {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .player-controls {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ═══════════════════════════════════════════════════════════
   تحسينات اللمس العامة
   ═══════════════════════════════════════════════════════════ */
@media (pointer: coarse) {
  /* إزالة التظليل الأزرق */
  * {
    -webkit-tap-highlight-color: transparent;
  }
  /* منع تأخير اللمس */
  a, button, [role="button"], input, select, textarea {
    touch-action: manipulation;
  }
  /* تعطيل hover effects على أجهزة اللمس */
  .movie-card:hover {
    transform: none !important;
  }
  .movie-card:active {
    transform: scale(0.97) !important;
  }
}

/* === LUXURY BACKGROUND INJECTED === */


/* ═══════════════════════════════════════════════════════════
   SHASHA — Premium Streaming Platform Background
   STATIC VERSION — No animations. Pure elegance.
   ═══════════════════════════════════════════════════════════ */

*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}

:root {
  --black-void:    #020202;
  --black-deep:    #050505;
  --black-matte:   #0a0a0a;
  --charcoal:      #111111;
  --charcoal-soft: #161616;
  --gold-raw:      #F59E0B;
  --gold-dim:      rgba(245,158,11,0.08);
  --gold-whisper:  rgba(245,158,11,0.04);
  --gold-accent:   rgba(245,158,11,0.22);
  --gold-line:     rgba(245,158,11,0.16);
  --gold-warm:     rgba(245,158,11,0.10);
  --gold-particle: rgba(245,158,11,0.55);
}

html, body {
  width: 100%; height: 100%;
  background: var(--black-void);
  /* overflow: hidden removed */
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────────────────
   LAYER 1 — Ultra Deep Matte Black Surface
   Luxury leather × anodized aluminum texture
   ───────────────────────────────────────────────────────── */
.layer-surface {
  position: fixed; inset: 0; z-index: -10;
  background:
    repeating-conic-gradient(
      var(--black-matte) 0% 25%,
      var(--black-deep) 0% 50%
    ) 0 0 / 4px 4px,
    linear-gradient(
      178deg,
      var(--black-deep) 0%,
      #070707 30%,
      var(--black-matte) 60%,
      #060606 100%
    );
  opacity: 0.95;
}

/* Carbon-fiber micro-pattern */
.layer-surface::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 1px,
      rgba(255,255,255,0.008) 1px,
      rgba(255,255,255,0.008) 2px
    );
  opacity: 0.4;
}


/* ─────────────────────────────────────────────────────────
   LAYER 2 — Volumetric Fog (Static)
   ───────────────────────────────────────────────────────── */
.layer-fog {
  position: fixed;
  transform: translateZ(0);
  will-change: transform; inset: 0; z-index: -9;
  pointer-events: none;
}

.fog-zone {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px); transform: translateZ(0); will-change: transform, filter;
}

.fog-1 {
  width: 65vw; height: 65vh;
  bottom: -22vh; left: -18vw;
  background: radial-gradient(circle, var(--gold-whisper) 0%, transparent 70%);
  opacity: 0.7;
}

.fog-2 {
  width: 55vw; height: 55vh;
  top: -18vh; right: -12vw;
  background: radial-gradient(circle, var(--gold-whisper) 0%, transparent 70%);
  opacity: 0.5;
}

.fog-3 {
  width: 45vw; height: 40vh;
  bottom: -12vh; right: -8vw;
  background: radial-gradient(circle, rgba(20,18,14,0.12) 0%, transparent 70%);
  opacity: 0.45;
}


/* ─────────────────────────────────────────────────────────
   LAYER 3 — Flowing Matte-Black Ribbons (Static)
   ───────────────────────────────────────────────────────── */
.layer-ribbons {
  position: fixed;
  transform: translateZ(0);
  will-change: transform; inset: 0; z-index: -8;
  pointer-events: none;
  /* overflow: hidden removed */
}

.ribbon {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(
    160deg,
    var(--charcoal) 0%,
    var(--black-matte) 40%,
    var(--black-deep) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.02),
    inset 0 -1px 15px rgba(0,0,0,0.6),
    0 0 30px rgba(0,0,0,0.6);
}

.ribbon-a {
  width: 120vmax; height: 120vmax;
  left: -55vmax; bottom: -75vmax;
  transform: rotate(-6deg);
}

.ribbon-b {
  width: 100vmax; height: 100vmax;
  right: -45vmax; top: -60vmax;
  background: linear-gradient(
    200deg,
    var(--charcoal-soft) 0%,
    var(--black-matte) 35%,
    var(--black-deep) 100%
  );
  transform: rotate(7deg);
}

.ribbon-c {
  width: 80vmax; height: 60vmax;
  right: -25vmax; bottom: -40vmax;
  border-radius: 45%;
  background: linear-gradient(140deg, #0e0e0e 0%, var(--black-deep) 100%);
  transform: rotate(-11deg);
}

.ribbon-d {
  width: 50vmax; height: 40vmax;
  left: -18vmax; top: -22vmax;
  border-radius: 48%;
  background: linear-gradient(170deg, #0d0d0d 0%, var(--black-deep) 100%);
  transform: rotate(4deg);
}


/* ─────────────────────────────────────────────────────────
   LAYER 4 — Champagne Gold Highlights (Enhanced + Static)
   ───────────────────────────────────────────────────────── */
.layer-gold {
  position: fixed; inset: 0; z-index: -7;
  pointer-events: none;
  /* overflow: hidden removed */
}

.gold-edge {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
}

/* Bottom-left gold rim */
.gold-a {
  width: 120vmax; height: 120vmax;
  left: -55vmax; bottom: -75vmax;
  transform: rotate(-6deg);
  border-top: 1px solid var(--gold-line);
  border-right: 1px solid rgba(245,158,11,0.06);
  box-shadow: 0 -1px 40px var(--gold-dim);
}

/* Inner gold echo — slightly offset for depth */
.gold-a2 {
  width: 118vmax; height: 118vmax;
  left: -54vmax; bottom: -74vmax;
  transform: rotate(-5.5deg);
  border-top: 1px solid rgba(245,158,11,0.07);
}

/* Top-right gold rim */
.gold-b {
  width: 100vmax; height: 100vmax;
  right: -45vmax; top: -60vmax;
  transform: rotate(7deg);
  border-bottom: 1px solid var(--gold-line);
  border-left: 1px solid rgba(245,158,11,0.05);
  box-shadow: 0 1px 35px var(--gold-dim);
}

/* Inner echo top-right */
.gold-b2 {
  width: 98vmax; height: 98vmax;
  right: -44vmax; top: -59vmax;
  transform: rotate(7.5deg);
  border-bottom: 1px solid rgba(245,158,11,0.06);
}

/* Bottom-right subtle gold */
.gold-c {
  width: 80vmax; height: 60vmax;
  right: -25vmax; bottom: -40vmax;
  border-radius: 45%;
  transform: rotate(-11deg);
  border-top: 1px solid rgba(245,158,11,0.10);
  box-shadow: 0 -1px 25px rgba(245,158,11,0.05);
}

/* Warm glow patches — static studio rim lights */
.rim-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(25px); transform: translateZ(0); will-change: filter;
}

.rim-1 {
  width: 30vw; height: 25vh;
  bottom: 2vh; left: 5vw;
  background: radial-gradient(circle, var(--gold-warm) 0%, transparent 70%);
  opacity: 0.5;
}

.rim-2 {
  width: 25vw; height: 18vh;
  top: 5vh; right: 8vw;
  background: radial-gradient(circle, var(--gold-dim) 0%, transparent 70%);
  opacity: 0.45;
}

.rim-3 {
  width: 18vw; height: 14vh;
  bottom: 12vh; right: 12vw;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  opacity: 0.4;
}

/* Extra gold warmth — corner glows */
.rim-4 {
  width: 35vw; height: 30vh;
  bottom: -5vh; left: -5vw;
  background: radial-gradient(circle, rgba(245,158,11,0.05) 0%, transparent 60%);
  opacity: 0.6;
  filter: blur(30px); transform: translateZ(0); will-change: filter;
}

.rim-5 {
  width: 28vw; height: 22vh;
  top: -3vh; right: -3vw;
  background: radial-gradient(circle, rgba(245,158,11,0.04) 0%, transparent 60%);
  opacity: 0.5;
  filter: blur(30px); transform: translateZ(0); will-change: filter;
}

/* ── Corner Golden Reflections ──
   Soft golden light falling on all 4 corners
   Like a shadow of warm light — reduces harsh black */
.corner-glow {
  position: absolute;
  pointer-events: none;
}

/* Bottom-Left corner */
.corner-bl {
  width: 45vw; height: 40vh;
  bottom: 0; left: 0;
  background:
    radial-gradient(ellipse at 0% 100%, rgba(245,158,11,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 5% 90%, rgba(245,158,11,0.05) 0%, transparent 40%);
  filter: blur(20px); transform: translateZ(0); will-change: filter;
}

/* Bottom-Right corner */
.corner-br {
  width: 40vw; height: 35vh;
  bottom: 0; right: 0;
  background:
    radial-gradient(ellipse at 100% 100%, rgba(245,158,11,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 85%, rgba(245,158,11,0.04) 0%, transparent 40%);
  filter: blur(20px); transform: translateZ(0); will-change: filter;
}

/* Top-Right corner */
.corner-tr {
  width: 40vw; height: 35vh;
  top: 0; right: 0;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(245,158,11,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 10%, rgba(245,158,11,0.04) 0%, transparent 40%);
  filter: blur(20px); transform: translateZ(0); will-change: filter;
}

/* Top-Left corner */
.corner-tl {
  width: 38vw; height: 32vh;
  top: 0; left: 0;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(245,158,11,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 8% 12%, rgba(245,158,11,0.035) 0%, transparent 40%);
  filter: blur(20px); transform: translateZ(0); will-change: filter;
}


/* ─────────────────────────────────────────────────────────
   LAYER 5 — Golden Dust Particles (Static, scattered)
   Fixed positions, no movement, just sparkle dots.
   ───────────────────────────────────────────────────────── */
.layer-particles {
  position: fixed; inset: 0; z-index: -6;
  pointer-events: none;
  /* overflow: hidden removed */
}

.dust {
  position: absolute;
  border-radius: 50%;
  background: var(--gold-particle);
  width: var(--s);
  height: var(--s);
  left: var(--x);
  top: var(--y);
  opacity: var(--o);
  filter: blur(var(--b));
  box-shadow: 0 0 4px rgba(245,158,11,0.3);
}


/* ─────────────────────────────────────────────────────────
   LAYER 6 — Cinematic Vignette
   ───────────────────────────────────────────────────────── */
.layer-vignette {
  position: fixed; inset: 0; z-index: -5;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 75% 70% at 50% 50%,
      transparent 0%,
      rgba(2,2,2,0.2) 50%,
      rgba(2,2,2,0.7) 80%,
      rgba(2,2,2,0.95) 100%
    ),
    linear-gradient(to bottom, rgba(2,2,2,0.6) 0%, transparent 15%),
    linear-gradient(to top, rgba(2,2,2,0.5) 0%, transparent 12%);
}


/* ─────────────────────────────────────────────────────────
   CONTENT AREA
   ───────────────────────────────────────────────────────── */
.content-area {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100vh; height: 100dvh;
}


/* ─────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ribbon-a, .gold-a  { width: 140vmax; height: 140vmax; left: -70vmax; bottom: -90vmax; }
  .ribbon-b, .gold-b  { width: 120vmax; height: 120vmax; right: -60vmax; top: -75vmax; }
  .gold-a2 { width: 138vmax; height: 138vmax; left: -69vmax; bottom: -89vmax; }
  .gold-b2 { width: 118vmax; height: 118vmax; right: -59vmax; top: -74vmax; }
  .fog-1, .fog-2, .fog-3 { filter: blur(90px); }
}

@media (max-width: 600px) {
  .ribbon-c, .ribbon-d, .gold-c, .gold-a2, .gold-b2 { display: none; }
  .rim-3, .rim-5 { display: none; }
  .fog-3 { display: none; }
}



/* ─────────────────────────────────────────────────────────
   BENTO GRID (Apple TV+ Style)
   ───────────────────────────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  width: 100%;
  margin-top: 10px;
  padding: 0 10px;
}

.bento-item {
  position: relative;
  border-radius: var(--radius-base);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--charcoal-soft);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  cursor: pointer;
  transform: translateZ(0);
}

.bento-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  z-index: 5;
}

.bento-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.bento-item:hover img {
  transform: scale(1.08);
}

.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.bento-info {
  z-index: 2;
}

.bento-title {
  font-family: var(--font-arabic);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-base);
  margin-bottom: 5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.bento-title.eng-text {
  font-family: var(--font-english);
}

.bento-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bento-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.bento-play i { margin-left: 3px; }

.bento-item:hover .bento-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 🌟 Featured Bento (The Hero Item) */
.bento-featured {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

.bento-featured .bento-title {
  font-size: 1.8rem;
}

.bento-skeleton {
  border-radius: var(--radius-base);
  background: var(--charcoal);
  animation: pulse 1.5s infinite;
  aspect-ratio: 16/10;
}
.bento-skeleton:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

/* Responsive Bento */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 4px;
  }
  /* المميّز يمتد عرض الصف كاملاً (بانر علوي) والأربعة الصغار في شبكة 2×2 */
  .bento-featured,
  .bento-skeleton:first-child {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16/9;
  }
  .bento-featured .bento-title { font-size: 1.15rem; }
}

/* ═══════════════════════════════════════════════
   SITE FOOTER — فوتر الموقع
   ═══════════════════════════════════════════════ */
.site-footer{
  position:relative;z-index:5;margin-top:28px;padding:12px 16px 10px;
  border-top:1px solid rgba(255,255,255,.06);
  background:linear-gradient(180deg,transparent,rgba(0,0,0,.35));
  text-align:center;
}
.footer-brand{
  display:flex;justify-content:center;align-items:center;gap:12px;margin-bottom:18px;
  font-family:var(--font-english,'Outfit',sans-serif);font-size:1.7rem;font-weight:800;color:#fff;letter-spacing:.5px;
}
.footer-brand .footer-logo{
  width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#f5b642,#d97706);color:#1a1200;font-size:1.2rem;
  box-shadow:0 8px 22px -8px rgba(245,182,66,.6);
}
.footer-online{
  display:inline-flex;align-items:center;gap:9px;margin:0 auto 8px;
  background:linear-gradient(180deg,rgba(245,182,66,.10),rgba(245,182,66,.03));
  border:1px solid rgba(245,182,66,.35);border-radius:999px;
  padding:6px 8px 6px 16px;font-size:.76rem;font-weight:700;color:#e6e6ea;
  box-shadow:0 6px 20px -8px rgba(245,182,66,.35), inset 0 1px 0 rgba(255,255,255,.06);
}
.footer-online b{
  font-family:var(--font-english,sans-serif);color:#1a1200;font-weight:800;
  background:linear-gradient(135deg,#f5d38a,#e0a531);border-radius:999px;
  padding:3px 11px;font-size:.82rem;box-shadow:0 2px 8px -2px rgba(245,182,66,.5);
}
.footer-online .dot{width:8px;height:8px;border-radius:50%;background:#22c55e;
  box-shadow:0 0 0 0 rgba(34,197,94,.6);animation:footerPulse 1.8s infinite}
@keyframes footerPulse{0%{box-shadow:0 0 0 0 rgba(34,197,94,.5)}70%{box-shadow:0 0 0 8px rgba(34,197,94,0)}100%{box-shadow:0 0 0 0 rgba(34,197,94,0)}}
.footer-social{display:flex;justify-content:center;gap:9px;margin-bottom:9px}
.footer-social a{
  width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:rgba(30,30,38,.7);border:1px solid rgba(255,255,255,.08);color:#c9c9d0;font-size:1.05rem;
  transition:.25s cubic-bezier(.22,1,.36,1);
}
.footer-social a:hover{transform:translateY(-4px);color:#1a1200;
  background:linear-gradient(135deg,#f5b642,#d97706);border-color:transparent;box-shadow:0 12px 26px -8px rgba(245,182,66,.55)}
.footer-tagline{max-width:560px;margin:0 auto 14px;color:#9a9aa2;font-size:.95rem;line-height:1.9}
.footer-copy{font-family:'Aref Ruqaa',serif;font-size:.85rem;font-weight:700;letter-spacing:.3px;
  background:linear-gradient(180deg,#f5d38a,#c8912f);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  text-shadow:0 2px 18px rgba(245,182,66,.15)}
@media (max-width:600px){
  .site-footer{padding:38px 16px 32px;margin-top:50px}
  .footer-brand{font-size:1.45rem}
}

/* ═══ Pagination — ترقيم الصفحات ═══ */
.pagination{
  display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;
  margin:40px auto 20px;padding:0 16px;
}
.pagination .page-btn{
  min-width:44px;height:44px;padding:0 12px;border-radius:12px;cursor:pointer;
  background:rgba(24,24,30,.6);border:1px solid rgba(255,255,255,.08);color:#e8e8ea;
  font-family:'Outfit',sans-serif;font-weight:700;font-size:.95rem;
  display:inline-flex;align-items:center;justify-content:center;
  transition:.2s cubic-bezier(.22,1,.36,1);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
}
.pagination .page-btn:hover:not(:disabled){border-color:rgba(245,182,66,.4);transform:translateY(-2px);color:#f5b642}
.pagination .page-btn.is-active{
  background:linear-gradient(135deg,#f5b642,#d97706);color:#1a1200;border-color:transparent;
  box-shadow:0 8px 22px -8px rgba(245,182,66,.6);
}
.pagination .page-btn:disabled{opacity:.35;cursor:not-allowed}
.pagination .page-ellipsis{color:#6a6a72;padding:0 4px;font-weight:700}
@media (max-width:600px){
  .pagination .page-btn{min-width:38px;height:38px;font-size:.85rem}
}

/* ═══ شعار الموقع (صورة) ═══ */
.topbar-logo{display:flex;align-items:center}
.topbar-logo img{height:52px;width:auto;display:block;object-fit:contain}
.logo img{height:72px;width:auto;display:block;object-fit:contain}
.footer-logo-img{height:28px;width:auto;object-fit:contain;
  filter:drop-shadow(0 10px 26px rgba(245,182,66,.4))}
.footer-brand{gap:8px;margin-bottom:8px}
.footer-name{font-family:'Outfit',sans-serif;font-weight:800;font-size:1.1rem;letter-spacing:2px;text-transform:lowercase;
  background:linear-gradient(180deg,#f7d68a,#e0a531 55%,#b9791e);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  text-shadow:0 2px 20px rgba(245,182,66,.2)}
@media (max-width:600px){
  .topbar-logo img{height:44px}
  .footer-logo-img{height:44px}
}

/* ═══════════════════════════════════════════════
   PERFORMANCE — تخفيف للسرعة (كالمواقع السريعة)
   ═══════════════════════════════════════════════ */
/* إزالة الزجاج الضبابي المكلف من كل مكان */
*{backdrop-filter:none !important;-webkit-backdrop-filter:none !important}

/* تثبيت شفافية العناصر المهمة لتبقى واضحة بدون بلور */
.topbar{background:rgba(10,10,12,.82) !important}
.advanced-search .search-input-wrapper,
.search-suggestions{background:rgba(14,14,18,.92) !important}

/* تبسيط إطار البطاقة (بدل التدرّج المتحرك + 3D) */
.movie-card-poster{
  background:#14141a !important;
  background-size:auto !important;
  transform-style:flat !important;
  border:1px solid rgba(255,255,255,.06);
}

/* ═══════════════════════════════════════════════
   MOBILE — شريط سفلي كالتطبيقات
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .topbar {
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 14px 14px 0 0;
    padding: 0 4px;
    height: 46px;
    gap: 0;
    align-items: stretch;
    justify-content: center;
    background: #000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
    border: none;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -4px 18px rgba(0,0,0,.8);
  }
  /* لا يختفي عند التمرير (بار تطبيق ثابت) */
  .topbar.is-hidden { transform: none; opacity: 1; }
  .topbar-logo, .topbar-actions { display: none; }

  .topbar-nav { width: 100%; justify-content: space-around; align-items: stretch; gap: 0; }
  .topbar-link {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 0;
    font-size: .54rem;
    font-weight: 600;
    letter-spacing: .2px;
    border-radius: 0;
    background: transparent !important;
    color: rgba(255,255,255,.5);
    box-shadow: none !important;
    transition: color .2s ease;
  }
  .topbar-link i { font-size: .98rem; color: rgba(255,255,255,.5); transition: color .2s ease, transform .2s ease; }
  .topbar-link.is-active { color: var(--gold-primary); background: transparent !important; box-shadow: none !important; }
  .topbar-link.is-active i { color: var(--gold-primary); transform: translateY(-1px); }

  /* مساحة أسفل المحتوى حتى لا يُغطّى بالبار */
  body.has-topbar .main-content,
  body.has-topbar .site-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* ═══ اسم العمل على البطاقة نفسها (فوق الصورة، أسفلها) ═══ */
.movie-card-name{
  position: absolute;
  right: 0; left: 0; bottom: 0;
  z-index: 6;
  padding: 26px 10px 10px;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,.9);
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.55) 45%, transparent 100%);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  pointer-events: none;
}
.movie-card:hover .movie-card-name{ color: var(--gold-light); }
@media (max-width: 600px){
  .movie-card-name{ font-size: .74rem; padding: 22px 8px 8px; }
}

/* ═══ لافتة تثبيت الآيفون (PWA) ═══ */
#ios-install-sheet{
  position: fixed; z-index: 2000;
  left: 12px; right: 12px; bottom: 64px;
  opacity: 0; transform: translateY(20px);
  transition: opacity .35s ease, transform .35s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
#ios-install-sheet.show{ opacity: 1; transform: none; pointer-events: auto; }
#ios-install-sheet .iis-card{
  position: relative;
  display: flex; align-items: center; gap: 12px;
  background: #14141a; border: 1px solid rgba(245,182,66,.3);
  border-radius: 16px; padding: 14px 16px;
  box-shadow: 0 20px 50px -12px rgba(0,0,0,.85);
}
#ios-install-sheet .iis-logo{ width: 44px; height: 44px; flex-shrink: 0; object-fit: contain; }
#ios-install-sheet .iis-text{ display: flex; flex-direction: column; gap: 3px; font-family: 'Cairo', sans-serif; }
#ios-install-sheet .iis-text b{ color: #fff; font-size: .95rem; }
#ios-install-sheet .iis-text span{ color: #b8b8be; font-size: .8rem; line-height: 1.5; }
#ios-install-sheet .iis-text i{ color: var(--gold-primary); }
#ios-install-sheet .iis-close{
  position: absolute; top: 6px; left: 8px;
  background: none; border: none; color: #888; font-size: 1.4rem; cursor: pointer; line-height: 1;
}

/* ═══ PWA (standalone): مناطق أمان الآيفون — شريط الحالة + المؤشر السفلي ═══ */
@media (display-mode: standalone) {
  body.has-topbar .main-content { padding-top: env(safe-area-inset-top, 0px); }
}
@media (display-mode: standalone) and (max-width: 768px) {
  .topbar {
    height: auto;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }
  body.has-topbar .main-content,
  body.has-topbar .site-footer {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  /* صفحة التفاصيل: أنزل صف المشغلات تحت شريط الحالة */
  .dx-wrap { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }
}


/* ═══ فوتر مضغوط جداً للجوال ═══ */
@media (max-width: 600px){
  .site-footer{ margin-top:24px; padding:12px 14px 12px; }
  .footer-brand{ gap:7px; margin-bottom:8px; }
  .footer-logo-img{ height:26px !important; }
  .footer-name{ font-size:1.05rem !important; }
  .footer-online{ margin:0 auto 8px; padding:5px 12px !important; font-size:.72rem; }
  .footer-social{ gap:9px; margin-bottom:8px; }
  .footer-social a{ width:30px; height:30px; font-size:.9rem; }
  .footer-tagline{ display:none; }  /* الوصف الطويل يختفي بالجوال */
  .footer-copy{ font-size:.85rem !important; }
}