/* ==========================================================================
   RostamFilm Web Cinema (/online) - Admin-Only Streaming UI
   Compatible with Modern Browsers & Smart TV Browsers (Samsung Tizen 2018+)
   Design System synced with Android App (#0B0F19 / #121824 / #FF3B5C)
   ========================================================================== */

@font-face {
  font-family: 'PeydaWeb';
  src: url('/static/fonts/PeydaWeb-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PeydaWeb';
  src: url('/static/fonts/PeydaWeb-SemiBold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PeydaWeb';
  src: url('/static/fonts/PeydaWeb-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0B0F19;
  --surface: #121824;
  --card: #161F2E;
  --card-hover: #1C273A;
  --stroke: #232F42;
  --stroke-light: rgba(255, 255, 255, 0.12);

  --coral: #FF3B5C;
  --coral-hover: #E02847;
  --coral-glow: rgba(255, 59, 92, 0.38);
  --sky: #38BDF8;
  --emerald: #10B981;
  --gold: #FFB800;
  --purple: #8B5CF6;

  --text: #FFFFFF;
  --text-sec: #9DB1C3;
  --text-muted: #778B9E;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  background-color: #0B0F19;
  color: #FFFFFF;
  scroll-behavior: smooth;
}

body {
  font-family: 'PeydaWeb', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
  background-color: #0B0F19;
  background-color: var(--bg);
  color: #FFFFFF;
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img {
  display: block;
}

/* Clear focus highlight for Smart TV remote / keyboard navigation */
.movie-card:focus,
.actor-card:focus,
.nav-link:focus,
.btn-coral:focus,
.btn-glass:focus,
.tab-chip:focus,
.ep-q-btn:focus,
.mini-play-btn:focus,
.drawer-ep-item:focus {
  outline: 2px solid #FF3B5C;
  outline-offset: 2px;
}

.ambient-glow {
  position: fixed;
  top: -160px;
  right: 50%;
  transform: translateX(50%);
  width: 900px;
  height: 460px;
  background: radial-gradient(ellipse at center, rgba(255, 59, 92, 0.14) 0%, transparent 68%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Top Sticky Navigation Bar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #0B0F19;
  background: rgba(11, 15, 25, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-right {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 22px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #FF3B5C 0%, #C91D3C 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  box-shadow: 0 6px 18px rgba(255, 59, 92, 0.38);
  margin-left: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 16px;
  font-weight: 800;
}

.brand-text small {
  font-size: 11px;
  color: #FF3B5C;
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-link {
  padding: 7px 13px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 700;
  color: #9DB1C3;
  transition: all 0.18s ease;
  white-space: nowrap;
  margin-left: 4px;
}

.nav-link:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.07);
}

.nav-link.active {
  background: #FF3B5C;
  color: #FFF;
  box-shadow: 0 4px 14px rgba(255, 59, 92, 0.38);
}

.topbar-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 290px;
  background: #161F2E;
  border: 1px solid #232F42;
  border-radius: 9999px;
  padding: 0 12px 0 6px;
  margin-left: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-icon {
  color: #778B9E;
  flex-shrink: 0;
}

.search-box input {
  width: 100%;
  height: 38px;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 10px;
  font-size: 13px;
  color: #FFF;
}

.search-box input::placeholder {
  color: #778B9E;
}

.search-filter-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9DB1C3;
  transition: background 0.15s, color 0.15s;
}

.search-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFF;
}

.search-dropdown {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  background: #121824;
  border: 1px solid #232F42;
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.78);
  overflow: hidden;
  z-index: 200;
  max-height: 440px;
  overflow-y: auto;
}

.search-drop-item {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s;
}

.search-drop-item:hover {
  background: rgba(255, 59, 92, 0.14);
}

.search-drop-item img {
  width: 40px;
  height: 58px;
  object-fit: cover;
  border-radius: 7px;
  background: #161F2E;
  flex-shrink: 0;
  margin-left: 12px;
}

.search-drop-meta {
  min-width: 0;
  flex: 1;
}

.search-drop-meta strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-drop-meta span {
  font-size: 11.5px;
  color: #778B9E;
}

.search-drop-footer {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #FF3B5C;
  background: rgba(255, 59, 92, 0.1);
}

.admin-controls {
  display: flex;
  align-items: center;
}

.icon-pill-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9DB1C3;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.18s;
  margin-left: 8px;
}

.icon-pill-btn svg {
  margin-left: 5px;
}

.icon-pill-btn:last-child {
  margin-left: 0;
}

.icon-pill-btn:last-child svg {
  margin-left: 0;
}

.icon-pill-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFF;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #FCA5A5;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  font-size: 12.5px;
  font-weight: 700;
  color: #6EE7B7;
  margin-left: 8px;
}

.admin-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  margin-left: 7px;
}

