/* ShwePlay Series Episode Rail & Season Selector — Consolidated & Mobile Fixes */

/* Season Selector Bar */
.sp-season-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.sp-season-bar .sp-community-header {
  min-width: 0;
  flex: 1 1 auto;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border: none !important;
  font-size: clamp(1rem, 4.2vw, 1.25rem) !important;
  flex-wrap: wrap;
}
.sp-season-bar .season-dropdown {
  float: none !important;
  flex: 0 0 auto;
  max-width: 100%;
}
.sp-season-dropdown-btn {
  min-height: 44px !important;
  padding: 8px 16px !important;
  max-width: 100%;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}
.sp-season-menu .dropdown-item {
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  transition: background-color 0.18s ease, color 0.18s ease !important;
}

/* Signature Cinema Episode Rail */
.flix-scroll-x.serie-episodes {
  padding: 12px 6px 26px 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
}
.episode.sp-episode-card,
.sp-episode-card {
  display: inline-block !important;
  vertical-align: top !important;
  white-space: normal !important;
  width: 290px !important;
  margin: 0 16px 0 0 !important;
  padding: 0 !important;
  background: linear-gradient(180deg, #121824 0%, #0a0e17 100%) !important;
  border: 1px solid rgba(255, 214, 91, 0.18) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  position: relative !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 1px rgba(255, 214, 91, 0.2) !important;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
  color: inherit !important;
}
.episode.sp-episode-card:hover,
.sp-episode-card:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(255, 214, 91, 0.55) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.75), 0 0 28px rgba(255, 214, 91, 0.22) !important;
  z-index: 10 !important;
}
.sp-ep-thumb-wrapper {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  height: 163px !important;
  overflow: hidden !important;
  background: #060911 !important;
  border-bottom: 1px solid rgba(255, 214, 91, 0.12) !important;
}
@supports (aspect-ratio: 16 / 9) {
  .sp-ep-thumb-wrapper { height: auto !important; }
}
.sp-ep-thumb-link { display: block !important; width: 100% !important; height: 100% !important; position: relative !important; text-decoration: none !important; color: inherit !important; }
.sp-ep-img,
.sp-episode-card img {
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
  max-width: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.sp-episode-card:hover .sp-ep-img { transform: scale(1.06) !important; }
.sp-ep-hover-glass {
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(circle, rgba(10, 14, 23, 0.25) 0%, rgba(6, 9, 17, 0.65) 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  transition: opacity 0.22s ease, transform 0.22s ease !important;
  pointer-events: none !important;
}
.sp-episode-card:hover .sp-ep-hover-glass { opacity: 1 !important; }
.sp-ep-play-circle {
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #ffd65b 0%, #f59e0b 100%) !important;
  color: #0b0f19 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  padding-left: 3px !important;
  box-shadow: 0 0 24px rgba(255, 214, 91, 0.75), 0 4px 14px rgba(0, 0, 0, 0.6) !important;
  transform: scale(0.85) !important;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.sp-episode-card:hover .sp-ep-play-circle { transform: scale(1) !important; }
.sp-ep-top-bar { position: absolute !important; top: 9px !important; left: 9px !important; right: 9px !important; display: flex !important; align-items: center !important; justify-content: space-between !important; pointer-events: none !important; z-index: 4 !important; }
.sp-ep-num-pill { display: inline-flex !important; align-items: center !important; gap: 4px !important; background: rgba(10, 14, 23, 0.88) !important; backdrop-filter: blur(8px) !important; -webkit-backdrop-filter: blur(8px) !important; border: 1px solid rgba(255, 214, 91, 0.45) !important; color: #ffd65b !important; font-size: 11px !important; font-weight: 850 !important; letter-spacing: 0.5px !important; padding: 3px 8px !important; border-radius: 6px !important; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55) !important; }
.sp-ep-access-tag { display: inline-flex !important; align-items: center !important; gap: 4px !important; font-size: 10.5px !important; font-weight: 900 !important; letter-spacing: 0.4px !important; padding: 3px 8px !important; border-radius: 6px !important; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important; }
.sp-ep-access-tag.sp-ep-vip { background: linear-gradient(135deg, #ffd65b 0%, #f59e0b 100%) !important; border: 1px solid rgba(255, 214, 91, 0.7) !important; color: #0b0f19 !important; }
.sp-ep-access-tag.sp-ep-reward { background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%) !important; border: 1px solid rgba(56, 189, 248, 0.7) !important; color: #ffffff !important; }

/* Bottom Overlays & Enlarged Touch Targets */
.sp-ep-bottom-bar { position: absolute !important; bottom: 8px !important; left: 9px !important; right: 9px !important; display: flex !important; align-items: center !important; justify-content: space-between !important; z-index: 8 !important; pointer-events: none !important; }
.sp-ep-dur-pill { display: inline-flex !important; align-items: center !important; gap: 4px !important; background: rgba(10, 14, 23, 0.85) !important; backdrop-filter: blur(6px) !important; -webkit-backdrop-filter: blur(6px) !important; border: 1px solid rgba(255, 255, 255, 0.18) !important; color: #e2e8f0 !important; font-size: 10.5px !important; font-weight: 750 !important; padding: 2px 7px !important; border-radius: 5px !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important; pointer-events: none !important; }
.sp-ep-action-pills { display: inline-flex !important; align-items: center !important; gap: 8px !important; position: relative !important; z-index: 9 !important; pointer-events: auto !important; }
.sp-ep-action-btn,
.episode.sp-episode-card .episode-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border-radius: 50% !important;
  background: rgba(10, 14, 23, 0.9) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  color: #e2e8f0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13px !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 10 !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
}
.sp-ep-action-btn:hover,
.episode.sp-episode-card .episode-btn:hover {
  background: linear-gradient(135deg, #ffd65b, #f59e0b) !important;
  border-color: #ffd65b !important;
  color: #0b0f19 !important;
  transform: scale(1.08) !important;
  box-shadow: 0 0 12px rgba(255, 214, 91, 0.7) !important;
}

/* Metadata & Burmese Anti-Clip Synopsis */
.sp-ep-content-box { padding: 12px 14px 14px 14px !important; display: flex !important; flex-direction: column !important; gap: 6px !important; text-align: left !important; background: transparent !important; }
.sp-ep-title-link { text-decoration: none !important; color: inherit !important; display: block !important; }
.sp-ep-title { margin: 0 !important; padding: 0 !important; font-size: 13.5px !important; font-weight: 700 !important; line-height: 1.4 !important; color: #f8fafc !important; display: flex !important; align-items: center !important; gap: 6px !important; overflow: hidden !important; }
.sp-locale-mm .sp-ep-title { line-height: 1.58 !important; }
.sp-ep-title-prefix { color: #ffd65b !important; font-weight: 850 !important; flex-shrink: 0 !important; }
.sp-ep-title-main { color: #f8fafc !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; transition: color 0.2s ease !important; }
.sp-episode-card:hover .sp-ep-title-main { color: #ffd65b !important; }
.sp-ep-synopsis {
  font-size: 12px !important;
  line-height: 1.55 !important;
  color: #94a3b8 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  height: auto !important;
  min-height: 2.9em !important;
  word-break: break-word !important;
}
.sp-locale-mm .sp-ep-synopsis { line-height: 1.68 !important; min-height: 3.36em !important; }
.sp-ep-empty-synopsis { display: flex !important; align-items: center !important; flex-wrap: wrap !important; gap: 8px !important; height: auto !important; min-height: 2.9em !important; }
.sp-ep-meta-tag { display: inline-flex !important; align-items: center !important; gap: 4px !important; font-size: 10.5px !important; font-weight: 600 !important; color: #94a3b8 !important; background: rgba(255, 255, 255, 0.04) !important; border: 1px solid rgba(255, 255, 255, 0.08) !important; padding: 3px 8px !important; border-radius: 4px !important; }
.sp-episode-card .episode-detail { display: none !important; }

/* Light Mode WCAG AA Contrast */
.light-mode .episode.sp-episode-card,
.light-mode .sp-episode-card { background: #ffffff !important; border-color: rgba(15, 23, 42, 0.14) !important; box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08) !important; }
.light-mode .episode.sp-episode-card:hover,
.light-mode .sp-episode-card:hover { border-color: #d97706 !important; box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14), 0 0 18px rgba(217, 119, 6, 0.15) !important; }
.light-mode .sp-ep-thumb-wrapper { background: #e2e8f0 !important; border-bottom-color: rgba(15, 23, 42, 0.08) !important; }
.light-mode .sp-ep-num-pill { background: rgba(255, 255, 255, 0.96) !important; border-color: rgba(180, 83, 9, 0.45) !important; color: #92400e !important; }
.light-mode .sp-ep-dur-pill { background: rgba(255, 255, 255, 0.94) !important; border-color: rgba(15, 23, 42, 0.15) !important; color: #1e293b !important; }
.light-mode .sp-ep-action-btn,
.light-mode .episode.sp-episode-card .episode-btn { background: rgba(255, 255, 255, 0.96) !important; border-color: rgba(15, 23, 42, 0.22) !important; color: #0f172a !important; }
.light-mode .sp-ep-action-btn:hover,
.light-mode .episode.sp-episode-card .episode-btn:hover { background: #d97706 !important; border-color: #d97706 !important; color: #ffffff !important; }
.light-mode .sp-ep-title,
.light-mode .sp-ep-title-main { color: #0f172a !important; }
.light-mode .sp-ep-title-prefix,
.light-mode .sp-episode-card:hover .sp-ep-title-main { color: #92400e !important; }
.light-mode .sp-ep-synopsis { color: #475569 !important; }
.light-mode .sp-ep-meta-tag { color: #475569 !important; background: rgba(15, 23, 42, 0.05) !important; border-color: rgba(15, 23, 42, 0.12) !important; }

/* Touch & Phone Responsive */
@media (hover: none) {
  .sp-ep-hover-glass { opacity: 0.88 !important; transform: scale(0.92) !important; }
}
@media (max-width: 767.98px) {
  .shweplay-site .flix-carousel:has(.serie-episodes) { padding-left: 6px !important; padding-right: 6px !important; }
  .shweplay-site .flix-carousel:has(.serie-episodes) > .prev_btn,
  .shweplay-site .flix-carousel:has(.serie-episodes) > .next_btn { display: none !important; }
  .episode.sp-episode-card,
  .sp-episode-card { width: min(256px, 78vw) !important; margin-right: 12px !important; }
  .sp-ep-title { font-size: 13px !important; }
}
@media (max-width: 420px) {
  .sp-season-bar .season-dropdown,
  .sp-season-dropdown-btn { width: 100%; }
}
