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

html {
  background-color: #fafafa;
  touch-action: manipulation;
}

body {
  align-items: center;
  background-color: #fafafa;
  box-sizing: border-box;
  display: flex;
  font-family: "Marcellus", serif;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem;
}

#app {
  -webkit-user-select: none;
  align-items: center;
  aspect-ratio: 1;
  background-color: #000000;
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  box-shadow:
    0 -1px 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 1px 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 4px 0 rgba(31, 31, 31, 0.08),
    0 4px 8px 0 rgba(31, 31, 31, 0.08),
    0 1px 2px 0 rgba(31, 31, 31, 0.08);
  color: #ffffff;
  display: flex;
  justify-content: center;
  max-height: 640px;
  max-width: 640px;
  overflow: hidden;
  padding: 4rem;
  position: relative;
  text-align: center;
  transform: rotate(-0.5deg);
  user-select: none;
  width: min(640px, 100%);
}

#app::before {
  background-color: #000000;
  border-radius: 8px;
  content: "";
  inset: 0;
  opacity: 0.25;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

#bg-video {
  display: none;
}

.bg-canvas {
  border-radius: 8px;
  display: block;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
  z-index: 0;
}

.bg-canvas.hidden {
  display: none;
}

.quote {
  font-size: clamp(1rem, 5vw, 2rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  max-width: 100%;
  position: relative;
  quotes: none;
  text-wrap: balance;
  z-index: 3;
}

.capture-hint {
  -webkit-user-select: none;
  color: #888888;
  font-size: 0.875rem;
  left: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  text-align: center;
  top: 2rem;
  user-select: none;
  z-index: 10;
}

.controls {
  -webkit-user-select: none;
  bottom: 2rem;
  color: #888888;
  display: flex;
  font-size: 0.875rem;
  gap: 0.5rem;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  user-select: none;
  z-index: 10;
}

.control {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

.control-sep {
  pointer-events: none;
}

.control[hidden],
.control-sep[hidden] {
  display: none;
}

.quote::before,
.quote::after {
  content: none;
}

@keyframes pop {
  0% {
    transform: rotate(-0.5deg) scale(1);
  }
  40% {
    transform: rotate(0deg) scale(0.98);
  }
  60% {
    transform: rotate(0deg) scale(1.02);
  }
  100% {
    transform: rotate(-0.5deg) scale(1);
  }
}

#app.pop {
  animation: pop 0.2s ease-out;
}

@media (hover: hover) {
  #app {
    cursor: pointer;
    rotate: -0.5deg;
    scale: 1;
    transform: none;
    transition:
      rotate 0.2s ease-out,
      scale 0.2s ease-out;
  }

  #app:hover {
    rotate: 0deg;
    scale: 1.02;
  }

  @keyframes pop-hover {
    40% {
      scale: 0.98;
    }
    100% {
      scale: 1.02;
    }
  }

  #app.pop {
    animation: pop-hover 0.2s ease-out;
  }
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  #app {
    padding: 2rem;
    width: 100%;
  }

  .capture-hint {
    top: 1rem;
  }

  .controls {
    bottom: 1rem;
  }
}
