/* ==========================================================================
   Reezn Web - Production UI/UX Stylesheet
   Engineered Dark Mode (#121212 base, 3-surface hierarchy, 1px hairline borders,
   3-layer shadows, concentric radiuses, RTL/LTR adaptive, @media(hover:hover))
   ========================================================================== */

:root {
  /* Surface Hierarchy (Never pure #000000) */
  --bg-base: #121212;
  --bg-surface: #18191e;
  --bg-raised: #21232b;
  --bg-glass: rgba(24, 25, 30, 0.84);

  /* Hairline Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(224, 79, 95, 0.65);

  /* Typography Tiers */
  --text-high: #f3f4f6;
  --text-medium: rgba(243, 244, 246, 0.68);
  --text-muted: rgba(243, 244, 246, 0.44);

  /* Desaturated Brand Accent */
  --accent: #e04f5f;
  --accent-hover: #eb6372;
  --accent-soft: rgba(224, 79, 95, 0.14);
  --gold: #eab308;
  --emerald: #22c55e;

  /* Concentric Border Radius Scale */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* 3-Layer Depth Shadows */
  --shadow-card:
    0 1px 3px rgba(0, 0, 0, 0.35),
    0 12px 24px -6px rgba(0, 0, 0, 0.45),
    0 32px 48px -12px rgba(0, 0, 0, 0.35);
  --shadow-elevated:
    0 2px 4px rgba(0, 0, 0, 0.45),
    0 16px 32px -4px rgba(0, 0, 0, 0.6),
    0 36px 64px -8px rgba(224, 79, 95, 0.12);

  /* Motion Constants */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --dur-micro: 95ms;
  --dur-enter: 240ms;
  --dur-exit: 150ms;

  /* Layout */
  --sidebar-width: 240px;
  --header-height: 64px;
}

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

html {
  background-color: var(--bg-base);
  color: var(--text-high);
  font-family: "IBM Plex Sans Arabic", "Inter", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  min-height: 100vh;
  overflow-x: hidden;
  isolation: isolate;
}

/* Modal scroll lock via :has() */
body:has(.modal-backdrop.open) {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button {
  cursor: pointer;
  user-select: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Tabular numbers for ratings, years, counts */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   App Layout Shell (Sidebar + Main Viewport)
   ========================================================================== */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

/* Persistent Desktop / TV Sidebar (FragmentHomeTV style) */
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background-color: var(--bg-surface);
  border-inline-end: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 21px 13px;
  z-index: 20;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, padding 0.25s ease;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 21px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text-high);
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e04f5f 0%, #c83748 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(224, 79, 95, 0.35);
}

.version-pill {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-medium);
  font-size: 0.93rem;
  font-weight: 500;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
  text-align: start;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 2px;
}

.nav-btn.active {
  background-color: var(--accent-soft);
  color: var(--text-high);
  font-weight: 600;
  border: 1px solid rgba(224, 79, 95, 0.3);
}

.nav-btn.active svg {
  color: var(--accent);
}

@media (hover: hover) {
  .nav-btn:hover:not(.active) {
    background-color: var(--bg-raised);
    color: var(--text-high);
  }
}

.sidebar-footer {
  padding-top: 13px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-medium);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--gold);
  flex-shrink: 0;
}

.status-dot.online {
  background-color: var(--emerald);
}

/* ==========================================================================
   Main Viewport & Top Sticky Toolbar (FragmentHome style)
   ========================================================================== */

.main-viewport {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: 84px;
}

.top-toolbar {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  z-index: 15;
}

.toolbar-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-tab {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-medium);
  transition: all var(--dur-micro) var(--ease-out);
}

.top-tab.active {
  background: var(--bg-raised);
  color: var(--text-high);
  border: 1px solid var(--border-subtle);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-medium);
  font-size: 0.86rem;
  min-width: 220px;
  justify-content: space-between;
  transition: border-color var(--dur-micro) var(--ease-out);
}

