/* ============================================
   AsilMedia v2 — Full Story Page
   ============================================ */

/* Full-width hero banner */
.fs-banner {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: var(--bg-tertiary);
  /* Create a local stacking context so the inner z-indexed children
     (shimmer ::before, img, gradient overlay) stay contained inside the
     banner. Without this, child z-index values escape to the root
     stacking context and paint over .fs-content (which sits below in
     source order with a negative margin overlap). */
  isolation: isolate;
}

@media (min-width: 768px) { .fs-banner { height: 400px; } }

/* Shimmer placeholder behind hero image — visible until <img> finishes loading */
.fs-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    var(--bg-tertiary) 0%,
    var(--bg-tertiary) 30%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 70%,
    var(--bg-tertiary) 100%);
  background-size: 250% 100%;
  animation: shimmer-loading 1.6s ease-in-out infinite;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.35s ease-out;
  pointer-events: none;
}

.fs-banner:has(.fs-banner__img.loaded)::before { opacity: 0; }

.fs-banner__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.fs-banner__img.loaded { opacity: 1; }

.fs-banner__gradient {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(to top, var(--bg-primary) 0%, var(--bg-glass-light) 50%, transparent 100%);
}

/* Content below banner */
.fs-content {
  position: relative;
  margin-top: -80px;
  padding: 0 var(--sp-4);
}

@media (min-width: 768px) {
  .fs-content {
    margin-top: -120px;
    padding: 0 var(--sp-6);
  }
}

/* Hero: Poster + Info side by side */
.fs-hero {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .fs-hero {
    flex-direction: row;
    gap: var(--sp-6);
    align-items: flex-start;
    text-align: left;
  }
}

/* Poster */
.fs-poster {
  position: relative;
  width: 200px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  align-self: center;
  transform: translateY(-20px);
}

@media (min-width: 768px) {
  .fs-poster {
    width: 220px;
    align-self: flex-start;
    transform: none;
  }
}

.fs-poster__img {
  aspect-ratio: 2/3;
  width: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease-out;
  position: relative;
  z-index: 2;
}

.fs-poster__img.loaded { opacity: 1; }

.fs-poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    var(--bg-tertiary) 0%,
    var(--bg-tertiary) 30%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 70%,
    var(--bg-tertiary) 100%);
  background-size: 250% 100%;
  animation: shimmer-loading 1.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.35s ease-out;
}

.fs-poster:has(.fs-poster__img.loaded)::before {
  opacity: 0;
}

.fs-poster__badges {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 3;
}

/* Info section */
.fs-info { flex: 1; min-width: 0; width: 100%; }

.fs-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-2);
  /* Mobile: clamp to 2 lines to hide SEO-long titles */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

@media (min-width: 768px) {
  .fs-title {
    font-size: var(--fs-2xl);
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }
}

/* Center meta rows on mobile */
.fs-year-info,
.fs-tags,
.fs-badges-row,
.fs-action-icons {
  justify-content: center;
}

@media (min-width: 768px) {
  .fs-year-info,
  .fs-tags,
  .fs-badges-row,
  .fs-action-icons {
    justify-content: flex-start;
  }
}

.fs-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

/* Alternative titles (other names) shown below main title */
.fs-subtitle--alt {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  font-weight: var(--fw-regular);
  line-height: 1.4;
  margin-top: -4px;
  margin-bottom: var(--sp-3);
  font-style: italic;
  opacity: 0.85;
}

@media (min-width: 768px) {
  .fs-subtitle--alt {
    font-size: var(--fs-lg);
  }
}

.fs-year-info {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}

.fs-year-info span:not(:last-child)::after {
  content: '·';
  margin-left: var(--sp-3);
  color: var(--text-muted);
}

.fs-year-info a {
  color: var(--text-secondary);
  text-decoration: none;
}

.fs-year-info a:hover {
  color: var(--accent);
}

/* Hide empty badges row */
.fs-badges-row:empty {
  display: none;
}

