@font-face {
  font-family: 'Rabar';
  src: url('../fonts/Rabar_1F.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Rabar';
  src: url('../fonts/Rabar_1B.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Rabar';
  src: url('../fonts/Rabar_1A.ttf') format('truetype');
  font-weight: 900;
  font-display: swap;
}

:root {
  --red: #e50914;
  --red-dark: #b0060f;
  --red-glow: rgba(229, 9, 20, 0.4);
  --black: #0a0a0a;
  --dark: #111111;
  --card: #1a1a1a;
  --card2: #222222;
  --border: #2a2a2a;
  --white: #ffffff;
  --gray: #888888;
  --gray2: #555555;
  --accent: var(--red);
}

[data-theme="blue"] { --red: #1a6cf6; --red-dark: #0d4ebd; --red-glow: rgba(26,108,246,0.4); }
[data-theme="green"] { --red: #00c851; --red-dark: #008a35; --red-glow: rgba(0,200,81,0.4); }
[data-theme="purple"] { --red: #9b59b6; --red-dark: #7d3c98; --red-glow: rgba(155,89,182,0.4); }
[data-theme="gold"] { --red: #f39c12; --red-dark: #d68910; --red-glow: rgba(243,156,18,0.4); }
[data-theme="cyan"] { --red: #00bcd4; --red-dark: #0097a7; --red-glow: rgba(0,188,212,0.4); }

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

html { scroll-behavior:smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Rabar', sans-serif;
  direction: rtl;
  overflow-x: hidden;
  min-height: 100vh;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(229,9,20,0.2);
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all 0.3s;
}

.navbar.scrolled {
  background: rgba(10,10,10,0.80);
  border-bottom-color: rgba(229,9,20,0.4);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.nav-logo {
  font-family: 'Rabar', sans-serif;
  font-size: 28px;
  color: var(--red);
  text-decoration: none;
  letter-spacing: 3px;
  text-shadow: 0 0 20px var(--red-glow);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logo span { color: var(--white); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--white);
  background: rgba(229,9,20,0.15);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 25px;
  padding: 8px 20px 8px 45px;
  color: var(--white);
  font-size: 13px;
  font-family: 'Rabar', sans-serif;
  outline: none;
  width: 220px;
  transition: all 0.3s;
  direction: rtl;
}

.nav-search:focus {
  border-color: var(--red);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 15px var(--red-glow);
  width: 260px;
}

.nav-search-icon {
  position: absolute;
  left: 15px;
  color: var(--gray);
  font-size: 14px;
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: none;
  z-index: 200;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.search-dropdown.show { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--white);
}

.search-result-item:hover { background: rgba(229,9,20,0.1); }

.search-result-item img {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.search-result-info { flex: 1; min-width: 0; }
.search-result-info h4 { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-info span { font-size: 11px; color: var(--gray); }

.color-picker-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--white);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-picker-btn:hover { border-color: var(--red); background: rgba(229,9,20,0.1); }

.color-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: none;
  z-index: 200;
  min-width: 180px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.color-panel.show { display: block; }
.color-panel h4 { font-size: 12px; color: var(--gray); margin-bottom: 12px; }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.color-swatch:hover, .color-swatch.active { border-color: var(--white); transform: scale(1.15); }

/* MOBILE NAV */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(18,18,18,0.92);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 40px;
  padding: 8px 12px;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);
  min-width: 260px;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: rgba(255,255,255,0.45);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  padding: 8px 14px;
  border-radius: 28px;
  position: relative;
  white-space: nowrap;
}

.mobile-nav-item i {
  font-size: 18px;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.mobile-nav-item:hover { color: rgba(255,255,255,0.75); }
.mobile-nav-item:hover i { transform: translateY(-2px); }

.mobile-nav-item.active {
  color: #fff;
  background: var(--red);
  box-shadow: 0 4px 16px rgba(229,9,20,0.45);
}
.mobile-nav-item.active i { transform: translateY(-1px); }
.mobile-nav-item.active:hover { color: #fff; }

/* HERO SLIDER */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.slider-slide.active { opacity: 1; }

.slider-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
 object-position: center 40%;
}

.slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10,10,10,0.95) 0%,
    rgba(10,10,10,0.7) 40%,
    rgba(10,10,10,0.2) 70%,
    transparent 100%
  ), linear-gradient(
    to top,
    rgba(10,10,10,1) 0%,
    transparent 50%
  );
}

.slider-content {
  position: absolute;
  bottom: 20%;
  right: 8%;
  max-width: 550px;
  z-index: 2;
}

.slider-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: white;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.slider-title {
  font-family: 'Rabar', sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  font-weight: 900;
  text-shadow: 2px 4px 20px rgba(0,0,0,0.8);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.slider-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #ccc;
  flex-wrap: wrap;
}

.slider-meta .rating {
  color: #ffd700;
  font-weight: 700;
  font-size: 15px;
}

.slider-desc {
  font-size: 15px;
  color: #ccc;
  line-height: 1.7;
  margin-bottom: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slider-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--red);
  color: white;
  border: none;
  padding: 13px 30px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: 'Rabar', sans-serif;
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--red-glow);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.3);
  padding: 13px 30px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: 'Rabar', sans-serif;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.slider-dot.active {
  background: var(--red);
  width: 24px;
  border-radius: 4px;
}

/* SECTIONS */
.section {
  padding: 60px 40px;
}

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

.section-title {
  font-family: 'Rabar', sans-serif;
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 28px;
  background: var(--red);
  border-radius: 2px;
}

.see-all {
  color: var(--red);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.see-all:hover { color: var(--white); gap: 8px; }

/* SWIPER */
.swiper-container {
  position: relative;
  overflow: hidden;
}

.swiper-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.swiper-track::-webkit-scrollbar { display: none; }

.swiper-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(229,9,20,0.85);
  border: none;
  color: white;
  width: 40px;
  height: 70px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  z-index: 5;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-btn:hover { background: var(--red); transform: translateY(-50%) scale(1.05); }
.swiper-btn.left { left: 0; border-radius: 0 6px 6px 0; }
.swiper-btn.right { right: 0; border-radius: 6px 0 0 6px; }

/* MOVIE CARD */
.movie-card {
  flex-shrink: 0;
  width: 160px;
  cursor: pointer;
  transition: transform 0.3s;
  text-decoration: none;
  color: var(--white);
  display: block;
}

.movie-card:hover { transform: scale(1.05); z-index: 2; }

.movie-card-img {
  position: relative;
  width: 100%;
  padding-top: 150%;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
}

.movie-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.movie-card:hover .movie-card-img img { transform: scale(1.08); }

.movie-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.movie-card:hover .movie-card-overlay { opacity: 1; }

.movie-card-views {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  color: #ccc;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.movie-card-rating {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(229,9,20,0.85);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

.movie-card-info { margin-top: 10px; }
.movie-card-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card-year { font-size: 11px; color: var(--gray); margin-top: 3px; }

/* CAST CARD */
.cast-card {
  flex-shrink: 0;
  width: 120px;
  text-align: center;
  cursor: pointer;
}

.cast-card-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  border: 2px solid var(--border);
  transition: all 0.3s;
  display: block;
}

.cast-card:hover .cast-card-img { border-color: var(--red); transform: scale(1.08); }
.cast-card-name { font-size: 12px; font-weight: 600; }
.cast-card-role { font-size: 11px; color: var(--gray); margin-top: 2px; }

/* AI SEARCH SECTION */
.ai-search-section {
  padding: 80px 40px;
  background: linear-gradient(135deg, rgba(229,9,20,0.08) 0%, rgba(10,10,10,0) 60%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ai-search-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.ai-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--red), #ff6b6b);
  color: white;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.ai-search-title {
  font-family: 'Rabar', sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.ai-search-subtitle {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 36px;
  line-height: 1.7;
}

.ai-search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.ai-search-box:focus-within { border-color: var(--red); box-shadow: 0 0 30px var(--red-glow); }

.ai-input {
  flex: 1;
  background: none;
  border: none;
  padding: 18px 24px;
  color: var(--white);
  font-size: 16px;
  font-family: 'Rabar', sans-serif;
  outline: none;
  direction: rtl;
}

.ai-input::placeholder { color: var(--gray2); }

.ai-search-btn {
  background: var(--red);
  border: none;
  padding: 18px 28px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-search-btn:hover { background: var(--red-dark); }

.ai-results {
  margin-top: 24px;
  text-align: right;
}

.ai-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--white);
  transition: all 0.2s;
}

.ai-result-item:hover { border-color: var(--red); background: rgba(229,9,20,0.08); }

.ai-result-item img {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.ai-result-info h4 { font-size: 15px; font-weight: 700; }
.ai-result-info p { font-size: 12px; color: var(--gray); margin-top: 4px; }

.ai-no-result {
  text-align: center;
  font-size: 60px;
  margin: 20px 0 10px;
}

/* FOOTER */
footer {
  background: #080808;
  border-top: 1px solid var(--border);
  padding: 60px 40px 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand .logo {
  font-family: 'Rabar', sans-serif;
  font-size: 32px;
  color: var(--red);
  letter-spacing: 3px;
  text-shadow: 0 0 20px var(--red-glow);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--white);
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: var(--gray);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--red); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p { color: var(--gray2); font-size: 13px; }

/* POPUP / MODAL */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.popup-overlay.show { opacity: 1; visibility: visible; }

.popup-box {
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.popup-overlay.show .popup-box { transform: scale(1); }

.popup-close {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover { background: var(--red); }

/* PAGE BANNER */
.page-banner {
  height: 280px;
  background: linear-gradient(135deg, #1a0000 0%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-top: 70px;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(229,9,20,0.2) 0%, transparent 70%);
}

.page-banner-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-banner h1 {
  font-family: 'Rabar', sans-serif;
  font-size: clamp(40px, 6vw, 70px);
  letter-spacing: 4px;
  color: var(--white);
  text-shadow: 0 0 40px var(--red-glow);
}

.page-banner p { color: var(--gray); margin-top: 10px; font-size: 16px; }

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

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 50px;
  flex-wrap: wrap;
}

.page-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-family: 'Rabar', sans-serif;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover, .page-btn.active {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 4px 15px var(--red-glow);
}

/* FILTER BUTTONS */
.sort-filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.sort-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--gray);
  font-family: 'Rabar', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sort-btn:hover, .sort-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.filter-dropdown {
  position: relative;
  display: inline-block;
}

.filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  min-width: 280px;
  z-index: 50;
  display: none;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.filter-panel.show { display: block; }
.filter-panel h4 { font-size: 12px; color: var(--gray); margin: 12px 0 8px; letter-spacing: 1px; }
.filter-panel h4:first-child { margin-top: 0; }

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-tag {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--gray);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Rabar', sans-serif;
}

.filter-tag:hover, .filter-tag.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.apply-filter-btn {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: var(--red);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Rabar', sans-serif;
  transition: background 0.2s;
}

.apply-filter-btn:hover { background: var(--red-dark); }

/* SINGLE MOVIE */
.single-hero {
  margin-top: 70px;
  min-height: 80vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 80px 40px 60px;
  overflow: hidden;
}

.single-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  filter: brightness(0.28) saturate(1.2);
  transform: scale(1.08);
  transition: background-image .5s ease;
}

.single-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0a0a0a 0%, rgba(10,10,10,0.65) 40%, transparent 75%),
    linear-gradient(to right, rgba(10,10,10,0.7) 0%, transparent 60%);
}

.single-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 50px;
  align-items: flex-end;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.single-poster {
  width: 240px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
}

.single-poster img { width: 100%; display: block; }

.single-info h1 {
  font-family: 'Rabar', sans-serif;
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: 3px;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.meta-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.meta-tag {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: #ddd;
}

.meta-tag.rating-tag {
  background: rgba(229,9,20,0.2);
  border-color: var(--red);
  color: #ff8080;
  font-weight: 700;
}

.single-desc {
  font-size: 16px;
  color: #ccc;
  line-height: 1.8;
  margin-bottom: 28px;
  max-width: 600px;
}

/* SERVER POPUP */
.servers-popup .popup-box {
  max-width: 550px;
}

.server-title {
  font-family: 'Rabar', sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-align: center;
}

.server-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.server-btn {
  padding: 10px 22px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--white);
  cursor: pointer;
  font-family: 'Rabar', sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.server-btn.active {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 4px 15px var(--red-glow);
}

.video-frame {
  width: 100%;
  height: 300px;
  background: #000;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.video-frame iframe { width: 100%; height: 100%; border: none; }

/* SEASON / EPISODE */
.season-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.season-tab {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--gray);
  cursor: pointer;
  font-family: 'Rabar', sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.season-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.ep-btn {
  padding: 12px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--white);
  cursor: pointer;
  font-family: 'Rabar', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
  position: relative;
}

.ep-btn:hover { border-color: var(--red); background: rgba(229,9,20,0.1); }

.ep-btn.watched {
  background: rgba(0,200,81,0.15);
  border-color: #00c851;
  color: #00c851;
}

.ep-btn .ep-check {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  color: #00c851;
}

/* LOADING */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px;
}

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

/* RESPONSIVE */
@media (max-width: 900px) {
  .navbar { padding: 0 16px; height: 60px; }
  .nav-links { display: none; }
  .nav-right .nav-search-wrap { display: none; }
  .nav-right { gap: 8px; }
  .mobile-nav { display: flex; }
  .section { padding: 40px 16px; }
  body { padding-bottom: 80px; }
  .slider-content { right: 5%; max-width: 90%; bottom: 15%; }
  .slider-title { font-size: 36px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .single-hero { padding: 40px 16px 40px; }
  .single-hero-content { flex-direction: column; align-items: flex-start; gap: 20px; }
  .single-poster { width: 150px; }
  .color-picker-btn span { display: none; }
  .page-banner { height: 180px; margin-top: 60px; }
  .ai-search-section { padding: 50px 16px; }
  /* لۆگۆی مۆبایل */
  .nav-logo { font-size: 20px; letter-spacing: 1px; }
  .nav-logo img { height: 32px; }

  /* ── سلایدەری مۆبایل: پۆستەر بە قەبارەی خۆی ── */
.hero-slider {
  height: 75vw;
  min-height: 400px;
}

  /* باکگراوندی سلایدەر لە مۆبایل */
  .slider-bg {
    object-fit: cover;
    object-position: center 30%;
    width: 100%;
    height: 100%;
  }

  /* overlay بۆ مۆبایل — لە خوارەوە زیاتر تاریکی */
  .slider-overlay {
    background:
      linear-gradient(
        to bottom,
        rgba(10,10,10,0.1)  0%,
        rgba(10,10,10,0.05) 40%,
        rgba(10,10,10,0.7)  75%,
        rgba(10,10,10,1)    100%
      ) !important;
  }

  /* نووسراوی سلایدەر لە مۆبایل */
  .slider-content {
    right: 0;
    left: 0;
    bottom: 8%;
    max-width: 100%;
    padding: 0 20px;
    text-align: right;
  }

  .slider-title { font-size: 28px; line-height: 1.2; }
  .slider-desc  { display: none; }
  .slider-meta  { font-size: 13px; }
  .slider-btns  { gap: 10px; }
  .slider-btns .btn { padding: 10px 20px; font-size: 13px; }
}

@media (max-width: 600px) {
  .movies-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .footer-top { grid-template-columns: 1fr; }
  .slider-btns { flex-direction: column; }
  .sort-filter-bar { gap: 8px; }
}

.cast-card {
  width: 140px;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  transition: 0.3s;
  cursor: pointer;
}

.cast-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.cast-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.cast-info {
  padding: 10px;
}

.cast-card-name {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
}

.cast-card-role {
  font-size: 12px;
  color: #aaa;
}
/* دوگمەی سێرچی مۆبایل لە ناڤبار */
.mobile-search-btn { display: none !important; }
/* ===== Genre Dropdown ===== */
/* پێویستە filter-dropdown overflow visible بێت */
.filter-dropdown { overflow: visible !important; }
.sort-filter-bar { overflow: visible !important; }

.genre-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  width: 240px;
  z-index: 9999;
  display: none;
  box-shadow: 0 20px 60px rgba(0,0,0,0.9);
  max-height: 380px;
  overflow: hidden;
  flex-direction: column;
}
.genre-dropdown-panel.show { display: flex; flex-direction: column; }
.genre-drop-search-wrap { padding: 4px 4px 8px; flex-shrink: 0; }
.genre-drop-search {
  width: 100%; padding: 9px 12px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--border); border-radius: 8px; color: var(--white);
  font-size: 13px; font-family: 'Rabar', sans-serif; outline: none; direction: rtl;
  box-sizing: border-box;
}
.genre-drop-search:focus { border-color: var(--red); }
.genre-drop-list {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.genre-drop-item {
  padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; color: #ccc; transition: background 0.15s;
  display: flex; align-items: center; gap: 8px; direction: rtl;
  white-space: nowrap;
}
.genre-drop-item:hover { background: rgba(255,255,255,0.08); color: white; }
.genre-drop-item.active { background: rgba(229,9,20,0.18); color: var(--red); }

/* ===== TEAM QUOTES SECTION ===== */
.team-section { padding-bottom: 60px; }

.team-swiper-wrap {
  position: relative;
  overflow: hidden;
  padding: 20px 10px 40px;
}

.team-swiper {
  display: flex;
  gap: 24px;
  overflow: hidden;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
}
.team-swiper:active { cursor: grabbing; }

.team-card {
  flex: 0 0 calc(33.333% - 16px);
  min-width: 0;
}

.team-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: -28px;
  position: relative;
  z-index: 2;
}

.team-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--red);
  box-shadow: 0 0 0 4px rgba(229,9,20,0.15);
}