.mobile-nav-strip {
  display: none;
  overflow-x: auto;
  padding: 0 14px 10px;
}

.mnav-link {
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #9DB1C3;
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  margin-left: 6px;
}

.mnav-link.active {
  background: #FF3B5C;
  color: #FFF;
}

/* ==========================================================================
   Main Container & Loaders
   ========================================================================== */
.app-main {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 24px 64px;
  min-height: calc(100vh - 70px);
}

.page-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 46vh;
  color: #9DB1C3;
  font-size: 14px;
}

.page-loader p {
  margin-top: 14px;
}

.spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: #FF3B5C;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Hero Slider (Home)
   ========================================================================== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 470px;
  border-radius: 24px;
  overflow: hidden;
  background: #121824;
  border: 1px solid rgba(255, 255, 255, 0.09);
  margin-bottom: 34px;
  box-shadow: 0 28px 60px -20px rgba(0, 0, 0, 0.75);
}

.hero-slide {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transform: scale(1.03);
}

.hero-scrim {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background:
    linear-gradient(270deg, rgba(11, 15, 25, 0.94) 0%, rgba(11, 15, 25, 0.72) 44%, rgba(11, 15, 25, 0.2) 100%),
    linear-gradient(0deg, rgba(11, 15, 25, 0.95) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 680px;
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(18, 24, 36, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #E2E8F0;
  margin-left: 8px;
  margin-bottom: 6px;
}

.pill-gold {
  color: #FFB800;
  border-color: rgba(255, 184, 0, 0.35);
  background: rgba(255, 184, 0, 0.14);
}

.pill-coral {
  color: #FFF;
  background: #FF3B5C;
  border-color: #FF3B5C;
}

.pill-sky {
  color: #7DD3FC;
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.35);
}

.pill-emerald {
  color: #6EE7B7;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.35);
}

.pill-purple {
  color: #DDD6FE;
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.4);
}

.hero-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
}

.hero-orig {
  font-size: 14px;
  color: #9DB1C3;
  direction: ltr;
  text-align: right;
  font-weight: 600;
  margin-bottom: 8px;
}

.hero-plot {
  font-size: 14px;
  color: #CBD5E1;
  line-height: 1.75;
  max-height: 76px;
  overflow: hidden;
  margin-bottom: 14px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions > * {
  margin-left: 10px;
  margin-bottom: 8px;
}

.btn-coral {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FF3B5C 0%, #E02847 100%);
  color: #FFF;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px -6px rgba(255, 59, 92, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s;
}

.btn-coral svg {
  margin-left: 8px;
}

.btn-coral:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -6px rgba(255, 59, 92, 0.65);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #FFF;
  font-size: 13.5px;
  font-weight: 700;
  transition: background 0.18s, border-color 0.18s;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-glass.bookmarked {
  background: rgba(255, 59, 92, 0.2);
  border-color: rgba(255, 59, 92, 0.48);
  color: #FF8DA1;
}

.hero-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(11, 15, 25, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.hero-nav-btn:hover {
  background: #FF3B5C;
  border-color: #FF3B5C;
}

.hero-prev { right: 16px; }
.hero-next { left: 16px; }

.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 28px;
  z-index: 4;
  display: flex;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  margin-left: 7px;
  transition: all 0.25s;
}

.hero-dot.active {
  width: 26px;
  background: #FF3B5C;
}

/* ==========================================================================
   Horizontal Carousels & Movie Cards (2:3 padding-top works on ALL TVs)
   ========================================================================== */
.carousel-section {
  margin-bottom: 34px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  border-radius: 99px;
  background: #FF3B5C;
  margin-left: 10px;
}

.section-more {
  font-size: 13px;
  font-weight: 700;
  color: #9DB1C3;
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.15s;
}

.section-more:hover {
  color: #FFF;
  background: rgba(255, 59, 92, 0.18);
}

.carousel-wrap {
  position: relative;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  padding: 4px 2px 10px;
}

.carousel-track::-webkit-scrollbar {
  height: 6px;
}

.carousel-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

.carousel-arrow {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(11, 15, 25, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.15s;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
}

.carousel-arrow:hover {
  opacity: 1;
  background: #FF3B5C;
  border-color: #FF3B5C;
}

.carousel-arrow.right { right: -10px; }
.carousel-arrow.left { left: -10px; }

/* Movie Poster Card */
.movie-card {
  flex: 0 0 176px;
  width: 176px;
  margin-left: 16px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.22s ease;
}

.movies-grid .movie-card {
  margin-left: 0;
}

.movie-card:hover {
  transform: translateY(-5px);
}

.poster-frame {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 150%;
  border-radius: 14px;
  overflow: hidden;
  background: #161F2E;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.7);
  margin-bottom: 8px;
}

.poster-frame img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
}

.poster-frame::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, transparent 35%, transparent 65%, rgba(11, 15, 25, 0.9) 100%);
  pointer-events: none;
}