/* Genre tags row — commas hidden via JS, pills via CSS */
.fs-tags {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

.fs-tags a {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: var(--fs-xs); /* Restore font size */
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.fs-tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Action icons (rate, save, share) */
.fs-action-icons {
  display: flex;
  gap: var(--sp-6);
  margin-bottom: var(--sp-4);
}

.fs-action-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
}

.fs-action-icon:hover { color: var(--accent); }
.fs-action-icon .icon { width: 24px; height: 24px; }

/* IMDB / KP badges */
.fs-badges-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}

/* Rating row */
.fs-rating {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.fs-rating__score {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--gold);
}

.fs-rating__score .icon { width: 20px; height: 20px; }

.fs-rating__votes {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.fs-rating__actions {
  display: flex;
  gap: var(--sp-2);
}

.fs-rating__btn {
  display: flex; align-items: center; gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  background: var(--bg-tertiary); border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.fs-rating__btn:hover { border-color: var(--border-accent); }
.fs-rating__btn--like:hover { color: var(--success); border-color: var(--success); }
.fs-rating__btn--dislike:hover { color: var(--danger); border-color: var(--danger); }

/* Big action buttons */
.fs-actions {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.fs-actions .btn {
  flex: 1;
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--fs-base);
  border-radius: var(--radius-md);
}

/* Tabs (Aktyorlar / Rejissiyorlar) */
.fs-tabs {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-4);
}

.fs-tab {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.fs-tab:hover { color: var(--text-primary); }
.fs-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }

/* Actor/Director grid */
.fs-cast {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  padding-bottom: var(--sp-3);
  scrollbar-width: none;
  margin-bottom: var(--sp-6);
  -webkit-overflow-scrolling: touch;
}

.fs-cast::-webkit-scrollbar { display: none; }

.fs-cast-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  width: 80px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-fast) var(--ease-out);
}

.fs-cast-item:hover {
  transform: translateY(-2px);
}

.fs-cast-item__photo {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--bg-tertiary);
  border: 2px solid transparent;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

/* Shimmer placeholder behind actor photo */
.fs-cast-item__photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    var(--bg-tertiary) 0%,
    var(--bg-tertiary) 30%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 70%,
    var(--bg-tertiary) 100%);
  background-size: 250% 100%;
  animation: shimmer-loading 1.6s ease-in-out infinite;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.35s ease-out;
  pointer-events: none;
}

/* Hide shimmer once <img> loads OR if the slot is an SVG fallback (no photo) */
.fs-cast-item__photo:has(img.loaded)::before,
.fs-cast-item__photo:has(svg)::before {
  opacity: 0;
}

.fs-cast-item:hover .fs-cast-item__photo {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.fs-cast-item__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.fs-cast-item__photo img.loaded { opacity: 1; }

.fs-cast-item__photo svg {
  width: 100%;
  height: 100%;
}

.fs-cast-item__name {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  line-height: var(--lh-tight);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.fs-cast-item:hover .fs-cast-item__name {
  color: var(--accent);
}

/* Metadata table */
.fs-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-6);
}

.fs-meta__label { color: var(--text-muted); white-space: nowrap; }
.fs-meta__value { color: var(--text-primary); }
.fs-meta__value a { color: var(--accent); }
.fs-meta__value a:hover { text-decoration: underline; }

/* Description/Story */
.fs-description {
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  margin-bottom: var(--sp-6);
}

.fs-description p { margin-bottom: var(--sp-3); }
.fs-description p:last-child { margin-bottom: 0; }
.fs-description br { display: block; content: ''; margin-top: var(--sp-4); }
.fs-description section,
.fs-description section > div { display: contents; }
.fs-description b, .fs-description strong { color: var(--text-primary); }

/* Waiting/notice banner (app promo card) */
.fs-notice {
  position: relative;
  background: linear-gradient(135deg, #1a2540 0%, #152035 50%, #1a2d45 100%);
  border: 1px solid rgba(88, 166, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: var(--sp-8) var(--sp-5);
  margin-bottom: var(--sp-6);
  text-align: center;
  overflow: hidden;
}

.fs-notice::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 400px 250px at 20% 50%, rgba(88, 166, 255, 0.12), transparent),
    radial-gradient(ellipse 400px 250px at 80% 50%, rgba(63, 185, 80, 0.1), transparent);
  pointer-events: none;
}

