*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  background: #fff;
  color: #111;
  font-family: system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  transition: background 0.4s ease;
}

body.dimmed {
  background: #000;
}

/* Full-screen overlay sits between body background and the theater */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.4s ease;
  z-index: 1;
}

body.dimmed #overlay {
  background: rgba(0, 0, 0, 0.82);
}

/* Theater container floats above the overlay */
.theater {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 90vw;
  max-width: 1100px;
}

/* Responsive 16:9 wrapper */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
}

.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Dim-lights toggle button */
#dimToggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

#dimToggle:hover {
  border-color: rgba(0, 0, 0, 0.4);
  color: rgba(0, 0, 0, 0.85);
}

body.dimmed #dimToggle {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.6);
}

body.dimmed #dimToggle:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.9);
}