@media (hover: hover) {
  .search-trigger-btn:hover {
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--text-high);
  }
}

.kbd-shortcut {
  font-size: 0.72rem;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--text-medium);
  transition: all var(--dur-micro) var(--ease-out);
}

@media (hover: hover) {
  .icon-btn:hover {
    background: var(--bg-raised);
    color: var(--text-high);
  }
}

/* ==========================================================================
   Hero Slider (SliderAdapter - Movies, TV & Sports Prepend)
   ========================================================================== */

.hero-slider-section {
  position: relative;
  margin: 21px 24px 13px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  min-height: 390px;
  box-shadow: var(--shadow-card);
}

.hero-slide {
  position: relative;
  width: 100%;
  height: 390px;
  display: flex;
  align-items: flex-end;
  padding: 34px;
  background-size: cover;
  background-position: center 22%;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(18, 18, 18, 0.98) 0%,
    rgba(18, 18, 18, 0.68) 45%,
    rgba(18, 18, 18, 0.2) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-high);
}

.badge-accent {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.badge-rating {
  color: var(--gold);
}

.hero-title {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-high);
}

.hero-overview {
  font-size: 0.93rem;
  color: var(--text-medium);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 21px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 44px;
  transition: transform var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}

@media (hover: hover) {
  .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
  }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(33, 35, 43, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-high);
  font-weight: 500;
  font-size: 0.9rem;
  min-height: 44px;
  transition: background-color var(--dur-micro) var(--ease-out);
}

@media (hover: hover) {
  .btn-secondary:hover {
    background: var(--bg-raised);
  }
}

.slider-dots {
  position: absolute;
  bottom: 18px;
  inset-inline-end: 28px;
  z-index: 3;
  display: flex;
  gap: 6px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  transition: all var(--dur-enter) var(--ease-out);
}

.slider-dot.active {
  width: 24px;
  background: var(--accent);
}

/* ==========================================================================
   Filter Pills: Movie Genres (GenreAdapter) & TV Networks (NetworkAdapter)
   ========================================================================== */

.filter-strip-section {
  padding: 8px 24px 4px;
}

.filter-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-raised) transparent;
}

.genre-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-medium);
  font-size: 0.86rem;
  font-weight: 500;
  transition: all var(--dur-micro) var(--ease-out);
}

@media (hover: hover) {
  .genre-pill:hover {
    background: var(--bg-raised);
    color: var(--text-high);
    border-color: rgba(255, 255, 255, 0.2);
  }
}

.network-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  min-height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all var(--dur-micro) var(--ease-out);
}

.network-card img {
  height: 22px;
  max-width: 72px;
  object-fit: contain;
  filter: brightness(1.1);
}

.network-card span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-high);
}

@media (hover: hover) {
  .network-card:hover {
    background: var(--bg-raised);
    transform: translateY(-2px);
    border-color: rgba(224, 79, 95, 0.4);
  }
}

/* ==========================================================================
   Content Rows (HomeFragment$ContentRow / HomeRecyclerAdapter)
   ========================================================================== */

.content-rows-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 13px 24px 34px;
}

.content-row {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.row-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-high);
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent);
}

.row-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-medium);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
}

@media (hover: hover) {
  .row-more-btn:hover {
    color: var(--accent);
    background: var(--bg-surface);
  }
}

.poster-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 168px;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-raised) transparent;
}

/* Media Poster Card (Follows Card Hover Animation Rule: scale inner media, lift card) */
.poster-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: transform var(--dur-enter) var(--ease-out);
}

.poster-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-enter) var(--ease-out);
}

@media (hover: hover) {
  .poster-card:hover {
    transform: translateY(-6px);
  }
  .poster-card:hover .poster-frame img {
    transform: scale(1.05);
  }
  .poster-card:hover .poster-frame {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow-elevated);
  }
}

.poster-rating {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
}

.poster-type-badge {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  background: rgba(18, 18, 18, 0.82);
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-medium);
  text-transform: uppercase;
}

