/* Scoped to .pov so the rest of sexspielzeug.net is untouched. */

body.pov-body {
  margin: 0;
  background: #140810;
}

.pov-page {
  display: flex;
  justify-content: center;
  padding: 16px 12px 48px;
  overflow-anchor: none;
}

.pov {
  --pov-bg: #140810;
  --pov-card: #2a1822;
  --pov-card-2: #351d29;
  --pov-text: #fdf6f8;
  --pov-muted: #d7b8c2;
  --pov-ok: #34d399;
  --pov-line: rgba(255, 255, 255, 0.12);
  --pov-radius: 22px;
  --pov-shadow: 0 18px 50px rgba(20, 6, 12, 0.35);
  --pov-neon: #ff4d8d;
  --pov-violet: #c084fc;
  --pov-orange: #fb923c;
  box-sizing: border-box;
  width: min(92vw, 600px);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  color: var(--pov-text);
  background: radial-gradient(1200px 480px at 50% -10%, #4a2233 0%, var(--pov-bg) 55%);
  border: 1px solid var(--pov-line);
  border-radius: var(--pov-radius);
  box-shadow: var(--pov-shadow);
  padding: 28px 20px 32px;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
  overflow: hidden;
  overflow-anchor: none;
  scroll-margin-top: 16px;
}

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

/*
 * Bootstrap sets [hidden] { display: none } without !important.
 * Later display:flex on the same node would keep it on screen.
 * Higher-specificity [hidden] wins without using !important.
 */
.pov [hidden],
.pov-screen[hidden],
.pov-overlay[hidden],
.pov-copy-msg[hidden],
.pov-fallback-url[hidden],
.pov-best[hidden] {
  display: none;
}

.pov-screen {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  width: 100%;
}

.pov-screen:not([hidden]) {
  display: flex;
}

.pov-screen-play:not([hidden]) {
  gap: 8px;
}

.pov.is-playing {
  padding: 14px 12px 16px;
}

.pov-emoji {
  font-size: 48px;
  line-height: 1;
  margin: 4px 0 0;
}

.pov-title {
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  font-weight: 800;
}

.pov-title-sm {
  font-size: clamp(1.25rem, 5vw, 1.7rem);
  text-transform: none;
  letter-spacing: 0;
}

.pov-lead,
.pov-sub,
.pov-meta,
.pov-disclaimer,
.pov-kicker,
.pov-score-line {
  margin: 0;
}

.pov-lead {
  font-size: 1.12rem;
  max-width: 22em;
}

.pov-sub,
.pov-disclaimer,
.pov-meta {
  color: var(--pov-muted);
  max-width: 24em;
}

.pov-disclaimer {
  font-size: 0.82rem;
}

.pov-meta {
  font-size: 0.88rem;
  margin-top: 2px;
}

.pov-controls {
  width: 100%;
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--pov-card);
  border: 1px solid var(--pov-line);
  color: var(--pov-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.pov-controls-kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--pov-text);
}

.pov-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pov-muted);
  font-weight: 700;
}

.pov-best {
  width: 100%;
  margin: 6px 0;
  padding: 14px 12px;
  border-radius: 16px;
  background: var(--pov-card);
  border: 1px solid var(--pov-line);
}

.pov-best-score {
  margin: 4px 0 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pov-start-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.pov-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--pov-text);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.pov-btn:focus-visible,
.pov-icon-btn:focus-visible,
.pov-fire:focus-visible,
.pov-track:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.pov-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

.pov-btn-primary {
  background: var(--pov-accent, var(--pov-neon));
  color: #fff;
}

.pov-btn-secondary {
  background: var(--pov-card-2);
  border-color: var(--pov-line);
}

.pov-btn-ghost {
  background: transparent;
  border-color: var(--pov-line);
}

.pov-hud {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "lives score actions"
    "wave wave actions";
  align-items: center;
  gap: 2px 10px;
  width: 100%;
  font-weight: 750;
  font-size: 0.92rem;
  padding-bottom: 6px;
  min-height: 52px;
}

.pov-hud-lives { grid-area: lives; margin: 0; letter-spacing: 0.06em; }
.pov-hud-score { grid-area: score; margin: 0; text-align: center; }
.pov-hud-wave {
  grid-area: wave;
  margin: 0;
  color: var(--pov-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pov-hud-actions {
  grid-area: actions;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.pov-icon-btn {
  appearance: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  border: 1px solid var(--pov-line);
  background: var(--pov-card);
  color: var(--pov-text);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  touch-action: manipulation;
}

.pov-stage {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pov-stage canvas {
  display: block;
  width: min(100%, 480px);
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: #0a0610;
  touch-action: none;
  user-select: none;
}

.pov-stage canvas:focus {
  outline: none;
}

.pov-stage canvas:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.pov-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 16px;
  background: rgba(10, 4, 8, 0.82);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 16px;
  text-align: center;
}

.pov-overlay:not([hidden]) {
  display: flex;
}

#pov-overlay-countdown:not([hidden]) {
  pointer-events: none;
}

.pov-overlay .pov-btn {
  max-width: 280px;
}

.pov-overlay-big {
  margin: 0;
  font-size: clamp(3rem, 16vw, 5.2rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 24px var(--pov-neon);
}

.pov-overlay-kicker {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--pov-violet);
}

.pov-overlay-sub {
  margin: 0;
  color: var(--pov-muted);
  max-width: 18em;
}

.pov-score-line {
  font-weight: 700;
}

.pov-copy-msg {
  margin: 0;
  color: var(--pov-ok);
  font-weight: 700;
}

.pov-fallback-url {
  margin: 0;
  color: var(--pov-muted);
  word-break: break-all;
  font-size: 0.88rem;
}

.pov-touch {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-top: 8px;
  user-select: none;
  position: relative;
  z-index: 3;
}

.pov-track {
  position: relative;
  height: 56px;
  min-height: 56px;
  border-radius: 18px;
  border: 1px solid var(--pov-line);
  background: var(--pov-card-2);
  touch-action: none;
  cursor: pointer;
}

.pov-track-knob {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border-radius: 14px;
  background: var(--pov-accent, var(--pov-neon));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.pov-fire {
  appearance: none;
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  border-radius: 50%;
  border: 1px solid var(--pov-line);
  background: var(--pov-accent, var(--pov-neon));
  color: #fff;
  font-size: 1.45rem;
  cursor: pointer;
  touch-action: manipulation;
  line-height: 1;
}

.pov-fire.is-held {
  filter: brightness(1.12);
  transform: scale(0.96);
}

.pov-noscript {
  text-align: center;
  padding: 16px;
}

@media (hover: hover) and (pointer: fine) {
  .pov-touch {
    display: none;
  }

  .pov-btn-primary:hover:not(:disabled) {
    filter: brightness(1.06);
  }

  .pov-btn-secondary:hover:not(:disabled),
  .pov-btn-ghost:hover:not(:disabled),
  .pov-icon-btn:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: var(--pov-card-2);
  }
}

@media (min-width: 768px) {
  .pov-page {
    padding: 32px 16px 64px;
  }

  .pov {
    padding: 36px 32px 40px;
  }

  .pov.is-playing {
    padding: 18px 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pov-btn,
  .pov-icon-btn,
  .pov-fire,
  .pov-track-knob {
    transition: none;
  }
}