.card-rating {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(18, 24, 36, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11.5px;
  font-weight: 800;
  color: #FFF;
}

.card-rating svg {
  color: #FFB800;
  margin-left: 4px;
}

.card-type-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 800;
  color: #FFF;
  background: rgba(139, 92, 246, 0.9);
}

.card-audio-badges {
  position: absolute;
  bottom: 8px;
  right: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-tag {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E2E8F0;
}

.mini-tag.dub {
  background: rgba(16, 185, 129, 0.9);
  border-color: transparent;
  color: #FFF;
}

.mini-tag.sub {
  background: rgba(56, 189, 248, 0.88);
  border-color: transparent;
  color: #082F49;
}

.card-hover-play {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 15, 25, 0.42);
  opacity: 0;
  transition: opacity 0.2s;
}

.movie-card:hover .card-hover-play {
  opacity: 1;
}

.card-play-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FF3B5C;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.45);
}

.card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.22);
  z-index: 4;
}

.card-progress-fill {
  height: 100%;
  background: #FF3B5C;
}

.card-info {
  padding: 0 2px;
}

.card-title {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sub {
  font-size: 11.5px;
  color: #778B9E;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Archive / Search / Filter Page
   ========================================================================== */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-head h1 {
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.count-badge {
  font-size: 12.5px;
  font-weight: 700;
  color: #9DB1C3;
  background: #161F2E;
  border: 1px solid #232F42;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-right: 10px;
}

.filter-panel {
  background: #121824;
  border: 1px solid #232F42;
  border-radius: 20px;
  padding: 16px 16px 14px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.filter-group {
  flex: 1 1 150px;
  min-width: 140px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

.filter-group.filter-group-search {
  flex: 2 1 240px;
  min-width: 200px;
}

.filter-group.filter-group-submit {
  flex: 0 0 130px;
  min-width: 120px;
}

.filter-group.filter-group-submit .btn-coral {
  width: 100%;
  height: 40px;
  padding: 0 16px;
}

.filter-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #9DB1C3;
  margin-bottom: 6px;
}

.filter-input, .filter-select {
  width: 100%;
  height: 40px;
  background: #0B0F19;
  border: 1px solid #232F42;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  color: #FFF;
  outline: none;
  box-sizing: border-box;
}

.filter-input:focus, .filter-select:focus {
  border-color: #FF3B5C;
}

.filter-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  flex: 1 1 100%;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
}

.toggle-chip {
  padding: 6px 13px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 700;
  background: #161F2E;
  border: 1px solid #232F42;
  color: #9DB1C3;
  margin-left: 8px;
  margin-bottom: 6px;
  transition: all 0.15s;
}

.toggle-chip.active {
  background: rgba(255, 59, 92, 0.2);
  border-color: #FF3B5C;
  color: #FF8DA1;
}

/* Bulletproof Cross-Device Movies Grid */
.movies-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 16px;
  width: 100%;
}

.movies-grid .movie-card {
  flex: 0 0 calc(16.666% - 14px); /* 6 columns default */
  width: calc(16.666% - 14px);
  min-width: 145px;
  max-width: 205px;
  margin: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1600px) {
  /* TV 1080p/4K & Ultra-wide displays */
  .movies-grid .movie-card {
    flex: 0 0 calc(12.5% - 14px);
    width: calc(12.5% - 14px);
    max-width: 195px;
  }
}

@media (max-width: 1300px) {
  .movies-grid .movie-card {
    flex: 0 0 calc(20% - 14px);
    width: calc(20% - 14px);
  }
}

@media (max-width: 1024px) {
  .movies-grid .movie-card {
    flex: 0 0 calc(25% - 12px);
    width: calc(25% - 12px);
  }
}

@media (max-width: 780px) {
  .movies-grid .movie-card {
    flex: 0 0 calc(33.333% - 12px);
    width: calc(33.333% - 12px);
    min-width: 125px;
  }
}

@media (max-width: 480px) {
  .movies-grid .movie-card {
    flex: 0 0 calc(50% - 8px);
    width: calc(50% - 8px);
    min-width: 110px;
  }
}

@supports (display: grid) {
  .movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 205px));
    gap: 20px 16px;
  }
  .movies-grid .movie-card {
    flex: none;
    width: 100%;
    max-width: 205px;
    min-width: 0;
  }
}

