/* ════════════════════════════════════════════════════════
   CallElayne — Cinema Room  🎬
   Premium watch-together experience with ambient lighting
   ════════════════════════════════════════════════════════ */

/* ── Cinema Mode Layout Transition ──────────────────── */

/* When cinema mode is active, reorganize the video container */
.video-container.cinema-mode {
  display: grid !important;
  grid-template-columns: 1fr 260px;
  grid-template-rows: 1fr;
  gap: 0;
  background: #000 !important;
  transition: all 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Override parent black backgrounds */
.call-screen:has(.cinema-mode) {
  background: #000 !important;
}

/* ── Right Sidebar: Both cameras stacked identically ── */
.video-container.cinema-mode .video-remote,
.video-container.cinema-mode .video-local {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  width: calc(100% - 24px) !important;
  height: calc(50% - 18px) !important;
  aspect-ratio: auto !important;
  border-radius: 14px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
  grid-column: 2;
  grid-row: 1;
  margin: 0 12px;
  z-index: 20 !important;
  pointer-events: auto !important;
  overflow: hidden !important;
  transition: all 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.video-container.cinema-mode .video-remote {
  align-self: start;
  margin-top: 12px;
}

.video-container.cinema-mode .video-local {
  align-self: end;
  margin-bottom: 12px;
}

/* Ensure videos fill their frames consistently */
.video-container.cinema-mode .video-remote video,
.video-container.cinema-mode .video-local video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Subtle labels inside cinema sidebar cameras */
.video-container.cinema-mode .video-label {
  bottom: 8px !important;
  left: 8px !important;
  font-size: 0.65rem !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(8px) !important;
}

/* Hide resize handle in cinema mode */
.video-container.cinema-mode .resize-handle {
  display: none !important;
}

/* ── Cinema Overlay (Main Area) ─────────────────────── */
.cinema-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.cinema-overlay.active {
  display: flex;
}

.video-container.cinema-mode .cinema-overlay {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  inset: auto;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ── Ambient Canvas (Background Glow) ───────────────── */
.cinema-ambient-canvas {
  position: absolute;
  top: -80px;
  bottom: -80px;
  left: -80px;
  right: -340px; /* Bleed far into the right column */
  width: calc(100% + 420px);
  height: calc(100% + 160px);
  z-index: 0;
  opacity: 0;
  filter: blur(80px) saturate(1.8) brightness(0.6);
  transition: opacity 1.2s ease;
  pointer-events: none;
}

.cinema-ambient-canvas.active {
  opacity: 1;
}

/* ── Movie Player Container ─────────────────────── */
.cinema-player-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1600px;
  aspect-ratio: 16/9;
  border-radius: 0;
  overflow: hidden;
  background: #000;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* The actual video element */
.cinema-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
  cursor: pointer;
}

/* ── Dark Pause Overlay ─────────────────────────── */
.cinema-pause-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.cinema-player-wrap.paused .cinema-pause-overlay {
  opacity: 1;
}

/* ── Title Overlay (Top-Left, Netflix) ──────────── */
.cinema-title-overlay {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cinema-player-wrap.paused .cinema-title-overlay {
  opacity: 1;
}

.cinema-title-secondary {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.cinema-title-primary {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f7f7f7;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ── Center Play/Pause Button ──────────────────── */
.cinema-center-display {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  padding-bottom: 50px;
}

.cinema-center-play {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #f7f7f7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.25s, color 0.2s, background 0.2s, transform 0.15s;
}

.cinema-player-wrap.paused .cinema-center-play {
  opacity: 1;
}

.cinema-center-play:hover {
  color: #e50914;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.cinema-center-play:active {
  transform: scale(0.95);
}

/* ── Netflix-Style Inline Controls ───────────────── */
.cinema-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 60%,
    transparent 100%
  );
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Controls visible when user is active (mouse moved recently), paused, or force */
.cinema-player-wrap.user-active .cinema-controls,
.cinema-player-wrap.paused .cinema-controls,
.cinema-controls.force-visible {
  opacity: 1;
}

/* Title/Center also tied to user-active */
.cinema-player-wrap.user-active .cinema-title-overlay,
.cinema-player-wrap.paused .cinema-title-overlay {
  opacity: 1;
}

.cinema-player-wrap.user-active .cinema-center-play,
.cinema-player-wrap.paused .cinema-center-play {
  opacity: 1;
}

.cinema-player-wrap.user-active .cinema-pause-overlay {
  opacity: 0.3;
}

/* Hide cursor when idle during playback */
.cinema-player-wrap:not(.user-active):not(.paused) {
  cursor: none;
}

/* Controls single row (inline progress bar) */
.cinema-controls-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px 12px;
}

/* ── Control Buttons ─────────────────────────────── */
.cinema-ctrl-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #f7f7f7;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.cinema-ctrl-btn:hover {
  color: #e50914;
}

.cinema-ctrl-btn:active {
  transform: scale(0.9);
}

.cinema-ctrl-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Time display */
.cinema-time-display {
  font-size: 0.78rem;
  font-weight: 500;
  color: #f7f7f7;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  user-select: none;
  white-space: nowrap;
  margin: 0 4px;
}

/* ── Inline Progress Bar ─────────────────────────── */
.cinema-progress-container {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
}

/* Preview (thumbnails) */
.cinema-progress-preview {
  position: absolute;
  bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  pointer-events: none;
  z-index: 100;
}

.cinema-progress-preview.active {
  opacity: 1;
  visibility: visible;
}

.cinema-preview-thumb {
  width: 160px;
  height: 90px;
  background-color: #000;
  border: 2px solid #e50914;
  border-radius: 3px;
  margin-bottom: 6px;
  background-repeat: no-repeat;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.cinema-preview-time {
  background: rgba(24, 25, 25, 0.9);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f7f7f7;
  font-variant-numeric: tabular-nums;
}

/* Track */
.cinema-progress-track {
  width: 100%;
  height: 3px;
  background: #181919;
  border-radius: 0;
  overflow: visible;
  position: relative;
  transition: height 0.12s ease;
}

.cinema-progress-container:hover .cinema-progress-track {
  height: 6px;
}

.cinema-progress-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #222323;
  transition: width 0.3s ease;
}

.cinema-progress-filled {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #e50914;
  transition: width 0.1s linear;
}

.cinema-progress-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: #e50914;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(229, 9, 20, 0.5);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.cinema-progress-container:hover .cinema-progress-thumb {
  opacity: 1;
}

/* Volume control */
.cinema-volume-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.cinema-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 0;
  outline: none;
  cursor: pointer;
  transition: width 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

.cinema-volume-wrap:hover .cinema-volume-slider {
  width: 60px;
  opacity: 1;
}

.cinema-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #e50914;
  border-radius: 50%;
  cursor: pointer;
}