.team-quote-ring {
  border: 2.5px solid var(--red);
  border-radius: 50% / 45%;
  padding: 44px 24px 28px;
  position: relative;
  background: var(--card);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.team-quote-text {
  font-size: 13px;
  line-height: 1.7;
  color: #ccc;
  text-align: center;
  margin: 0;
}

.team-quote-icon {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 48px;
  color: var(--red);
  line-height: 1;
  font-family: Georgia, serif;
  font-weight: 900;
}

.team-info {
  text-align: center;
  margin-top: 28px;
  padding: 0 10px;
}

.team-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}

.team-role {
  font-size: 12px;
  color: #666;
}

/* dots */
.team-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.team-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  cursor: pointer;
  transition: all 0.2s;
}
.team-dot.active {
  background: var(--red);
  width: 24px;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 1023px) {
  .team-card { flex: 0 0 calc(50% - 12px); }
}
@media (max-width: 699px) {
  .team-card { flex: 0 0 100%; }
  .team-quote-ring { padding: 44px 16px 28px; }
}

/* ===== GENRE CARDS ===== */
.genre-card {
  position: relative;
  width: 200px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s;
}
.genre-card:hover { transform: scale(1.04); }
.genre-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
  transition: transform 0.3s;
}
.genre-card:hover .genre-card-bg { transform: scale(1.08); }
.genre-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(229,9,20,0.7) 0%, rgba(0,0,0,0.7) 100%);
}
.genre-card-name {
  position: absolute;
  bottom: 14px;
  right: 14px;
  left: 14px;
  font-size: 15px;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  z-index: 1;
}
/* ===== TRENDING SECTION ===== */
.trending-section { overflow: hidden; }
.trending-swiper-wrap {
  position: relative;
  overflow: hidden;
  padding: 0 50px;
}
.trending-track {
  display: flex;
  gap: 20px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.trending-card {
  flex-shrink: 0;
  width: 300px;
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--white);
  position: relative;
  transition: all 0.3s;
  cursor: pointer;
}
.trending-card:hover {
  border-color: var(--red);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(229,9,20,0.2);
}
.trending-card-num {
  position: absolute;
  top: 10px;
  right: 8px;
  font-family: 'Bebas Neue', 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 900;
  color: rgba(255,255,255,0.12);
  line-height: 1;
  z-index: 2;
  pointer-events: none;
  letter-spacing: -1px;
}
.trending-card-img-wrap {
  width: 120px;
  min-width: 120px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.trending-card-img-wrap img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.trending-card:hover .trending-card-img-wrap img { transform: scale(1.06); }
.trending-card-hover {
  position: absolute;
  inset: 0;
  background: rgba(229,9,20,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 22px;
  color: white;
}
.trending-card:hover .trending-card-hover { opacity: 1; }
.trending-card-info {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.trend-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(229,9,20,0.2);
  color: var(--red);
  border: 1px solid rgba(229,9,20,0.35);
  width: fit-content;
}
.trend-badge-movie {
  background: rgba(255,183,0,0.15);
  color: #ffb700;
  border-color: rgba(255,183,0,0.3);
}
.trending-card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.trending-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--gray);
}
.trending-rating { color: #f5c518; font-size: 11px; }
.trending-card-desc {
  font-size: 11px;
  color: #666;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
}
.trending-card-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: auto;
}
.tag-pill {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  background: rgba(255,255,255,0.06);
  color: #888;
  border: 1px solid #222;
}