.load-more-wrap {
  margin-top: 32px;
  text-align: center;
}

/* ==========================================================================
   Actors Directory
   ========================================================================== */
.actors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.actor-card {
  flex: 0 0 calc(16.666% - 14px);
  width: calc(16.666% - 14px);
  min-width: 135px;
  max-width: 200px;
}

@media (min-width: 1600px) {
  .actor-card {
    flex: 0 0 calc(12.5% - 14px);
    width: calc(12.5% - 14px);
  }
}

@media (max-width: 1100px) {
  .actor-card {
    flex: 0 0 calc(25% - 12px);
    width: calc(25% - 12px);
  }
}

@media (max-width: 680px) {
  .actor-card {
    flex: 0 0 calc(33.333% - 12px);
    width: calc(33.333% - 12px);
  }
}

@media (max-width: 440px) {
  .actor-card {
    flex: 0 0 calc(50% - 8px);
    width: calc(50% - 8px);
  }
}

@supports (display: grid) {
  .actors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 200px));
    gap: 16px;
  }
  .actor-card {
    flex: none;
    width: 100%;
    max-width: 200px;
    min-width: 0;
  }
}

.actor-card {
  background: #161F2E;
  border: 1px solid #232F42;
  border-radius: 20px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s;
}

.actor-card:hover {
  transform: translateY(-4px);
  border-color: #FF3B5C;
}

.actor-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  margin: 0 auto 10px;
  object-fit: cover;
  background: #121824;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.actor-initials {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1E293B, #0F172A);
  border: 2px solid rgba(255, 255, 255, 0.1);
  font-size: 24px;
  font-weight: 800;
  color: #FF3B5C;
}

.actor-name {
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.actor-count {
  font-size: 11.5px;
  color: #778B9E;
}

/* ==========================================================================
   Movie / Series Detail Page
   ========================================================================== */
.detail-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #121824;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 26px;
}

.detail-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: blur(10px) saturate(1.15);
  transform: scale(1.08);
}

.detail-backdrop-scrim {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(11, 15, 25, 0.45) 0%, rgba(11, 15, 25, 0.94) 100%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 30px;
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-gap: 28px;
  gap: 28px;
  align-items: start;
}

.detail-poster-col {
  position: relative;
  width: 100%;
}

.detail-poster {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-info-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.detail-info-col > * {
  margin-bottom: 14px;
}

.detail-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
}

.detail-orig {
  font-size: 14.5px;
  color: #9DB1C3;
  direction: ltr;
  text-align: right;
  font-weight: 600;
}

.detail-plot {
  font-size: 14.5px;
  color: #D5E0EC;
  line-height: 1.85;
}

.detail-meta-grid {
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  color: #9DB1C3;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(11, 15, 25, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-meta-grid > div {
  margin-left: 22px;
  margin-bottom: 6px;
}

.detail-meta-grid strong {
  color: #FFF;
  margin-right: 4px;
}

.genre-chips {
  display: flex;
  flex-wrap: wrap;
}

.genre-chip {
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  margin-left: 8px;
  margin-bottom: 6px;
  transition: all 0.15s;
}

.genre-chip:hover {
  background: #FF3B5C;
  border-color: #FF3B5C;
  color: #FFF;
}

/* Cast Horizontal Strip */
.cast-strip {
  display: flex;
  overflow-x: auto;
  padding: 4px 0 8px;
}