.fs-notice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.15), rgba(63, 185, 80, 0.1));
  color: var(--info);
  margin-bottom: var(--sp-4);
}

.fs-notice__body {
  position: relative;
  z-index: 1;
}

.fs-notice__text {
  font-size: var(--fs-md);
  color: var(--text-primary);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto var(--sp-5);
}

.fs-notice__stores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.fs-notice__store-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
  border: 1px solid transparent;
}

.fs-notice__store-btn--gp {
  background: linear-gradient(135deg, #1a472a, #0d2818);
  border-color: rgba(63, 185, 80, 0.3);
  color: #3fb950;
}

.fs-notice__store-btn--gp:hover {
  background: linear-gradient(135deg, #1f5a33, #123820);
  border-color: rgba(63, 185, 80, 0.5);
  box-shadow: 0 0 20px rgba(63, 185, 80, 0.15);
}

.fs-notice__store-btn--as {
  background: linear-gradient(135deg, #1a2a47, #0d1828);
  border-color: rgba(88, 166, 255, 0.3);
  color: #58a6ff;
}

.fs-notice__store-btn--as:hover {
  background: linear-gradient(135deg, #1f3a5a, #122838);
  border-color: rgba(88, 166, 255, 0.5);
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.15);
}

.fs-notice__store-btn svg {
  flex-shrink: 0;
}

/* Poster serial badge (bottom-left) */
.fs-poster__serial-badge {
  position: absolute;
  bottom: var(--sp-2);
  left: var(--sp-2);
  z-index: 3;
}

.fs-poster__serial-badge .badge {
  font-size: var(--fs-xs);
  padding: 4px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Player section */
.fs-player {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--sp-6);
}

.fs-player__header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.fs-player__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
}

.fs-player__title .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.fs-player__tabs {
  display: flex; gap: var(--sp-2);
  overflow-x: auto; padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.fs-player__tab {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm); color: var(--text-muted);
  border-radius: var(--radius-sm); white-space: nowrap;
  cursor: pointer; transition: all var(--duration-fast) var(--ease-out);
  background: none; border: none;
}

.fs-player__tab:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.fs-player__tab.active { background: var(--accent-glow); color: var(--accent); }

.fs-player__body { padding: var(--sp-3); }

.fs-player__iframe {
  position: relative; padding-bottom: 56.25%; height: 0;
  border-radius: var(--radius-sm); overflow: hidden; background: #000;
}

.fs-player__iframe iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

/* ─────────────────────────────────────────────────────────────
   Player facade: shown until user clicks play. Prevents eager
   iframe load (~850ms LoadEnd blocker on fayllar1.ru).
   ───────────────────────────────────────────────────────────── */
.fs-player__facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 75%),
    #05070d;
  border: 0; padding: 0; margin: 0; cursor: pointer; outline: none;
  z-index: 2; overflow: hidden;
  transition: opacity .25s ease-out;
  font-family: inherit;
}

/* Branded backdrop image (AsilMedia logo) */
.fs-player__facade-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: .85;
  pointer-events: none;
  transition: opacity .3s ease-out, transform .6s ease-out;
}

/* Subtle dark overlay so the play button + label stay readable */
.fs-player__facade-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,.2) 0%, rgba(0,0,0,.55) 80%),
    radial-gradient(circle at center, rgba(0,180,216,.08) 0%, transparent 60%);
}

/* Center content wrapper: play icon + label */
.fs-player__facade-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-3);
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.2);
}

/* Play button circle with pulsing rings */
.fs-player__facade-play {
  position: relative; display: inline-flex;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .7));
}
.fs-player__facade-play::before,
.fs-player__facade-play::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 180, 216, .55);
  animation: fs-player-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
.fs-player__facade-play::after { animation-delay: 1.2s; }

