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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

/* Fullscreen video: fills the whole screen, cropping the sides if needed */
#intro {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  object-fit: cover;
  z-index: 0;
}

/* White translucent + blurred overlay: lets the video show through, blurred */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
}

.title {
  color: #7c3aed; /* violet */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(2.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  user-select: none;
}

/* Controls, top-right corner: a trigger circle + a panel that drops down */
.controls {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Trigger: solid purple circle */
.menu-toggle {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: #7c3aed;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-toggle:hover {
  background: #6d28d9;
}

.controls.is-open .menu-toggle {
  transform: rotate(45deg);
}

/* Panel that expands downward */
.menu-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  /* collapsed by default */
  opacity: 0;
  transform: translateY(-8px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.controls.is-open .menu-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.85);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.ctrl-btn:hover {
  background: rgba(124, 58, 237, 1);
}

.ctrl-btn:active {
  transform: scale(0.94);
}

/* Audio icon swap: muted by default */
.icon-unmuted {
  display: none;
}

#audio-toggle.is-playing .icon-muted {
  display: none;
}

#audio-toggle.is-playing .icon-unmuted {
  display: block;
}

/* Play/pause icon swap: playing by default (shows pause icon) */
.icon-play {
  display: none;
}

#play-toggle.is-paused .icon-pause {
  display: none;
}

#play-toggle.is-paused .icon-play {
  display: block;
}