.cast-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 5px 6px 5px 14px;
  border-radius: 9999px;
  background: #161F2E;
  border: 1px solid #232F42;
  font-size: 12.5px;
  font-weight: 700;
  margin-left: 10px;
  transition: border-color 0.15s, background 0.15s;
}

.cast-pill:hover {
  border-color: #FF3B5C;
  background: #1C273A;
}

.cast-pill img, .cast-pill-init {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-left: 9px;
}

.cast-pill-init {
  background: rgba(255, 59, 92, 0.18);
  color: #FF3B5C;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

/* Media Selector Panel */
.media-box {
  background: #121824;
  border: 1px solid #232F42;
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 32px;
}

.media-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.media-box-header h2 {
  font-size: 18px;
  font-weight: 800;
}

.tabs-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tab-chip {
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  background: #161F2E;
  border: 1px solid #232F42;
  color: #9DB1C3;
  margin-left: 8px;
  margin-bottom: 8px;
  transition: all 0.16s;
}

.tab-chip:hover {
  color: #FFF;
  border-color: rgba(255, 255, 255, 0.25);
}

.tab-chip.active {
  background: #FF3B5C;
  border-color: #FF3B5C;
  color: #FFF;
  box-shadow: 0 6px 16px -4px rgba(255, 59, 92, 0.4);
}

.tab-chip.audio-chip.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38BDF8;
  color: #BAE6FD;
  box-shadow: none;
}

/* Quality Cards for Movies */
.qualities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.quality-card {
  background: #161F2E;
  border: 1px solid #232F42;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.18s, background 0.18s;
}

.quality-card:hover {
  border-color: #FF3B5C;
  background: #1C273A;
}

.quality-meta {
  min-width: 0;
  margin-left: 12px;
}

.quality-res-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.res-badge {
  padding: 2px 9px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 800;
  background: rgba(255, 59, 92, 0.18);
  color: #FF8DA1;
  direction: ltr;
  margin-left: 8px;
}

.quality-size {
  font-size: 12px;
  color: #9DB1C3;
  font-weight: 600;
}

.quality-note {
  font-size: 11.5px;
  color: #778B9E;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quality-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mini-play-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  background: #FF3B5C;
  color: #FFF;
  font-size: 12.5px;
  font-weight: 800;
  margin-left: 6px;
  transition: background 0.15s;
}

.mini-play-btn svg {
  margin-left: 6px;
}

.mini-play-btn:hover {
  background: #E02847;
}

.mini-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #9DB1C3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  transition: all 0.15s;
}

.mini-icon-btn:last-child {
  margin-left: 0;
}

.mini-icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #FFF;
}

/* Series Episodes List */
.episodes-list {
  display: flex;
  flex-direction: column;
}

.episode-row {
  background: #161F2E;
  border: 1px solid #232F42;
  border-radius: 14px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}

.episode-row:hover {
  border-color: rgba(255, 59, 92, 0.5);
}

.episode-row.watched {
  border-color: rgba(16, 185, 129, 0.4);
}

.ep-left {
  display: flex;
  align-items: center;
  min-width: 180px;
  margin-left: 12px;
  margin-bottom: 6px;
}

.ep-num {
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 11px;
  background: rgba(255, 59, 92, 0.16);
  color: #FF8DA1;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
}

.ep-title {
  font-size: 14px;
  font-weight: 800;
}

.ep-progress-text {
  font-size: 11.5px;
  color: #10B981;
  font-weight: 700;
}

.ep-qualities {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.ep-q-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(11, 15, 25, 0.78);
  border: 1px solid #232F42;
  font-size: 12px;
  font-weight: 700;
  color: #FFF;
  margin-left: 8px;
  margin-bottom: 6px;
  transition: all 0.15s;
}

.ep-q-btn:hover {
  background: #FF3B5C;
  border-color: #FF3B5C;
}

.ep-q-btn small {
  color: #9DB1C3;
  font-weight: 500;
  margin-right: 6px;
}

.ep-q-btn:hover small {
  color: rgba(255, 255, 255, 0.9);
}

/* Empty State */
.empty-box {
  text-align: center;
  padding: 56px 24px;
  background: #121824;
  border: 1px dashed #232F42;
  border-radius: 24px;
  color: #9DB1C3;
}

.empty-box h3 {
  font-size: 18px;
  color: #FFF;
  margin-bottom: 6px;
}