@keyframes fs-player-pulse {
  0%   { transform: scale(1);    opacity: .75; }
  80%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Label under the play button */
.fs-player__facade-label {
  color: #fff;
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  letter-spacing: .02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
  opacity: .92;
}

/* Hover / focus interaction */
.fs-player__facade:hover .fs-player__facade-inner,
.fs-player__facade:focus-visible .fs-player__facade-inner {
  transform: scale(1.05);
}
.fs-player__facade:hover .fs-player__facade-bg {
  opacity: .55;
  transform: scale(1.12);
}
.fs-player__facade:focus-visible {
  box-shadow: inset 0 0 0 3px var(--accent);
}

/* Once the iframe is loaded, JS removes --pending and the facade is hidden */
.fs-player__iframe:not(.fs-player__iframe--pending) .fs-player__facade {
  display: none;
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .fs-player__facade-play::before,
  .fs-player__facade-play::after { animation: none; }
  .fs-player__facade-inner,
  .fs-player__facade-bg { transition: none; }
}

/* Mobile sizing */
@media (max-width: 640px) {
  .fs-player__facade-label { font-size: var(--fs-sm); }
}

/* Download section */
.fs-download {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.fs-download__title {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-md); font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-4);
}

.fs-download__title .icon {
  width: 20px; height: 20px; color: var(--accent);
}

.fs-download__list { display: flex; flex-direction: column; gap: var(--sp-2); }

.fs-download__item {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  background: var(--bg-tertiary); border-radius: var(--radius-sm);
  font-size: var(--fs-sm); color: var(--text-secondary);
  text-decoration: none; border: 1px solid var(--border);
  transition: all var(--duration-fast) var(--ease-out);
}

.fs-download__item:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.fs-download__item .icon { color: var(--accent); }

.fs-download__item--tg {
  background: rgba(0, 136, 204, 0.1);
  border-color: rgba(0, 136, 204, 0.3);
  color: #0088cc;
}

.fs-download__item--tg:hover {
  background: rgba(0, 136, 204, 0.2);
  border-color: #0088cc;
}

/* Trailers section */
.fs-trailers {
  margin-bottom: var(--sp-6);
}

.fs-trailers__grid {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scrollbar-width: none;
}

.fs-trailers__grid::-webkit-scrollbar { display: none; }

.fs-trailers__item {
  flex-shrink: 0;
  width: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.fs-trailers__item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.fs-trailers__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
}

.fs-trailers__play .icon {
  width: 40px;
  height: 40px;
  color: #fff;
  opacity: 0.8;
}

/* Screenshots gallery */
.fs-screenshots { margin-bottom: var(--sp-6); }

.fs-screenshots__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-4);
}

.fs-screenshots__grid {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scrollbar-width: none;
}

.fs-screenshots__grid::-webkit-scrollbar { display: none; }

.fs-screenshots__item {
  position: relative;
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-tertiary);
}

/* Shimmer placeholder behind screenshot — visible until <img> loads */
.fs-screenshots__item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    var(--bg-tertiary) 0%,
    var(--bg-tertiary) 30%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 70%,
    var(--bg-tertiary) 100%);
  background-size: 250% 100%;
  animation: shimmer-loading 1.6s ease-in-out infinite;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.35s ease-out;
  pointer-events: none;
}

.fs-screenshots__item:has(img.loaded)::before { opacity: 0; }

.fs-screenshots__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease-out, transform var(--duration-fast);
}

.fs-screenshots__item img.loaded { opacity: 1; }
.fs-screenshots__item:hover img.loaded { transform: scale(1.03); }

/* Series episodes */
.fs-episodes {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-6);
}

.fs-episodes__header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
}

.fs-episodes__header .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.fs-episodes__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--sp-2);
  padding: var(--sp-3);
  max-height: 320px;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .fs-episodes__list {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    padding: var(--sp-4);
    max-height: 400px;
  }
}

.fs-episodes__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: var(--sp-2) var(--sp-2);
  text-align: center;
  font-size: var(--fs-sm);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  min-height: 48px;
}

.fs-episodes__num {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: 1;
}

.fs-episodes__label {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.2;
}

.fs-episodes__item:hover { border-color: var(--accent); color: var(--accent); }
.fs-episodes__item:hover .fs-episodes__label { color: var(--accent); }

