:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111111;
  color: #f5f5f5;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #111111;
}

button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(20, 20, 20, 0.78);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 10px 12px;
}

button:hover,
button:focus-visible {
  background: rgba(44, 44, 44, 0.86);
  outline: none;
}

.deck {
  position: relative;
  display: grid;
  width: 100vw;
  height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: clamp(0px, 1.4vw, 18px);
}

.slide {
  position: absolute;
  display: none;
  width: min(100vw, 177.7777778vh);
  max-width: 100vw;
  aspect-ratio: 16 / 9;
  background: #e9e9e9;
  box-shadow: 0 16px 80px rgba(0, 0, 0, 0.38);
}

.slide.active {
  display: block;
}

.slide.video-slide {
  background: #000000;
}

.slide.video-slide.active {
  display: grid;
  place-items: center;
}

.slide img,
.slide iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.slide img {
  object-fit: contain;
}

.slide.video-slide iframe {
  width: min(100%, 60.75vh);
  max-width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;
}

.controls {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 160ms ease;
}

body:hover .controls,
body.controls-visible .controls,
.controls:focus-within {
  opacity: 1;
}

.counter {
  min-width: 46px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

@media (max-width: 720px) {
  .controls {
    right: 10px;
    bottom: 10px;
    left: 10px;
    justify-content: center;
  }

  button {
    padding: 9px 10px;
  }
}
