/* ==========================================================================
   🌟 DramaWorld (عالم الدراما) V4.2 - Authentic Pure AMOLED Mobile/Web UI
   ========================================================================== */

:root {
  --bg-black: #000000;
  --bg-surface: #0e0e12;
  --bg-card: #14141a;
  --bg-card-hover: #1c1c24;
  --bg-input: #18181f;
  
  --primary-purple: #8b5cf6;
  --primary-purple-glow: rgba(139, 92, 246, 0.4);
  --accent-red: #ef4444;
  --accent-green: #22c55e;
  --accent-gold: #eab308;
  --accent-orange: #f97316;
  --imdb-yellow: #f5c518;
  
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(139, 92, 246, 0.5);
  
  --font-ar: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-en: 'Outfit', sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: #8b5cf6 #000000;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #000000;
}
::-webkit-scrollbar-thumb {
  background: #272732;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8b5cf6;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-black);
  color: var(--text-main);
  font-family: var(--font-ar);
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.4;
  font-size: 15px;
}

/* ==========================================================================
   1. SPLASH / WELCOME SCREEN (Screenshot 1)
   ========================================================================== */
.dw-splash-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

.dw-splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.05);
  pointer-events: none;
}

.splash-posters-mosaic {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at center, rgba(14, 14, 22, 0.7) 0%, rgba(0, 0, 0, 0.96) 80%),
    url('/dramaworld/assets/icon.png');
  background-size: cover;
  background-position: center;
  filter: blur(14px) brightness(0.25);
  opacity: 0.6;
}

.splash-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 40%, #000000 95%);
}

.splash-content-box {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.splash-version-tag {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  margin-bottom: 25px;
}

.splash-logo-wrap {
  width: 90px;
  height: 90px;
  margin-bottom: 30px;
  filter: drop-shadow(0 10px 25px rgba(139, 92, 246, 0.5));
}

.splash-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 20px;
}

.splash-play-btn {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 38px 0 38px 65px;
  border-color: transparent transparent transparent #ffffff;
  background: transparent;
  cursor: pointer;
  margin: 30px 0 35px 0;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.6));
}

.splash-play-btn i {
  display: none;
}

.splash-play-btn:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.9));
}

.splash-start-text {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  letter-spacing: 0.5px;
  margin-bottom: 45px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  transition: color 0.2s ease;
}

.splash-start-text:hover {
  color: var(--primary-purple);
}

.splash-bottom-dot {
  width: 22px;
  height: 22px;
  background-color: #a855f7;
  border-radius: 50%;
  box-shadow: 0 0 16px #a855f7;
}

/* ==========================================================================
   2. MAIN APP SHELL & WRAPPER
   ========================================================================== */
.dw-app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  padding-bottom: 75px; /* Space for fixed bottom navbar */
}

/* Top Search Bar (Screenshot 2) */
.dw-top-search-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background-color: #000000;
  padding: 12px 14px 8px 14px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.dw-search-input {
  width: 100%;
  height: 44px;
  background-color: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0 45px 0 16px;
  color: #ffffff;
  font-family: var(--font-ar);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.dw-search-input::placeholder {
  color: #8e8e93;
}

.dw-search-input:focus {
  border-color: var(--primary-purple);
  background-color: #1c1c24;
}

.dw-search-icon-btn {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dw-search-clear-btn {
  position: absolute;
  left: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: none;
}

/* Live Search Overlay */
.dw-search-overlay {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 65px;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  z-index: 800;
  padding: 16px;
  overflow-y: auto;
  display: none;
}

.dw-search-overlay.active {
  display: block;
}

.search-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.search-results-count {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-purple);
}

.search-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* ==========================================================================
   3. TABS & MAIN CONTENT AREA
   ========================================================================== */
.dw-main-content {
  flex: 1;
  padding: 8px 12px;
}

.dw-tab-pane {
  display: none;
}

.dw-tab-pane.active {
  display: block;
}

/* A. Hero Carousel Slider (Screenshot 2) */
.dw-hero-carousel-container {
  width: 100%;
  margin-bottom: 20px;
}

.dw-hero-slider {
  width: 100%;
  height: 210px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--bg-surface);
}

