/* ========================================================================
   FILE 3: PAGES.CSS (Fullstory, Generator, Player UI/UX, Comments)
   ======================================================================== */

/* ==========================================================================
   1. ASOSIY QOIDALAR (Ikkala sahifa uchun umumiy)
   ========================================================================== */
/* GRID NI YORIB CHIQISH UCHUN QAT'IY QOIDA */
.modern-fullstory, 
.modern-generator,
.km-person { 
    grid-column: 1 / -1 !important; 
    width: 100% !important; 
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex; 
    flex-direction: column; 
    color: #fff; 
    margin-bottom: 50px; 
}

/* ==========================================================================
   2. HERO QISMI (Faqat Fullstory uchun, Posterli)
   ========================================================================== */
.fs-hero-section {
  --fs-glow-r: 0;
  --fs-glow-g: 180;
  --fs-glow-b: 100;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(var(--fs-glow-r), var(--fs-glow-g), var(--fs-glow-b), 0.28), transparent 55%),
    radial-gradient(90% 60% at 90% 30%, rgba(var(--fs-glow-r), var(--fs-glow-g), var(--fs-glow-b), 0.14), transparent 50%),
    var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
  transition: background .4s ease;
}
.fs-backdrop {
  position: absolute;
  top: -8%;
  left: -5%;
  width: 110%;
  height: 70%;
  z-index: 0;
  opacity: 0.35;
  filter: blur(42px) saturate(1.7) brightness(0.75);
  pointer-events: none;
  transform: scale(1.05);
}
.fs-backdrop__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fs-backdrop__wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg-card) 88%);
}
.fs-ambient {
  position: absolute;
  inset: -20% -10% auto;
  height: 55%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 30% 40%, rgba(var(--fs-glow-r), var(--fs-glow-g), var(--fs-glow-b), 0.45), transparent 65%);
  filter: blur(8px);
  opacity: .85;
}
.fs-hero-content { position: relative; z-index: 2; display: flex; gap: 28px; width: 100%; align-items: flex-start; min-width: 0; pointer-events: auto; }
.fs-hero-more { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 10px; min-width: 0; width: 100%; }
.fs-cast-row {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}
.fs-cast-row:empty { display: none; }
.fs-cast-row > .km-cast:only-child { grid-column: 1 / -1; }

.fs-poster-box {
  flex: 0 0 360px;
  width: 360px;
  max-width: none;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 18px;
  height: fit-content;
}

@media (min-width: 769px) {
  .fs-hero-section {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    grid-template-areas:
      "poster info"
      "poster cast"
      "poster desc";
    column-gap: 28px;
    row-gap: 14px;
    align-items: start;
    padding: 24px 26px;
  }
  .fs-hero-content,
  .fs-hero-more {
    display: contents;
  }
  .fs-poster-box {
    grid-area: poster;
    width: 360px;
    max-width: none !important;
    flex: none;
    align-self: start;
    height: fit-content;
  }
  .fs-info-box {
    grid-area: info;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 0;
  }
  .fs-cast-row {
    grid-area: cast;
    align-self: start;
  }
  .fs-desc-wrapper {
    grid-area: desc;
    min-width: 0;
    align-self: start;
  }
  .fs-cta-row,
  .fs-details-grid {
    max-width: none;
  }
  .fs-title { font-size: clamp(1.55rem, 2.6vw, 2.15rem); }
}

@media (min-width: 1200px) {
  .fs-hero-section {
    grid-template-columns: 420px minmax(0, 1fr);
    column-gap: 32px;
    padding: 28px 32px;
  }
  .fs-poster-box { width: 420px; }
}
.fs-poster-box::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 16px;
  background: linear-gradient(110deg, #1a1b20 8%, #2a2c33 18%, #1a1b20 33%);
  background-size: 200% 100%;
  animation: onetvShimmer 1.15s linear infinite;
  pointer-events: none;
  transition: opacity .35s ease;
}
.fs-poster-box.is-loaded::before { opacity: 0; }
.fs-poster-glow {
  position: absolute;
  inset: 12% -28% -18%;
  z-index: 0;
  pointer-events: none;
  filter: blur(28px) saturate(1.5);
  opacity: 0.65;
  border-radius: 50%;
  overflow: hidden;
}
.fs-poster-glow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
}
.fs-poster-box .fs-poster-img,
.fs-poster-box > img.fs-poster-img {
  position: relative;
  z-index: 3;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2 / 3 !important;
  object-fit: cover !important;
  object-position: center top !important;
  border-radius: 18px;
  box-shadow:
    0 22px 48px rgba(0,0,0,0.58),
    0 0 0 1px rgba(255,255,255,0.1),
    0 0 48px rgba(var(--fs-glow-r), var(--fs-glow-g), var(--fs-glow-b), 0.38);
  display: block;
  background: #0a0b0e;
  opacity: 0;
  transition: opacity .35s ease;
}
.fs-poster-box .fs-poster-img.is-loaded,
.fs-poster-box.is-loaded .fs-poster-img { opacity: 1; }
.fs-poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--accent);
  color: #04140a;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

.fs-info-box { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; min-width: 0; gap: 0; }
.fs-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 2.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0 0 8px 0;
  text-wrap: balance;
  text-shadow:
    0 2px 0 rgba(0,0,0,.2),
    0 8px 24px rgba(0,0,0,.55),
    0 0 36px rgba(0, 230, 118, 0.12);
}
.fs-alt-title { font-family: var(--font-ui); font-size: 15px; color: var(--text-muted); font-weight: 500; margin-bottom: 12px; }

.fs-meta-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.meta-tag { background: rgba(255,255,255,0.05); padding: 7px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,0.05); }
.meta-tag i { color: var(--accent); }
.meta-tag.quality { background: var(--danger); color: #fff; border: none; }
.meta-tag.age { border-color: rgba(255,255,255,0.2); }

.fs-cta-row {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  width: 100%;
  max-width: 420px;
  pointer-events: auto;
}
.fs-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  transition: transform .15s, background .2s;
  position: relative;
  z-index: 6;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.fs-cta--primary {
  background: var(--accent);
  color: #04140a;
  box-shadow: 0 8px 20px var(--accent-glow);
}
.fs-cta--primary:hover { background: #fff; transform: translateY(-1px); }
.fs-cta--ghost {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}
.fs-cta--ghost:hover { border-color: var(--accent); color: var(--accent); }

.fs-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 18px;
  background: rgba(0,0,0,0.28);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  width: 100%;
  max-width: 560px;
}
.detail-item { font-size: 13.5px; color: #fff; line-height: 1.45; min-width: 0; }
.detail-item span:first-child { color: var(--text-muted); font-weight: 500; display: block; font-size: 11px; margin-bottom: 2px; }
.detail-item a { color: var(--accent); transition: 0.2s; text-decoration: none; }
.detail-item a:hover { text-decoration: underline; }

/* Cast rails */
.km-cast {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 8px 10px 6px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}
.km-cast__heading {
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.km-cast__heading i { color: var(--accent); font-size: 0.75rem; }
.km-cast__rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 0 2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
  touch-action: pan-x pan-y;
}
.km-cast__rail::-webkit-scrollbar { display: none; }
.km-cast__rail.is-dragging { cursor: grabbing; user-select: none; }
.km-cast__rail.is-dragging .km-cast__card { pointer-events: none; }
.km-cast__card {
  flex: 0 0 auto;
  width: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
  transition: transform .15s, color .15s;
}
.km-cast__card:hover { transform: translateY(-2px); color: var(--accent); }
.km-cast__photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-input);
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.12);
}
.km-cast__photo--empty {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  border-radius: 50%;
}
.km-cast__meta { min-width: 0; width: 100%; text-align: center; }
.km-cast__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 650;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
  max-height: 2.4em;
}
.km-cast__role { display: none; }
@media (max-width: 860px) {
  .fs-cast-row { grid-template-columns: 1fr; }
}
@media (max-width: 719px) {
  .km-cast { padding: 8px 10px 6px; }
  .km-cast__card { width: 58px; }
  .km-cast__photo { width: 40px; height: 40px; }
  .km-cast__name { font-size: 10px; }
}