/* ===== CAST CARD LARGE ===== */
.cast-card-lg {
  width: 140px !important;
  text-align: center;
}
.cast-card-img-wrap{
width:160px;
height:220px;
border-radius:14px;
overflow:hidden;
margin:0 auto 10px;
}
.cast-card-lg:hover .cast-card-img-wrap {
  border-color: var(--red);
  transform: scale(1.04);
}
.cast-card-img-lg{
width:100%;
height:100%;
object-fit:cover;
object-position:top center;
}

/* موبایل: ژانەر dropdown بە position:fixed */
@media (max-width: 768px) {
  .genre-dropdown-panel {
    position: fixed;
    top: auto;
    bottom: 70px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: 60vh;
    z-index: 99999;
    border-radius: 16px;
  }
}

/* ═══════════════════════════════════════════════════
   MOBILE RESPONSIVE FIXES — داڕێژی مۆبایل چاکسازی
   ═══════════════════════════════════════════════════ */

/* داڕێژی گشتی مۆبایل */
@media (max-width: 480px) {
  /* ناڤبار */
  .navbar { padding: 0 12px; height: 56px; }
  .nav-logo { font-size: 18px; }

  /* سێکشن */
  .section { padding: 30px 12px; }
  body { padding-bottom: 70px; }

  /* سلایدەر */
  .hero-slider { height: 80vw; min-height: 320px; }
  .slider-title { font-size: 22px !important; }
  .slider-btns .btn { padding: 8px 16px; font-size: 12px; }

  /* گریدی فیلمەکان */
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  /* کارتی فیلم */
  .movie-card .movie-title { font-size: 12px; }
  .movie-card .movie-year  { font-size: 11px; }

  /* پەیجی تاکە فیلم */
  .single-hero { padding: 20px 12px 30px; }
  .single-poster { width: 120px; }
  .single-title { font-size: 24px; }

  /* فووتەر */
  .footer-top { grid-template-columns: 1fr; gap: 20px; }
  .footer { padding: 30px 12px; }

  /* مۆبایل ناڤ ژێرەوە */
  .mobile-nav { height: 60px; }
  .mobile-nav-item { font-size: 10px; }
  .mobile-nav-item i { font-size: 20px; }
}

