/* ===================================================
   ANISHIFT - WATCH PAGE STYLESHEET (watch.css)
   Matches home.html & anime-details.html design system
   =================================================== */

/* --------------------------------------------------
   1. MAIN WATCH PAGE LAYOUT
   -------------------------------------------------- */
.watch-container {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 16px 20px 48px;
  box-sizing: border-box;
}

/* Breadcrumb Bar */
.watch-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.watch-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.watch-breadcrumb a {
  color: var(--text-muted);
  transition: color 0.2s;
  text-decoration: none;
}

.watch-breadcrumb a:hover {
  color: var(--accent-primary);
}

.watch-breadcrumb .bc-sep {
  font-size: 13px;
  opacity: 0.6;
}

.watch-breadcrumb .bc-current {
  color: var(--text-main);
  font-weight: 600;
}

/* 2-Column Main Watch Grid */
.watch-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

/* --------------------------------------------------
   2. VIDEO PLAYER COLUMN
   -------------------------------------------------- */
.watch-player-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Video Player Wrapper */
.player-outer-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #0b0c0f;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}


/* 16:9 Player Viewport */
.player-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #050608;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-video-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Player Skeleton Loader */
.player-skeleton {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
}

/* TMDB Episode Poster Splash Overlay & Modern Glass Play Button */
.player-poster-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0b0c0f;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.player-poster-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
  /* Fixed: No zoom on hover/click */
}

.player-poster-backdrop-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.45) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Custom Play Button using 2000x2000_play_icon.png without zoom */
.player-splash-play-btn {
  position: relative;
  z-index: 3;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55));
}

.player-splash-play-btn:hover {
  opacity: 0.88;
  /* Fixed: No zoom transform */
}

.player-splash-play-btn:active {
  opacity: 0.75;
}

.player-splash-play-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* Custom Interactive Mock Player UI */
.custom-player-ui {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-size: cover;
  background-position: center;
  z-index: 2;
}

.player-backdrop-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
  z-index: 1;
}

.player-center-overlay {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  gap: 14px;
}

.player-big-play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.9);
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(14, 165, 233, 0.6);
  transition: transform 0.25s, background-color 0.25s, box-shadow 0.25s;
}

.player-big-play-btn:hover {
  transform: scale(1.1);
  background: var(--accent-primary);
  box-shadow: 0 0 40px rgba(14, 165, 233, 0.9);
}

.player-stream-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.player-stream-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Bottom Player Controls Overlay */
.player-bottom-controls {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-seek-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.player-seek-progress {
  height: 100%;
  width: 32%;
  background: var(--accent-primary);
  border-radius: 4px;
  position: relative;
}

.player-seek-progress::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -3.5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 13px;
}

.player-controls-left,
.player-controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.player-ctrl-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.2s;
}

.player-ctrl-btn:hover {
  color: var(--accent-primary);
  transform: scale(1.1);
}

.player-time-display {
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.4px;
}

/* --------------------------------------------------
   3. UNDER-PLAYER CONTROL STRIP (MATCHES IMAGE 2 TOP)
   -------------------------------------------------- */
.player-quick-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
}

.strip-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.strip-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  transition: color 0.2s;
}

.strip-item:hover {
  color: var(--text-main);
}

.strip-item.active {
  color: #8b5cf6; /* Matching purple/blue accent in Image 2 */
}

.strip-item.active.accent-blue {
  color: var(--accent-primary);
}

.strip-box-icon {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background-color: var(--text-muted);
  transition: background-color 0.2s;
}

.strip-item.active .strip-box-icon {
  background-color: #8b5cf6;
}

.strip-item.active.accent-blue .strip-box-icon {
  background-color: var(--accent-primary);
}

.strip-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.strip-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
}

.strip-nav-link:hover:not(:disabled) {
  color: var(--text-main);
}

.strip-nav-link:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* --------------------------------------------------
   3.5. ONGOING EPISODE COUNTDOWN STRIP (PREMIUM THEME MATCH)
   -------------------------------------------------- */