/* ==========================================================================
   Cinema Web Video Player Overlay
   ========================================================================== */
.player-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  background: rgba(5, 8, 14, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.player-shell {
  width: 100%;
  max-width: 1320px;
  height: 92vh;
  max-height: 840px;
  background: #090D16;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.9);
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #101624;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.player-title-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  margin-left: 12px;
}

.player-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  color: #FFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 12px;
  transition: background 0.15s;
}

.player-icon-btn:hover {
  background: #FF3B5C;
}

.player-titles {
  min-width: 0;
}

.player-titles h2 {
  font-size: 15.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-subtitle {
  font-size: 12px;
  color: #9DB1C3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.player-top-actions > * {
  margin-right: 8px;
}

.player-chip-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 700;
  color: #FFF;
  transition: background 0.15s;
}

.player-chip-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.player-chip-btn.accent {
  background: #FF3B5C;
  border-color: #FF3B5C;
}

.player-select {
  height: 34px;
  background: #161F2E;
  border: 1px solid #232F42;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #FFF;
  outline: none;
}

.player-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  background: #000;
}

.video-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.video-stage.drag-active {
  box-shadow: inset 0 0 0 3px #F43F5E;
}

.video-stage video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  background: #000;
  outline: none;
}

video::cue {
  background: rgba(0, 0, 0, 0.78);
  color: #FFF;
  font-family: 'PeydaWeb', Tahoma, sans-serif;
  font-size: 1.1em;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   On-Video Stage Controls (Play/Pause, +10s, -10s HUD)
   ========================================================================== */
.player-stage-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.player-stage-overlay.auto-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.stage-controls-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 12px 24px;
  border-radius: 9999px;
  background: rgba(11, 15, 25, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
  pointer-events: auto;
  direction: ltr;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stage-controls-cluster:hover {
  border-color: rgba(255, 59, 92, 0.45);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

.stage-ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  padding: 0;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.stage-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #FFF;
  transform: scale(1.08);
}

.stage-ctrl-btn:focus-visible,
.stage-ctrl-btn:focus {
  outline: 3px solid #FF3B5C;
  outline-offset: 3px;
  transform: scale(1.12);
}

.stage-ctrl-btn:active {
  transform: scale(0.94);
}

.stage-ctrl-btn.play-pause-btn {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #FF3B5C 0%, #D92242 100%);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.55);
}

.stage-ctrl-btn.play-pause-btn:hover {
  background: linear-gradient(135deg, #FF5573 0%, #E62A4B 100%);
  border-color: #FFF;
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(255, 59, 92, 0.75);
}

.stage-ctrl-btn.seek-btn {
  width: 56px;
  height: 56px;
}

.stage-ctrl-btn.seek-btn svg {
  margin-top: -2px;
}

.ctrl-sec-text {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #FFFFFF;
  margin-top: 1px;
}

.ctrl-subtext {
  font-size: 8.5px;
  font-weight: 700;
  color: #9DB1C3;
  line-height: 1;
  margin-top: 1px;
}

/* Transient On-Screen Seek Feedback Pill */
.stage-seek-feedback {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 15, 25, 0.88);
  border: 1px solid rgba(255, 59, 92, 0.5);
  color: #FFFFFF;
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  z-index: 6;
  direction: rtl;
}

.stage-seek-feedback.animate-pop {
  animation: stageSeekPop 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes stageSeekPop {
  0% { opacity: 0; transform: translate(-50%, -10px) scale(0.85); }
  25% { opacity: 1; transform: translate(-50%, 0) scale(1.06); }
  70% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -8px) scale(0.94); }
}

.player-loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(5, 8, 14, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  color: #E2E8F0;
  z-index: 5;
}

.player-loading span {
  margin-top: 12px;
}

.player-error-box {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(11, 15, 25, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  z-index: 6;
}

.player-error-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 59, 92, 0.2);
  color: #FF3B5C;
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.player-error-box p {
  max-width: 460px;
  font-size: 13.5px;
  color: #9DB1C3;
  margin: 8px 0 14px;
}

.player-error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.player-error-actions > * {
  margin: 4px;
}

.player-episodes-drawer {
  width: 290px;
  background: #101624;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.drawer-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.drawer-ep-item {
  width: 100%;
  text-align: right;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  color: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  transition: all 0.15s;
}

.drawer-ep-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.drawer-ep-item.active {
  background: rgba(255, 59, 92, 0.2);
  border-color: #FF3B5C;
  color: #FFF;
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #101624;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.toolbar-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
  color: #9DB1C3;
  margin-left: 7px;
  margin-bottom: 4px;
  transition: all 0.15s;
  cursor: pointer;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFF;
}

.tool-btn.accent-outline {
  border-color: rgba(255, 59, 92, 0.5);
  color: #FF8DA1;
}

.tool-btn.accent-outline:hover {
  background: #FF3B5C;
  border-color: #FF3B5C;
  color: #FFF;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-stack {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.toast {
  background: #121824;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-right: 4px solid #FF3B5C;
  color: #FFF;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.65);
}

.toast.success { border-right-color: #10B981; }
.toast.error { border-right-color: #EF4444; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1120px) {
  .main-nav { display: none; }
  .mobile-nav-strip { display: flex; }
  .search-box { width: 220px; }
  .hide-md { display: none; }
}

@media (max-width: 780px) {
  .topbar-inner { padding: 10px 14px; }
  .search-box { width: 165px; }
  .hide-sm { display: none; }
  .app-main { padding: 14px 14px 48px; }
  .hero-slider { height: 390px; }
  .hero-content { padding: 22px; }
  .hero-title { font-size: 24px; }
  .hero-nav-btn { display: none; }
  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .detail-poster-col {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-poster { height: 300px; }
  .detail-title { font-size: 23px; }
  .movie-card { flex: 0 0 142px; width: 142px; }
  .movies-grid .movie-card { flex: 0 0 calc(33.333% - 12px); width: calc(33.333% - 12px); max-width: 175px; }
  @supports (display: grid) {
    .movies-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 175px)); }
    .movies-grid .movie-card { flex: none; width: 100%; max-width: 175px; }
  }
  .carousel-arrow { display: none; }
  .player-overlay { padding: 0; }
  .player-shell { height: 100vh; max-height: 100vh; border-radius: 0; border: none; }
  .player-episodes-drawer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    width: 84vw;
    max-width: 300px;
  }
}