.poster-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-high);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Responsive Grid View (AllContentActivity, SearchResultsFragment, MyList)
   ========================================================================== */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 18px;
  padding: 16px 24px 34px;
}

/* ==========================================================================
   VOD Details & Seasons Modal (VodInfoActivity + EpisodeAdapter)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(10px);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 21px;
  opacity: 0;
  transition: opacity var(--dur-exit) var(--ease-in);
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
  transition: opacity var(--dur-enter) var(--ease-out);
}

.modal-panel {
  width: min(1040px, 100%);
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-elevated);
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
    scrollbar-width: thin;
  scrollbar-color: var(--bg-raised) transparent;
}

.modal-close-btn {
  position: sticky;
  top: 16px;
  inset-inline-end: 16px;
  align-self: flex-end;
  margin: 16px 16px -56px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(18, 18, 18, 0.82);
  border: 1px solid var(--border-subtle);
  color: var(--text-high);
  display: grid;
  place-items: center;
  z-index: 10;
}

.vod-hero {
  position: relative;
  min-height: 340px;
  padding: 34px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  background-size: cover;
  background-position: center 20%;
}

.vod-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg-surface) 2%,
    rgba(24, 25, 30, 0.72) 55%,
    rgba(24, 25, 30, 0.3) 100%
  );
}

.vod-poster-thumb {
  position: relative;
  z-index: 2;
  width: 148px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.vod-hero-info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.vod-body {
  padding: 21px 34px 34px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Seasons & Episodes (SeasonsAdapter + EpisodeAdapter) */
.seasons-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.season-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.season-pill {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-medium);
  white-space: nowrap;
}

.season-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.episode-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  align-items: center;
}

.episode-still-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-base);
}

.episode-still-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter var(--dur-enter) var(--ease-out);
}

/* EpisodeBlurTransformation from EpisodeAdapter */
.episode-still-wrap.blurred img {
  filter: blur(18px) brightness(0.75);
  transform: scale(1.08);
}

.spoiler-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(18, 18, 18, 0.35);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-high);
  text-align: center;
  padding: 4px;
}

/* Cast Strip (ActorsAdapter) */
.cast-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 120px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
    scrollbar-width: thin;
  scrollbar-color: var(--bg-raised) transparent;
}

.cast-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform var(--dur-micro) var(--ease-out);
}

@media (hover: hover) {
  .cast-card:hover {
    transform: translateY(-4px);
    border-color: rgba(224, 79, 95, 0.45);
  }
}

.cast-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Search View & Filter Controls (SearchActivity + SearchFilters)
   ========================================================================== */

.search-header-box {
  margin: 21px 24px 13px;
  padding: 21px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  min-height: 46px;
}

.search-input-wrapper:focus-within {
  border-color: var(--accent);
}

.search-input-wrapper input {
  width: 100%;
  height: 44px;
  outline: none;
}

.search-filters-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-medium);
}

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

.filter-field select,
.filter-field input[type="number"] {
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 5px 10px;
  color: var(--text-high);
}

/* ==========================================================================
   Live TV Country & Channel Cards (LiveTvAdapter + countries.json)
   ========================================================================== */

.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 12px;
  padding: 13px 24px 34px;
}

.country-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--dur-micro) var(--ease-out);
}

