/* ==========================================================================
   SinePulse MAX - Video Player, Lights Off Mode & Episode Selector Styles
   ========================================================================== */

/* Cinema Lighting Dimmer Overlay */
.cinema-curtain {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.lights-off .cinema-curtain {
  opacity: 1;
  pointer-events: auto;
}

body.lights-off .cine-player-container {
  position: relative;
  z-index: 90;
  box-shadow: 0 0 80px rgba(0, 242, 254, 0.4);
}

/* Player Container */
.cine-player-wrapper {
  margin: 30px 0 40px;
}

.cine-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.cine-player-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cine-player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cine-control-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #D1D5DB;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.cine-control-btn:hover,
.cine-control-btn.active {
  background: rgba(0, 242, 254, 0.18);
  border-color: var(--accent-cyan);
  color: #fff;
}

.cine-player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
}

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

/* Server Selector Bar */
.cine-servers-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-top: 14px;
  flex-wrap: wrap;
}

.cine-servers-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cine-server-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cine-server-pill:hover,
.cine-server-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* ==========================================================================
   YouTube Quick Action & Direct Fallback Bar
   ========================================================================== */
.cine-yt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.15) 0%, rgba(14, 19, 31, 0.95) 100%);
  border: 1px solid rgba(229, 9, 20, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.cine-yt-bar-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.cine-yt-badge {
  background: #E50914;
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.4);
}

.cine-yt-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cine-yt-direct-btn {
  background: linear-gradient(135deg, #FF0000 0%, #B81D24 100%);
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.35);
  transition: all var(--transition-fast);
}

.cine-yt-direct-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.55);
  color: #fff;
}

.cine-yt-refresh-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #D1D5DB;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.cine-yt-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Series Episode Drawer & Grid */
.cine-episodes-section {
  margin-top: 36px;
}