/* Person page — full width, no empty void */
.km-person {
  margin: 0 0 32px;
  color: #fff;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
  box-sizing: border-box;
}
.km-person__crumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 13px; color: var(--text-muted); margin-bottom: 18px;
}
.km-person__crumbs a { color: var(--accent); text-decoration: none; }
.km-person__top {
  display: grid;
  gap: 22px;
  width: 100%;
  margin-bottom: 12px;
  align-items: start;
}
@media (min-width: 720px) {
  .km-person__top {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: end;
  }
}
.km-person__photo-wrap {
  border-radius: 14px; overflow: hidden;
  background: #0a0b0e; aspect-ratio: 2/3; width: 100%;
  max-width: 220px; border: 1px solid var(--border);
  justify-self: start;
}
.km-person__photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.km-person__head { min-width: 0; width: 100%; padding-bottom: 4px; }
.km-person__role {
  margin: 0 0 4px; font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent); font-weight: 700;
}
.km-person__name {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.02em;
}
.km-person__meta-row {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
}
.km-person__meta { margin: 0; color: var(--text-muted); font-size: 14px; }
.km-person__body { width: 100%; min-width: 0; margin-top: 8px; }
.km-person__tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: 0 0 14px; border-bottom: 1px solid var(--border); padding-bottom: 0;
  width: 100%;
}
.km-person__tab {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  color: var(--text-muted); font-weight: 700; font-size: 14px;
  padding: 10px 14px; border-radius: 10px 10px 0 0; font-family: inherit;
}
.km-person__tab.is-active {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.km-person__panels { width: 100%; min-width: 0; }
.km-person__panel { width: 100%; min-width: 0; }
.km-person__bio {
  width: 100%;
  max-width: none;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,0,0,0.25);
  line-height: 1.65;
  color: #ddd;
  font-size: 15px;
  box-sizing: border-box;
}
.km-person__bio p { margin: 0 0 12px; }
.km-person__bio p:last-child { margin-bottom: 0; }
.km-person__empty { color: var(--text-muted); margin: 12px 0; }
.km-person__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 4px;
  width: 100%;
}
.km-person .km-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
}
.km-person .km-card__link { position: absolute; inset: 0; z-index: 2; }
.km-person .km-card__poster { aspect-ratio: 2/3; background: #0a0b0e; position: relative; }
.km-person .km-card__poster img,
.km-person .km-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.km-person .km-card__badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  background: rgba(0,0,0,.75); color: #ffc107; font-size: 11px;
  font-weight: 700; padding: 3px 7px; border-radius: 6px;
}
.km-person .km-card__body { padding: 10px; }
.km-person .km-card__title {
  margin: 0; font-size: 13px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.km-person .km-card__meta { margin-top: 4px; font-size: 11px; color: var(--text-muted); }

.fs-desc-wrapper { position: relative; }
.fs-desc-text { font-size: 14px; color: #ccc; line-height: 1.6; max-height: 80px; overflow: hidden; position: relative; transition: max-height 0.4s ease; }
.fs-desc-text::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 40px; background: linear-gradient(transparent, var(--bg-card)); transition: opacity 0.3s; }
.fs-desc-text.expanded { max-height: 2000px; }
.fs-desc-text.expanded::after { opacity: 0; pointer-events: none; }
.fs-desc-text.no-gradient::after { display: none; }
.read-more-btn { background: none; border: none; color: var(--accent); font-weight: 600; font-size: 14px; margin-top: 10px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 5px; padding: 0;}
.read-more-btn:hover { color: #fff; }

/* ==========================================================================
   3. PLEYER VA QISMLAR LAYOUTI (Mukammal va bo'sh joysiz)
   ========================================================================== */
.fs-player-layout { display: flex; gap: 20px; margin-bottom: 40px; align-items: flex-start !important; }

/* PRO YONDASHUV: Qismlar bor bo'lsa Grid ishlatamiz, bu qotib turishini ta'minlaydi */
.fs-player-layout.has-episodes { 
    display: grid !important; 
    grid-template-columns: 1fr 340px; 
    align-items: start;
} 
.fs-player-main { display: flex; flex-direction: column; min-width: 0; width: 100%; }

/* =========================================
   UCHIB KETGAN NAVIGATSIYA DIZAYNI TIKLANDI
   ========================================= */
.gen-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; background: var(--bg-card); padding: 20px 30px; border-radius: 16px; margin-bottom: 25px; border: 1px solid var(--border); }
.gen-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; letter-spacing: -0.03em; margin: 0; display: flex; align-items: center; gap: 12px; color: #fff; }
.gen-ep-tag { background: var(--accent); padding: 4px 12px; border-radius: 8px; font-size: 14px; color: #04140a; }
.gen-back-btn { background: rgba(255,255,255,0.05); color: #fff; padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 14px; transition: 0.3s; border: 1px solid rgba(255,255,255,0.05); text-decoration: none;}
.gen-back-btn:hover { background: rgba(255,255,255,0.1); }

/* =========================================
   PLEYERNI TEMIRDEK QOTIRISH FIXI (Chrome + Edge uchun 100% ishlaydi)
   ========================================= */
.fs-player-layout,
#video-player,
#episode-box {
    scroll-margin-top: calc(var(--header-offset, 72px) + 12px);
}
.fs-video-wrapper { 
    position: relative !important;
    width: 100% !important; 
    height: 0 !important; 
    padding-top: 56.25% !important; /* Bu qoida pleyerni barcha browserlarda aniq 16:9 qiladi va tagida joy qoldirmaydi */
    background: #12131a; 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.5); 
    border: 1px solid var(--border); 
    display: block !important;
}
/* Desktopda vertical video ham 16:9 quti ichida (kichraytirmaymiz).
   Mobil fullscreen orientation — player JS da (albom/portrait). */
.fs-video-wrapper.is-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(110deg, #12131a 8%, #24262f 18%, #12131a 33%);
  background-size: 200% 100%;
  animation: onetvShimmer 1.15s linear infinite;
  pointer-events: none;
  transition: opacity .4s ease;
}
.fs-video-wrapper.is-loaded::after { opacity: 0; }

.fs-video-wrapper iframe, 
.fs-video-wrapper video, 
.fs-video-wrapper .v-source, 
.fs-video-wrapper #myplayer { 
    position: absolute !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100% !important; 
    height: 100% !important; 
    border: none !important; 
}

/* Harakatlar paneli (Like/Dislike) */
.fs-actions { display: flex; justify-content: space-between; align-items: stretch; margin-top: 15px; flex-wrap: wrap; gap: 12px; }
.fs-actions .action-btn {
  align-self: stretch;
  height: 52px;
  min-height: 52px;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.fs-rating-box { display: flex; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border); padding: 5px; gap: 5px; }
.rate-btn {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #bbb;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.2s;
  border-radius: 8px;
  border: 0;
  background: transparent;
  font-family: inherit;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.rate-btn.like { color: #4caf50; }
.rate-btn.dislike { color: #f44336; }
.rate-btn.like:hover { background: rgba(76, 175, 80, 0.15); }
.rate-btn.dislike:hover { background: rgba(244, 67, 54, 0.15); }
.rate-btn:disabled { opacity: .55; cursor: wait; }
.fs-rating-box.is-voting { opacity: .85; }
.rate-btn.voted-like {
  color: #fff !important;
  background-color: #2a5298 !important;
}
.rate-btn.voted-dislike {
  color: #fff !important;
  background-color: #dc3545 !important;
}
.rate-btn [data-likes-id],
.rate-btn [data-dislikes-id] {
  font-variant-numeric: tabular-nums;
  min-width: 1.2em;
  display: inline-block;
  text-align: left;
}

.onetv-rate-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-height, 70px) + 18px);
  transform: translateX(-50%) translateY(16px);
  z-index: 100110;
  background: rgba(20, 22, 28, 0.96);
  color: #fff;
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: min(90vw, 360px);
  text-align: center;
}
.onetv-rate-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.action-btn { padding: 12px 20px; background: rgba(255,255,255,0.05); color: #fff; border-radius: 12px; font-weight: 600; font-size: 14px; transition: 0.2s; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,0.05); text-decoration: none;}
.action-btn:hover { background: rgba(255,255,255,0.1); }

.comments-head { margin: 0 0 16px; }
.comments-head__title { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: #fff; }
.comments-head__hint { margin: 0; font-size: 13px; color: var(--text-muted); }
.premium-comments-section[hidden] { display: none !important; }
.premium-comments-section:not([hidden]) { display: block; margin-top: 16px; }

/* Qismlar paneli (generator — o'ng tomonda) */
.fs-player-sidebar { width: 100%; position: sticky; top: 100px; max-height: 550px; overflow-y: auto; min-width: 0; }
.fs-player-sidebar::-webkit-scrollbar { width: 5px; }
.fs-player-sidebar::-webkit-scrollbar-track { background: transparent; }
.fs-player-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

/* Serial fullstory: faqat qism tanlash (player yo'q) */
.fs-serial-pick {
  margin-bottom: 16px;
  scroll-margin-top: 96px;
}
.fs-serial-pick .episode-selector--full {
  padding: 20px;
}
.fs-serial-pick__hint {
  margin: -4px 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.fs-serial-pick .fs-actions {
  margin-top: 16px;
}

.episode-selector { background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); padding: 16px; }
.ep-header { color: #fff; font-size: 15px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 12px;}
.ep-header i { color: var(--accent); }

/* Nested season/grid from km_seasons.php */
.episode-links {
  display: block;
  max-height: none;
  overflow: visible;
  padding: 0;
}
.km-season { margin-bottom: 10px; }
.km-season:last-child { margin-bottom: 0; }
.km-season__head {
  display: flex; align-items: center; gap: 8px;
  margin: 4px 0 10px;
}
.km-season__bar {
  width: 3px; height: 14px; border-radius: 2px; background: var(--accent);
}
.km-season__title {
  margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .04em;
  color: var(--text-muted); text-transform: uppercase;
}
.episode-links.km-ep-grid,
.km-ep-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 4px 2px 2px;
  -webkit-overflow-scrolling: touch;
}
.km-ep-grid::-webkit-scrollbar { width: 4px; }
.km-ep-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }

.episode-links a,
.episode-links span,
.episode-links b,
.km-ep-grid a,
.BatcoH {
  background: var(--bg-input);
  color: var(--text-muted);
  padding: 11px 4px;
  border-radius: 10px;
  font-weight: 700;
  pointer-events: auto !important;
  touch-action: manipulation;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  font-size: 13px;
  text-align: center;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  text-decoration: none;
  min-height: 42px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  line-height: 1.2;
  position: relative;
  overflow: hidden;
  outline: none !important;
  box-shadow: none;
}
.episode-links a:hover,
.km-ep-grid a:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-color: rgba(255,255,255,0.12);
}
.episode-links span,
.episode-links b,
.episode-links .active,
.km-ep-grid .active,
.km-ep-grid .is-current,
.BatcoH.active,
.BatcoH.is-current {
  background: var(--accent) !important;
  color: #04140a !important;
  box-shadow: 0 4px 12px var(--accent-glow) !important;
  border-color: var(--accent) !important;
  z-index: 1;
  gap: 4px;
}
.km-ep-grid a.is-current::before,
.km-ep-grid a.active::before,
.episode-links a.is-current::before,
.episode-links a.active::before,
.BatcoH.active::before,
.BatcoH.is-current::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #04140a;
  flex: 0 0 auto;
}
.km-ep-grid a.is-watched,
.episode-links a.is-watched,
.BatcoH.is-watched {
  background: rgba(255,255,255,0.04) !important;
  color: #9ca3af !important;
  border-color: rgba(255,255,255,0.08) !important;
  box-shadow: none !important;
}
.km-ep-grid a.is-watched::after,
.episode-links a.is-watched::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  pointer-events: none;
  z-index: 2;
}
.km-ep-grid a.is-resume,
.episode-links a.is-resume,
.BatcoH.is-resume {
  outline: none !important;
  border: 2px solid var(--accent) !important;
  color: #fff !important;
  background: rgba(0, 230, 118, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(0, 230, 118, 0.15) !important;
  z-index: 2;
}
.km-ep-grid a.is-resume.is-watched,
.episode-links a.is-resume.is-watched,
.BatcoH.is-resume.is-watched {
  border: 2px solid var(--accent) !important;
  background: rgba(0, 230, 118, 0.12) !important;
  color: #fff !important;
}
.km-ep-grid a.is-resume::after,
.episode-links a.is-resume::after {
  background: var(--accent);
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
}
.km-ep-grid a.is-current.is-resume,
.km-ep-grid a.active.is-resume,
.BatcoH.active.is-resume {
  background: var(--accent) !important;
  color: #04140a !important;
  border-color: var(--accent) !important;
  box-shadow: 0 4px 12px var(--accent-glow) !important;
}
.ep-progress-hint {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .02em;
}
.ep-header {
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

/* Prev / Next episode nav */
.ep-nav-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  width: 100%;
}
.ep-nav-top:has(> :only-child) {
  grid-template-columns: 1fr;
}
.ep-nav-top > a,
.BatcoH-prevnext {
  flex: 1;
  padding: 12px 14px;
  background: var(--bg-card);
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--border);
  transition: 0.25s;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  min-height: 46px;
  box-sizing: border-box;
}
.ep-nav-top a span,
.BatcoH-prevnext span {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0;
  min-height: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: inline;
  width: auto;
  color: inherit;
}
.ep-nav-prev::before,
.ep-nav-next::after {
  font-size: 1.35em;
  font-weight: 800;
  line-height: 1;
  opacity: .9;
}
.ep-nav-prev::before { content: "‹"; }
.ep-nav-next::after { content: "›"; }
.ep-nav-top a:hover,
.BatcoH-prevnext:hover { background: var(--bg-input); color: var(--accent); border-color: rgba(0,230,118,0.35); }

