/* Refresh for /watch/{movie,series,anime} pages. Scoped to body.watch-page;
   the templates' inline styles remain the base. */
body.watch-page { --wp-accent: #e50914; --wp-accent-soft: rgba(229, 9, 20, 0.15); background: #07070a; }
body.watch-page--series { --wp-accent: #3b82f6; --wp-accent-soft: rgba(59, 130, 246, 0.15); }
body.watch-page--anime { --wp-accent: #a855f7; --wp-accent-soft: rgba(168, 85, 247, 0.16); }

/* Panels: one quiet surface style instead of mixed borders/glows */
.watch-page .watch-controls-panel,
.watch-page .server-selector,
.watch-page .content-overview,
.watch-page .sidebar-section,
.watch-page .watch-party-section,
.watch-page .streaming-tips {
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}
.watch-page .player-section { border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }

/* Server buttons as pills with an accent for the active one */
.watch-page .server-btn {
  border-radius: 999px !important; padding: 8px 16px !important; font-weight: 700 !important;
  background: rgba(255, 255, 255, 0.06) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.watch-page .server-btn:hover { border-color: var(--wp-accent) !important; }
.watch-page .server-btn.active { background: var(--wp-accent) !important; border-color: var(--wp-accent) !important; color: #fff !important; box-shadow: none !important; }

/* ---------- Similar titles: horizontal poster row ---------- */
.watch-page .similar-content-section {
  margin-top: 34px !important; padding: 0 !important;
  background: none !important; border: 0 !important; box-shadow: none !important;
}
.watch-page .similar-content-section::before, .watch-page .similar-content-section::after { display: none !important; }
.watch-page .similar-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0 14px !important; padding: 0 !important; border: 0 !important;
}
.watch-page .similar-section-header h3, .watch-page .similar-section-header h2 {
  margin: 0; padding-left: 12px; border-left: 4px solid var(--wp-accent);
  font-size: 1.35rem !important; font-weight: 800; letter-spacing: -0.01em; text-transform: none !important;
  color: #fff !important; background: none !important; -webkit-text-fill-color: #fff !important;
}
.watch-page .similar-section-header h3 i, .watch-page .similar-section-header h2 i { display: none; }
.watch-page .similar-section-header::after { display: none !important; }
.watch-page .similar-section-header a {
  border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important;
  font-weight: 700; color: rgba(255, 255, 255, 0.7) !important;
}
.watch-page .similar-section-header a:hover { color: var(--wp-accent) !important; }

.watch-page .similar-cards-grid {
  display: flex !important; grid-template-columns: none !important; gap: 0 !important;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  padding: 2px 2px 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.watch-page .similar-content-card {
  flex: 0 0 160px; margin-right: 14px; scroll-snap-align: start;
  padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important;
  border-radius: 0 !important; text-decoration: none;
}
.watch-page .similar-content-card:hover { transform: none !important; }
.watch-page .similar-card-image {
  position: relative; aspect-ratio: 2 / 3; height: auto !important; border-radius: 10px; overflow: hidden;
  background: #15151c; transition: transform 0.2s ease;
}
.watch-page .similar-content-card:hover .similar-card-image { transform: translateY(-4px) scale(1.03); }
.watch-page .similar-card-image img { width: 100%; height: 100% !important; object-fit: cover; }
.watch-page .similar-card-overlay { background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent 55%) !important; }
.watch-page .similar-card-overlay .play-icon { background: var(--wp-accent) !important; box-shadow: none !important; }
.watch-page .similar-rating-badge {
  top: 8px !important; left: 8px !important; right: auto !important; padding: 3px 7px !important; border-radius: 6px !important;
  font-size: 0.72rem !important; font-weight: 700; color: #fbbf24 !important; background: rgba(0, 0, 0, 0.75) !important; border: 0 !important;
}
.watch-page .similar-card-info { padding: 9px 0 0 !important; background: none !important; }
.watch-page .similar-card-title {
  margin: 0 !important; font-size: 0.88rem !important; font-weight: 650; line-height: 1.3; color: #fff !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block !important;
}
.watch-page .similar-card-meta { display: block; margin-top: 3px; font-size: 0.76rem; color: rgba(255, 255, 255, 0.55) !important; }

@media (max-width: 600px) {
  .watch-page .similar-content-card { flex-basis: 120px; margin-right: 10px; }
  .watch-page .similar-section-header h3, .watch-page .similar-section-header h2 { font-size: 1.15rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  .watch-page .similar-card-image { transition: none; }
}

/* Episode list: docked in the sidebar beside the player (desktop) or under the player (mobile) */
.pm-episodes-dock:empty { display: none; }
body.pm-episodes-docked .pm-episodes-dock {
  position: sticky; top: 76px; z-index: 2; margin-bottom: 16px;
}
body.pm-episodes-docked .pm-episodes-dock .pm-episodes {
  margin-top: 0 !important; padding: 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.08);
}
body.pm-episodes-docked .pm-episodes-dock .pm-episodes-head { margin-bottom: 10px; gap: 8px; }
body.pm-episodes-docked .pm-episodes-dock .pm-episodes-head h3 { font-size: 1.05rem; }
body.pm-episodes-docked .pm-episodes-dock .pm-episodes-season-select { min-width: 0; width: 100%; }
body.pm-episodes-docked .pm-episodes-dock .pm-episodes-list { max-height: calc(100vh - 210px); }
body.pm-episodes-docked .pm-episodes-dock .pm-episode-row { grid-template-columns: 30px 72px 1fr; gap: 10px; padding: 8px; }
body.pm-episodes-docked .pm-episodes-dock .pm-episode-thumb { width: 72px; height: 41px; }
body.pm-episodes-docked .pm-episodes-dock .pm-episode-play { display: none; }
body.pm-episodes-docked .pm-episodes-dock .pm-episode-num { font-size: 1rem; }
body.pm-episodes-docked .pm-episodes-dock .pm-episode-title { font-size: 0.85rem; }
body.pm-episodes-docked .movie-poster-sidebar { display: none; }
#pmEpisodesMobileSlot .pm-episodes { margin-top: 14px !important; }
#pmEpisodesMobileSlot .pm-episodes-list { max-height: 55vh; }
body.watch-page--sports { --wp-accent: #ef4444; --wp-accent-soft: rgba(239, 68, 68, 0.15); }
body.pm-episodes-docked .watch-page .sidebar-section,
body.watch-page.pm-episodes-docked .sidebar-section { background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; }

/* ---------- Sports watch page ---------- */
body.watch-page--sports .watch-sport-page { padding-top: 12px; }
body.watch-page--sports .player-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
body.watch-page--sports .sport-head-actions { display: flex; gap: 8px; }

body.watch-page--sports .sport-match {
  position: relative; overflow: hidden; margin-bottom: 14px; padding: 18px 22px 16px; border-radius: 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(239, 68, 68, 0.18), transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(59, 130, 246, 0.16), transparent 55%),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
body.watch-page--sports .sport-match-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; color: rgba(255, 255, 255, 0.62); margin-bottom: 14px; }
body.watch-page--sports .sport-match-league { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.78); }
body.watch-page--sports .sport-match-league i, body.watch-page--sports .sport-match-when i { margin-right: 6px; color: var(--wp-accent); }
body.watch-page--sports .sport-match-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
body.watch-page--sports .sport-team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
body.watch-page--sports .sport-team-badge {
  width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 800; font-size: 1.4rem; color: #fff; overflow: hidden;
}
body.watch-page--sports .sport-team-badge img { width: 70%; height: 70%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
body.watch-page--sports .sport-team-name { font-size: 1.15rem; font-weight: 800; color: #fff; line-height: 1.2; overflow-wrap: anywhere; }
body.watch-page--sports .sport-team-side { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
body.watch-page--sports .sport-match-center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
body.watch-page--sports .sport-match-vs { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.35); }
body.watch-page--sports .sport-status {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  font-weight: 800; font-size: 0.85rem; letter-spacing: 0.08em; white-space: nowrap; background: none; border: 0;
}
body.watch-page--sports .sport-status--live, body.watch-page--sports .sport-status.live { color: #fff; background: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2); }
body.watch-page--sports .sport-status--soon { flex-direction: column; gap: 2px; padding: 8px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); color: #fff; }
body.watch-page--sports .sport-status-label { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
body.watch-page--sports .sport-status-time { font-size: 1.1rem; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
body.watch-page--sports .sport-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: sportLive 1.2s infinite; }
@keyframes sportLive { 50% { opacity: 0.25; } }
body.watch-page--sports .sport-match-title { margin: 14px 0 0; text-align: center; font-size: 0.95rem; font-weight: 600; color: rgba(255, 255, 255, 0.55); }
body.watch-page--sports .sport-match-single { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
body.watch-page--sports .sport-match-title--big { margin: 0; text-align: left; font-size: 1.6rem; font-weight: 800; color: #fff; }

/* sources: one clean row instead of the old centred box */
body.watch-page--sports .watch-controls-panel { padding: 14px 16px !important; margin-top: 12px; }
body.watch-page--sports .watch-controls-panel .player-controls { display: block !important; padding: 0 !important; margin: 0 !important; background: none !important; border: 0 !important; text-align: left; }
body.watch-page--sports .watch-controls-servers { width: 100%; }
body.watch-page--sports .server-selector { padding: 0 !important; background: none !important; border: 0 !important; width: 100% !important; max-width: none !important; margin: 0 !important; }
body.watch-page--sports .server-selector > label { display: none; }
body.watch-page--sports .server-buttons { display: flex !important; flex-wrap: wrap; gap: 8px; justify-content: flex-start !important; padding: 0 !important; background: none !important; border: 0 !important; }
body.watch-page--sports .watch-controls-actions-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* sidebar: chat then Discord, stacked (both were sticky and overlapped) */
body.watch-page--sports .sport-page-right-col #sportWatchLiveChat,
body.watch-page--sports .sport-page-right-col .sidebar-section { position: relative !important; top: auto !important; }
body.watch-page--sports .sport-page-right-col .sidebar-section { margin-top: 0 !important; }
body.watch-page--sports .server-selector label { display: none !important; }
@media (max-width: 1024px) {
  body.watch-page--sports .player-header { flex-direction: row !important; justify-content: space-between !important; }
}
@media (max-width: 600px) {
  body.watch-page--sports .sport-match { padding: 14px; }
  body.watch-page--sports .sport-team-badge { width: 56px; height: 56px; font-size: 1.1rem; }
  body.watch-page--sports .sport-team-name { font-size: 0.95rem; }
  body.watch-page--sports .sport-match-teams { gap: 8px; }
}

/* ---------- Movie / TV / anime pages: even spacing, "Up next" bar, TV-friendly ---------- */
.watch-page .player-section { gap: 14px !important; }
.watch-page .player-section > .watch-download-bar,
.watch-page .player-section > .acc-bar,
.watch-page .player-section > .watch-party-section,
.watch-page .player-section > .pm-next-episode-bar,
.watch-page .player-section > .channel-details,
.watch-page .player-section > .content-overview,
.watch-page .player-section > .tips-section { margin-top: 0 !important; margin-bottom: 0 !important; }
.watch-page .player-section > .watch-player-toolbar { margin-top: 0 !important; }
.watch-page .player-section > #pmEpisodesMobileSlot:empty { display: none; }
.watch-page .pm-next-episode-bar { justify-content: stretch !important; }
.watch-page .pm-next-episode-btn { width: 100%; justify-content: space-between; padding: 12px 18px !important; border-radius: 14px !important; }

/* Single-column layouts with room (theater mode, TVs, tablets): episodes as a card grid */
@media (min-width: 700px) {
  #pmEpisodesMobileSlot .pm-episodes-list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); max-height: 460px; }
  #pmEpisodesMobileSlot .pm-episode-row:not(.pm-episode-row--compact) { grid-template-columns: 34px 96px 1fr; }
  #pmEpisodesMobileSlot .pm-episode-row .pm-episode-play { display: none; }
}

/* Remote / keyboard navigation */
.watch-page :is(.pm-episode-row, .server-btn, .watch-quick-btn, .action-btn, .acc-btn, .pm-next-episode-btn, .back-btn, .pm-episodes-season-select):focus-visible {
  outline: 3px solid var(--wp-accent) !important; outline-offset: 3px; position: relative; z-index: 1;
}
.watch-page .watch-toggle:focus-within { outline: 3px solid var(--wp-accent); outline-offset: 3px; border-radius: 999px; }
@media (min-width: 1800px) {
  .watch-page .watch-container { max-width: 1840px !important; }
  .watch-page .pm-episode-title, .watch-page .server-btn, .watch-page .watch-quick-btn { font-size: 1.02rem; }
}

/* Sports sidebar: chat sized to the player, match list, slim Discord link */
body.watch-page--sports #sportWatchLiveChat { min-height: 0 !important; }
body.watch-page--sports #sportWatchLiveChat .chat-messages { min-height: 420px; max-height: 560px; }
body.watch-page--sports #sportWatchLiveChat .welcome-message { padding: 16px !important; }
body.watch-page--sports #sportWatchLiveChat .welcome-message .welcome-icon { display: none; }
body.watch-page--sports .sport-side { padding: 14px !important; background: rgba(255, 255, 255, 0.035) !important; border: 1px solid rgba(255, 255, 255, 0.08) !important; border-radius: 14px !important; }
body.watch-page--sports .sport-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
body.watch-page--sports .sport-side-head h3 { margin: 0; font-size: 1rem; color: #fff; display: flex; align-items: center; gap: 8px; }
body.watch-page--sports .sport-side-head h3 i { color: var(--wp-accent); }
body.watch-page--sports .sport-side-head a { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); text-decoration: none; }
body.watch-page--sports .sport-side-head a:hover { color: #fff; }
body.watch-page--sports .sport-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
body.watch-page--sports .sport-side-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; color: inherit; text-decoration: none; transition: background 0.15s; }
body.watch-page--sports .sport-side-item:hover, body.watch-page--sports .sport-side-item:focus-visible { background: rgba(255, 255, 255, 0.06); }
body.watch-page--sports .sport-side-badges { display: flex; align-items: center; gap: 2px; flex: none; width: 56px; justify-content: center; color: rgba(255, 255, 255, 0.4); }
body.watch-page--sports .sport-side-badges img { width: 26px; height: 26px; object-fit: contain; }
body.watch-page--sports .sport-side-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.watch-page--sports .sport-side-title { font-size: 0.88rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.watch-page--sports .sport-side-meta { font-size: 0.75rem; color: rgba(255, 255, 255, 0.55); display: flex; gap: 6px; align-items: center; }
body.watch-page--sports .sport-side-live { color: #fff; background: #dc2626; border-radius: 4px; padding: 0 5px; font-size: 0.66rem; letter-spacing: 0.06em; }
body.watch-page--sports .sport-side-discord { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 10px; border-radius: 10px; background: rgba(88, 101, 242, 0.15); border: 1px solid rgba(88, 101, 242, 0.35); color: #c7cbff; font-size: 0.85rem; font-weight: 600; text-decoration: none; }
body.watch-page--sports .sport-side-discord:hover { background: rgba(88, 101, 242, 0.28); color: #fff; }
body.watch-page--sports .sport-similar-bottom { display: none !important; }
body.watch-page--sports .player-section > .content-overview,
body.watch-page--sports .player-section > .tips-section { margin-top: 14px !important; margin-bottom: 0 !important; }
body.watch-page--sports #sportWatchLiveChat { margin-bottom: 0 !important; }
body.watch-page--sports .sport-page-right-col { display: flex !important; flex-direction: column; gap: 14px !important; }
body.watch-page--sports .sport-page-right-col > * { margin-top: 0 !important; margin-bottom: 0 !important; }