.country-card img {
  width: 36px;
  height: 24px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

@media (hover: hover) {
  .country-card:hover {
    background: var(--bg-raised);
    transform: translateY(-2px);
    border-color: rgba(224, 79, 95, 0.35);
  }
}

/* ==========================================================================
   Skeleton Shimmer Loading (ShimmerFrameLayout equivalent)
   ========================================================================== */

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

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-surface) 25%,
    var(--bg-raised) 50%,
    var(--bg-surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmerPulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Toast Notifications (Bottom-right desktop / Top mobile)
   ========================================================================== */

.toast-stack {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.toast-item {
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-inline-start: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-elevated);
  font-size: 0.88rem;
  color: var(--text-high);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ==========================================================================
   Mobile Bottom Navigation (Mobile Thumb Zone Rule)
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  height: 64px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  z-index: 30;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 56px;
  min-height: 48px;
  font-size: 0.72rem;
  color: var(--text-medium);
}

.mobile-nav-btn.active {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .app-sidebar {
    display: none;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .episode-card {
    grid-template-columns: 1fr;
  }
  .vod-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   MovieBox Custom Cinema Player & Subtitle Engine Styles
   ========================================================================== */

.player-modal-backdrop {
  z-index: 100;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
}

.player-modal-panel {
  max-width: 1100px;
  width: 95vw;
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
}

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

.player-title-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-header-poster {
  width: 40px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.player-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.player-modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-medium, #8b949e);
  margin: 3px 0 0 0;
}

.player-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.player-badge-direct {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
}

.player-btn-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e6edf3;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-btn-badge:hover {
  background: rgba(255, 255, 255, 0.16);
}

.custom-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(88vh - 160px);
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.custom-player-wrapper.hide-cursor {
  cursor: none;
}

.custom-player-wrapper.hide-controls .custom-controls-bar {
  opacity: 0;
  pointer-events: none;
}

.player-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
  cursor: pointer;
}

.player-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* Custom Arabic Subtitle Overlay */
.custom-subtitle-overlay {
  position: absolute;
  inset-inline: 16px;
  bottom: 74px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 15;
  transition: all 0.15s ease;
}

.custom-subtitle-box {
  padding: 6px 18px;
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  line-height: 1.6;
  max-width: 85%;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.1s ease;
}

.custom-subtitle-box.hidden {
  display: none !important;
}

/* Subtitle Settings Panel */
.subtitle-settings-panel {
  position: absolute;
  bottom: 74px;
  inset-inline-start: 16px;
  z-index: 35;
  width: 320px;
  max-width: 90vw;
  background: rgba(22, 27, 34, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  font-size: 0.82rem;
  color: #e6edf3;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.subtitle-settings-panel.hidden {
  display: none !important;
}

.sub-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.sub-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #fff;
  font-size: 0.88rem;
}

.sub-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-pill-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c9d1d9;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.sub-icon-btn {
  background: transparent;
  border: none;
  color: #8b949e;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
}

.sub-setting-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sub-row-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #8b949e;
  font-weight: 600;
}

.sub-val-mono {
  font-family: monospace;
  font-weight: 700;
  color: #34d399;
}

.sub-color-input {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.sub-colors-palette {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.color-dot:hover {
  transform: scale(1.15);
  border-color: #fff;
}

.sub-range-slider {
  width: 100%;
  accent-color: var(--accent, #e50914);
  height: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.sub-delay-section {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sub-delay-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.sub-delay-hint {
  display: block;
  font-size: 0.68rem;
  color: #8b949e;
}

.sub-delay-badge {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 6px;
}

.sub-delay-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.sub-delay-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e6edf3;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.74rem;
  padding: 5px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sub-delay-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sub-delay-reset-btn {
  background: rgba(229, 9, 20, 0.2);
  border-color: rgba(229, 9, 20, 0.5);
  color: #fff;
}

/* Center Play/Pause Feedback Icon */
.player-center-feedback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 10;
}

.player-center-feedback-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.6rem;
}

/* Loading Overlay */
.player-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  z-index: 20;
  gap: 12px;
}

.player-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--accent, #e50914);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.player-loading-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e6edf3;
  margin: 0;
}

.player-quality-info {
  font-size: 0.78rem;
  color: #34d399;
  margin: 0;
}

/* Error Overlay */
.player-error-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  z-index: 20;
  padding: 24px;
}

.player-error-overlay.hidden {
  display: none !important;
}

.player-error-card {
  max-width: 400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.player-error-icon {
  font-size: 2.4rem;
}

.player-error-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.player-error-desc {
  font-size: 0.82rem;
  color: #8b949e;
  line-height: 1.5;
  margin: 0;
}

.player-retry-btn {
  margin-top: 8px;
  background: var(--accent, #e50914);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease;
}

.player-retry-btn:hover {
  transform: scale(1.03);
}

/* Controls Bar */
.custom-controls-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 30px 16px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
  transition: opacity 0.25s ease;
}

.progress-container {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  cursor: pointer;
  transition: height 0.15s ease;
}

.progress-container:hover {
  height: 9px;
}

.progress-buffered {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  width: 0%;
  pointer-events: none;
}

.progress-played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--accent, #e50914), #ff5a5a);
  border-radius: 999px;
  width: 0%;
  pointer-events: none;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%) scale(0);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(229, 9, 20, 0.8);
  transition: transform 0.15s ease;
}