.cinema-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #e50914;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Movie title in controls */
.cinema-now-playing {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  flex-shrink: 0;
}

/* ── Movie Selector Panel (Netflix Style) ─────────────── */
.cinema-selector {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: #050510;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow: hidden;
}

.cinema-selector.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Hero Banner ── */
.cinema-hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  padding: 40px 60px;
}

.cinema-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0d0f24 0%, #111333 100%);
  z-index: 0;
}

/* Gradient vignette over the hero image */
.cinema-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #050510 0%, transparent 60%),
              linear-gradient(to right, #050510 0%, transparent 50%);
  z-index: 1;
}

.cinema-hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.cinema-hero-badge {
  display: inline-block;
  background: rgba(245, 197, 24, 0.2);
  color: #f5c518;
  border: 1px solid rgba(245, 197, 24, 0.4);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
}

.cinema-hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin: 0 0 16px 0;
  line-height: 1.1;
  letter-spacing: -1.5px;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cinema-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: #a1a1aa;
  font-weight: 600;
  margin-bottom: 20px;
}

.cinema-hero-dot {
  color: #52525b;
}

.cinema-hero-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #d4d4d8;
  margin: 0 0 32px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cinema-hero-actions {
  display: flex;
  gap: 16px;
}

.cinema-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cinema-btn-primary {
  background: #fff;
  color: #000;
}

.cinema-btn-primary:hover {
  background: #e4e4e7;
  transform: scale(1.05);
}

.cinema-btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(8px);
}

.cinema-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.cinema-btn-icon {
  padding: 10px;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.cinema-btn-icon:hover {
  border-color: #fff;
}

/* ── Carousel Section ── */
.cinema-carousel-section {
  position: relative;
  z-index: 5;
  padding: 0 0 40px 60px;
  background: #050510;
}

.cinema-carousel-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: #fff;
}

.cinema-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-behavior: smooth;
}

.cinema-carousel::-webkit-scrollbar {
  height: 6px;
}

.cinema-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.cinema-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.cinema-carousel-card {
  flex: 0 0 240px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.cinema-carousel-card:hover {
  transform: scale(1.05);
}

.cinema-carousel-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a1e3a 0%, #0d1025 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border: 2px solid transparent;
  transition: border-color 0.3s;
}

.cinema-carousel-icon {
  font-size: 2rem;
  opacity: 0.3;
}

.cinema-carousel-card.active .cinema-carousel-thumb {
  border-color: #fff;
}

.cinema-carousel-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #a1a1aa;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.cinema-carousel-card.active .cinema-carousel-title {
  color: #fff;
}

/* ── Close / Back Buttons ───────────────────────────── */
.cinema-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s;
  z-index: 20;
}

.cinema-close-btn:hover {
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
  border-color: rgba(255, 71, 87, 0.3);
}

.cinema-browse-btn {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
  z-index: 20;
}

.cinema-browse-btn:hover {
  background: rgba(108, 99, 255, 0.15);
  color: #fff;
  border-color: rgba(108, 99, 255, 0.3);
}

