/* ---------------------------------------------------------
   Bonvivant Bankettmappe — Styles
   Ruhiges, dunkles Präsentations-Layout. Das Video steht
   im Mittelpunkt, es gibt bewusst keine sichtbare UI.
--------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: #0d0d0f;
  color: #eaeaea;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

/* Gesamte Bühne: zentriert das Video auf dunklem Hintergrund */
.stage {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Videobereich: skaliert responsiv, behält Seitenverhältnis des Videos,
   wird aber nie größer als der verfügbare Platz */
.video-wrap {
  position: relative;
  max-width: 1100px;
  width: 100%;
  max-height: 100vh;
  line-height: 0;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.video-wrap video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 92vh;
  pointer-events: none; /* Klicks laufen über .video-wrap, nicht über die native Video-UI */
}

/* Dezenter Hinweistext, erscheint nur wenn das Video an einem
   Stopppunkt pausiert ist */
.hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(6px);
  padding: 8px 16px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  white-space: nowrap;
}

.hint.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Vollbild-Button: dezent oben rechts, immer klickbar (auch während
   das Video läuft), unabhängig vom "Klicken zum Fortfahren"-Bereich */
.fullscreen-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.15s ease;
  pointer-events: auto;
}

.video-wrap:hover .fullscreen-btn,
.fullscreen-btn:focus-visible {
  opacity: 1;
}

.fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.55);
}

/* Auf Touch-Geräten gibt es kein Hover — Button dauerhaft leicht sichtbar */
@media (hover: none) {
  .fullscreen-btn {
    opacity: 0.75;
  }
}

/* Sprachumschalter DE/EN: dezent oben links, wie der Vollbild-Button */
.lang-switch {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 2px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: auto;
}

.video-wrap:hover .lang-switch,
.lang-switch:focus-within {
  opacity: 1;
}

.lang-btn {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

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

.lang-btn.active {
  color: #0d0d0f;
  background: #eaeaea;
}

/* Auf Touch-Geräten gibt es kein Hover — Umschalter dauerhaft leicht sichtbar */
@media (hover: none) {
  .lang-switch {
    opacity: 0.75;
  }
}

/* Meldung, wenn die Videodatei fehlt */
.video-missing[hidden] {
  display: none;
}

.video-missing {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d0f;
  padding: 24px;
}

.video-missing-box {
  max-width: 480px;
  text-align: center;
  background: #17171a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 32px;
}

.video-missing-box h1 {
  font-size: 20px;
  margin: 0 0 12px;
  color: #fff;
}

.video-missing-box p {
  font-size: 14px;
  line-height: 1.5;
  color: #b8b8bc;
  margin: 8px 0;
}

.video-missing-box code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #fff;
}

/* Debug-Ansicht: Sekunde + aktives Segment, unten links */
.debug-panel {
  position: fixed;
  left: 12px;
  bottom: 12px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #9be89b;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 12px;
  white-space: pre;
  pointer-events: none;
  z-index: 10;
}

/* Sprungliste im Debug-Panel: ein klickbarer Button pro Stopppunkt */
.debug-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 300px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  white-space: normal;
  pointer-events: auto;
}

.debug-jumps button {
  font: inherit;
  font-size: 11px;
  color: #9be89b;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
}

.debug-jumps button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.debug-jumps button.active {
  background: rgba(155, 232, 155, 0.22);
  border-color: rgba(155, 232, 155, 0.6);
}

@media (max-width: 640px) {
  .stage {
    padding: 0;
  }
  .video-wrap {
    border-radius: 0;
  }
}
