/* =====================================================================
   ZAPFLIX — POLISH LAYER (cards, shelves, motion, focus)
   Same palette and glass language as zapflix-liquid.css; this file only
   refines motion curves, sharpness, hover feedback and row navigation.
   Card footprint never changes on hover (shelves clip overflow).
   ===================================================================== */

:root {
  --zfp-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --zfp-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

::selection { background: rgba(229, 9, 20, 0.55); color: #fff; }

/* ---------- section headings ----------
   One look everywhere (same as the title page): red accent bar, bold title,
   quiet one-line subtitle. The bar runs down the title and its subtitle. */
.content-section .section-title {
  font-size: clamp(18px, 1.35vw, 24px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #f5f5f7;
}
.content-section > .section-title,
.zf-studio-title .section-title,
.zf-heading-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 10px;
  font-size: clamp(19px, 1.45vw, 26px) !important;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #f5f5f7;
  border-inline-start: 3px solid var(--zfx-red, #e50914);
  padding-inline-start: 12px;
  margin-bottom: 16px !important;
}
.content-section > .section-title.has-sub,
.zf-studio-title .section-title.has-sub,
.zf-heading-bar.has-sub {
  margin-bottom: 0 !important;
  padding-bottom: 3px;
}
.zf-section-sub {
  margin: 0 0 16px;
  padding: 1px 0 2px;
  padding-inline-start: 12px;
  border-inline-start: 3px solid var(--zfx-red, #e50914);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.58);
}
.zf-studio-title .zf-section-sub { margin-bottom: 0; }
.zf-studio-title .zf-top10-chip { margin: 0; font-size: 10.5px; }
html[dir="rtl"] .content-section > .section-title,
html[dir="rtl"] .zf-section-sub { text-align: right; }
@media (max-width: 900px) {
  .content-section > .section-title,
  .zf-studio-title .section-title,
  .zf-heading-bar { font-size: 18px !important; padding-inline-start: 10px; }
  .zf-section-sub { font-size: 12.5px; margin-bottom: 12px; padding-inline-start: 10px; }
  .zf-studio-head { flex-wrap: wrap; }
}

/* ---------- poster cards ---------- */
.movie-card {
  transition: box-shadow 0.45s var(--zfp-ease), border-color 0.45s var(--zfp-ease), transform 0.45s var(--zfp-ease);
}
.movie-card .card-img {
  transition: transform 0.7s var(--zfp-ease-out), filter 0.45s var(--zfp-ease), opacity 0.35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .movie-card:hover {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  }
  /* Inner highlight ring above the artwork — created only for the hovered card. */
  .movie-card:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 3;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85), inset 0 0 28px rgba(229, 9, 20, 0.18);
    animation: zfpRingIn 0.35s var(--zfp-ease) both;
  }
  @keyframes zfpRingIn { from { opacity: 0; } to { opacity: 1; } }
  .movie-card:hover .card-img {
    transform: scale(1.07);
    filter: saturate(1.08) contrast(1.03);
  }
  /* Information rises into place instead of just fading. */
  .movie-card .card-overlay > * {
    transform: translate3d(0, 10px, 0);
    opacity: 0;
    transition: transform 0.45s var(--zfp-ease-out), opacity 0.35s var(--zfp-ease);
  }
  .movie-card:hover .card-overlay > * { transform: none; opacity: 1; }
  .movie-card:hover .card-overlay > :nth-child(2) { transition-delay: 0.04s; }
  .movie-card:hover .card-overlay > :nth-child(3) { transition-delay: 0.08s; }
  .movie-card .card-overlay { transition: opacity 0.35s var(--zfp-ease); }
}

.movie-card:focus-visible,
.movie-card a:focus-visible,
.card-btn:focus-visible,
.zf-row-arrow:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.card-overlay .card-btn {
  transition: transform 0.25s var(--zfp-ease), background 0.25s var(--zfp-ease), border-color 0.25s var(--zfp-ease), box-shadow 0.25s var(--zfp-ease);
}
.card-overlay .card-btn:active { transform: scale(0.9); }

/* Pressed feedback on touch devices (no hover there). */
@media (hover: none) {
  .movie-card { transition: transform 0.2s var(--zfp-ease); }
  .movie-card:active { transform: scale(0.97); }
}

/* ---------- shelves: snap + arrow navigation ---------- */
.zf-row-wrap { position: relative; }
@media (hover: hover) and (pointer: fine) {
  .content-section .movie-row {
    scroll-snap-type: x proximity;
    scroll-padding-inline: 2px;
  }
  .content-section .movie-row > .movie-card { scroll-snap-align: start; }
}

.zf-row-arrow {
  position: absolute;
  z-index: 8;
  top: calc(50% - 10px);
  width: 46px;
  height: 46px;
  margin-top: -23px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(12, 12, 14, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 30px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.85);
  transition: opacity 0.28s var(--zfp-ease), transform 0.28s var(--zfp-ease), background 0.2s, visibility 0s linear 0.28s;
}
.zf-row-arrow--prev { inset-inline-start: -14px; }
.zf-row-arrow--next { inset-inline-end: -14px; }
html[dir="rtl"] .zf-row-arrow svg { transform: scaleX(-1); }
/* Arrows follow the row's real direction (set by JS as data-zf-dir): desktop Arabic rows
   scroll left-to-right, so "next" must sit on the right and point right. */
[data-zf-dir="ltr"] .zf-row-arrow--prev { left: -14px; right: auto; }
[data-zf-dir="ltr"] .zf-row-arrow--next { right: -14px; left: auto; }
[data-zf-dir="rtl"] .zf-row-arrow--prev { right: -14px; left: auto; }
[data-zf-dir="rtl"] .zf-row-arrow--next { left: -14px; right: auto; }
html[dir] [data-zf-dir="ltr"] .zf-row-arrow svg { transform: none; }
html[dir] [data-zf-dir="rtl"] .zf-row-arrow svg { transform: scaleX(-1); }
.zf-row-wrap:hover .zf-row-arrow:not([data-hidden]),
.zf-row-arrow:focus-visible:not([data-hidden]) {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition-delay: 0s;
}
.zf-row-arrow:hover { background: rgba(229, 9, 20, 0.9); box-shadow: 0 10px 30px rgba(229, 9, 20, 0.4); }
.zf-row-arrow:active { transform: scale(0.92) !important; }
@media (hover: none), (max-width: 900px) { .zf-row-arrow { display: none; } }

/* ---------- navbar: smoother state change ---------- */
.navbar {
  transition: background-color 0.45s var(--zfp-ease), border-color 0.45s var(--zfp-ease), box-shadow 0.45s var(--zfp-ease);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .movie-card .card-img,
  .movie-card .card-overlay > *,
  .zf-row-arrow { transition: none !important; }
  .movie-card:hover .card-img { transform: none; }
}

/* Page-level titles that share the shelf heading bar (My List, rewards). */
h1.zf-heading-bar { font-size: clamp(26px, 2.6vw, 36px) !important; padding-inline-start: 14px; }
h1.zf-heading-bar + .zf-section-sub { padding-inline-start: 14px; font-size: 15px; }

/* Footer links to the catalogue hubs (index.php) */
.zf-seo-footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 28px; max-width: 1200px; margin: 0 auto 26px; padding: 0 4%; text-align: start; }
.zf-seo-footer h3 { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: #e8e8ee; }
.zf-seo-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.zf-seo-footer a { color: #9a9aa6; font-size: 13px; text-decoration: none; }
.zf-seo-footer a:hover, .zf-seo-footer a:focus-visible { color: #fff; text-decoration: underline; }
@media (max-width: 600px) { .zf-seo-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px; } }

/* =====================================================================
   Cards v2 (includes/movie_card.php): SVG buttons, star rating, type chip
   ===================================================================== */
.content-section[hidden] { display: none !important; }
.movie-card .card-overlay .card-title { font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.movie-card .card-overlay .card-title a { color: inherit; text-decoration: none; }
.movie-card .card-overlay .card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  margin: 5px 0 0;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
}
.movie-card .zf-card-rating { display: inline-flex; align-items: center; gap: 3px; color: #ffd166; font-variant-numeric: tabular-nums; }
.movie-card .zf-card-rating svg { flex: none; }
.movie-card .zf-card-type {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.movie-card .card-meta .match.zf-card-likes { color: #ff7a80; }
.movie-card .card-overlay .card-buttons { gap: 8px; margin-top: 9px; direction: ltr; }
html[dir="rtl"] .movie-card .card-overlay .card-buttons { direction: rtl; }
.movie-card .card-overlay .card-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 0;
  color: #fff;
  /* Solid tint, no backdrop blur: ~460 of these sit on a homepage, and a live blur on each
     made the phone spend over a second compositing layers while loading (CLAUDE.md 5.57). */
  background: rgba(18, 18, 24, 0.58);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}
.movie-card .card-overlay .card-btn svg { display: block; pointer-events: none; }
.movie-card .card-overlay .card-btn.play-btn { color: #0b0b0f; background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); }
/* The play path is centred on the triangle's visual centre: no extra offset (it looked tilted, and flipped in RTL). */
.movie-card .card-overlay .card-btn.play-btn svg { margin: 0 !important; }
.movie-card .card-overlay .card-btn.play-btn:hover { background: #ffffff; transform: scale(1.08); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(255, 255, 255, 0.18); }
.movie-card .card-overlay .card-btn.like-btn:hover { background: rgba(255, 255, 255, 0.24); box-shadow: inset 0 0 0 1.5px #fff; transform: scale(1.08); }
.movie-card .card-overlay .card-btn.like-btn.liked { color: #fff; background: #e50914; box-shadow: 0 6px 18px rgba(229, 9, 20, 0.5); }
.movie-card .card-overlay .card-btn.like-btn.liked svg path { fill: currentColor; }
.movie-card .card-overlay .card-btn.like-btn.animating { animation: zfpLikePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes zfpLikePop { 0% { transform: scale(0.8); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (max-width: 900px) {
  .movie-card .card-overlay .card-btn { width: 30px; height: 30px; }
  .movie-card .card-overlay .card-meta { font-size: 10.5px; }
}

/* ---------- "View all" link next to a shelf heading ---------- */
.content-section.has-more { position: relative; }
.zf-section-more {
  position: absolute;
  top: 2px;
  inset-inline-end: var(--zfp-gutter, 4%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: background 0.2s, color 0.2s;
}
html[dir="rtl"] .zf-section-more { padding: 6px 14px 6px 10px; }
html[dir="rtl"] .zf-section-more svg { transform: scaleX(-1); }
.zf-section-more:hover, .zf-section-more:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.14); }

/* ---------- Top 10 rows: big numeral beside the poster ---------- */
/* One fixed height per item and no vertical scrolling: the numeral never pushes the row taller than the poster. */
.content-section .movie-row.zf-rank-row { gap: 6px; overflow-y: hidden !important; padding-top: 4px; align-items: stretch; }
.zf-rank-row > .zf-rank-item {
  position: relative;
  flex: 0 0 clamp(240px, 21vw, 340px);
  display: flex;
  align-items: flex-end;
  min-width: 0;
  overflow: hidden;
  container-type: inline-size;
}
.zf-rank-item > .movie-card {
  flex: 0 0 60% !important;
  width: 60% !important;
  height: auto !important;
  aspect-ratio: 2 / 3;
  margin: 0 !important;
  transform: none !important;
  max-width: none !important;
  position: relative;
  z-index: 1;
}
.zf-rank-num {
  flex: 0 0 46%;
  min-width: 0;
  position: relative;
  z-index: 0;
  margin-inline-end: -6%;
  overflow: visible;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  font-family: 'Inter', 'Arial Black', system-ui, sans-serif;
  font-size: clamp(150px, 13.5vw, 250px);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.06em;
  text-align: end;
  white-space: nowrap;
  color: #0b0b0f;
  -webkit-text-stroke: 4px rgba(255, 255, 255, 0.8);
  paint-order: stroke fill;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
  user-select: none;
  pointer-events: none;
  transition: -webkit-text-stroke-color 0.3s, color 0.3s;
}
/* "10" sized from the item width (cqi) so it always fits its 46% slot and never pushes the poster past the clipped edge. */
.zf-rank-num.is-wide { font-size: clamp(110px, 10vw, 176px); font-size: 50cqi; letter-spacing: -0.14em; }
.zf-rank-item:hover .zf-rank-num { -webkit-text-stroke-color: #fff; color: #1a0306; }
.zf-rank-item:nth-child(-n+3) .zf-rank-num { -webkit-text-stroke-color: rgba(255, 92, 100, 0.95); }
@media (hover: hover) and (pointer: fine) {
  .content-section .movie-row > .zf-rank-item { scroll-snap-align: start; }
}
@media (max-width: 900px) {
  .zf-rank-row > .zf-rank-item { flex: 0 0 54%; }
  .zf-rank-item > .movie-card { flex-basis: 62% !important; width: 62% !important; }
  .zf-rank-num { flex-basis: 44%; font-size: 112px; -webkit-text-stroke-width: 2.5px; }
  .zf-rank-num.is-wide { font-size: 84px; font-size: 47cqi; }
}

/* ---------- Studio shelf: studio chips + movies/series switch ---------- */
.zf-studio-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.zf-chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; min-width: 0; }
.zf-chip-row::-webkit-scrollbar { display: none; }
.zf-chip, .zf-seg button {
  flex: none;
  padding: 7px 15px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.zf-chip:hover, .zf-seg button:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.zf-chip.is-on { color: #fff; background: #e50914; box-shadow: 0 6px 18px rgba(229, 9, 20, 0.35); }
.zf-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.zf-seg button { background: transparent; box-shadow: none; padding: 6px 14px; }
.zf-seg button.is-on { color: #0b0b0f; background: #fff; }
.zf-studio-hub .movie-row[aria-busy="true"] { opacity: 0.55; transition: opacity 0.2s; }
.zf-studio-hub .zf-studio-placeholder {
  aspect-ratio: 2 / 3;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 70%) 0 0 / 300% 100%;
  animation: zfpShimmer 1.4s linear infinite;
}
@keyframes zfpShimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) {
  .zf-studio-hub .zf-studio-placeholder, .movie-card .card-overlay .card-btn.like-btn.animating { animation: none; }
}

/* "+" My List button: always visible on poster cards (not only on hover). */
.movie-card .zf-wish-btn { opacity: 1; transform: none; width: 32px; height: 32px; background: rgba(10, 10, 14, 0.6); }
.movie-card .zf-wish-btn svg { width: 17px; height: 17px; }
.movie-card:hover .zf-wish-btn { background: rgba(10, 10, 14, 0.78); }
.movie-card .zf-wish-btn:hover { background: rgba(229, 9, 20, 0.9); }
.movie-card .zf-wish-btn.in-list { background: linear-gradient(180deg, #F5222E, #C00812); }

/* Round play buttons that held a text triangle now hold the shared SVG: keep it centred. */
.zf-play-circle { display: grid !important; place-items: center !important; font-size: 0 !important; line-height: 0 !important; padding: 0 !important; text-indent: 0 !important; }
.zf-play-circle svg { display: block; margin: 0 !important; }
.play-btn-circle.zf-play-circle { width: 52px; height: 52px; border-radius: 50%; color: #0b0b0f; background: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }

/* "+" My List inside the card's button row, next to like (same size and glass look). */
.movie-card .card-overlay .card-buttons .card-btn.zf-wish-inline {
  display: flex !important;
  position: static;
  inset: auto;
  opacity: 1;
  transform: none;
  width: 34px;
  height: 34px;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}
.movie-card .card-overlay .card-buttons .card-btn.zf-wish-inline svg { width: 18px; height: 18px; }
.movie-card .card-overlay .card-buttons .card-btn.zf-wish-inline:hover { background: rgba(255, 255, 255, 0.24); box-shadow: inset 0 0 0 1.5px #fff; transform: scale(1.08); }
.movie-card .card-overlay .card-buttons .card-btn.zf-wish-inline.in-list { background: #fff; color: #0b0b0f; box-shadow: none; }
@media (max-width: 900px) {
  .movie-card .card-overlay .card-buttons .card-btn.zf-wish-inline { width: 30px; height: 30px; }
}

/* =====================================================================
   Card buttons on phones/tablets: three equal round buttons that never
   squash. The row was a shrinking flex row (play/like became 21x30 ovals)
   and "+" was forced to 38px by zapflix-mobile-app.css. Sizes follow the
   card width (container query) so narrow Top 10 cards still fit.
   ===================================================================== */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .movie-card .card-overlay { container-type: inline-size; }
  .movie-card .card-overlay .card-buttons {
    --zf-cb: 32px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
  }
  .movie-card .card-overlay .card-buttons > .card-btn,
  .movie-card .card-overlay .card-buttons > .card-btn.zf-wish-inline {
    flex: 0 0 var(--zf-cb) !important;
    width: var(--zf-cb) !important;
    height: var(--zf-cb) !important;
    min-width: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 50%;
    display: grid !important;
    place-items: center;
  }
  .movie-card .card-overlay .card-buttons > .card-btn svg {
    width: calc(var(--zf-cb) * 0.5) !important;
    height: calc(var(--zf-cb) * 0.5) !important;
  }
  /* "+" matches like exactly (same glass, same ring). */
  .movie-card .card-overlay .card-buttons > .card-btn.zf-wish-inline:not(.in-list) {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
  }
  /* No hover on touch: a tap should not leave a button scaled up. */
  .movie-card .card-overlay .card-buttons > .card-btn:hover { transform: none; }
  .movie-card .card-overlay .card-buttons > .card-btn:active { transform: scale(0.9); }
}
@container (max-width: 124px) {
  .movie-card .card-overlay .card-buttons { --zf-cb: 28px; gap: 6px; margin-top: 6px; }
}
@container (max-width: 96px) {
  .movie-card .card-overlay .card-buttons { --zf-cb: 26px; gap: 4px; }
}

/* ===== ZFX BADGES v2 — "New Season" / "Recently added" (CLAUDE.md 5.70, includes/title_badges.php) =====
   Netflix-style ribbon at the bottom centre of a poster: solid red, white bold label, square bottom
   edge flush with the art. Centred with left/right 0 + auto margins, so it stays in the middle
   whatever the row's direction (Arabic desktop rows run left to right). One fixed height for
   every language; the label is centred inside it. It steps aside while hover info shows (mouse). */
.zf-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  width: fit-content;
  max-width: calc(100% - 12px);
  height: 22px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 4px 4px 0 0;
  background: #e50914;
  color: #fff;
  font: 800 11.5px/1 Inter, 'Noto Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: 0.01em;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
  overflow-x: clip;
  overflow-y: visible;
  text-overflow: ellipsis;
  box-shadow: 0 -1px 12px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  user-select: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
/* Top 10 rows, phones and narrow posters: smaller, still one height for every language. */
.zf-rank-item .zf-badge { height: 19px; padding: 0 8px; font-size: 10px; }
@media (max-width: 900px) {
  .zf-badge { height: 19px; padding: 0 8px; font-size: 10px; border-radius: 3px 3px 0 0; }
}
/* Arabic: the marks above the letters (ُ ً) make a label look high; 1px down balances "أُضيف حديثًا"
   and "موسم جديد" (measured at 6x). Same box size as every other language; after the size rules. */
.zf-badge:lang(ar), .zf-rank-item .zf-badge:lang(ar) { padding-top: 2px; }
/* "موسم جديد" has no marks above its letters: it sits 1px higher than "أُضيف حديثًا" (owner's check, 18 Oct). */
.zf-badge--season:lang(ar), .zf-rank-item .zf-badge--season:lang(ar) { padding-top: 0; }
@media (hover: hover) and (pointer: fine) {
  .movie-card:hover > .zf-badge,
  .movie-card:focus-within > .zf-badge,
  .netflix-gallery-card:hover .card-media > .zf-badge,
  .zf-cat-card:hover .zf-badge,
  .zf-cat-card:focus-visible .zf-badge { opacity: 0; transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) { .zf-badge { transition: none; } }
/* Title page header (movie_details.php) and homepage hero: the same red tag, one fixed height for
   every language and the label centred inside it (like the poster ribbon above). */
.zf-title-flag,
.zf-hero-meta > .zf-hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 24px;
  padding: 0 10px;
  border-radius: 4px;
  background: #e50914;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  vertical-align: middle;
  box-shadow: 0 6px 18px rgba(229, 9, 20, 0.35);
}
/* Arabic: 1px down centres "موسم جديد"; "أُضيف حديثًا" (marks ُ ً above) needs 3px (owner's check, 18 Oct). */
.zf-title-flag:lang(ar),
.zf-hero-meta > .zf-hero-badge:lang(ar) { padding-top: 2px; }
.zf-title-flag--recent:lang(ar),
.zf-hero-meta > .zf-hero-badge--recent:lang(ar) { padding-top: 6px; }
@media (max-width: 700px) {
  .zf-title-flag, .zf-hero-meta > .zf-hero-badge { height: 22px; padding: 0 9px; font-size: 12px; }
  .zf-title-flag:lang(ar), .zf-hero-meta > .zf-hero-badge:lang(ar) { padding-top: 2px; }
  .zf-title-flag--recent:lang(ar), .zf-hero-meta > .zf-hero-badge--recent:lang(ar) { padding-top: 6px; }
}
.zf-title-meta > .zf-title-flag::before,
.zf-hero-meta > .zf-title-flag::before { display: none !important; }
/* Category / studio grid: the rating chip sits in the poster's bottom corner; with a ribbon it moves up. */
.zf-cat-poster:has(> .zf-badge) > .zf-cat-vote { bottom: 31px; }
@media (max-width: 900px) { .zf-cat-poster:has(> .zf-badge) > .zf-cat-vote { bottom: 26px; } }

/* Legal links row in page footers (includes/legal.php, zf_legal_links). */
.footer .zf-legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; max-width: 1200px; margin: 0 auto 14px; padding: 16px 4% 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.footer .zf-legal-links a { color: #9a9aa6; font-size: 13px; text-decoration: none; }
.footer .zf-legal-links a:hover, .footer .zf-legal-links a:focus-visible { color: #fff; text-decoration: underline; }
@media (max-width: 900px) { html body .footer .zf-legal-links { margin: 18px 16px 0; padding: 14px 0 0; gap: 8px 16px; } }