/* ==========================================================================
   LIYU CINEMA - IMMERSIVE THEATER PLAYER STYLES (css/player.css)
   Commercial Grade Player Layout & ArtPlayer Skin Overrides
   ========================================================================== */

.player-page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
}

/* Breadcrumb & Top Bar */
.player-top-bar {
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.back-to-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  transition: all var(--transition-fast);
}
.back-to-home:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.player-top-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Main Theater Grid */
.theater-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: start;
}
@media (max-width: 1080px) {
  .theater-layout {
    grid-template-columns: 1fr;
  }
}

/* Player Stage */
.player-stage-wrap {
  position: relative;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 40px rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Cinema / Theater Mode (Stretches across screen) */
.theater-mode .theater-layout {
  grid-template-columns: 1fr;
}
.theater-mode .player-stage-wrap {
  height: 80vh;
}

.artplayer-app {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 480px;
  max-height: 82vh;
  position: relative;
}
@media (max-width: 768px) {
  .artplayer-app {
    min-height: 240px;
  }
}

/* Artplayer Theme Overrides */
.art-video-player {
  font-family: var(--font-family) !important;
}
.art-control-play, .art-control-volume {
  color: #fff !important;
}
.art-progress-played {
  background: var(--accent-gradient) !important;
}
.art-progress-loaded {
  background: rgba(255, 255, 255, 0.3) !important;
}

/* Next Episode Auto-Play Overlay */
.next-episode-overlay {
  position: absolute;
  bottom: 80px;
  right: 24px;
  background: rgba(13, 17, 26, 0.95);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: none;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  backdrop-filter: blur(16px);
  animation: fadeIn 0.3s ease-out;
}
.next-episode-overlay.active {
  display: flex;
}
.next-ep-header {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.next-ep-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.next-ep-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-play-now-ep {
  padding: 6px 16px;
  background: var(--accent-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}
.btn-cancel-ep {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* Right Sidebar: Episode Selector & Playlist */
.player-sidebar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 640px;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.episodes-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

.episode-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.episode-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}
.episode-item.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-primary);
}
.ep-number {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}
.episode-item.active .ep-number {
  color: var(--accent-primary);
}
.ep-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.ep-duration {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.ep-playing-icon {
  width: 14px;
  height: 14px;
  color: var(--accent-primary);
}

/* Video Metadata & Controls Bar */
.video-meta-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.video-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.video-main-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.video-sub-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.video-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.btn-action-pill:hover,
.btn-action-pill.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Synopsis Box */
.video-synopsis-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  line-height: 1.7;
  color: #cbd5e1;
  font-size: 0.95rem;
}
.synopsis-header {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.creator-credits {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.creator-credits strong {
  color: #e2e8f0;
}

/* Shortcut Modal */
.shortcut-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.shortcut-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}
.shortcut-key {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 700;
}

/* Missing keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile player adjustments */
@media (max-width: 768px) {
  .player-sidebar {
    max-height: 320px;
  }
  .video-main-title {
    font-size: 1.3rem;
  }
  .video-header-row {
    flex-direction: column;
  }
  .video-action-group {
    flex-wrap: wrap;
  }
  .creator-credits {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Stream Line Selector */
.stream-line-selector {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 6px;
}
.line-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-left: 4px;
}
.btn-line-pill {
  background: none;
  border: none;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-line-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.btn-line-pill.active {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* Ambilight Dynamic Canvas Glow */
.ambilight-wrap {
  position: absolute;
  inset: -20px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.ambilight-wrap.active {
  opacity: 0.85;
}
.ambilight-canvas {
  width: 100%;
  height: 100%;
  filter: blur(45px);
  transform: scale(1.15);
}

/* Mobile Touch 2X Speed HUD */
.touch-speed-hud {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  display: none;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 50;
}
.touch-speed-hud.active {
  display: flex;
}
.touch-speed-hud .hud-icon {
  color: #60a5fa;
  animation: blink 0.8s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Feedback & Request Modal */
.feedback-card {
  width: 100%;
  max-width: 440px;
  background: #111726;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  position: relative;
}