.airing-countdown-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius-sm);
  gap: 12px;
  flex-wrap: wrap;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .airing-countdown-strip,
[data-theme="oled"] .airing-countdown-strip,
[data-theme="navy"] .airing-countdown-strip {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.airing-countdown-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.airing-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
  animation: airing-pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes airing-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(14, 165, 233, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
}

.airing-tag-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--accent-primary);
  text-transform: uppercase;
}

.airing-ep-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.airing-countdown-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.airing-date-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.airing-timer-box {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  font-size: 12.5px;
  font-weight: 700;
  font-family: 'Inter', monospace, sans-serif;
  letter-spacing: 0.3px;
}

.airing-timer-box i {
  font-size: 12px;
  color: var(--accent-primary);
}

/* --------------------------------------------------
   4. EPISODE INFO CARD (MATCHES IMAGE 2 MAIN CARD)
   -------------------------------------------------- */
.episode-info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ep-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ep-card-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.ep-card-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.ep-card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ep-date-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.ep-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Download and Share Buttons (Only 2 buttons on right as requested) */
.ep-card-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ep-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ep-btn-action:hover {
  background-color: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.ep-btn-action i {
  font-size: 13px;
}

.ep-card-divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-light);
  margin: 0;
}

.ep-card-synopsis {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* --------------------------------------------------
   5. RIGHT COLUMN: EPISODES WIDGET (MATCHES IMAGE 3, 4 & 5)
   -------------------------------------------------- */
.watch-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.episodes-widget-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

/* Image 3: Top Filter Bar */
.episodes-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

/* Range Dropdown (Matching Miruro UI in Image 2) */
.ep-range-dropdown-wrap {
  position: relative;
  flex-shrink: 0;
}

.ep-range-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.2s ease;
}

.ep-range-btn:hover {
  background-color: var(--bg-hover);
  border-color: var(--text-muted);
}

.ep-range-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.ep-range-dropdown-wrap.open .ep-range-arrow {
  transform: rotate(180deg);
}

.ep-range-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 130px;
  max-height: 280px;
  overflow-y: auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 120;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ep-range-menu::-webkit-scrollbar {
  width: 4px;
}
.ep-range-menu::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.ep-range-item {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  background: none;
  border: none;
  width: 100%;
  transition: all 0.15s ease;
  user-select: none;
}

.ep-range-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.ep-range-item.active {
  background-color: var(--accent-primary) !important;
  color: #fff !important;
  font-weight: 700;
}

.ep-search-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.ep-search-wrap i {
  position: absolute;
  left: 9px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.ep-filter-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 6px 10px 6px 28px;
  font-size: 12.5px;
  color: var(--text-main);
  font-family: inherit;
}

.ep-filter-input::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.ep-view-mode-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ep-view-mode-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

/* Image 4 & 5: Vertical Episode List - Flexes to exact height */
.episodes-list-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar */
.episodes-list-scroll::-webkit-scrollbar {
  width: 5px;
}
.episodes-list-scroll::-webkit-scrollbar-track {
  background: var(--bg-body);
}
.episodes-list-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
.episodes-list-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Episode Row Item (Image 4 & 5) */
.ep-row-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background-color 0.18s ease;
  user-select: none;
  gap: 12px;
  background-color: var(--bg-card);
}

.ep-row-item:last-child {
  border-bottom: none;
}

.ep-row-item:hover {
  background-color: var(--bg-hover);
}

.ep-row-number {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  min-width: 26px;
  transition: color 0.18s;
}

.ep-row-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.18s;
}

.ep-row-play-icon {
  font-size: 15px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s, transform 0.18s;
}

/* Active Episode State (Image 4 & 5 - Blue accent highlight) */
.ep-row-item.active {
  background-color: rgba(14, 165, 233, 0.08);
}

[data-theme="dark"] .ep-row-item.active,
[data-theme="oled"] .ep-row-item.active,
[data-theme="navy"] .ep-row-item.active {
  background-color: #0c192c;
}