.cinema-browse-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Sync Status Badge ──────────────────────────────── */
.cinema-sync-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  background: rgba(0, 212, 170, 0.12);
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #00d4aa;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cinema-sync-badge.visible {
  opacity: 1;
}

/* ── Loading State ──────────────────────────────────── */
.cinema-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.7);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cinema-loading.active {
  opacity: 1;
  pointer-events: auto;
}

.cinema-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(108, 99, 255, 0.2);
  border-top-color: #6c63ff;
  border-radius: 50%;
  animation: cinemaSpinner 0.8s linear infinite;
}

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

.cinema-loading-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Cinema Button Style (control bar) ──────────────── */
#btn-cinema .control-icon {
  stroke: currentColor;
}

#btn-cinema.active {
  background: linear-gradient(180deg, rgba(108, 99, 255, 0.92), rgba(79, 70, 229, 0.92));
}

/* ── Entrance / Exit Animations ─────────────────────── */
@keyframes cinemaSlideIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cinemaSlideOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

.cinema-overlay.entering {
  animation: cinemaSlideIn 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.cinema-overlay.exiting {
  animation: cinemaSlideOut 0.4s ease-in forwards;
}

/* ── Mobile Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .video-container.cinema-mode {
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr 140px;
  }

  .video-container.cinema-mode .cinema-overlay {
    grid-row: 1;
  }

  .video-container.cinema-mode .video-remote,
  .video-container.cinema-mode .video-local {
    grid-column: 1;
    grid-row: 2;
    width: calc(50% - 8px) !important;
    height: calc(100% - 8px) !important;
    margin: 4px !important;
    align-self: center !important;
  }

  .video-container.cinema-mode .video-remote {
    justify-self: start;
  }

  .video-container.cinema-mode .video-local {
    justify-self: end;
  }

  .cinema-player-wrap {
    width: 100%;
  }

  .cinema-movie-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .cinema-volume-slider {
    width: 50px;
  }
}

/* ── Cinema Mode: Auto-hide Control Bar ─────────────── */
.video-container.cinema-mode ~ .control-bar {
  opacity: 0 !important;
  transform: translateX(-50%) translateY(30px) !important;
  pointer-events: none !important;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Show when mouse approaches bottom of screen (JS adds this class) */
.video-container.cinema-mode ~ .control-bar.cinema-hover-active,
.video-container.cinema-mode ~ .control-bar:hover {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
  pointer-events: auto !important;
}

/* ── Cinema Subtitles (Netflix-style) ───────────────── */
.cinema-subtitles {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 820px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.cinema-subtitle-line {
  padding: 4px 14px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  font-size: 1.15rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.45;
  max-width: 100%;
  word-wrap: break-word;
  opacity: 1;
  transition: opacity 0.15s ease;
}

.cinema-subtitle-line.sub-primary {
  color: #ffffff;
  font-size: 1.2rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.7);
}

.cinema-subtitle-line.sub-secondary {
  color: #ffeb3b;
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.92;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* Subtitle toggle button */
.cinema-ambient-btn {
  color: rgba(255, 255, 255, 0.6);
}

.cinema-ambient-btn.active {
  color: #e50914;
}

.cinema-subtitle-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #f7f7f7;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.2s;
  flex-shrink: 0;
  padding: 0;
  position: relative;
}

.cinema-subtitle-btn:hover {
  color: #e50914;
}

.cinema-subtitle-btn.active {
  color: #f7f7f7;
}

.cinema-subtitle-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Subtitle indicator dot */
.cinema-subtitle-btn.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #e50914;
  border-radius: 50%;
}

/* ── Subtitle Settings Panel ──────────────────────── */
.cinema-sub-panel {
  position: absolute;
  bottom: 70px;
  right: 16px;
  background: rgba(20, 20, 25, 0.94);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0;
  width: 240px;
  z-index: 50;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  transition: opacity 0.2s, transform 0.2s;
  color: #fff;
  overflow: hidden;
}

.cinema-sub-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.cinema-sub-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cinema-sub-panel-close {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.cinema-sub-panel-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.cinema-sub-panel-body {
  padding: 12px 14px;
}

.cinema-sub-lang-group {
  margin-bottom: 10px;
}

.cinema-sub-label {
  display: block;
  font-size: 0.72rem;
  color: #888;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cinema-sub-select {
  width: 100%;
  padding: 7px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #fff;
  outline: none;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.cinema-sub-select:focus {
  border-color: rgba(255,255,255,0.25);
}

.cinema-sub-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 10px 0;
}

.cinema-sub-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  color: #ccc;
  transition: background 0.15s, color 0.15s;
}

.cinema-sub-upload-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.cinema-sub-upload-btn svg {
  flex-shrink: 0;
}

/* Size range slider */
.cinema-sub-range {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.cinema-sub-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Color pickers row */
.cinema-sub-colors-row {
  display: flex;
  gap: 10px;
}

.cinema-sub-color-group {
  flex: 1;
}

.cinema-sub-color {
  width: 100%;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.cinema-sub-color::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.cinema-sub-color::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}
