/* 1-Click Fullscreen Video & Media Theater Lightbox */
.theater-modal {
  position: fixed; inset: 0; z-index: 220;
  background: #060911; color: var(--light);
  display: none; flex-direction: column;
  width: 100vw; height: 100dvh; max-height: 100vh;
  overflow: hidden;
}
.theater-modal.is-open { display: flex; }

.theater-ambient {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0.42;
  background: radial-gradient(64% 58% at 50% 42%, var(--fx-accent-2, rgba(240, 195, 90, 0.25)), transparent 74%);
}
.theater-modal[data-showcase-fx="cinema-obsidian-gold"] { --fx-accent: #F0C35A; --fx-accent-2: rgba(240, 195, 90, 0.26); }
.theater-modal[data-showcase-fx="blueprint-step-flow"] { --fx-accent: #60A5FA; --fx-accent-2: rgba(29, 78, 216, 0.28); }
.theater-modal[data-showcase-fx="celadon-kiln-luster"] { --fx-accent: #D9A752; --fx-accent-2: rgba(124, 184, 155, 0.28); }
.theater-modal[data-showcase-fx="geo-topo-radar"] { --fx-accent: #E5B85B; --fx-accent-2: rgba(56, 189, 248, 0.28); }
.theater-modal[data-showcase-fx="editorial-ink-folio"] { --fx-accent: #D89E43; --fx-accent-2: rgba(216, 158, 67, 0.28); }
.theater-modal[data-showcase-fx="kinetic-xray-pulse"] { --fx-accent: #2EE6A6; --fx-accent-2: rgba(46, 230, 166, 0.26); }
.theater-modal[data-showcase-fx="clinical-scan-lumen"] { --fx-accent: #2DD4BF; --fx-accent-2: rgba(45, 212, 191, 0.26); }
.theater-modal[data-showcase-fx="prism-before-after-veil"] { --fx-accent: #F3CF82; --fx-accent-2: rgba(232, 121, 155, 0.28); }

.theater-topbar {
  position: relative; z-index: 2; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 18px; min-height: 58px;
  background: rgba(7, 11, 20, 0.92); border-bottom: 1px solid rgba(240, 195, 90, 0.18);
}
.theater-status { display: flex; align-items: center; gap: 12px; min-width: 0; }
.theater-counter { font-size: 0.86rem; font-weight: 700; color: var(--fx-accent, var(--gold)); white-space: nowrap; }
.theater-group { font-size: 0.86rem; color: var(--light-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theater-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.theater-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 4px;
  border: 1px solid rgba(240, 195, 90, 0.34); background: rgba(255, 255, 255, 0.06);
  color: var(--light); font-size: 0.84rem; font-weight: 600; cursor: pointer;
}
.theater-btn--link { border-color: var(--fx-accent, var(--gold)); color: var(--fx-accent, var(--gold)); }

.theater-stage {
  position: relative; z-index: 2; flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center; padding: 14px 68px;
}
.theater-viewport {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}
.theater-video, .theater-img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; background: #03050A; border: 1px solid rgba(255, 255, 255, 0.14);
}
.theater-video[hidden], .theater-img[hidden] { display: none !important; }
.theater-nav {
  position: absolute; top: 50%; transform: translate3d(0, -50%, 0); z-index: 4;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(240, 195, 90, 0.38); background: rgba(7, 11, 20, 0.82);
  color: var(--light); font-size: 1.55rem; line-height: 1;
}
.theater-nav--prev { left: 14px; }
.theater-nav--next { right: 14px; }
.theater-nav[hidden] { display: none; }

.theater-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.1);
}
.theater-progress-bar {
  display: block; width: 100%; height: 100%; background: var(--fx-accent, var(--gold));
  transform-origin: left center; transform: scaleX(1); transition: transform 0.24s ease;
}

.theater-bottom {
  position: relative; z-index: 2; flex-shrink: 0;
  background: rgba(7, 11, 20, 0.96); border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 18px 12px; display: flex; flex-direction: column; gap: 10px;
}
.theater-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-width: 0; }
.theater-meta h3 { font-family: var(--font-serif); font-size: 1.08rem; color: var(--light); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theater-meta p { margin: 0; font-size: 0.82rem; color: var(--light-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.theater-strip { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 0; }
.theater-thumb {
  flex: 0 0 auto; min-width: 68px; height: 48px; padding: 0; border-radius: 4px;
  border: 2px solid transparent; overflow: hidden; background: #141A29;
  opacity: 0.56; cursor: pointer; transition: opacity 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.theater-thumb.is-active { opacity: 1; border-color: var(--fx-accent, var(--gold)); transform: translate3d(0, -1px, 0); }
.theater-thumb img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 720px) {
  .theater-topbar { padding: 6px 10px; min-height: 54px; }
  .theater-group, .theater-btn span { display: none; }
  .theater-btn--link { font-size: 0.78rem; padding: 0 10px; }
  .theater-stage { padding: 8px 6px; }
  .theater-nav { width: 44px; height: 44px; }
  .theater-nav--prev { left: 8px; }
  .theater-nav--next { right: 8px; }
  .theater-meta { flex-direction: column; gap: 2px; }
  .theater-meta h3, .theater-meta p { max-width: 100%; }
}
