/* ==========================================================================
   HAYFILM - WATCH PAGE STYLES (VIDEO.JS V10 FROSTED PLAYER)
   ========================================================================== */

:root {
  --accent: #ff5500;
  --accent-hover: #ff6a1a;
  --bg-dark: #000000;
  --text-main: #ffffff;
  --text-muted: #9e9e9e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html {
  width: 100%;
  height: 100%;
  background: #000000 !important;
  background-color: #000000 !important;
  color-scheme: dark;
}

body {
  width: 100%;
  min-height: 100%;
  background-color: #141414 !important;
  font-family: 'Montserrat', 'Noto Sans Armenian', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ==========================================================================
   WATCH PAGE HEADER
   ========================================================================== */
.watch-header {
  position: relative;
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 40px);
  z-index: 100;
}

.watch-back-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
  padding: 0;
}

.watch-back-arrow:hover {
  color: var(--accent);
  transform: scale(1.22);
}

.watch-back-arrow svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.95));
}

.watch-brand {
  text-decoration: none;
  color: #fff;
}

.brand-title {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.brand-title span {
  color: var(--accent);
}

.header-spacer {
  width: 90px;
}

/* ==========================================================================
   PLAYER STAGE: VIDEO.JS V10 CINEMA CONTAINER
   ========================================================================== */
.player-stage {
  position: relative;
  width: 100%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.player-container {
  position: relative;
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95);
}

video-player {
  display: block;
  width: 100%;
  background: #000000;
}

.html-video-skin-basic {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

hlsjs-video {
  display: block;
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   MOVIE DETAILS SECTION (Under Player - Background: #141414)
   ========================================================================== */
.movie-detail-section {
  width: 100%;
  padding: 36px clamp(16px, 4vw, 50px) 60px;
  background: #141414 !important;
  border-bottom: none;
}

.detail-container {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-main-row {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  width: 100%;
}

/* Medium Sharp Poster (Under Player on Left) */
.detail-poster-wrap {
  flex: 0 0 210px;
  width: 210px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0 !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.7);
}

.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0 !important;
}

/* Right Side: Title, Metadata, Description */
.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.detail-tag {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.detail-title {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.22;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: #b5b5b5;
  font-weight: 600;
  margin-bottom: 18px;
}

.meta-dot {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.detail-genre {
  color: #d1d1d1;
}

.detail-desc {
  font-size: 15.5px;
  line-height: 1.7;
  color: #c4c4c4;
  max-width: 900px;
}

/* ==========================================================================
   EPISODES ROW (Pure standalone square rounded buttons with arrow)
   ========================================================================== */
.episodes-section {
  width: 100%;
  margin-top: 14px;
  padding-top: 0;
}

.episodes-wrapper {
  position: relative;
  width: 100%;
  max-width: 680px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
}

.episodes-track {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  padding: 6px 2px;
  scrollbar-width: none;
  box-sizing: border-box;
}

.episodes-track::-webkit-scrollbar {
  display: none;
}

/* Individual Episode Button: Pure squircle with rounded corners */
.episode-btn {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  background: #202226;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  box-shadow: none;
  text-shadow: none;
  filter: none;
}

.episode-btn:hover {
  background: #2a2d33;
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.episode-btn:active {
  transform: scale(0.95);
}

/* Active Episode Button: Vibrant orange with subtle warm glow */
.episode-btn.active {
  background: #ff5500 !important;
  border-color: #ff5500 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(255, 85, 0, 0.45) !important;
  font-weight: 800 !important;
}

/* Navigation Arrow Buttons: Clean borderless chevron, NO shiny square box */
.episodes-arrow {
  flex: 0 0 32px;
  width: 32px;
  height: 48px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.18s ease, transform 0.15s ease, opacity 0.2s ease;
}

.episodes-arrow:hover {
  color: #ff5500;
  transform: scale(1.15);
}

.episodes-arrow:active {
  transform: scale(0.92);
}

.episodes-arrow svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.episodes-arrow.hidden {
  display: none !important;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .detail-container {
    gap: 20px;
  }
  .detail-poster-wrap {
    flex: 0 0 170px;
    width: 170px;
  }
}

@media (max-width: 768px), (pointer: coarse) {
  .watch-header {
    height: 52px;
    padding: 0 14px;
  }
  .brand-title {
    font-size: 18px;
  }
  .watch-back-arrow {
    width: 38px;
    height: 38px;
  }
  .watch-back-arrow svg {
    width: 28px;
    height: 28px;
  }
  .header-spacer {
    width: 38px;
  }

  .movie-detail-section {
    padding: 24px 16px 50px;
  }

  .detail-container {
    flex-direction: column;
    gap: 0;
  }

  .detail-main-row {
    flex-direction: row;
    gap: 14px;
    align-items: flex-start;
    width: 100%;
  }

  .episodes-section {
    margin-top: 10px;
    padding-top: 0;
  }

  .episodes-wrapper {
    max-width: 100%;
    gap: 4px;
  }

  .episodes-track {
    gap: 8px;
    padding: 4px 1px;
  }

  .episode-btn {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    font-size: 15px;
  }

  .episode-btn.active {
    box-shadow: 0 3px 14px rgba(255, 85, 0, 0.45) !important;
  }

  .episodes-arrow {
    flex: 0 0 28px;
    width: 28px;
    height: 44px;
    background: transparent !important;
    border: none !important;
  }

  .episodes-arrow svg {
    width: 20px;
    height: 20px;
    stroke-width: 3.2;
  }

  .detail-poster-wrap {
    flex: 0 0 120px;
    width: 120px;
  }

  .detail-title {
    font-size: 19px;
  }

  .detail-meta {
    font-size: 12px;
    gap: 6px;
  }

  .detail-desc {
    font-size: 13.5px;
  }
}

.episode-btn.pending {
  opacity: 0.45;
  border-style: dashed !important;
}

.player-notice-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 20px;
  border-radius: 12px;
}

.player-notice-box {
  max-width: 440px;
  background: #151515;
  border: 1px solid #2e2e2e;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
}

/* Suppress all native/skin raw error dialogs */
media-error-dialog,
media-dialog[data-error],
.media-error-dialog,
[data-error-dialog] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