.ep-row-item.active .ep-row-number {
  color: var(--accent-primary) !important;
}

.ep-row-item.active .ep-row-title {
  color: var(--accent-primary) !important;
  font-weight: 600;
}

.ep-row-item.active .ep-row-play-icon {
  color: var(--accent-primary) !important;
}

/* Grid View Mode (Image 1 Mockup Match: Exactly 6 Columns, Centered Number) */
.episodes-list-scroll.grid-mode {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 46px;
  align-content: start;
  gap: 8px;
}

.episodes-list-scroll.grid-mode .ep-row-item {
  width: 100%;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-hover);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  box-sizing: border-box;
}

.episodes-list-scroll.grid-mode .ep-row-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.episodes-list-scroll.grid-mode .ep-row-title,
.episodes-list-scroll.grid-mode .ep-row-play-icon {
  display: none !important;
}

.episodes-list-scroll.grid-mode .ep-row-item.active,
[data-theme="dark"] .episodes-list-scroll.grid-mode .ep-row-item.active,
[data-theme="oled"] .episodes-list-scroll.grid-mode .ep-row-item.active,
[data-theme="navy"] .episodes-list-scroll.grid-mode .ep-row-item.active {
  background-color: var(--accent-primary) !important;
  border-color: var(--accent-primary) !important;
}

.episodes-list-scroll.grid-mode .ep-row-item.active .ep-row-number {
  color: #fff !important;
}

/* Skeleton styling when in Grid Mode */
.episodes-list-scroll.grid-mode .ep-row-item .glass-skeleton:first-child {
  width: 24px !important;
  height: 16px !important;
  margin: auto !important;
}

.episodes-list-scroll.grid-mode .ep-row-item .glass-skeleton:not(:first-child) {
  display: none !important;
}

/* Skeleton Count Control: 14 items in list mode, 60 items in grid mode */
.episodes-list-scroll:not(.grid-mode) .ep-skeleton-placeholder:nth-child(n+15) {
  display: none !important;
}

.episodes-list-scroll.grid-mode .ep-skeleton-placeholder:nth-child(n+61) {
  display: none !important;
}


/* --------------------------------------------------
   6. SHORTCUTS MODAL
   -------------------------------------------------- */
.shortcuts-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.shortcuts-modal-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.shortcuts-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.shortcuts-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.shortcuts-modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

.shortcut-key {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color);
  font-family: monospace;
  font-weight: 700;
  color: var(--text-main);
}

/* --------------------------------------------------
   7. CINEMA MODE (LIGHTS OFF)
   -------------------------------------------------- */
body.cinema-mode-active {
  background-color: #050608 !important;
}

body.cinema-mode-active .navbar,
body.cinema-mode-active .watch-breadcrumb-bar,
body.cinema-mode-active .watch-sidebar-col,
body.cinema-mode-active .site-footer {
  opacity: 0.08 !important;
  filter: blur(2px);
  pointer-events: none;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

body.cinema-mode-active .player-outer-wrap,
body.cinema-mode-active .player-quick-strip,
body.cinema-mode-active .episode-info-card {
  position: relative;
  z-index: 1000;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
}

/* --------------------------------------------------
   8. RESPONSIVE DESIGN (DESKTOP, TABLET, MOBILE)
   -------------------------------------------------- */
@media (max-width: 1200px) {
  .watch-main-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
  }
}

