:root {
  --bg-main: #090c14;
  --bg-card: #121824;
  --bg-card-hover: #1c2538;
  --bg-modal: #0d121c;
  --border-color: rgba(255, 255, 255, 0.08);
  --primary: #e50914;
  --primary-glow: rgba(229, 9, 20, 0.4);
  --cyan: #00d2ff;
  --purple: #a855f7;
  --pink: #ec4899;
  --yellow: #eab308;
  --green: #10b981;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --radius: 12px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  --font-ar: 'Cairo', sans-serif;
  --font-en: 'Outfit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-ar);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #090c14;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e50914, #ff4b2b);
  border-radius: 999px;
  border: 2px solid #090c14;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff2a2a, #ff6b4a);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.6);
}
* {
  scrollbar-width: thin;
  scrollbar-color: #e50914 #090c14;
}

/* Top Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 12, 20, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.logo-icon, .flix-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.logo-text {
  font-family: var(--font-en);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.logo-text span {
  color: var(--primary);
}

.badge-version {
  font-size: 0.68rem;
  background: rgba(229, 9, 20, 0.15);
  color: var(--primary);
  border: 1px solid rgba(229, 9, 20, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-en);
  font-weight: 700;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-ar);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.25s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(229, 9, 20, 0.12);
  border-bottom: 2px solid var(--primary);
}



.search-box {
  position: relative;
  width: 260px;
}

.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 36px 8px 32px;
  border-radius: 20px;
  font-family: var(--font-ar);
  font-size: 0.82rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-box input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.clear-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* Views Management */
.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Spotlight */
.hero-spotlight {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  padding: 40px 24px;
  max-width: 1440px;
  margin: 0 auto 24px auto;
  border-radius: 16px;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.6);
  transition: background-image 0.5s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9,12,20,0.95) 0%, rgba(9,12,20,0.6) 50%, rgba(9,12,20,0.15) 100%),
              linear-gradient(0deg, rgba(9,12,20,1) 0%, transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 620px;
}

.hero-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.meta-rating {
  color: #ffd700;
  font-weight: 700;
}

.meta-year {
  color: var(--text-muted);
}

.meta-type {
  background: rgba(255,255,255,0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.hero-overview {
  font-size: 0.92rem;
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 22px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  border: none;
  outline: none;
  font-family: var(--font-ar);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  background: #f40612;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229,9,20,0.5);
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.btn-large {
  padding: 12px 28px;
  font-size: 1.05rem;
}

/* Content Container & Rows */
.content-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 60px 24px;
}

/* Networks Strip */
.networks-strip-wrapper {
  margin-bottom: 30px;
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.strip-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.networks-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.network-badge-card {
  flex: 0 0 auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.25s ease;
  user-select: none;
}

.network-badge-card:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 16px 0;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.see-all-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-ar);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.see-all-btn:hover {
  color: var(--primary);
}

.text-red { color: var(--primary); }
.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-pink { color: var(--pink); }
.text-yellow { color: var(--yellow); }
.text-green { color: var(--green); }

/* Horizontal Rows */
.media-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-behavior: smooth;
}

/* Media Cards */
.media-card {
  flex: 0 0 180px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  user-select: none;
}

.media-card:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 9, 20, 0.45);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(229, 9, 20, 0.25);
}

.poster-box {
  position: relative;
  width: 100%;
  height: 260px;
  background: #182030;
}

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

.card-rating-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(9, 12, 20, 0.85);
  backdrop-filter: blur(6px);
  color: #ffd700;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-quality-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(229, 9, 20, 0.9);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.card-body {
  padding: 10px;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* Grids */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

/* Networks Full Hub Grid */
.networks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.network-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.network-hub-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.2);
}

.network-hub-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

/* Catalog Sub-tabs */
.catalog-header {
  margin-bottom: 24px;
}

.catalog-header h1 {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.catalog-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.subtabs-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 4px;
}

.subtab-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-ar);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.subtab-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.subtab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.custom-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 7px 12px;
  border-radius: 8px;
  font-family: var(--font-ar);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.custom-select:focus {
  border-color: var(--primary);
}

.btn-reset-filter {
  padding: 7px 14px;
  font-size: 0.82rem;
  margin-right: auto;
}

/* Adult Zone Styles */


/* Pagination */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.page-indicator {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Modal Details & Player */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-backdrop.show {
  display: flex;
}

.modal-dialog {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* Player Area */
.player-wrapper {
  background: #000;
  display: none;
}

.player-wrapper.active {
  display: block;
}

.player-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.player-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.servers-bar {
  background: #0b0f17;
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.servers-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
}

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

.server-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: var(--font-ar);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--cyan);
}

.server-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* Modal Content */
.modal-header-banner {
  padding: 24px;
  display: flex;
  gap: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}

.modal-poster-wrapper {
  flex: 0 0 160px;
  height: 240px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.modal-poster-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  flex: 1;
}

.modal-info h2 {
  font-size: 1.7rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag {
  background: rgba(255,255,255,0.08);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  color: var(--text-muted);
}

.tag-rating {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.modal-overview {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Episodes Section */
.episodes-section {
  padding: 0 24px 24px 24px;
}

.episodes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.episodes-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.episode-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-ar);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.episode-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--cyan);
}

.episode-btn.active {
  background: var(--cyan);
  color: #000;
  border-color: var(--cyan);
  box-shadow: 0 2px 10px rgba(0, 210, 255, 0.4);
}

/* Cast Section */
.cast-section, .similar-section {
  padding: 0 24px 24px 24px;
}

.cast-section h3, .similar-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
}

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

.cast-card {
  flex: 0 0 80px;
  text-align: center;
}

.cast-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 6px auto;
  display: block;
  border: 2px solid var(--border-color);
}

.cast-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 30px 0;
  background: #06080d;
  text-align: center;
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

.footer-links {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 12px;
  }
  .nav-menu {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 6px;
  }
  .search-box {
    width: 100%;
  }
  .hero-spotlight {
    min-height: 380px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .modal-header-banner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .modal-tags {
    justify-content: center;
  }
  .nav-menu {
    display: none;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(6, 8, 13, 0.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 500;
    align-items: center;
    justify-content: space-around;
  }
  .m-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }
  .m-nav-btn i { font-size: 16px; }
  .m-nav-btn.active { color: var(--primary); }
}

.mobile-nav {
  display: none;
}

/* Adult Zone Category Cards */
.adult-cat-card {
  position: relative;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: var(--bg-card);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.adult-cat-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(229, 9, 20, 0.3);
}

.adult-cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75);
  transition: all 0.35s ease;
}

.adult-cat-card:hover img {
  filter: brightness(1);
  transform: scale(1.08);
}

.adult-cat-card .cat-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 10px 10px;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 8, 13, 0.95) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
}

