/* Watch-page appearance only. Player markup, sources and post content are retained. */
html[data-javfin-appearance="classic"] body.single-post.gac-cinema {
  --cin-bg: #07060f;
  --cin-surface: #0d0b18;
  --cin-raised: rgba(22, 20, 38, .88);
  --cin-line: rgba(255, 255, 255, .08);
  --cin-ink: #f8fafc;
  --cin-muted: #94a3b8;
  --cin-accent: #f43f7e;
  --cin-mint: #d8b4fe;
  --cin-button: #e11d73;
  --cin-font: 'Prompt', 'Inter', 'IBM Plex Sans Thai', Tahoma, sans-serif;
  background-color: #07060f;
  background-image: linear-gradient(180deg, rgba(7, 6, 15, .78), rgba(7, 6, 15, .93)), url('https://images.unsplash.com/photo-1503899036084-c55cdd92da26?auto=format&fit=crop&w=1800&q=80');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}
html[data-javfin-appearance="classic"] .single-post .site-header {
  background: rgba(10, 9, 20, .9);
  backdrop-filter: blur(24px);
  border-color: var(--cin-line);
}
html[data-javfin-appearance="classic"] .single-post .header-inner {
  width: 100%;
  max-width: 1440px;
  min-height: 70px;
  padding-inline: 32px;
  padding-block: 12px;
}
html[data-javfin-appearance="classic"] .single-post .site-brand { position: relative; }
html[data-javfin-appearance="classic"] .single-post .site-brand::before {
  content: '';
  display: block;
  width: 160px;
  height: 36px;
  background: url('/logos/logo-2.svg') left center / contain no-repeat;
}
html[data-javfin-appearance="classic"] .single-post .site-brand > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
html[data-javfin-appearance="classic"] .single-post .site-brand > img { display: none; }
html[data-javfin-appearance="classic"] .single-post .search-form {
  background: rgba(22, 20, 38, .92);
  border-radius: 10px;
}
html[data-javfin-appearance="classic"] .single-post .watch-page { max-width: 1236px; padding-block: 28px 60px; }
html[data-javfin-appearance="classic"] .single-post .watch-classic-shell {
  border: 1px solid rgba(168, 85, 247, .25);
  border-radius: 14px;
  background: #0d0b18;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .7);
  overflow: hidden;
}
html[data-javfin-appearance="classic"] .single-post .watch-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cin-line);
}
html[data-javfin-appearance="classic"] .single-post .watch-heading .movie-code {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 5px;
  background: linear-gradient(135deg, #f43f7e, #a855f7);
  color: #fff;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
}
html[data-javfin-appearance="classic"] .single-post .watch-heading h1 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 600;
}
.watch-classic-close { display: none; }
html[data-javfin-appearance="classic"] .single-post .watch-classic-close {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--cin-line);
  border-radius: 8px;
  background: var(--cin-raised);
  color: var(--cin-muted);
}
html[data-javfin-appearance="classic"] .single-post .watch-classic-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}
html[data-javfin-appearance="classic"] .single-post .watch-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
html[data-javfin-appearance="classic"] .single-post .watch-main { padding: 16px 18px 20px; }
html[data-javfin-appearance="classic"] .single-post .entry-content p { margin-block: 14px; font-size: .84rem; }
html[data-javfin-appearance="classic"] .single-post .avpi-box { border: 1px solid var(--cin-line); border-radius: 10px; overflow: hidden; }
html[data-javfin-appearance="classic"] .single-post .avpi-play {
  background: linear-gradient(135deg, #f43f7e, #a855f7) !important;
  border-color: rgba(255, 255, 255, .15) !important;
  box-shadow: 0 8px 24px rgba(168, 85, 247, .3);
}
html[data-javfin-appearance="classic"] .single-post .avpi-btns { gap: 6px; flex-wrap: wrap; padding-block: 12px; border-bottom: 1px solid var(--cin-line); }
html[data-javfin-appearance="classic"] .single-post .avpi-s {
  padding: 6px 10px;
  background: var(--cin-raised) !important;
  color: var(--cin-muted) !important;
  border: 1px solid var(--cin-line) !important;
  border-radius: 6px !important;
  font-family: var(--cin-font);
  font-size: .74rem;
}
html[data-javfin-appearance="classic"] .single-post .avpi-s[aria-pressed="true"] {
  background: rgba(244, 63, 126, .15) !important;
  border-color: rgba(244, 63, 126, .55) !important;
}
html[data-javfin-appearance="classic"] .single-post .related-section {
  margin: 0;
  padding: 16px 14px;
  border-top: 0;
  border-left: 1px solid var(--cin-line);
  min-width: 0;
  align-self: stretch;
  background: rgba(7, 6, 15, .6);
}
html[data-javfin-appearance="classic"] .single-post .related-section .section-heading { gap: 8px; margin-bottom: 14px; }
html[data-javfin-appearance="classic"] .single-post .related-section .section-heading h2 { font-size: .85rem; }
html[data-javfin-appearance="classic"] .single-post .related-section .text-link { font-size: .7rem; white-space: nowrap; }
html[data-javfin-appearance="classic"] .single-post .related-section .movie-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
html[data-javfin-appearance="classic"] .single-post .related-section .movie-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-content: start;
  gap: 4px 8px;
  padding: 6px;
  border: 1px solid var(--cin-line);
  border-radius: 7px;
  background: rgba(14, 13, 26, .78);
}
html[data-javfin-appearance="classic"] .single-post .related-section .movie-cover { grid-row: 1 / 3; border-radius: 4px; }
html[data-javfin-appearance="classic"] .single-post .related-section .movie-card-meta { flex-wrap: wrap; margin: 0; min-height: 0; gap: 0 6px; }
html[data-javfin-appearance="classic"] .single-post .related-section .movie-code { font-size: .65rem; }
html[data-javfin-appearance="classic"] .single-post .related-section .movie-card-meta time { font-size: .58rem; }
html[data-javfin-appearance="classic"] .single-post .related-section .movie-card h2 {
  margin: 0;
  font-size: .73rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html[data-javfin-appearance="classic"] .single-post .site-footer { background: rgba(10, 9, 20, .9); }
.gac-cinema .javfin-watch-appearance {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 0 28px 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  color: var(--cin-muted);
}
.gac-cinema .javfin-watch-appearance select {
  max-width: 100%;
  min-height: 40px;
  padding: 6px 11px;
  border: 1px solid var(--cin-line);
  border-radius: 8px;
  background: var(--cin-raised);
  color: var(--cin-ink);
}
@media (max-width: 1000px) {
  html[data-javfin-appearance="classic"] .single-post .watch-classic-content { grid-template-columns: minmax(0, 1fr); }
  html[data-javfin-appearance="classic"] .single-post .related-section { border-left: 0; border-top: 1px solid var(--cin-line); }
  html[data-javfin-appearance="classic"] .single-post .related-section .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  html[data-javfin-appearance="classic"] .single-post .header-inner { grid-template-columns: minmax(0, 1fr) 44px; gap: 12px; padding-inline: 16px; }
}
@media (max-width: 640px) {
  html[data-javfin-appearance="classic"] .single-post .watch-page { padding: 18px 12px 36px; }
  html[data-javfin-appearance="classic"] .single-post .watch-heading { flex-wrap: wrap; padding: 12px; gap: 8px; }
  html[data-javfin-appearance="classic"] .single-post .watch-heading h1 { order: 3; flex-basis: 100%; font-size: .96rem; }
  html[data-javfin-appearance="classic"] .single-post .watch-classic-close { margin-left: auto; }
  html[data-javfin-appearance="classic"] .single-post .watch-main { padding: 12px; }
  html[data-javfin-appearance="classic"] .single-post .related-section .movie-grid { grid-template-columns: minmax(0, 1fr); }
  .gac-cinema .javfin-watch-appearance { padding-inline: 16px; }
}

/* Movie Watch Page Favorite Button */
.watch-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.btn-watch-fav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: var(--cin-raised, rgba(22, 20, 38, 0.9));
  color: #f8fafc;
  font-family: var(--cin-font, 'Prompt', sans-serif);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-watch-fav:hover {
  border-color: #f43f7e;
  background: rgba(244, 63, 126, 0.15);
  color: #fff;
}
.btn-watch-fav.active,
.btn-watch-fav.saved {
  background: linear-gradient(135deg, rgba(244, 63, 126, 0.3), rgba(168, 85, 247, 0.3));
  border-color: #f43f7e;
  color: #f43f7e;
  box-shadow: 0 0 12px rgba(244, 63, 126, 0.35);
}
.btn-watch-fav svg {
  flex-shrink: 0;
}
.btn-watch-fav.active svg,
.btn-watch-fav.saved svg {
  fill: currentColor;
}
/* Unified Player Button Row: Same line, same height, perfect alignment */
.avpi-btns {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 10px 0 !important;
  padding: 0 !important;
}

/* Keep disabled/hidden server buttons completely hidden */
.avpi-btns .avpi-off,
.avpi-btns .avpi-s.avpi-off,
.avpi-btns [hidden],
.avpi-btns [disabled],
.avpi-btns [style*="display:none"],
.avpi-btns [style*="display: none"] {
  display: none !important;
}

/* Style only the visible buttons */
.avpi-btns .avpi-s:not(.avpi-off):not([hidden]):not([disabled]),
.avpi-btns button.avpi-s:not(.avpi-off):not([hidden]):not([disabled]),
.avpi-btns .avpi-fav-btn,
.avpi-btns button#playerFavBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 16px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  font-family: inherit !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.18s ease !important;
}