@media (max-width: 1024px) {
  .watch-main-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .watch-player-col,
  .watch-sidebar-col {
    display: contents;
  }

  .player-outer-wrap {
    order: 1;
    width: 100%;
  }

  .player-quick-strip {
    order: 2;
    width: 100%;
  }

  .airing-countdown-strip {
    order: 3;
    width: 100%;
  }

  .episode-info-card {
    order: 4;
    width: 100%;
  }

  /* Episode List is moved directly under the player and episode info card */
  .episodes-widget-card {
    order: 5;
    width: 100%;
    height: auto !important;
  }

  /* COMMENTS Section is placed below Player & Episode List */
  .comments-section {
    order: 6;
    width: 100%;
    margin-top: 10px !important;
  }

  /* RELATED ANIME is moved down below Comments */
  .related-section {
    order: 7;
    width: 100%;
    margin-top: 6px !important;
  }

  /* Most Popular at the bottom */
  .popular-widget-box {
    order: 8;
    width: 100%;
  }

  .episodes-list-scroll {
    max-height: 480px;
    height: auto;
  }

  .episodes-list-scroll.grid-mode {
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    grid-auto-rows: 46px;
    align-content: start;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .watch-container {
    padding: 12px 14px 40px;
  }

  .watch-breadcrumb-bar {
    margin-bottom: 12px;
  }

  .player-quick-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
  }

  .strip-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 16px;
    width: 100%;
    flex-wrap: wrap;
  }

  /* Hide Shortcuts and Lights Off on mobile view as requested */
  #strip-shortcuts-btn,
  #strip-lights-btn {
    display: none !important;
  }

  .strip-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
  }

  .ep-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .ep-card-title {
    font-size: 17px;
    word-break: break-word;
  }

  .ep-card-right-actions {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
  }

  .ep-btn-action {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 12px;
  }

  .episodes-filter-bar {
    gap: 6px;
    padding: 4px;
  }

  .ep-range-btn {
    padding: 5px 9px;
    font-size: 11.5px;
  }

  .ep-filter-input {
    font-size: 11.5px;
    padding: 5px 8px 5px 24px;
    min-width: 0;
  }

  .ep-search-wrap i {
    left: 7px;
    font-size: 10.5px;
  }
}

@media (max-width: 480px) {
  .watch-container {
    padding: 10px 10px 36px;
  }

  .watch-breadcrumb-bar {
    margin-bottom: 8px;
  }

  .watch-breadcrumb {
    font-size: 11px;
    gap: 4px;
  }

  .player-bottom-controls {
    padding: 8px 10px;
    gap: 6px;
  }

  .player-controls-left,
  .player-controls-right {
    gap: 8px;
  }

  .player-ctrl-btn {
    font-size: 12px;
    padding: 2px;
  }

  #ctrl-forward-btn,
  #ctrl-rewind-btn {
    display: none;
  }

  .player-time-display {
    font-size: 10.5px;
    letter-spacing: normal;
  }

  .airing-countdown-strip {
    padding: 7px 12px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .airing-countdown-left {
    gap: 6px;
    flex-shrink: 0;
  }

  .airing-tag-label {
    font-size: 10px;
  }

  .airing-ep-num {
    font-size: 11.5px;
  }

  .airing-date-text {
    display: none; /* Hide verbose date on small screens so timer fits cleanly on single line */
  }

  .airing-countdown-right {
    gap: 6px;
    flex-shrink: 0;
  }

  .airing-timer-box {
    padding: 3px 8px;
    font-size: 11px;
    gap: 5px;
  }

  .airing-timer-box i {
    font-size: 10px;
  }

  .strip-item {
    font-size: 11px;
  }

  .strip-item i {
    font-size: 10px;
  }

  .strip-nav-link {
    font-size: 11.5px;
  }

  .ep-card-title {
    font-size: 15px;
    line-height: 1.35;
  }

  .ep-card-synopsis {
    font-size: 12px;
    line-height: 1.5;
  }

  .episodes-widget-card {
    padding: 10px;
  }

  .episodes-list-scroll {
    max-height: 380px;
  }

  .episodes-list-scroll.grid-mode {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 38px;
    align-content: start;
    gap: 5px;
    padding: 6px;
  }

  .episodes-list-scroll.grid-mode .ep-row-item {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
  }

  .episodes-list-scroll.grid-mode .ep-row-number {
    font-size: 11px;
  }

  .ep-row-item {
    padding: 8px 10px;
    gap: 8px;
  }

  .ep-row-number {
    font-size: 12px;
    min-width: 20px;
  }

  .ep-row-title {
    font-size: 12px;
  }
}