.progress-container:hover .progress-thumb {
  transform: translateY(-50%) scale(1);
}

.player-hover-tooltip {
  position: absolute;
  top: -28px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: monospace;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  pointer-events: none;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
}

.controls-left,
.controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: #e6edf3;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

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

.ctrl-sub-active {
  background: rgba(229, 9, 20, 0.25);
  color: #ff6b6b;
  border: 1px solid rgba(229, 9, 20, 0.4);
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vol-slider {
  width: 75px;
  accent-color: var(--accent, #e50914);
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.vol-percent-text {
  font-family: monospace;
  font-size: 0.72rem;
  color: #34d399;
  font-weight: 700;
  min-width: 34px;
}

.time-display {
  font-family: monospace;
  font-size: 0.78rem;
  color: #c9d1d9;
  user-select: none;
  padding-inline-start: 4px;
}

.time-divider {
  color: #8b949e;
  margin: 0 2px;
}

.res-badge {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
}

.ctrl-select {
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e6edf3;
  font-weight: 600;
  font-size: 0.74rem;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
}

.ctrl-select:focus {
  border-color: var(--accent, #e50914);
}

/* Bottom Tray (Sources & Episodes) */
.player-bottom-tray {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
}

.tray-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tray-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8b949e;
}

.source-buttons-list,
.episode-buttons-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-height: 80px;
  overflow-y: auto;
}

.source-btn,
.ep-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c9d1d9;
  cursor: pointer;
  transition: all 0.15s ease;
}

.source-btn:hover,
.ep-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
}

.source-btn.active,
.ep-btn.active {
  background: var(--accent, #e50914);
  border-color: var(--accent, #e50914);
  color: #fff;
}

.ep-tray-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}

.season-select-wrap,
.episodes-list-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.season-select-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  outline: none;
}

/* ==========================================================================
   Mobile & Touch Responsive Design Rules (Phones & Tablets)
   ========================================================================== */

