:root {
  color-scheme: dark;
  font-family: "Segoe UI", Roboto, sans-serif;
  --hud-bg: rgba(10, 12, 24, 0.85);
  --accent: #ff78ce;
  --accent-dark: #e056af;
  --text: #f4f4f5;
}

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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top, #221133 0%, #0a0c15 70%);
  color: var(--text);
}

body {
  overflow: hidden;
}

.hud {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.sound-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  border: none;
  border-radius: 999px;
  background: var(--hud-bg);
  color: var(--text);
  padding: 0.6rem 0.9rem;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 180ms ease, transform 150ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  background: rgba(255, 120, 206, 0.35);
  outline: none;
  transform: translateY(-1px);
}

.sound-toggle--muted {
  background: rgba(255, 255, 255, 0.08);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu-toggle {
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 0.75rem;
  background: var(--hud-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: background 200ms ease;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(255, 120, 206, 0.35);
  outline: none;
}

.menu {
  background: var(--hud-bg);
  padding: 0.75rem;
  border-radius: 0.75rem;
  display: grid;
  gap: 0.5rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
  animation: fade-in 150ms ease;
}

.menu[hidden] {
  display: none !important;
}

.menu button {
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.menu button:hover,
.menu button:focus-visible {
  background: rgba(255, 120, 206, 0.45);
  transform: translateY(-1px);
  outline: none;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.stage--flash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent 60%);
  animation: flash 450ms ease;
  pointer-events: none;
}

.boob {
  position: absolute;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 200ms ease, filter 160ms ease, opacity 200ms ease;
  display: block;
  transform-origin: center;
}

.boob:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.boob:hover {
  filter: drop-shadow(0 0.5rem 1.4rem rgba(255, 120, 206, 0.55));
}

.boob img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.1rem;
  box-shadow: 0 1.4rem 2.3rem rgba(0, 0, 0, 0.4);
}

.boob--giggle img {
  animation: giggle 360ms ease-in-out;
}

.boob--explode {
  pointer-events: none;
  z-index: 15;
  opacity: 0;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
}

.modal[hidden] {
  display: none !important;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.75);
}

.modal__panel {
  position: relative;
  background: #141621;
  padding: 1.75rem;
  border-radius: 1.25rem;
  width: min(420px, 90vw);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.38);
  animation: slide-up 200ms ease;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal__close {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease;
}

.modal__close:hover,
.modal__close:focus-visible {
  background: rgba(255, 120, 206, 0.45);
  outline: none;
}

.modal__body {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(244, 244, 245, 0.85);
}

.modal__note {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: rgba(244, 244, 245, 0.65);
}

.modal__footer {
  margin-top: 1.65rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal__button {
  border: none;
  border-radius: 0.65rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.modal__button:hover,
.modal__button:focus-visible {
  transform: translateY(-1px);
  outline: none;
  background: rgba(255, 120, 206, 0.45);
}

.modal__button--primary {
  background: var(--accent);
  color: #1a0d1c;
  font-weight: 600;
}

.modal__button--primary:hover,
.modal__button--primary:focus-visible {
  background: var(--accent-dark);
  color: #fff;
}

.empty-state {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 1.05rem;
  color: rgba(244, 244, 245, 0.75);
  padding: 1.5rem;
}

@keyframes flash {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes giggle {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  30% {
    transform: translate3d(5px, -2px, 0);
  }
  60% {
    transform: translate3d(-5px, 2px, 0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