/* Ensure favorite button is always at the VERY END of the row */
.avpi-btns .avpi-fav-btn,
.avpi-btns #playerFavBtn {
  order: 99 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(22, 20, 38, 0.95) !important;
  color: #f8fafc !important;
}

.avpi-btns .avpi-fav-btn svg,
.avpi-btns #playerFavBtn svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  vertical-align: middle !important;
  stroke: currentColor !important;
}

.avpi-btns .avpi-fav-btn:hover,
.avpi-btns #playerFavBtn:hover {
  border-color: #f43f7e !important;
  background: rgba(244, 63, 126, 0.15) !important;
  color: #fff !important;
}

.avpi-btns .avpi-fav-btn.active,
.avpi-btns .avpi-fav-btn.saved,
.avpi-btns #playerFavBtn.active,
.avpi-btns #playerFavBtn.saved {
  background: linear-gradient(135deg, #f43f7e, #a855f7) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(244, 63, 126, 0.4) !important;
}

.avpi-btns .avpi-fav-btn.active svg,
.avpi-btns .avpi-fav-btn.saved svg,
.avpi-btns #playerFavBtn.active svg,
.avpi-btns #playerFavBtn.saved svg {
  fill: currentColor !important;
}

/* Watch Page Sponsor Banner */
.watch-sponsor-banner {
  width: 100%;
  max-width: 900px;
  margin: 16px auto 24px auto;
  display: block;
}

.sponsor-banner-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #090814;
  border: 1px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.15);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.sponsor-banner-wrap:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 215, 0, 0.75);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 25px rgba(245, 158, 11, 0.3);
}

.sponsor-banner-link {
  display: block;
  width: 100%;
  text-decoration: none;
  line-height: 0;
  cursor: pointer;
  background: transparent;
}

.sponsor-banner-media {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1648 / 544;
  object-fit: cover;
  border-radius: 11px;
}

@media (max-width: 768px) {
  .watch-sponsor-banner {
    margin: 12px auto 18px auto;
  }
  .sponsor-banner-wrap {
    border-radius: 8px;
  }
  .sponsor-banner-media {
    border-radius: 7px;
  }
}