@media (max-width: 768px) {
  /* Header & Navigation */
  .top-toolbar {
    padding: 0 12px;
    height: 56px;
    gap: 8px;
  }
  .toolbar-tabs {
    display: none; /* Bottom nav handles section switching on mobile */
  }
  .toolbar-actions {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .search-trigger-btn {
    min-width: 0;
    flex: 1;
    padding: 7px 12px;
    font-size: 0.8rem;
  }
  .search-trigger-btn .kbd-shortcut {
    display: none;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  /* Main Viewport & Hero Slider */
  .hero-slider-section {
    margin: 10px 12px 8px;
    min-height: 270px;
    border-radius: var(--radius-lg);
  }
  .hero-slide {
    height: 270px;
    padding: 18px 14px;
  }
  .hero-title {
    font-size: 1.35rem;
    line-height: 1.2;
  }
  .hero-overview {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    max-width: 100%;
  }
  .hero-actions {
    gap: 8px;
  }
  .btn-primary, .btn-secondary {
    padding: 8px 14px;
    min-height: 38px;
    font-size: 0.82rem;
  }

  /* Content Sections & Grids */
  .filter-strip-section {
    padding: 6px 12px 2px;
  }
  .content-rows-container {
    padding: 10px 12px 28px;
    gap: 20px;
  }
  .row-header h2 {
    font-size: 1.05rem;
  }
  .countries-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    padding: 10px 12px 28px;
    gap: 8px;
  }
  .country-card {
    padding: 8px 10px;
    gap: 8px;
    font-size: 0.8rem;
  }
  .country-card img {
    width: 28px;
    height: 18px;
  }

  /* Details Modal (Movie & Series Details) */
  .modal-panel {
    width: 100%;
    max-width: 100%;
    max-height: 94vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
  .vod-hero {
    min-height: auto;
    padding: 18px 14px;
    gap: 14px;
  }
  .vod-poster-thumb {
    width: 85px;
    border-radius: var(--radius-sm);
  }
  .vod-body {
    padding: 14px 14px 28px;
    gap: 18px;
  }
  .modal-close-btn {
    top: 10px;
    inset-inline-end: 10px;
    margin: 10px 10px -40px;
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  /* MovieBox Cinema Player on Mobile Screen */
  .player-modal-backdrop {
    padding: 0;
  }
  .player-modal-panel {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    padding: 8px 8px 12px;
    justify-content: flex-start;
    box-sizing: border-box;
    overflow-y: auto;
  }
  .player-modal-header {
    padding-bottom: 6px;
    gap: 6px;
  }
  .player-header-poster {
    width: 32px;
    height: 44px;
    border-radius: 6px;
  }
  .player-modal-title {
    font-size: 0.86rem;
    max-width: 160px;
  }
  .player-modal-subtitle {
    font-size: 0.7rem;
  }
  .player-header-actions {
    gap: 4px;
  }
  .player-badge-direct,
  .player-btn-badge {
    font-size: 0.68rem;
    padding: 3px 6px;
    border-radius: 6px;
  }
  .custom-player-wrapper {
    width: 100%;
    max-height: 44vh;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    margin-top: 4px;
  }
  .custom-player-wrapper:fullscreen,
  :fullscreen .custom-player-wrapper {
    max-height: 100vh;
    height: 100vh;
    width: 100vw;
    border-radius: 0;
  }
  .custom-controls-bar {
    padding: 16px 8px 6px 8px;
    gap: 4px;
  }
  .controls-row {
    gap: 4px;
  }
  .controls-left,
  .controls-right {
    gap: 4px;
  }
  .ctrl-btn {
    padding: 4px 5px;
    font-size: 0.78rem;
  }
  .ctrl-btn svg {
    width: 18px;
    height: 18px;
  }
  /* On touch screens, volume is controlled via hardware buttons; hide slider to make room */
  .vol-slider,
  .vol-percent-text,
  .res-badge {
    display: none !important;
  }
  .time-display {
    font-size: 0.68rem;
    padding: 0;
    white-space: nowrap;
  }
  .ctrl-select {
    padding: 2px 4px;
    font-size: 0.7rem;
  }
  .custom-subtitle-overlay {
    bottom: 52px;
    inset-inline: 8px;
  }
  .custom-subtitle-box {
    font-size: 0.95rem !important;
    padding: 4px 10px;
    max-width: 95%;
    line-height: 1.4;
  }
  .subtitle-settings-panel {
    inset-inline: 8px;
    width: calc(100% - 16px);
    max-width: 360px;
    bottom: 52px;
    padding: 10px;
    gap: 8px;
  }
  .sub-delay-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
  }
  .sub-delay-btn {
    font-size: 0.68rem;
    padding: 4px 0;
  }
  .player-bottom-tray {
    padding-top: 6px;
    gap: 6px;
    overflow-y: auto;
    flex: 1;
  }
  .source-btn,
  .ep-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .player-modal-title {
    max-width: 120px;
  }
  .search-trigger-btn span {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hero-slider-section {
    min-height: 230px;
  }
  .hero-slide {
    height: 230px;
  }
  .hero-title {
    font-size: 1.15rem;
  }
  .countries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

