/* ==========================================================================
   Minifilm „Budiž světlo" — přehrávač (web i samostatná stránka minifilm.html).
   Barvy jsou lokální proměnné, aby se nehádaly s proměnnými webu.
   ========================================================================== */

.mf-player {
  --mf-n950: #070b0e;
  --mf-n900: #0c1115;
  --mf-n800: #1a232b;
  --mf-n700: #26323c;
  --mf-n400: #8b98a3;
  --mf-n300: #b3bec6;
  --mf-n100: #e6ecf0;
  --mf-l300: #5cb2ff;
  --mf-l500: #0084ff;
  background: var(--mf-n950);
  border: 1px solid var(--mf-n800);
  border-radius: 12px;
  color: var(--mf-n100);
  display: flex;
  flex-direction: column;
  font-family: "IBM Plex Mono", Consolas, monospace;
  overflow: hidden;
  position: relative;
}

.mf-player *,
.mf-player *::before,
.mf-player *::after {
  box-sizing: border-box;
}

.mf-player__stage {
  aspect-ratio: 16 / 9;
  background: var(--mf-n950);
  container-type: inline-size;
  outline: none;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.mf-player__stage:focus-visible {
  box-shadow: inset 0 0 0 2px var(--mf-l500);
}

/* --- Stavy přehrávače ---------------------------------------------------- */

/* klidový stav před prvním spuštěním: jen tmavá plocha a velké tlačítko */
.mf-player--idle,
.mf-player--ended {
  border-color: transparent;
}

.mf-player--idle .mf-bar {
  display: none;
}

/* konec filmu: lišta zmizí, pod citátem a logem zůstanou dvě tlačítka;
   místo po liště zůstane (tmavé), přehrávač se nezkrátí */
.mf-player--ended .mf-bar {
  visibility: hidden;
}

.mf-endnav {
  bottom: clamp(16px, 5cqw, 64px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 1.6cqw, 20px);
  justify-content: center;
  left: 0;
  padding: 0 16px;
  position: absolute;
  right: 0;
  z-index: 3;
}

.mf-endnav[hidden] {
  display: none;
}

/* stejný styl jako tlačítka webu (.btn a .btn--secondary): hranatá, tučná, plná plocha */
.mf-endnav__btn {
  background-color: #1a232b;
  border: none;
  border-radius: 0;
  color: #fff;
  cursor: pointer;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
  padding: 0.85rem 1.6rem;
  text-transform: none;
  transition: background-color 290ms ease, transform 290ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mf-endnav__btn:hover {
  background-color: #26323c;
  transform: translateY(-2px);
}

.mf-endnav__btn:focus {
  background-color: #26323c;
}

.mf-endnav__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  transform: translateY(-2px);
}

.mf-endnav__btn:active {
  transform: translateY(0);
}

.mf-endnav__btn--primary {
  background-color: #006bd6;
}

.mf-endnav__btn--primary:hover,
.mf-endnav__btn--primary:focus {
  background-color: #0054aa;
}

@media (max-width: 560px) {
  .mf-endnav__btn {
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
  }
}

/* --- Umístění ------------------------------------------------------------ */

/* na webu (sekce Zákulisí): přes celou šířku stránky, bez rámečku */
.backstage__player {
  border: 0;
  border-radius: 0;
  margin-top: 2rem;
  width: 100%;
}

/* obraz + lišta se vždy vejdou pod pevné menu (--mf-avail nastaví přehrávač při spuštění) */
.backstage__player .mf-player__stage {
  max-height: calc(var(--mf-avail, 100vh) - 52px);
}

.backstage__player.mf-player--idle .mf-player__stage {
  max-height: 92vh;
}

/* celá obrazovka */
.mf-player:fullscreen {
  border: 0;
  border-radius: 0;
  height: 100%;
  margin: 0;
  width: 100%;
}

/* !important: zruší limit výšky z umístění na webu (.backstage__player), jinak lišta ve fullscreenu vyskočí nahoru */
.mf-player:fullscreen .mf-player__stage {
  aspect-ratio: auto;
  flex: 1 1 auto;
  max-height: none !important;
  min-height: 0;
}

/* samostatná stránka: přes celé okno */
.mf-player--full {
  border: 0;
  border-radius: 0;
  inset: 0;
  position: fixed;
}

.mf-player--full .mf-player__stage {
  aspect-ratio: auto;
  flex: 1;
}

/* --- Titulky a efekty ve filmu (velikosti podle šířky přehrávače) --------- */

.mf-overlay {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.mf-stamp {
  bottom: clamp(12px, 4cqw, 48px);
  color: var(--mf-n300);
  font-size: clamp(10px, 1.4cqw, 16px);
  left: clamp(12px, 4cqw, 48px);
  letter-spacing: 0.3em;
  opacity: 0;
  position: absolute;
}

.mf-chapter {
  bottom: 18%;
  font-size: clamp(20px, 6cqw, 84px);
  font-weight: 500;
  left: 0;
  letter-spacing: 0.5em;
  padding-left: 0.5em;
  position: absolute;
  right: 0;
  text-align: center;
  white-space: nowrap;
}

.mf-chapter span {
  color: var(--mf-n700);
  display: inline-block;
  opacity: 0;
  transition: opacity 0.25s, color 0.25s, text-shadow 0.25s;
}

.mf-chapter span.on {
  color: #fff;
  opacity: 1;
  text-shadow: 0 0 12px var(--mf-l300), 0 0 32px var(--mf-l500);
}

.mf-chapter span.flick {
  opacity: 0.4;
}

.mf-ff {
  color: var(--mf-l300);
  font-size: clamp(11px, 1.6cqw, 20px);
  letter-spacing: 0.25em;
  opacity: 0;
  position: absolute;
  right: clamp(12px, 4cqw, 48px);
  text-shadow: 0 0 10px var(--mf-l500);
  top: clamp(12px, 3.5cqw, 40px);
  transition: opacity 0.2s;
}

.mf-say {
  bottom: 30%;
  color: var(--mf-n100);
  font-size: clamp(14px, 2.6cqw, 34px);
  left: 0;
  letter-spacing: 0.12em;
  position: absolute;
  right: 0;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
}

.mf-say.loud {
  color: #fff;
  font-size: clamp(22px, 5cqw, 64px);
  text-shadow: 0 0 14px var(--mf-l300), 0 0 36px var(--mf-l500);
}

/* spodní odsazení je stálé (místo pro tlačítka Znovu/Pokračovat), aby se citát a logo na konci nepohnuly */
.mf-end {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 4cqw;
  inset: 0;
  justify-content: center;
  padding: 16px 16px clamp(64px, 15cqw, 170px);
  position: absolute;
  text-align: center;
}

.mf-quote {
  color: #fff;
  font-family: "TG Regular", serif;
  line-height: 1.35;
}

.mf-q1 {
  font-size: clamp(18px, 3.6cqw, 48px);
  opacity: 0;
}

.mf-q2:empty {
  display: none;
}

.mf-brand {
  opacity: 0;
}

.mf-logo {
  color: #fff;
  font-family: "TG Regular", serif;
  font-size: clamp(24px, 5cqw, 64px);
}

.mf-rlogo {
  color: var(--mf-l500);
  display: inline-block;
  transform: scale(-1, 1);
}

.mf-fade {
  background: var(--mf-n950);
  inset: 0;
  opacity: 0;
  position: absolute;
}

/* --- Plakát před prvním spuštěním ---------------------------------------- */

.mf-poster {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--mf-n100);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font: inherit;
  gap: 10px;
  inset: 0;
  justify-content: center;
  padding: 16px;
  position: absolute;
  transition: opacity 0.35s ease;
  z-index: 2;
}

.mf-poster[hidden] {
  display: none;
}

.mf-poster__btn {
  aspect-ratio: 1;
  background: var(--mf-l500);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0, 132, 255, 0.55);
  color: #fff;
  display: grid;
  font-size: clamp(24px, 3.3cqw, 44px);
  padding-left: 0.15em;
  place-items: center;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  width: clamp(68px, 8.5cqw, 116px);
}