/* ===================================================
   CINEMATIC PLAYER STATUS OVERLAY (statusdemo.html)
   =================================================== */
/* 0. Background Poster Preview behind Status Overlay */
.player-status-bg-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 140;
  overflow: hidden;
  pointer-events: none;
}

.player-status-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px) brightness(0.85);
  transform: scale(1.05);
  transition: opacity 0.4s ease;
}

.player-status-bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.45) 100%);
}

/* 1. Cinematic Translucent Overlay (Allows poster to show through clearly) */
.player-status-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10, 12, 16, 0.32) 0%, rgba(0, 0, 0, 0.55) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #fff;
  transition: opacity 0.2s ease;
}

/* Fallback / Default Colors */
.player-status-overlay {
  --status-color: #ffffff;
  --status-bg: rgba(255, 255, 255, 0.12);
  --status-glow: rgba(255, 255, 255, 0.2);
}

/* 1. Waiting State Colors (Pending Sub / Upload) */
.player-status-overlay[data-status="waiting"] {
  --status-color: #fbbf24; /* Amber / Warning */
  --status-bg: rgba(251, 191, 36, 0.18);
  --status-glow: rgba(251, 191, 36, 0.35);
}

/* 2. Processing State Colors (Processing Video - Site Theme Accent Blue) */
.player-status-overlay[data-status="processing"] {
  --status-color: var(--accent-primary, #1E90FF);
  --status-bg: rgba(30, 144, 255, 0.18);
  --status-glow: rgba(30, 144, 255, 0.38);
}

/* 3. Failed State Colors (Processing Failed) */
.player-status-overlay[data-status="failed"] {
  --status-color: #ef4444; /* Red / Error */
  --status-bg: rgba(239, 68, 68, 0.18);
  --status-glow: rgba(239, 68, 68, 0.38);
}

/* 4. Not Found (404) State Colors */
.player-status-overlay[data-status="not-found"] {
  --status-color: #a855f7; /* Purple */
  --status-bg: rgba(168, 85, 247, 0.18);
  --status-glow: rgba(168, 85, 247, 0.35);
}

/* Light Theme Adaptations (Clean Glassmorphism on Light background) */
html[data-theme="light"] .player-status-bg-img {
  filter: blur(5px) brightness(0.92);
}

html[data-theme="light"] .player-status-overlay {
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.28) 0%, rgba(2, 6, 23, 0.52) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

html[data-theme="light"] .player-status-overlay .status-title {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

html[data-theme="light"] .player-status-overlay .status-desc {
  color: #f1f5f9;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* Content Container */
.player-status-overlay .status-content {
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: playerStatusFadeIn 0.4s ease-out forwards;
}

@keyframes playerStatusFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Icon Styling */
.player-status-overlay .icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--status-bg);
  color: var(--status-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  box-shadow: 0 0 30px var(--status-glow);
  transition: all 0.4s ease;
}

.player-status-overlay .icon-wrapper svg {
  width: 32px;
  height: 32px;
  display: none;
}

/* Text Styling */
.player-status-overlay .status-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  color: #ffffff;
  display: none;
}

.player-status-overlay .status-desc {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 8px;
  display: none;
}

/* State Visibility Selectors */
[data-status="waiting"] .show-waiting,
[data-status="processing"] .show-processing,
[data-status="failed"] .show-failed,
[data-status="not-found"] .show-not-found {
  display: block !important;
}

[data-status="waiting"] svg.show-waiting,
[data-status="processing"] svg.show-processing,
[data-status="failed"] svg.show-failed,
[data-status="not-found"] svg.show-not-found {
  display: block !important;
}

/* Micro Animations */
.player-status-overlay .spin {
  animation: statusSpinAnim 1.2s linear infinite;
}
@keyframes statusSpinAnim {
  100% { transform: rotate(360deg); }
}

.player-status-overlay .pulse {
  animation: statusPulseAnim 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes statusPulseAnim {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
