/* Webflix — modern single movie/series detail page */

.main_page_container.detail-route {
  padding: 0;
  max-width: none;
}

.wf-detail {
  --wf-detail-accent: #f5ad11;
  --wf-detail-bg: #0b0e0f;
  position: relative;
  display: block !important;
  width: 100%;
  overflow: hidden;
  color: #f2f2f2;
}

/* Single backdrop — one image, no tiling */
.wf-detail .bg_back_single {
  position: absolute;
  inset: 0;
  height: min(72vh, 640px) !important;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: none !important;
  background-image: none !important;
}

.wf-detail .bg_back_single::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to top, var(--wf-detail-bg) 0%, rgba(11, 14, 15, 0.95) 24%, rgba(11, 14, 15, 0.62) 58%, rgba(11, 14, 15, 0.4) 100%),
    linear-gradient(to left, var(--wf-detail-bg) 0%, rgba(11, 14, 15, 0.88) 48%, rgba(11, 14, 15, 0.45) 72%, transparent 88%);
}

.wf-detail .bg_back_single img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  filter: saturate(1.05);
}

.wf-detail > .container,
.wf-detail-scroll > .container {
  display: block !important;
  flex-flow: unset !important;
}

.wf-detail > .container {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}

.wf-detail .content_single_post {
  display: grid !important;
  grid-template-columns: minmax(140px, 260px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(5.5rem, 14vh, 8rem) 0 clamp(1.5rem, 4vw, 2.5rem) !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
  flex-direction: row !important;
}

.wf-detail .poster {
  position: relative;
  width: 100% !important;
  max-width: 260px;
}

.wf-detail .hero_poster_img,
.wf-detail .poster img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wf-detail .side_data {
  flex: none !important;
  min-width: 0;
  background: rgba(11, 14, 15, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: clamp(1rem, 2.5vw, 1.5rem) !important;
}

.wf-detail .single_en_title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.5rem, 4vw, 2.35rem) !important;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  justify-content: flex-start !important;
  text-align: start;
}

.wf-detail .micro_data {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.wf-detail .micro_data > span,
.wf-detail .imdb_rate_single {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.wf-detail .imdb_rate_single {
  background: rgba(245, 173, 17, 0.12);
  border-color: rgba(245, 173, 17, 0.35);
  color: var(--wf-detail-accent);
}

.wf-detail .imdb_rate_single .avg_num {
  font-weight: 800;
}

/* Neutralize legacy absolute positioning */
.wf-detail .movie-infos,
.wf-detail .movie-taxonomy,
.wf-detail .header-buttons,
.wf-detail .header-ratings,
.wf-detail .movie-title {
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  margin: 0 0 1rem !important;
}

.wf-detail .movie-infos a,
.wf-detail .movie-taxonomy a {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  margin: 0 0 0.35rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.wf-detail .movie-infos a:hover,
.wf-detail .movie-taxonomy a:hover {
  background: rgba(245, 173, 17, 0.15);
  color: var(--wf-detail-accent) !important;
  text-decoration: none;
}

.wf-detail .presentation {
  margin-bottom: 1.25rem;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  max-width: 720px;
}

.wf-detail .single_like_or_dislike {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.wf-detail .single_btns,
.wf-detail .movie-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.wf-detail .btn_single,
.wf-detail .single_like_or_dislike button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px !important;
  height: auto !important;
  padding: 0 1.15rem !important;
  margin: 0 !important;
  border-radius: 12px !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.wf-detail .btn_play_online {
  background: linear-gradient(135deg, #f5ad11, #e89b00) !important;
  color: #0b0e0f !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(245, 173, 17, 0.3);
}

.wf-detail .btn_play_online:hover {
  transform: translateY(-2px);
  color: #0b0e0f !important;
}

.wf-detail .btn_single:not(.btn_play_online),
.wf-detail .single_like_or_dislike button {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
}

.wf-detail .btn_single:not(.btn_play_online):hover,
.wf-detail .single_like_or_dislike button:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}

.wf-detail .single_add_to_watchlist.active {
  background: rgba(245, 173, 17, 0.18) !important;
  border-color: rgba(245, 173, 17, 0.4) !important;
  color: var(--wf-detail-accent) !important;
}

/* Sticky tabs */
.wf-detail .tabs_scroll {
  position: sticky;
  top: var(--header-height, 70px);
  z-index: 20;
  width: 100%;
  height: auto;
  background: rgba(11, 14, 15, 0.85);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wf-detail .tabs_scroll_inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}

.wf-detail .tabs_scroll ul,
.wf-detail .tabs_scroll {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.65rem 0;
}

.wf-detail .tabs_scroll::-webkit-scrollbar {
  display: none;
}

.wf-detail .tab_scroll_item {
  flex: 0 0 auto;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.wf-detail .tab_scroll_item:hover {
  color: #fff;
  text-decoration: none;
}

.wf-detail .tab_scroll_item.active {
  background: rgba(245, 173, 17, 0.15);
  color: var(--wf-detail-accent);
}

/* Content sections below hero */
.wf-detail-scroll {
  position: relative;
  z-index: 1;
  background: var(--wf-detail-bg);
  padding-bottom: 3rem;
}

.wf-detail-scroll > .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem);
}

.wf-detail-scroll .SingleRowBox {
  margin: 2rem 0 1.5rem;
}

.wf-detail-scroll .SingleRowBox .title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.wf-detail-scroll .SingleRowBox .text_title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.wf-detail-scroll .sep_line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.12));
}

.wf-detail-scroll .data_more_single ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.wf-detail-scroll .data_more_single li {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wf-detail-scroll .label_data_single {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.25rem;
}

.wf-detail-scroll .value_data_single {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.wf-detail-scroll .comment-section .comment-item {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.75rem;
}

.wf-detail-scroll .review {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.75rem;
}

.wf-detail-scroll .btn-primary {
  background: var(--wf-detail-accent) !important;
  border-color: var(--wf-detail-accent) !important;
  color: #0b0e0f !important;
  border-radius: 10px;
}

/* Legacy single-style overrides */
.wf-detail-scroll .detailPost ul {
  height: auto !important;
  overflow: visible !important;
}

.wf-detail-scroll .relatedPost .body {
  display: block !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

.wf-detail-scroll .flix-scroll-x .artist-card {
  flex: 0 0 auto;
  min-width: 96px;
  max-width: 108px;
}

.wf-detail-scroll .artist-card-name,
.wf-detail-scroll .cast-role {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}

.wf-detail-scroll .artist-card-avatar img {
  width: 88px;
  height: 88px;
}

/* Responsive */
@media (max-width: 768px) {
  .wf-detail .bg_back_single {
    height: 52vh;
  }

  .wf-detail .content_single_post {
    grid-template-columns: minmax(110px, 38vw) minmax(0, 1fr);
    gap: 1rem;
    padding-top: 5rem !important;
  }

  .wf-detail .hero_poster_img,
  .wf-detail .poster img {
    border-radius: 12px;
  }

  .wf-detail .presentation {
    -webkit-line-clamp: 4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .wf-detail .single_btns .btn_single,
  .wf-detail .single_like_or_dislike button {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: calc(50% - 0.35rem);
    font-size: 0.82rem !important;
    padding: 0 0.75rem !important;
  }

  .wf-detail .btn_play_online {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

@media (max-width: 520px) {
  .wf-detail .content_single_post {
    grid-template-columns: 1fr;
  }

  .wf-detail .poster {
    max-width: 200px;
    margin: 0 auto;
  }

  .wf-detail .side_data {
    width: 100%;
    margin-top: 0.5rem;
  }
}