.fs-episodes__item.active {
  background: var(--accent); color: var(--text-inverse); border-color: var(--accent);
}
.fs-episodes__item.active .fs-episodes__label { color: rgba(255,255,255,0.8); }

/* ── Serial Download Wizard Button ── */
.fs-dl-wizard-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  background: linear-gradient(135deg, var(--accent), #0090b0);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-align: left;
}

.fs-dl-wizard-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 180, 216, 0.35);
}

.fs-dl-wizard-btn .icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.fs-dl-wizard-btn__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fs-dl-wizard-btn__text strong {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}

.fs-dl-wizard-btn__text small {
  font-size: var(--fs-xs);
  opacity: 0.8;
}

.fs-dl-wizard-btn__arrow {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── Episode season tabs ── */
.fs-episodes__seasons {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-3) 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.fs-episodes__seasons::-webkit-scrollbar { display: none; }

.fs-episodes__season-tab {
  flex-shrink: 0;
  padding: var(--sp-1) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.fs-episodes__season-tab:hover { border-color: var(--accent); color: var(--accent); }
.fs-episodes__season-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Continue watching button ── */
.fs-episodes__continue {
  padding: var(--sp-3) var(--sp-3) 0;
}

.fs-episodes__continue-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: linear-gradient(135deg, rgba(0,180,216,0.15), rgba(0,180,216,0.05));
  border: 1px solid rgba(0,180,216,0.3);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.fs-episodes__continue-btn:hover {
  background: linear-gradient(135deg, rgba(0,180,216,0.25), rgba(0,180,216,0.1));
  border-color: var(--accent);
}

.fs-episodes__continue-btn .icon {
  width: 18px;
  height: 18px;
}

/* ── Watched episode indicator ── */
.fs-episodes__item.watched {
  position: relative;
  border-color: rgba(0,180,216,0.3);
}

.watched-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--bg-secondary);
}

.fs-episodes__item.watched.active .watched-dot {
  background: #fff;
  border-color: var(--accent);
}

/* ── Quality Picker (player) ── */
.qp-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: wzFadeIn 0.2s ease;
}

.qp-modal {
  width: 100%;
  max-width: 340px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: wzSlideUp 0.25s ease;
}

.qp-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.qp-modal__ep {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
}

.qp-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.qp-modal__close:hover { background: var(--bg-hover); color: var(--text-primary); }

.qp-modal__title {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}

.qp-modal__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: 0 var(--sp-4) var(--sp-4);
}

.qp-option {
  flex: 1;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.qp-option:hover {
  border-color: var(--accent);
  background: rgba(0,180,216,0.08);
}

.qp-option__icon {
  font-size: 18px;
  line-height: 1;
}

.qp-option__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

.qp-option__meta {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: var(--fw-normal);
}

.qp-option--server .qp-option__label {
  font-size: var(--fs-sm);
}

.qp-modal__back {
  display: block;
  margin: var(--sp-3) auto 0;
  padding: var(--sp-2) var(--sp-4);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.qp-modal__back:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Download Wizard Modal ── */
@keyframes wzFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.dl-wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: wzFadeIn 0.2s ease;
}

.dl-wizard {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: wzSlideUp 0.25s ease;
}

/* Wizard header */
.dl-wizard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.dl-wizard__back,
.dl-wizard__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.dl-wizard__back:hover,
.dl-wizard__close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dl-wizard__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin: 0;
}

.dl-wizard__title .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

/* Steps indicator */
.dl-wizard__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.dl-wizard__step {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
}

.dl-wizard__step.active {
  color: var(--accent);
}

.dl-wizard__step.done {
  color: var(--success);
}

.dl-wizard__step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: var(--fw-bold);
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
}

.dl-wizard__step.active .dl-wizard__step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.dl-wizard__step.done .dl-wizard__step-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  font-size: 13px;
}

.dl-wizard__step-label {
  display: none;
}

@media (min-width: 400px) {
  .dl-wizard__step-label {
    display: inline;
  }
}

.dl-wizard__step-line {
  width: 24px;
  height: 2px;
  background: var(--border);
  margin: 0 var(--sp-1);
  flex-shrink: 0;
}