@media (min-width: 768px) {
  .dw-hero-slider {
    height: 340px;
  }
}

.hero-slide-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.hero-slide-item.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-slide-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
}

.hero-slide-title-wrap {
  position: absolute;
  bottom: 16px;
  right: 16px;
  left: 16px;
}

.hero-slide-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.dw-slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.dw-dot {
  width: 6px;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
}

.dw-dot.active {
  width: 16px;
  height: 6px;
  border-radius: 999px;
  background-color: #ffffff;
}

/* Section Common Styles */
.dw-section-block {
  margin-bottom: 24px;
}

.dw-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dw-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.dw-grid-icon-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.dw-grid-icon-btn:hover {
  opacity: 1;
  color: var(--primary-purple);
}

/* B. Horizontal Live Channels Row (Screenshot 2) */
.dw-channels-horizontal-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.dw-channels-horizontal-row::-webkit-scrollbar {
  display: none;
}

.dw-channel-card-wide {
  flex: 0 0 170px;
  height: 95px;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dw-channel-card-wide:hover {
  transform: translateY(-2px);
  border-color: var(--primary-purple);
}

.dw-channel-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(139, 92, 246, 0.85);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.dw-channel-badge.now-badge {
  background: #7e22ce;
}

.dw-channel-badge.kanald-badge {
  background: #0284c7;
}

.dw-channel-logo-img {
  max-width: 80%;
  max-height: 60%;
  object-fit: contain;
}

.dw-channel-card-title {
  position: absolute;
  bottom: 4px;
  right: 8px;
  left: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* C. Horizontal Actors Row (Screenshot 2) */
.dw-actors-horizontal-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.dw-actors-horizontal-row::-webkit-scrollbar {
  display: none;
}

.dw-actor-circle-item {
  flex: 0 0 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
}

.dw-actor-avatar-wrap {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 6px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background-color: var(--bg-surface);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.dw-actor-circle-item:hover .dw-actor-avatar-wrap {
  transform: scale(1.05);
  border-color: var(--primary-purple);
}

.dw-actor-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dw-actor-name-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* D. Dual Action Quick Buttons Strip (Screenshot 3) */
.dw-quick-actions-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.dw-quick-action-btn {
  background-color: #121217;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: #ffffff;
  font-family: var(--font-ar);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
}

.dw-quick-action-btn i {
  font-size: 1.2rem;
  color: #ffffff;
}

.dw-quick-action-btn:hover {
  background-color: #1a1a24;
  border-color: var(--primary-purple);
  transform: translateY(-2px);
}

/* E. 3-Column Posters Grid (Screenshots 3 & 4) */
.dw-posters-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .dw-posters-grid-3col {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .dw-posters-grid-3col {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}

.dw-poster-card {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-surface);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dw-poster-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
}

.dw-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dw-poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.1) 40%, transparent 100%);
  pointer-events: none;
}

/* Episode Badge (Screenshot 3: ح 12, ح 26, ح 4) */
.dw-episode-pill-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: #ffffff;
  color: #000000;
  font-family: var(--font-ar);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* Movie Quality Badges Stack (Screenshot 4: WEB-DL, 1080p) */
.dw-quality-badges-stack {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 2;
}

.dw-badge-purple {
  background-color: #7e22ce;
  color: #ffffff;
  font-family: var(--font-en);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
}

.dw-badge-white {
  background-color: #ffffff;
  color: #000000;
  font-family: var(--font-en);
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 4px;
}

.dw-poster-bottom-title {
  position: absolute;
  bottom: 6px;
  right: 8px;
  left: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

/* ==========================================================================
   4. FIXED BOTTOM NAVIGATION BAR (Screenshot 2)
   ========================================================================== */
.dw-bottom-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: #0b0b0e;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding: 0 6px;
}