.cine-seasons-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.cine-season-tab {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.cine-season-tab:hover,
.cine-season-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cine-season-tab.active {
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
}

.cine-episodes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.cine-episode-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cine-episode-card:hover,
.cine-episode-card.active {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.cine-episode-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cine-ep-number {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

.cine-ep-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cine-ep-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

/* ==========================================================================
   AdSense Advertising Slots (Zero Layout Shift)
   ========================================================================== */
.cine-ad-slot {
  width: 100%;
  margin: 20px 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
}

.cine-ad-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: block;
}

/* ==========================================================================
   User Generated Comments & 10-Star Rating System
   ========================================================================== */
.cine-comments-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 40px 0;
}

.cine-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.cine-star-picker {
  display: flex;
  gap: 4px;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.cine-star-picker i {
  transition: color 0.15s, transform 0.15s;
}

.cine-star-picker i:hover,
.cine-star-picker i.selected {
  color: #F5C518;
  transform: scale(1.15);
}

.cine-comment-form {
  background: #05070B;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 30px;
}

.cine-comment-input {
  width: 100%;
  background: #0E131F;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 12px 14px;
  font-size: 0.95rem;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.cine-comment-input:focus {
  border-color: var(--accent-cyan);
}

.cine-comment-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cine-comment-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}

.cine-comment-author-name {
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cine-comment-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #D1D5DB;
}

.cine-spoiler-box {
  position: relative;
  background: rgba(229, 9, 20, 0.1);
  border: 1px solid rgba(229, 9, 20, 0.3);
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
}

.cine-spoiler-blur {
  filter: blur(6px);
  user-select: none;
  transition: filter 0.3s;
}

.cine-spoiler-notice {
  color: #FF6B6B;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Advanced Cinema Video Player Suite (Plyr + Hls.js + Ambient Backlight)
   ========================================================================== */
:root {
  --plyr-color-main: #E50914;
  --plyr-video-background: #000000;
  --plyr-menu-background: rgba(14, 19, 31, 0.95);
  --plyr-menu-color: #ffffff;
  --plyr-badge-text-color: #ffffff;
  --plyr-badge-background: #E50914;
  --plyr-control-radius: 6px;
  --plyr-control-spacing: 12px;
}

.cine-ambient-glow {
  position: absolute;
  inset: -15%;
  background: radial-gradient(circle at center, rgba(229, 9, 20, 0.28) 0%, rgba(0, 242, 254, 0.1) 40%, transparent 75%);
  filter: blur(50px);
  opacity: 0.6;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.cine-advanced-wrapper {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cine-advanced-wrapper .plyr {
  width: 100%;
  height: 100%;
}

.cine-advanced-wrapper .plyr video {
  object-fit: contain;
}

.cine-html5-player {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.cine-player-frame {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.cine-player-topbar {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.cine-player-container:hover .cine-player-topbar {
  opacity: 1;
}

.cine-quality-badge {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 197, 24, 0.5);
  color: #F5C518;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
}

.cine-stream-status {
  background: rgba(14, 19, 31, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: #00F2FE;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cine-player-loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
}

.cine-loader-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #E50914;
  border-radius: 50%;
  animation: cineSpin 0.8s linear infinite;
}

@keyframes cineSpin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Restricted Channel Streams Fallback Overlay
   ========================================================================== */
.cine-fallback-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 15, 0.95);
  backdrop-filter: blur(14px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.cine-fallback-card {
  max-width: 560px;
  background: rgba(18, 24, 38, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

.cine-fallback-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.cine-fallback-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.cine-fallback-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ==========================================================================
   Netflix-Tier UX: Skip Intro, Resume Playback & Next Episode Countdown
   ========================================================================== */

/* Skip Intro Button */
.cine-skip-intro-btn {
  position: absolute;
  bottom: 74px;
  right: 24px;
  z-index: 45;
  background: rgba(14, 19, 31, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: fadeInRight 0.3s ease;
}

.cine-skip-intro-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--primary-glow);
}

/* Resume Playback Toast */
.cine-resume-toast {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  background: rgba(14, 19, 31, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-cyan);
  border-radius: 30px;
  padding: 10px 20px;
  color: #fff;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 242, 254, 0.25);
  animation: fadeInDown 0.35s ease;
}

.cine-resume-btn {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  transition: transform 0.2s;
}

.cine-resume-btn:hover {
  transform: scale(1.06);
}

.cine-resume-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}

/* Next Episode Countdown Floating Card */
.cine-next-ep-card {
  position: absolute;
  bottom: 74px;
  right: 24px;
  z-index: 50;
  background: rgba(14, 19, 31, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(229, 9, 20, 0.6);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  max-width: 340px;
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  animation: fadeInRight 0.35s ease;
}

.cine-next-ep-card .title {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cine-next-ep-card .ep-name {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.cine-next-ep-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Continue Watching Row on Home Page */
.cine-continue-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.cine-continue-bar {
  height: 100%;
  background: linear-gradient(90deg, #E50914, var(--accent-cyan));
  width: 0%;
  transition: width 0.3s;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   Player 2.0 - Floating Mini-Player (PiP) & Speed Selector
   ========================================================================== */
.cine-player-container.is-pip {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 360px !important;
  max-width: 90vw !important;
  aspect-ratio: 16 / 9 !important;
  z-index: 99999 !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), 0 0 20px rgba(0, 242, 254, 0.4) !important;
  border: 2px solid var(--accent-cyan) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  animation: slideInPip 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.cine-pip-controls {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 100000;
  gap: 6px;
}

.cine-player-container.is-pip .cine-pip-controls {
  display: flex !important;
}

.cine-pip-btn {
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.cine-pip-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

.cine-speed-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: #D1D5DB;
}

.cine-speed-selector select {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-weight: 700;
  cursor: pointer;
  outline: none;
  font-size: 0.82rem;
}

.cine-speed-selector select option {
  background: #0B0F19;
  color: #fff;
}

@keyframes slideInPip {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}