.mf-poster:hover .mf-poster__btn,
.mf-poster:focus-visible .mf-poster__btn {
  box-shadow: 0 0 0 10px rgba(0, 132, 255, 0.18);
  transform: scale(1.06);
}

.mf-poster:focus-visible {
  outline: 2px solid var(--mf-l500);
  outline-offset: -2px;
}

/* --- Ovládací lišta ------------------------------------------------------ */

.mf-bar {
  align-items: center;
  background: var(--mf-n900);
  border-top: 1px solid var(--mf-n800);
  display: flex;
  font-size: 13px;
  gap: 10px;
  padding: 8px 12px;
}

.mf-bar button {
  background: var(--mf-n800);
  border: 1px solid var(--mf-n700);
  border-radius: 6px;
  color: var(--mf-n100);
  cursor: pointer;
  font: inherit;
  height: 34px;
  line-height: 1;
  min-width: 40px;
  padding: 0 12px;
}

.mf-bar button:hover,
.mf-bar button:focus-visible {
  border-color: var(--mf-l500);
  outline: none;
}

.mf-bar button[aria-pressed="true"] {
  border-color: var(--mf-l300);
  color: var(--mf-l300);
}

.mf-bar input[type="range"] {
  accent-color: var(--mf-l500);
  flex: 1;
  min-width: 60px;
}

.mf-bar__time {
  color: var(--mf-n400);
  font-variant-numeric: tabular-nums;
  min-width: 8.5em;
  text-align: right;
}

@media (max-width: 560px) {
  .mf-bar {
    gap: 6px;
    padding: 6px 8px;
  }

  .mf-bar button {
    min-width: 34px;
    padding: 0 9px;
  }

  .mf-bar__time {
    font-size: 11px;
    min-width: 0;
  }

  .mf-bar [data-mf="restart"] {
    display: none;
  }
}