.dw-nav-item {
  background: transparent;
  border: none;
  color: #8e8e93;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 4px 10px;
  font-family: var(--font-ar);
  font-size: 0.72rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-icon-wrap {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon-wrap.icon-red { color: var(--accent-red); }
.nav-icon-wrap.icon-green { color: var(--accent-green); }
.nav-icon-wrap.icon-purple { color: var(--primary-purple); }
.nav-icon-wrap.icon-orange { color: var(--accent-orange); }

/* Active Home Pill Style (Screenshot 2) */
.dw-nav-item.active[data-tab="home"] {
  background-color: #312b12;
  color: var(--accent-gold);
  border-radius: 999px;
  padding: 6px 18px;
  flex-direction: row;
  gap: 8px;
}

.dw-nav-item.active[data-tab="home"] .nav-icon-wrap {
  color: var(--accent-gold);
  font-size: 1.15rem;
}

.dw-nav-item.active[data-tab="home"] .nav-label {
  font-size: 0.85rem;
  font-weight: 800;
}

.dw-nav-item.active:not([data-tab="home"]) {
  color: #ffffff;
}

/* Catalog Filter Bar */
.dw-catalog-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-pill-select {
  flex: 1;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0 12px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.filter-pill-select select {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-ar);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}

.filter-pill-select select option {
  background-color: #181820;
  color: #fff;
}

/* Load More */
.dw-load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 25px 0 10px 0;
}

.dw-load-more-btn {
  background-color: #1a1a24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 30px;
  font-family: var(--font-ar);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.dw-load-more-btn:hover {
  background-color: var(--primary-purple);
}

/* Channels Packages Strip */
.dw-channels-packages-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.dw-package-chip {
  flex: 0 0 auto;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 7px 16px;
  color: var(--text-muted);
  font-family: var(--font-ar);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.dw-package-chip.active {
  background-color: var(--primary-purple);
  border-color: var(--primary-purple);
  color: #ffffff;
}

.dw-channels-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .dw-channels-grid-layout {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* MyList Subtabs */
.dw-mylist-tabs-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.mylist-subtab-btn {
  flex: 1;
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px;
  color: var(--text-muted);
  font-family: var(--font-ar);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mylist-subtab-btn.active {
  background-color: var(--primary-purple);
  color: #ffffff;
  border-color: var(--primary-purple);
}

/* ==========================================================================
   5. ITEM DETAILS VIEW / MODAL (Screenshot 5)
   ========================================================================== */
.dw-details-overlay {
  position: fixed;
  inset: 0;
  background-color: #000000;
  z-index: 2000;
  overflow-y: auto;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dw-details-overlay.active {
  display: block;
  opacity: 1;
}

.details-content-sheet {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* Details Top Back Arrow */
.details-top-header {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 50;
}

.details-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background-color 0.2s;
}

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

/* Backdrop Hero Section (Screenshot 5) */
.details-hero-backdrop-wrap {
  width: 100%;
  height: 320px;
  position: relative;
  overflow: hidden;
  background-color: #0c0c10;
}

@media (min-width: 768px) {
  .details-hero-backdrop-wrap {
    height: 420px;
  }
}

.details-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.details-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 100%);
}

.details-hero-title-box {
  position: absolute;
  bottom: 20px;
  right: 18px;
  z-index: 10;
}

.details-hero-english-title {
  font-family: var(--font-en);
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.details-category-pill {
  display: inline-block;
  background: rgba(20, 20, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  backdrop-filter: blur(8px);
}

/* Floating Purple Squircle Play Button (Screenshot 5) */
.details-floating-play-btn {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 68px;
  height: 68px;
  background-color: #9333ea;
  border: none;
  border-radius: 22px;
  color: #ffffff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 20;
}

.details-floating-play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(147, 51, 234, 0.8);
}

/* Details Info Body */
.details-info-body {
  padding: 20px 18px;
}

.details-main-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  margin-bottom: 8px;
}

.details-meta-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.imdb-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  font-weight: 700;
}

.imdb-pill {
  background-color: var(--imdb-yellow);
  color: #000000;
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 0.7rem;
  padding: 1px 4px;
  border-radius: 3px;
}

.details-arabic-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  margin-bottom: 8px;
}

.details-synopsis-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #d1d5db;
  text-align: center;
  max-width: 750px;
  margin: 0 auto 24px auto;
}

/* 5 Action Buttons Row (Screenshot 5) */
.details-actions-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 600px;
  margin: 0 auto 28px auto;
}