/* Mobilda ekranga moslashuv (Responsive) */
@media (max-width: 1024px) {
    .fs-player-layout.has-episodes { display: flex !important; flex-direction: column; }
    .fs-player-sidebar { position: static; max-height: none; }
    .km-ep-grid { max-height: 220px; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
}
@media (max-width: 768px) {
    .fs-video-wrapper { border-radius: 12px !important; }
    .gen-header { flex-direction: column; align-items: flex-start; text-align: left; padding: 14px 16px; gap: 10px; }
    .gen-title { font-size: 17px; flex-wrap: wrap; }
    .gen-back-btn { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 8px; }
    .ep-nav-top { gap: 8px; position: sticky; top: calc(var(--header-offset, var(--header-height, 64px)) + 4px); z-index: 20; }
    .ep-nav-top a,
    .BatcoH-prevnext { padding: 11px 10px; font-size: 12px; min-height: 44px; }
}
/* ==========================================================================
   4. COMMENTS SYSTEM (Izohlar qismi to'liq tiklandi)
   ========================================================================== */
.comments-toggle-btn { width: 100%; background: var(--bg-card); color: #fff; border: 1px solid var(--border); padding: 18px; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.comments-toggle-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.comments-toggle-btn:hover:not(.active) { background: rgba(255,255,255,0.05); }

.premium-comments-section { animation: fadeIn 0.4s ease; width: 100%; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* DLE vizual redaktorni bekitish (YANGI QO'SHILDI) */
.premium-comments-section .fr-box, 
.premium-comments-section .mce-container,
.premium-comments-section .wysiwyg-editor { display: none !important; }

/* Izoh yozish formasi */
#addcform { background: var(--bg-card); padding: 25px; border-radius: 16px; border: 1px solid var(--border); margin-bottom: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); width: 100%; box-sizing: border-box; }
#addcform .bb-editor, #addcform table { background: transparent !important; border: none !important; width: 100% !important; }
#addcform textarea, .premium-textarea { width: 100%; min-height: 120px; background: var(--bg-input); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 15px; color: #fff; font-size: 15px; font-family: inherit; resize: vertical; margin-bottom: 15px; transition: 0.3s; box-sizing: border-box; }
#addcform textarea:focus, .premium-textarea:focus { border-color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); outline: none; background: var(--bg-body); }
#addcform button[name="submit"], #addcform .bb-btn, .premium-submit-btn { background: var(--accent); color: #fff; border: none; padding: 12px 30px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase; }
#addcform button[name="submit"]:hover, .premium-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--accent-glow); background: var(--accent-hover); }

.add-comment-actions { display: flex; justify-content: flex-end; align-items: center; gap: 15px; margin-top: 15px; flex-wrap: wrap; }
.premium-input { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 12px 15px; border-radius: 8px; font-size: 14px; }
.premium-captcha { display: flex; align-items: center; gap: 10px; }

/* Izohlar ro'yxati */
#dle-comments-list .comments-tree, #dle-comments-list .comments-item { margin-bottom: 20px; list-style: none; padding: 0; }
.comments-item, .comments-tree-item, .premium-comment-item { background: rgba(0, 0, 0, 0.2); padding: 20px; border-radius: 16px; border: 1px solid var(--border); display: flex; gap: 15px; margin-bottom: 15px; }
.com-avatar img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.com-content, .com-body { flex: 1; min-width: 0; }
.com-author { font-weight: 800; color: #fff; font-size: 16px; margin-bottom: 5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.com-date { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.com-text { color: #cbd5e1; line-height: 1.6; font-size: 14px; margin-top: 10px; background: rgba(255,255,255,0.02); padding: 15px; border-radius: 12px; word-wrap: break-word; }
.com-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap;}
.com-footer { display: flex; gap: 15px; margin-top: 12px; font-size: 13px; font-weight: 600; }
.com-action { color: var(--text-muted); cursor: pointer; transition: 0.2s; text-decoration: none;}
.com-action:hover { color: #fff; }

/* ==========================================================================
   5. RESPONSIVE (MOBILDA EKRANGA YOPISHTIRISH) XATOLIK TO'G'RILANDI
   ========================================================================== */
@media (max-width: 1024px) {
    .fs-player-layout.has-episodes { flex-wrap: wrap; }
    .fs-player-sidebar { width: 100%; position: static; max-height: none; }
}

@media (max-width: 768px) {
    .modern-fullstory,
    .modern-generator {
        margin-bottom: calc(var(--bottom-nav-height, 64px) + 24px);
    }
    .fs-hero-section {
        padding: 0 0 14px;
        gap: 0;
        margin-bottom: 16px;
        border-radius: 16px;
        overflow: hidden;
        background:
          radial-gradient(100% 70% at 50% 0%, rgba(var(--fs-glow-r), var(--fs-glow-g), var(--fs-glow-b), 0.42), transparent 60%),
          linear-gradient(180deg, rgba(10,11,14,0.2) 0%, var(--bg-card) 55%);
        border: 1px solid rgba(255,255,255,0.06);
    }
    .fs-backdrop {
        top: -5%;
        left: -15%;
        width: 130%;
        height: 48%;
        opacity: 0.55;
        filter: blur(28px) saturate(1.85) brightness(0.8);
    }
    .fs-backdrop__wash {
        background: linear-gradient(180deg, transparent 10%, var(--bg-card) 78%);
    }
    .fs-ambient {
        height: 42%;
        opacity: 1;
        background: radial-gradient(ellipse at 50% 20%, rgba(var(--fs-glow-r), var(--fs-glow-g), var(--fs-glow-b), 0.55), transparent 70%);
    }
    .fs-hero-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 18px 14px 0;
    }
    .fs-poster-box {
        flex: none;
        width: min(78vw, 280px);
        max-width: 280px;
        margin: 0 auto 16px;
        align-self: center;
    }
    .fs-poster-glow {
        inset: 8% -40% -25%;
        opacity: 0.8;
        filter: blur(32px) saturate(1.7);
    }
    .fs-poster-box .fs-poster-img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 2 / 3 !important;
        border-radius: 14px !important;
        box-shadow:
          0 16px 36px rgba(0,0,0,0.55),
          0 0 0 1px rgba(255,255,255,0.12),
          0 0 48px rgba(var(--fs-glow-r), var(--fs-glow-g), var(--fs-glow-b), 0.45);
    }
    .fs-poster-badge { top: 10px; left: 10px; font-size: 11px; padding: 4px 10px; }
    .fs-info-box {
        flex: none;
        width: 100%;
        min-width: 0;
        align-items: stretch;
        text-align: center;
        padding: 0 2px;
    }
    .fs-title {
        font-family: var(--font-display);
        font-size: clamp(1.3rem, 5.8vw, 1.7rem);
        line-height: 1.12;
        letter-spacing: -0.035em;
        margin-bottom: 6px;
        white-space: normal;
        text-overflow: unset;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: center;
    }
    .fs-alt-title {
        font-size: 13px;
        margin-bottom: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.35;
        text-align: center;
    }
    .fs-meta-tags {
        justify-content: center;
        gap: 6px;
        margin-bottom: 14px;
    }
    .meta-tag { padding: 6px 10px; font-size: 11px; max-width: 100%; }
    .fs-cta-row {
        flex-direction: row;
        flex-wrap: nowrap;
        max-width: none;
        margin: 0 0 12px;
        gap: 8px;
    }
    .fs-cta {
        flex: 1;
        justify-content: center;
        padding: 12px 10px;
        font-size: 13px;
        min-height: 46px;
        border-radius: 12px;
    }
    .fs-hero-more {
        gap: 8px;
        padding: 0 14px;
        margin-top: 2px;
    }
    .fs-cast-row { gap: 8px; }
    .fs-details-grid {
        grid-template-columns: 1fr 1fr;
        text-align: left;
        padding: 12px 14px;
        gap: 10px;
        max-width: none;
        background: rgba(0,0,0,0.35);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    .km-cast {
        background: rgba(0,0,0,0.32);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    .km-cast__heading { font-size: 0.9rem; margin-bottom: 8px; }
    .fs-player-layout { margin-bottom: 12px; gap: 14px; }
    .fs-serial-pick { margin-bottom: 12px; }
    .fs-ad-slot { margin: 10px 0; min-height: 56px; padding: 14px 10px; }
    .fs-video-wrapper {
        border-radius: 12px !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
    .fs-actions {
      flex-direction: column;
      align-items: stretch;
      gap: 6px;
      margin-top: 10px;
    }
    .fs-actions .action-btn {
      width: 100%;
      height: 40px;
      min-height: 40px;
      flex: none;
      justify-content: center;
    }
    .rate-btn { padding: 9px 14px; font-size: 13px; }
    .action-btn { padding: 10px 14px; font-size: 13px; justify-content: center; }
    .episode-selector { padding: 12px; border-radius: 14px; }
    .km-ep-grid { max-height: 200px; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
    .fs-bottom-sections { min-width: 0; }
    .fs-bottom-sections .section-title { font-size: 18px; margin-bottom: 14px; }

    .gen-header { flex-direction: column; align-items: flex-start; text-align: left; padding: 14px 16px; gap: 10px; border-radius: 14px; }
    .gen-title { font-size: 17px; flex-wrap: wrap; }
    .gen-back-btn { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 8px; }
    .ep-nav-top a { padding: 11px 10px; font-size: 12px; }

    .comments-item, .premium-comment-item { flex-direction: column; gap: 10px; padding: 15px; }
    .com-avatar img { width: 40px; height: 40px; }
    .add-comment-actions { justify-content: stretch; flex-direction: column; }
    .add-comment-actions > * { width: 100%; }
    #addcform button[name="submit"] { justify-content: center; width: 100%; }
    .comments-toggle-btn { padding: 14px; font-size: 14px; }
}

@media (max-width: 480px) {
    .fs-hero-section { padding-bottom: 12px; }
    .fs-poster-box { width: min(82vw, 280px); max-width: 280px; margin-bottom: 14px; }
    .fs-cta-row { flex-wrap: nowrap; }
    .fs-desc-text { font-size: 13px; max-height: 72px; }
    .km-person__grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
}

/* ==========================================================================
   6. ADVANCED SEARCH PAGE (Kengaytirilgan qidiruv sahifasi)
   ========================================================================== */
#dle-content > form,
#dle-content > form[name="searchform"],
#dle-content > #searchtable,
.modern-search-page {
    grid-column: 1 / -1 !important; 
    width: 100% !important;
    display: block !important;
}

.modern-search-page {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.search-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    box-sizing: border-box;
}

.search-form-wrapper table { width: 100%; border-collapse: collapse; }
.search-form-wrapper td { padding: 10px; color: #fff; font-size: 14px; font-weight: 500; vertical-align: middle; }

.search-form-wrapper input[type="text"],
.search-form-wrapper input[type="search"] {
    width: 100%; max-width: 500px; padding: 14px 20px; background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; color: #fff;
    font-family: inherit; font-size: 15px; outline: none; transition: 0.3s; box-sizing: border-box;
}
.search-form-wrapper input[type="text"]:focus,
.search-form-wrapper input[type="search"]:focus {
    border-color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); background: var(--bg-body);
}

.search-form-wrapper input[type="button"],
.search-form-wrapper input[type="submit"] {
    background: var(--accent); color: #fff; border: none; padding: 14px 30px;
    border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
    transition: 0.3s; text-transform: uppercase; margin-top: 10px; margin-right: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.search-form-wrapper input[type="button"]:hover,
.search-form-wrapper input[type="submit"]:hover {
    background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 5px 20px var(--accent-glow);
}

.search-form-wrapper select {
    padding: 12px 15px; background: var(--bg-input); color: #fff; border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px; outline: none; font-family: inherit;
}

.search-msg-box {
    background: rgba(0, 230, 118, 0.1); border-left: 4px solid var(--accent); padding: 15px 20px;
    border-radius: 8px; color: #fff; margin-top: 25px; display: flex; align-items: center; gap: 12px;
    font-size: 15px; font-weight: 500;
}
.search-msg-box i { color: var(--accent); font-size: 20px; }

.search-lead {
    color: var(--text-muted);
    font-size: 14px;
    margin: -8px 0 18px;
    line-height: 1.45;
}

.search-comment-card {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.search-comment-card__title {
    margin: 0 0 8px;
    font-size: 15px;
    color: #fff;
}
.search-comment-card__text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .search-form-wrapper { padding: 20px; }
    .search-form-wrapper table, .search-form-wrapper tbody, .search-form-wrapper tr, .search-form-wrapper td {
        display: block; width: 100%; text-align: left;
    }
    .search-form-wrapper td { padding: 8px 0; }
    .search-form-wrapper input[type="text"],
    .search-form-wrapper input[type="search"],
    .search-form-wrapper select {
        max-width: 100%;
        width: 100%;
        font-size: 16px; /* iOS zoom oldini olish */
    }
    .search-form-wrapper input[type="button"], .search-form-wrapper input[type="submit"] {
        width: 100%; margin-right: 0; margin-bottom: 10px; min-height: 48px;
    }
}

/* ==========================================================================
   8. PERSONAL MESSAGES (Shaxsiy xabarlar sahifasi)
   ========================================================================== */
.modern-pm-page {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 50px;
}

.pm-header-box {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.pm-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pm-nav-tabs a { text-decoration: none; }

.pm-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-input);
    color: var(--text-muted);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid transparent;
}
.pm-tab-btn:hover { background: rgba(255,255,255,0.05); color: #fff; }
.pm-tab-btn.active, .pm-nav-tabs a.active .pm-tab-btn { 
    background: rgba(0, 230, 118, 0.15); 
    color: var(--accent); 
    border-color: var(--accent);
}
.pm-tab-btn.new-msg-btn { background: var(--accent); color: #fff; }
.pm-tab-btn.new-msg-btn:hover { background: var(--accent-hover); box-shadow: 0 5px 15px var(--accent-glow); }

.pm-status-bar {
    min-width: 200px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}
.status-text { margin-bottom: 8px; }
.pm-status-bar table, .pm-status-bar div[style*="border"] { width: 100% !important; border-radius: 5px; overflow: hidden; background: var(--bg-input) !important; border: none !important;}

.pm-list-wrapper {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    overflow-x: auto;
}
.pm-list-wrapper table { width: 100%; border-collapse: collapse; color: #fff; font-size: 14px; }
.pm-list-wrapper td { padding: 15px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.pm-list-wrapper tr:hover td { background: rgba(255,255,255,0.02); }
.pm-list-wrapper a { color: var(--accent); text-decoration: none; }
.pm-list-wrapper a:hover { text-decoration: underline; }

.pm-form-box {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
}
.pm-sub-title { font-size: 20px; color: #fff; font-weight: 800; margin-bottom: 25px; display: flex; align-items: center; gap: 10px; }
.pm-sub-title i { color: var(--accent); }

.pm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.pm-input, .pm-textarea {
    width: 100%; padding: 15px; background: var(--bg-input); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px; color: #fff; font-size: 14px; font-family: inherit; transition: 0.3s; box-sizing: border-box;
}
.pm-input:focus, .pm-textarea:focus { border-color: var(--accent); outline: none; background: var(--bg-body); }
.pm-textarea { resize: vertical; min-height: 150px; }

.pm-checkbox-group { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 14px; margin-top: 15px; margin-bottom: 25px; }
.pm-checkbox-group input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

.pm-captcha-box { margin-bottom: 20px; background: rgba(255,255,255,0.02); padding: 20px; border-radius: 10px; border-left: 3px solid var(--accent); }
.pm-captcha-box label { display: block; color: #fff; font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.c-captcha-img { margin-bottom: 10px; }

.pm-submit-actions { display: flex; gap: 15px; margin-top: 30px; flex-wrap: wrap; }
.pm-btn { padding: 14px 30px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; border: none; display: flex; align-items: center; gap: 10px; transition: 0.3s; }
.submit-btn { background: var(--accent); color: #fff; }
.submit-btn:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 5px 15px var(--accent-glow); }
.preview-btn { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.1); }
.preview-btn:hover { background: rgba(255,255,255,0.1); }

.pm-read-box { background: var(--bg-card); border-radius: 16px; border: 1px solid var(--border); padding: 30px; }
.pm-read-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 20px; flex-wrap: wrap; gap: 15px;}
.pm-author-info { display: flex; align-items: center; gap: 15px; }
.pm-avatar img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.pm-author { color: #fff; font-size: 18px; display: block; margin-bottom: 5px; }
.pm-date { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.del-btn { background: rgba(255, 51, 102, 0.1); color: var(--danger); border: none; padding: 10px 15px; border-radius: 8px; cursor: pointer; transition: 0.3s; }
.del-btn:hover { background: var(--danger); color: #fff; }
.del-btn a { color: inherit; text-decoration: none; }

.pm-msg-title { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 15px; }
.pm-msg-text { color: #ccc; line-height: 1.6; font-size: 15px; background: var(--bg-input); padding: 20px; border-radius: 12px; }
.pm-signature { margin-top: 20px; color: var(--text-muted); font-size: 13px; font-style: italic; }
.sig-line { width: 50px; height: 2px; background: rgba(255,255,255,0.1); margin-bottom: 10px; }

@media (max-width: 768px) {
    .pm-header-box { flex-direction: column; align-items: flex-start; }
    .pm-nav-tabs { width: 100%; }
    .pm-tab-btn { flex: 1; justify-content: center; }
    .pm-form-grid { grid-template-columns: 1fr; }
    .pm-submit-actions .pm-btn { width: 100%; justify-content: center; }
    .pm-form-box, .pm-read-box { padding: 20px; }
}

/* ==========================================================================
   10. FEEDBACK PAGE (Biz bilan aloqa sahifasi - Premium Dizayn)
   ========================================================================== */
.feedback-page-container {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 700px; 
    margin: 20px auto 50px auto;
}

.modern-form-box {
    background: var(--bg-card); 
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); 
}

.ui-form {
    padding: 0; margin: 0; list-style: none;
    display: flex; flex-direction: column; gap: 25px;
}

.form-group {
    display: flex; flex-direction: column; gap: 10px;
}

.form-group label {
    color: #fff; font-size: 15px; font-weight: 600; margin-left: 5px;
}

.modern-input, .modern-textarea, .modern-form-box select, .modern-form-box textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-input) !important; 
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 12px;
    color: #fff !important; 
    font-family: inherit; font-size: 15px; outline: none; transition: 0.3s; box-sizing: border-box;
}
.modern-input:focus, .modern-textarea:focus, .modern-form-box select:focus, .modern-form-box textarea:focus {
    border-color: var(--accent) !important; 
    box-shadow: 0 0 20px var(--accent-glow);
    background: var(--bg-body) !important;
}
.modern-textarea { resize: vertical; min-height: 130px; }

.select-wrapper { position: relative; }
.modern-form-box select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300e676' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 15px center; background-size: 20px; padding-right: 45px;
}
.modern-form-box select option { background: var(--bg-card); color: #fff; padding: 10px; }

.combo-group { flex-direction: row; gap: 20px; }
.combo_field { flex: 1; display: flex; flex-direction: column; gap: 10px; }

.captcha-group { margin-top: 25px; }
.c-captcha {
    display: flex; align-items: center; gap: 20px;
    background: rgba(255,255,255,0.03); padding: 20px;
    border-radius: 12px; border: 1px solid rgba(255,255,255,0.05);
}
.captcha-img-box img { border-radius: 8px; height: 50px; border: 1px solid rgba(255,255,255,0.1); }
.sec_block { flex: 1; }

.form_submit { margin-top: 35px; }
.modern-btn.submit-btn {
    width: 100%; padding: 18px;
    background: var(--accent); color: #fff; border: none; border-radius: 12px;
    font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 12px;
}
.modern-btn.submit-btn:hover {
    background: var(--accent-hover); transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

@media (max-width: 768px) {
    .modern-form-box { padding: 25px; }
    .combo-group { flex-direction: column; }
    .c-captcha { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ==========================================================================
   11. ONLINE RADIO PAGE (Zamonaviy Radio sahifasi va Sticky Player)
   ========================================================================== */
.modern-radio-page {
    grid-column: 1 / -1 !important; 
    width: 100% !important;
    display: flex;
    flex-direction: column;
    margin-bottom: 100px; 
}
.radio-hero { margin-bottom: 22px; }
.radio-hero .section-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.radio-live-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 800; letter-spacing: .04em;
    color: #04140c; background: var(--accent); border-radius: 999px; padding: 4px 10px;
}
.radio-hero__text { color: var(--text-muted); font-size: 14px; margin: 0 0 14px; }
.radio-search {
    display: flex; align-items: center; gap: 10px; max-width: 420px;
    background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; padding: 0 14px;
}
.radio-search i { color: var(--text-muted); }
.radio-search input {
    flex: 1; border: 0; background: transparent; color: var(--text-main);
    min-height: 44px; font: inherit; outline: none;
}
.radio-empty { color: var(--text-muted); text-align: center; padding: 30px 10px; }

.radio-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    width: 100%;
}

.radio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}
.radio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 230, 118, 0.15); 
    border-color: rgba(0, 230, 118, 0.3);
}

.rc-cover {
    width: 100%;
    aspect-ratio: 1/1; 
    position: relative;
    background: #000;
}
.rc-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.4s;
}

.rc-play-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.3s;
}
.rc-play-overlay i {
    font-size: 40px; color: var(--accent); filter: drop-shadow(0 0 10px var(--accent));
}
.radio-card:hover .rc-cover img { opacity: 0.5; transform: scale(1.05); }
.radio-card:hover .rc-play-overlay { opacity: 1; }

.rc-info {
    padding: 15px;
    text-align: center;
}
.rc-info .song {
    font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rc-info .artist {
    font-size: 12px; font-weight: 700; color: var(--danger);
    background: rgba(255, 51, 102, 0.1); display: inline-block; padding: 2px 8px; border-radius: 4px;
}

.radio-card.playing {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
}
.radio-card.playing .rc-cover::after {
    content: 'PLAYING'; position: absolute; bottom: 10px; right: 10px;
    background: var(--accent); color: #000; font-size: 10px; font-weight: 900; padding: 4px 8px; border-radius: 4px;
}

/* STICKY RADIO PLAYER */
.sticky-radio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 16, 20, 0.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.05);
    z-index: 2147482500; 
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    animation: slideUp 0.4s ease forwards;
    pointer-events: auto !important;
}
.sticky-radio-player[hidden] { display: none !important; }

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.srp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.srp-info { display: flex; align-items: center; gap: 15px; width: 300px; }
.srp-info img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; border: 1px solid rgba(255,255,255,0.1); }
.srp-text h4 { font-size: 15px; font-weight: 700; color: #fff; margin: 0 0 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srp-text p { font-size: 12px; color: var(--danger); font-weight: 700; margin: 0; }

.srp-controls { display: flex; align-items: center; gap: 20px; }
.srp-btn {
    background: transparent; border: none; color: #fff; font-size: 20px; cursor: pointer; transition: 0.2s;
    width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.play-pause-btn { background: var(--accent); color: #000; font-size: 18px; }
.play-pause-btn:hover { transform: scale(1.1); box-shadow: 0 5px 15px var(--accent-glow); }
.stop-btn { color: var(--text-muted); }
.stop-btn:hover { color: var(--danger); background: rgba(255,255,255,0.05); }

.srp-volume { display: flex; align-items: center; gap: 10px; width: 200px; justify-content: flex-end; }
.srp-volume i { color: var(--text-muted); font-size: 14px; }
.srp-volume span { color: var(--text-muted); font-size: 12px; font-weight: 600; width: 40px; }
.srp-volume input[type="range"] {
    flex: 1; accent-color: var(--accent); height: 4px; background: rgba(255,255,255,0.1);
    border-radius: 5px; outline: none; -webkit-appearance: none;
}
.srp-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); cursor: pointer;
}

@media (max-width: 768px) {
    .radio-grid-list { grid-template-columns: repeat(2, 1fr); gap: 12px; } 
    .sticky-radio-player { bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px)); }
    .srp-container { flex-wrap: wrap; padding: 12px 14px; justify-content: space-between; gap: 10px; }
    .srp-info { width: auto; flex: 1; min-width: 0; }
    .srp-volume { display: none; } 
}

/* ==========================================================================
   12. INFO & 404 ERROR PAGE (Xatoliklar va Tizim xabarlari)
   ========================================================================== */
.modern-info-page {
    grid-column: 1 / -1 !important; 
    width: 100% !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    min-height: 60vh; 
}

.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: scaleIn 0.4s ease forwards;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.info-icon i {
    font-size: 80px;
    color: var(--danger); 
    margin-bottom: 25px;
    filter: drop-shadow(0 0 20px rgba(255, 51, 102, 0.4));
}

.info-title {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-text {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 35px;
}

.info-home-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 15px 35px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}
.info-home-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--accent-glow);
    color: #fff;
}

@media (max-width: 768px) {
    .info-box { padding: 35px 20px; }
    .info-icon i { font-size: 60px; }
    .info-title { font-size: 22px; }
}

/* ==========================================================================
   13. 404 ERROR PAGE (Katta xatolik sahifasi)
   ========================================================================== */
.error-code-text {
    font-size: 130px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 10px;
    background: var(--gradient); 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 15px 30px var(--accent-glow));
    font-family: var(--font-display);
}

@media (max-width: 768px) {
    .error-code-text {
        font-size: 90px;
    }
}

/* ==========================================================================
   14. TOP 100 PAGE (Eng ko'p ko'rilgan kinolar sahifasi)
   ========================================================================== */
.modern-top100-page {
    grid-column: 1 / -1 !important; 
    width: 100% !important;
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 50px;
}

.top100-header {
    background: var(--bg-card);
    padding: 40px 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.top100-header .section-title {
    font-size: 32px;
    margin-bottom: 10px;
    color: #fff;
}
.top100-header .section-title::before { display: none; }

.top100-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
}

.top100-filters {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none; 
}
.top100-filters::-webkit-scrollbar { display: none; } 

.filter-btn {
    background: var(--bg-card);
    color: var(--text-muted);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--border);
    transition: 0.3s;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.filter-btn:hover {
    background: var(--bg-input);
    color: #fff;
    border-color: rgba(255,255,255,0.1);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 5px 15px var(--accent-glow);
}

@media (max-width: 768px) {
    .top100-header { padding: 25px 15px; }
    .top100-header .section-title { font-size: 24px; }
    .top100-subtitle { font-size: 14px; }
    .filter-btn { padding: 10px 20px; font-size: 13px; }
}

.static-page {
    grid-column: 1 / -1 !important;
    width: 100%;
    max-width: 820px;
    margin: 0 auto 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 26px 24px;
}
.static-page__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 16px;
}
.static-page__body,
.static-page .static__text {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.65;
}
.static-page__body p { margin: 0 0 12px; }
.static-page__body b, .static-page__body strong { color: var(--text-main); }
@media (max-width: 768px) {
    .static-page { padding: 20px 16px; }
    .static-page__title { font-size: 20px; }
}

/* ==========================================================================
   15. CUSTOM PAGES (Premyeralar va boshqa maxsus sahifalar)
   ========================================================================== */
.modern-custom-page {
    grid-column: 1 / -1 !important; 
    width: 100% !important;
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 50px;
}

.page-header-box {
    background: var(--bg-card);
    padding: 18px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.page-header-box .section-title {
    font-size: 26px;
    margin-bottom: 6px;
    color: #fff;
}
.page-header-box .section-title::before { display: none; }

.page-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .page-header-box { padding: 25px 15px; }
    .page-header-box .section-title { font-size: 24px; }
    .page-subtitle { font-size: 14px; }
}

/* ==========================================================================
   DROPDOWN OCHILISHI UCHUN QAT'IY QOIDALAR
   ========================================================================== */

/* 1. Odatiy holatda ichki menyu mutlaqo yopiq va ko'rinmas bo'lishi shart */
.nav-dropdown-content {
    max-height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0 !important;
}

/* 2. .active klassi qo'shilganda (JS orqali), uni majburan ochamiz */
.nav-dropdown.active .nav-dropdown-content {
    max-height: 1000px !important; 
    visibility: visible !important;
    opacity: 1 !important;
    padding: 10px 0 !important;
}

/* 3. Strelka aylanishi */
.nav-dropdown.active .arrow {
    transform: rotate(180deg) !important;
    color: var(--accent) !important;
}

/* 4. Tugma rangi o'zgarishi */
.nav-dropdown.active .nav-dropdown-btn {
    color: var(--accent) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.fs-extras { display: flex; flex-direction: column; gap: 18px; margin: 18px 0 8px; }
.fs-extras:not(:has(.fs-stills)) { display: none; margin: 0; }
.fs-trailer-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color: #fff; font-weight: 800; cursor: pointer;
}
.fs-trailer-btn:hover { border-color: var(--accent); color: var(--accent); }

.fs-stills__title {
  font-family: var(--font-display); font-size: 16px; margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.fs-stills__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fs-still {
  border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: #111; aspect-ratio: 16/9; position: relative;
}
.fs-still img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.fs-still:hover img { transform: scale(1.06); }

.fs-site-rate {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 12px;
}
.fs-site-rate--bar {
  flex: 1 1 280px;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  margin: 0;
  height: 52px;
  min-height: 52px;
  box-sizing: border-box;
  border-radius: 12px;
  overflow: hidden;
}
.fs-site-rate__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fs-site-rate__head strong { font-size: 15px; }
.fs-site-rate__score { font-family: var(--font-display); color: var(--accent); font-size: 22px; }
.fs-site-rate--bar .fs-site-rate__score { font-size: 16px; min-width: 52px; line-height: 1; }
.fs-site-rate__score small { color: var(--text-muted); font-size: 13px; margin-left: 2px; }
.fs-site-rate__stars { display: flex; flex-wrap: nowrap; gap: 5px; }
.fs-star {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 36px; border-radius: 0; border: 0;
  background: transparent; color: rgba(255,255,255,.22); font-weight: 800; cursor: pointer;
  box-sizing: border-box; padding: 0; margin: 0; line-height: 36px; font-size: 18px; flex: 0 0 28px;
  box-shadow: none; transform: none; outline: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.fs-star i { font-size: inherit; line-height: 1; }
.fs-site-rate--bar .fs-star,
.fs-site-rate--bar .fs-star.is-on,
.fs-site-rate--bar .fs-star.is-mine,
.fs-site-rate--bar .fs-star:hover,
.fs-site-rate--bar .fs-star:focus {
  width: 28px; height: 36px; min-width: 0; min-height: 0; max-width: none; max-height: none;
  border-radius: 0; line-height: 1; transform: none; box-shadow: none; font-size: 18px; padding: 0;
  background: transparent; border: 0;
}
.fs-star.is-on { color: var(--accent); background: transparent; border: 0; }
.fs-star.is-mine { color: #fff59d; background: transparent; border: 0; filter: drop-shadow(0 0 6px rgba(0,230,118,.45)); }
.fs-star:hover { color: #b9ffd8; }
.fs-site-rate__hint { margin: 0; color: var(--text-muted); font-size: 13px; }
.fs-site-rate--bar .fs-site-rate__hint {
  width: auto;
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fs-ad-slot {
  position: relative; margin: 18px 0; min-height: 90px; border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.12); background: rgba(255,255,255,.02);
  display: flex; align-items: center; justify-content: center; padding: 18px 12px;
  overflow: hidden;
}
.fs-ad-slot__label {
  position: absolute; top: 8px; left: 10px; font-size: 10px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: #c4b5fd;
  background: rgba(124,58,237,.25); border: 1px solid rgba(167,139,250,.35);
  border-radius: 999px; padding: 3px 8px;
}
.fs-ad-slot__ph { color: var(--text-muted); font-size: 14px; }
.fs-ad-slot:has([id^="vgt"], iframe, ins, img, script + div) .fs-ad-slot__ph { display: none; }

.fs-lightbox, .fs-trailer-modal {
  position: fixed; inset: 0; z-index: 12000; background: rgba(0,0,0,.86);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.fs-lightbox[hidden], .fs-trailer-modal[hidden] { display: none !important; }
.fs-lightbox__img { max-width: min(1100px, 94vw); max-height: 86vh; border-radius: 12px; object-fit: contain; }
.fs-lightbox__close, .fs-trailer-modal__close, .fs-lightbox__nav {
  position: absolute; border: 0; background: rgba(255,255,255,.08); color: #fff;
  width: 44px; height: 44px; border-radius: 50%; font-size: 24px; cursor: pointer;
}
.fs-lightbox__close, .fs-trailer-modal__close { top: 18px; right: 18px; }
.fs-lightbox__nav--prev { left: 16px; }
.fs-lightbox__nav--next { right: 16px; }
.fs-trailer-modal__box { width: min(960px, 96vw); }
.fs-trailer-modal__frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; }
.fs-trailer-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 768px) {
  .fs-site-rate.fs-site-rate--bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start;
    gap: 6px !important;
    width: 100%;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 10px;
  }
  .fs-site-rate--bar > [itemprop="aggregateRating"],
  .fs-site-rate--bar .fs-site-rate__hint {
    display: none !important;
  }
  .fs-site-rate--bar .fs-site-rate__score {
    font-size: 13px !important;
    min-width: 0 !important;
    line-height: 1 !important;
    flex: 0 0 auto;
  }
  .fs-site-rate--bar .fs-site-rate__score small { font-size: 11px; }
  .fs-site-rate--bar .fs-site-rate__stars {
    display: flex !important;
    flex: 1 1 auto;
    gap: 0 !important;
    width: auto;
    min-width: 0;
    justify-content: space-between;
    align-items: center;
  }
  .fs-extras { gap: 12px; margin: 10px 0 4px; }
  .fs-extras:not(:has(.fs-stills)) { display: none; margin: 0; }
  .fs-stills__title { font-size: 14px; margin: 0 0 8px; }
  .fs-stills__grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
    padding-bottom: 2px;
  }
  .fs-stills__grid::-webkit-scrollbar { display: none; }
  .fs-still {
    flex: 0 0 68%;
    width: 68%;
    max-width: 240px;
    aspect-ratio: 16 / 9;
    scroll-snap-align: start;
  }
  .fs-star,
  .fs-site-rate--bar .fs-star,
  .fs-site-rate--bar .fs-star.is-on,
  .fs-site-rate--bar .fs-star.is-mine,
  .fs-site-rate--bar .fs-star:hover,
  .fs-site-rate--bar .fs-star:focus,
  .fs-site-rate--bar .fs-star i {
    width: auto;
    min-width: 0;
    max-width: none;
    height: 22px !important;
    min-height: 0;
    max-height: 22px !important;
    flex: 1 1 0;
    border-radius: 0;
    line-height: 22px !important;
    font-size: 14px !important;
    background: transparent;
    border: 0;
  }
  .fs-lightbox__nav { display: none; }
}

.history-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.history-empty i { font-size: 56px; opacity: .28; margin-bottom: 14px; display: block; }
.history-empty h3 { color: #fff; margin: 0 0 8px; }
.history-empty a {
  display: inline-block; margin-top: 14px; padding: 10px 22px; border-radius: 10px;
  background: var(--accent); color: #04140a; font-weight: 800;
}

/* Fullstory / generator — continue watching + genre chips */
.fs-continue {
  margin: 8px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  min-width: 0;
}
.fs-continue__block { min-width: 0; }
.fs-continue__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.fs-continue__head .section-title {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fs-continue__more {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.fs-continue__more:hover { text-decoration: underline; }
.fs-continue__rail {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  overflow-x: auto !important;
  padding-bottom: 8px !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}
.fs-continue__rail::-webkit-scrollbar { display: none; }
.fs-continue__rail .movie-card.related-card {
  flex: 0 0 132px !important;
  width: 132px !important;
  max-width: 132px !important;
}
.fs-continue__chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  font-size: 0;
  line-height: 0;
}
.fs-continue__chips::-webkit-scrollbar { display: none; }
.fs-continue__chips a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s, color .2s, background .2s;
}
.fs-continue__chips a:hover {
  border-color: rgba(0,230,118,.45);
  color: var(--accent);
  background: rgba(0,230,118,.1);
}
.fs-continue__trending .stories-shell {
  margin: 0;
}
.fs-continue__trending .stories-rail {
  padding-bottom: 4px;
}
@media (max-width: 768px) {
  .fs-continue { gap: 18px; margin: 4px 0 18px; }
  .fs-continue__rail .movie-card.related-card {
    flex: 0 0 118px !important;
    width: 118px !important;
    max-width: 118px !important;
  }
  .fs-continue__chips a { padding: 9px 12px; font-size: 12px; }
}