/* ==========================================================================
   Compliance & Legal Notice Banner (Top of Page)
   ========================================================================== */
.legal-notice-banner {
  background: linear-gradient(90deg, rgba(255, 59, 92, 0.12) 0%, rgba(18, 24, 36, 0.96) 50%, rgba(255, 59, 92, 0.12) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 18px;
  position: relative;
  z-index: 102;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.legal-notice-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.legal-notice-content {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
}

.legal-notice-icon {
  color: #10B981;
  flex-shrink: 0;
}

.legal-notice-close {
  color: #778B9E;
  font-size: 13px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.18s;
  cursor: pointer;
}

.legal-notice-close:hover {
  color: #FFFFFF;
  background: rgba(255, 59, 92, 0.2);
  border-color: rgba(255, 59, 92, 0.35);
}

/* ==========================================================================
   Header Guest Controls
   ========================================================================== */
.guest-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.accent-pill {
  background: rgba(255, 59, 92, 0.14) !important;
  border: 1px solid rgba(255, 59, 92, 0.35) !important;
  color: #FF8DA1 !important;
}

.accent-pill:hover {
  background: #FF3B5C !important;
  color: #FFFFFF !important;
}

.login-btn {
  background: linear-gradient(135deg, #FF3B5C 0%, #D91E40 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(255, 59, 92, 0.38);
}

.login-btn:hover {
  background: linear-gradient(135deg, #FF5270 0%, #FF3B5C 100%) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Comprehensive Site Footer
   ========================================================================== */
.site-footer {
  margin-top: 70px;
  background: #0D1320;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 56px 24px 30px;
  color: #9DB1C3;
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 1480px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 1.3fr 1.2fr;
  gap: 36px;
  margin-bottom: 44px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF3B5C 0%, #D91E40 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(255, 59, 92, 0.38);
}

.footer-brand-title {
  font-size: 20px;
  font-weight: 900;
  color: #FFFFFF;
}

.footer-desc {
  font-size: 13.5px;
  line-height: 1.8;
  color: #8C9FAF;
}

.footer-badges-strip {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 4px;
}

.footer-mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #10B981;
}

.footer-heading {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  position: relative;
  padding-bottom: 10px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 3px;
  background: #FF3B5C;
  border-radius: 3px;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-size: 13.5px;
  color: #8C9FAF;
  transition: color 0.18s, transform 0.18s;
  display: inline-block;
}

.footer-nav a:hover {
  color: #FFFFFF;
  transform: translateX(-4px);
}

.footer-subtext {
  font-size: 13px;
  line-height: 1.7;
  color: #8C9FAF;
}

.footer-download-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(255, 59, 92, 0.15) 0%, rgba(255, 59, 92, 0.05) 100%);
  border: 1px solid rgba(255, 59, 92, 0.35);
  border-radius: 14px;
  padding: 13px 18px;
  color: #FFFFFF;
  transition: all 0.22s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.footer-download-btn:hover {
  background: linear-gradient(135deg, #FF3B5C 0%, #D91E40 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 59, 92, 0.45);
}

.footer-download-btn svg {
  color: #FF3B5C;
  flex-shrink: 0;
  transition: color 0.2s;
}

.footer-download-btn:hover svg {
  color: #FFFFFF;
}

.footer-download-btn .btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.footer-download-btn .btn-text small {
  font-size: 11px;
  color: #9DB1C3;
  transition: color 0.2s;
}

.footer-download-btn:hover .btn-text small {
  color: rgba(255, 255, 255, 0.9);
}

.footer-download-btn .btn-text strong {
  font-size: 14px;
  font-weight: 800;
}

.footer-social-row {
  margin-top: 4px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.2s;
  text-decoration: none;
}

.footer-social-link:hover {
  background: rgba(56, 189, 248, 0.22);
  color: #FFFFFF;
}

.trust-badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trust-badge-card {
  background: #121824;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.trust-badge-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.badge-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38BDF8;
}

.enamad-seal-wrap {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.enamad-seal-wrap:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
}

.enamad-seal-wrap a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.enamad-seal-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.badge-title {
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.4;
}

.badge-sub {
  font-size: 10.5px;
  color: #6B7C8F;
  line-height: 1.3;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: #778B9E;
}

.footer-legal-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9DB1C3;
  font-weight: 600;
}

.footer-rights {
  font-weight: 600;
}

/* ==========================================================================
   In-Page Login Modal
   ========================================================================== */
.login-modal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  background: rgba(11, 15, 25, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #121824;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 32px 26px 26px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: modalScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9DB1C3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.login-modal-close:hover {
  background: rgba(255, 59, 92, 0.15);
  color: #FF3B5C;
  border-color: rgba(255, 59, 92, 0.3);
}

.login-modal-header {
  text-align: center;
  margin-bottom: 22px;
}

.login-modal-badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FF3B5C 0%, #D91E40 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 8px 22px rgba(255, 59, 92, 0.4);
}

.login-modal-title {
  font-size: 20px;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.login-modal-desc {
  font-size: 13px;
  color: #9DB1C3;
  line-height: 1.6;
}

.login-modal-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 16px;
}

.modal-field {
  margin-bottom: 16px;
}

.modal-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #CBD5E1;
  margin-bottom: 6px;
}

.modal-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.modal-input-icon {
  position: absolute;
  right: 14px;
  color: #778B9E;
  display: flex;
  pointer-events: none;
}

.modal-input-box input {
  width: 100%;
  height: 46px;
  background: #0B0F19;
  border: 1px solid #232F42;
  border-radius: 12px;
  padding: 0 42px 0 42px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-input-box input:focus {
  border-color: #FF3B5C;
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.18);
}

.modal-toggle-pass {
  position: absolute;
  left: 10px;
  background: none;
  border: none;
  color: #778B9E;
  cursor: pointer;
  display: flex;
  padding: 4px;
  transition: color 0.15s;
}

.modal-toggle-pass:hover {
  color: #FFFFFF;
}

.modal-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 12.5px;
  color: #9DB1C3;
}

.modal-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.modal-remember-label input {
  accent-color: #FF3B5C;
  cursor: pointer;
}

.modal-download-link {
  color: #38BDF8;
  font-weight: 600;
  text-decoration: none;
}

.modal-download-link:hover {
  text-decoration: underline;
}

.modal-submit-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF3B5C 0%, #E02847 100%);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(255, 59, 92, 0.45);
  transition: transform 0.18s, box-shadow 0.18s;
}

.modal-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(255, 59, 92, 0.6);
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 580px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