.detail-action-btn {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #ffffff;
  font-family: var(--font-ar);
}

.action-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #ffffff;
  transition: background-color 0.2s, transform 0.15s;
}

.detail-action-btn:hover .action-icon-circle {
  background-color: var(--primary-purple);
  transform: scale(1.08);
}

.action-label {
  font-size: 0.78rem;
  font-weight: 600;
}

/* Series Seasons & Episodes Selector */
.details-series-section {
  margin-bottom: 25px;
  background-color: #101016;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.seasons-selector-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.seasons-selector-wrap select {
  background-color: #1a1a24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font-ar);
  font-size: 0.9rem;
  font-weight: 700;
}

.episodes-horizontal-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.episode-card-item {
  flex: 0 0 130px;
  background-color: #181822;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s, border-color 0.2s;
}

.episode-card-item.active {
  border-color: var(--primary-purple);
}

.episode-card-thumb {
  width: 100%;
  height: 75px;
  object-fit: cover;
}

.episode-card-title {
  padding: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

/* Servers Row */
.details-servers-box {
  margin-bottom: 25px;
  background-color: #101016;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.servers-box-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.servers-pills-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.server-stream-pill {
  background-color: #1a1a24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font-ar);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
}

.server-stream-pill:hover, .server-stream-pill.active {
  background-color: var(--primary-purple);
  border-color: var(--primary-purple);
}

/* Cast Section (Screenshot 5: فريق العمل) */
.details-cast-section {
  margin-top: 25px;
}

.cast-section-heading {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.cast-section-heading::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary-purple);
  border-radius: 2px;
}

.cast-horizontal-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.cast-horizontal-row::-webkit-scrollbar {
  display: none;
}

/* Floating Comments Button (Screenshot 5) */
.details-floating-chat-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background-color: #9333ea;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.5);
  z-index: 2500;
  transition: transform 0.2s;
}

.details-floating-chat-btn:hover {
  transform: scale(1.1);
}

/* ==========================================================================
   6. MODALS COMMON (أقسام التطبيق، سجل المشاهدة، الممثلين، المشغل)
   ========================================================================== */
.dw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  display: none;
}

.dw-modal-backdrop.active {
  display: flex;
}

.dw-modal-card {
  background-color: #121218;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px;
  position: relative;
}

.dw-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dw-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sections Grid */
.dw-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dw-section-tile {
  background-color: #181822;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.dw-section-tile:hover {
  background-color: var(--primary-purple);
  transform: translateY(-2px);
}

/* Video Player Modal */
.dw-player-modal {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 5000;
  display: none;
  flex-direction: column;
  justify-content: center;
}

.dw-player-modal.active {
  display: flex;
}

.player-modal-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.player-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #0d0d12;
}

.player-title-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.player-subtitle-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.player-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.video-element-wrapper {
  flex: 1;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dw-video-player {
  width: 100%;
  height: 100%;
  max-height: 80vh;
}

.player-loader {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 0.9rem;
}

.spinner-circle {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.player-servers-strip {
  padding: 12px 16px;
  background: #0d0d12;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

/* Toast */
.dw-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background-color: #1f1f2a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 700;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.dw-toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Skeletons */
.skeleton {
  background: linear-gradient(90deg, #14141d 25%, #22222e 50%, #14141d 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