/* ═══════════════════════════════
   HORIZONTAL SCROLL FIX
   ═══════════════════════════════ */
@media (max-width: 900px) {
  html, body { max-width: 100vw; overflow-x: hidden; }

  /* دڵنیابوون لە ئەوەی هیچ ئەلێمێنتێک دەرچو نەبێت */
  .section,
  .admin-content,
  .admin-table-wrap,
  .stats-grid { max-width: 100%; }

  /* تیبڵی داشبۆرد لە مۆبایل */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* گریدی ئامارەکان */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ═══════════════════════════════
   THEME: RED (default)
   ═══════════════════════════════ */
[data-theme="red"] {
  --red: #e50914;
  --red-dark: #b0060f;
  --red-glow: rgba(229,9,20,0.4);
}

/* ═══════════════════════════════
   IMAGE UPLOAD LABEL IN STAFF ROWS
   ═══════════════════════════════ */
.staff-img-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid #444;
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
  color: #aaa;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
  margin-top: 6px;
}
.staff-img-upload-label:hover {
  background: rgba(229,9,20,0.15);
  border-color: var(--red);
  color: var(--red);
}
.staff-img-upload-label i { color: var(--red); }
/* Mobile bottom navigation and Kurdish typography alignment. */
:root{--disp:'Rabar',Tahoma,sans-serif!important;--font:'Rabar',Tahoma,sans-serif!important;--body:'Rabar',Tahoma,sans-serif!important}
button,input,select,textarea{font-family:'Rabar',Tahoma,sans-serif}
@media(max-width:900px){
  body:has(.mobile-nav){padding-bottom:calc(110px + env(safe-area-inset-bottom))}
  .mobile-nav{bottom:max(12px,env(safe-area-inset-bottom));width:min(calc(100% - 24px),440px);min-width:0;max-width:440px;justify-content:space-around;padding:7px 5px;transition:opacity .22s,transform .22s}
  .mobile-nav-item{min-width:0;flex:1;padding:8px 3px;text-align:center;line-height:1.4;overflow:hidden;text-overflow:ellipsis;font-size:10px;letter-spacing:0}
}