.dl-wizard__step-line.done {
  background: var(--success);
}

/* Context breadcrumb */
.dl-wizard__context {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--accent);
  background: rgba(0,180,216,0.06);
  border-bottom: 1px solid var(--border);
}

/* Wizard body */
.dl-wizard__body {
  padding: var(--sp-4);
  overflow-y: auto;
  flex: 1;
}

.dl-wizard__grid {
  display: grid;
  gap: var(--sp-2);
}

/* Season cards */
.wz-seasons {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.wz-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: var(--sp-4) var(--sp-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  color: var(--text-primary);
}

.wz-card:hover {
  border-color: var(--accent);
  background: rgba(0,180,216,0.08);
  transform: translateY(-2px);
}

.wz-card__num {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--accent);
}

.wz-card__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  text-transform: lowercase;
}

.wz-card__meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

/* Episode grid */
.wz-episodes {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}

.wz-ep-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: var(--sp-3) var(--sp-2);
  min-height: 60px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  color: var(--text-primary);
}

.wz-ep-btn:hover {
  border-color: var(--accent);
  background: rgba(0,180,216,0.08);
}

.wz-ep-btn__num {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: 1;
}

.wz-ep-btn__label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: lowercase;
}

.wz-ep-btn.watched {
  border-color: rgba(0,180,216,0.3);
}

.wz-ep-btn__watched {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 10px;
  color: var(--accent);
  line-height: 1;
}

/* Quality buttons */
.wz-qualities {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.wz-quality-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  color: var(--text-primary);
}

.wz-quality-btn:hover {
  border-color: var(--accent);
  background: rgba(0,180,216,0.08);
  transform: translateY(-2px);
}

.wz-quality-btn__icon {
  font-size: 24px;
  line-height: 1;
}

.wz-quality-btn__label {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}

.wz-quality-btn__meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Server download buttons */
.wz-servers {
  grid-template-columns: 1fr;
}

.wz-server-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.wz-server-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,180,216,0.08);
}

.wz-server-btn .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.wz-server-btn__name {
  flex: 1;
}

/* Rated button feedback */
.fs-action-icon.rated-like { color: var(--success); }
.fs-action-icon.rated-dislike { color: var(--danger); }

/* Cast section */
.fs-cast-section {
  margin-bottom: var(--sp-6);
}

.fs-tab-content {
  display: none;
}

.fs-tab-content.active {
  display: block;
}

.fs-cast-list {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

.fs-cast-list a {
  color: var(--accent);
}

.fs-cast-list a:hover {
  text-decoration: underline;
}

/* Action icons rate group */
.fs-action-icons__rate {
  display: flex;
  gap: var(--sp-2);
}

/* Badge icon--xs */
.icon--xs { width: 12px; height: 12px; }
.icon--sm { width: 16px; height: 16px; }

/* Now Playing indicator — right side of player header */
.fs-player__now-playing {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-full);
  white-space: nowrap;
  animation: nowPlayingPulse 2s ease-in-out infinite;
}

@keyframes nowPlayingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(0, 180, 216, 0); }
}


/* Related / Comments section titles */
.fs-related { margin-bottom: var(--sp-6); }


/* ============================================
   Screenshot Gallery Viewer
   ============================================ */
.sg-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sg-overlay.sg-open {
  opacity: 1;
}

.sg-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: default;
}

.sg-image {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  transition: opacity 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.sg-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.sg-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.sg-counter {
  position: absolute;
  top: 20px;
  right: 68px;
  z-index: 10;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  user-select: none;
}

.sg-prev,
.sg-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.sg-prev { left: 16px; }
.sg-next { right: 16px; }

.sg-prev:hover,
.sg-next:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.08);
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .sg-image {
    max-width: 96vw;
    max-height: 85vh;
    border-radius: 8px;
  }

  .sg-prev,
  .sg-next {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .sg-prev { left: 8px; }
  .sg-next { right: 8px; }

  .sg-close { top: 10px; right: 10px; }
  .sg-counter { top: 14px; right: 58px; font-size: 13px; }
}
