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

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

.rof {
  --rof-bg: #1b1016;
  --rof-card: #2a1822;
  --rof-card-2: #351d29;
  --rof-text: #fdf6f8;
  --rof-muted: #d7b8c2;
  --rof-ok: #34d399;
  --rof-bad: #fb7185;
  --rof-line: rgba(255, 255, 255, 0.12);
  --rof-radius: 22px;
  --rof-shadow: 0 18px 50px rgba(20, 6, 12, 0.35);
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  color: var(--rof-text);
  background: radial-gradient(1200px 480px at 50% -10%, #4a2233 0%, var(--rof-bg) 55%);
  border: 1px solid var(--rof-line);
  border-radius: var(--rof-radius);
  box-shadow: var(--rof-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;
}

.rof *,
.rof *::before,
.rof *::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.
 */
.rof [hidden],
.rof-screen[hidden],
.rof-feedback[hidden],
.rof-product[hidden],
.rof-image-wrap[hidden],
.rof-image-fallback[hidden],
.rof-lookalike-name[hidden] {
  display: none;
}

.rof-screen {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

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

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

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

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

.rof-lead,
.rof-sub,
.rof-blurb,
.rof-meta,
.rof-prompt,
.rof-kicker,
.rof-progress-label {
  margin: 0;
}

.rof-lead {
  font-size: 1.08rem;
  color: var(--rof-text);
  max-width: 22em;
}

.rof-sub,
.rof-blurb {
  color: var(--rof-muted);
  max-width: 22em;
}

.rof-meta {
  font-size: 0.82rem;
  color: var(--rof-muted);
  margin-top: 6px;
}

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

.rof-play-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.rof-progress-label {
  font-size: 0.92rem;
  font-weight: 650;
  white-space: nowrap;
}

.rof-progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.rof-progress-bar {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, var(--rof-accent), #fb7185);
  border-radius: inherit;
  transform-origin: left center;
  transition: width 0.28s ease;
}

.rof-prompt {
  margin-top: 8px;
  font-weight: 600;
}

.rof-image-wrap {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 4 / 3;
  min-height: 200px;
  border-radius: 16px;
  overflow: hidden;
  overflow-anchor: none;
  background: var(--rof-card-2);
  border: 1px solid var(--rof-line);
}

.rof-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.rof-image-fallback {
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: var(--rof-muted);
  font-size: 0.9rem;
  background: var(--rof-card-2);
}

.rof-image-fallback:not([hidden]) {
  display: flex;
}

.rof-product {
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin: 4px 0 2px;
  text-decoration: none;
  color: inherit;
}

.rof-product:not([hidden]) {
  display: flex;
}

.rof-product:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  border-radius: 16px;
}

.rof-product .rof-image-wrap {
  max-width: none;
}

.rof-name {
  scroll-margin-top: 16px;
  margin: 4px 0 8px;
  width: 100%;
  padding: 18px 16px;
  background: var(--rof-card);
  border: 1px solid var(--rof-line);
  border-radius: 16px;
  font-size: clamp(1.15rem, 4.4vw, 1.45rem);
  font-weight: 750;
  line-height: 1.3;
  color: var(--rof-text);
}

.rof-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rof-actions .rof-btn-answer {
  min-width: 0;
  width: 100%;
  padding-left: 8px;
  padding-right: 8px;
}

.rof-result-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rof-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(--rof-text);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.rof-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.rof-btn:disabled {
  cursor: default;
}

.rof-btn-answer:disabled {
  opacity: 1;
}

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

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

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

.rof-btn-answer {
  background: var(--rof-card);
  border-color: var(--rof-line);
  font-size: 1.05rem;
}

.rof-btn-answer.is-correct {
  background: rgba(52, 211, 153, 0.18);
  border-color: var(--rof-ok);
}

.rof-btn-answer.is-wrong {
  background: rgba(251, 113, 133, 0.16);
  border-color: var(--rof-bad);
}

.rof-btn-answer.is-miss {
  opacity: 0.45;
}

.rof-feedback {
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.rof-feedback:not([hidden]) {
  display: flex;
}

.rof-feedback-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.rof-feedback-text,
.rof-feedback-score {
  margin: 0;
  color: var(--rof-muted);
}

.rof-cta {
  color: var(--rof-ok);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.rof-lookalike-name {
  margin: 0;
  font-size: 0.85rem;
  color: var(--rof-muted);
  font-weight: 500;
  text-align: center;
}

.rof-scoreline {
  font-size: 3rem;
  font-weight: 800;
  margin: 0;
  line-height: 1;
}

.rof-rank {
  margin: 4px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.rof-points {
  margin: 0;
  color: var(--rof-muted);
}

.rof-gallery {
  width: 100%;
  margin: 12px 0 4px;
  text-align: left;
}

.rof-gallery-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
}

.rof-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.rof-gallery-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background: var(--rof-card);
  border: 1px solid var(--rof-line);
  border-radius: 16px;
  overflow: hidden;
}

.rof-gallery-tile:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.rof-gallery-tile.is-real {
  border-color: rgba(52, 211, 153, 0.35);
}

.rof-gallery-tile.is-fake {
  border-color: rgba(251, 113, 133, 0.28);
}

.rof-gallery-tile .rof-image-wrap {
  max-width: none;
  border: 0;
  border-radius: 0;
}

.rof-gallery-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 12px;
}

.rof-gallery-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rof-gallery-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--rof-card-2);
  color: var(--rof-muted);
}

.rof-gallery-badge.is-real {
  color: var(--rof-ok);
}

.rof-gallery-badge.is-fake {
  color: var(--rof-bad);
}

.rof-gallery-badge.is-ok {
  color: var(--rof-ok);
}

.rof-gallery-badge.is-bad {
  color: var(--rof-bad);
}

.rof-gallery-name {
  font-weight: 750;
  line-height: 1.3;
}

.rof-gallery-sub {
  font-size: 0.82rem;
  color: var(--rof-muted);
}

.rof-share-card {
  width: 100%;
  margin: 8px 0;
  padding: 20px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #3a2030, #1a1016);
  border: 1px solid var(--rof-line);
}

.rof-share-card-kicker,
.rof-share-card-site {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--rof-muted);
}

.rof-share-card-emoji {
  margin: 8px 0;
  font-size: 28px;
}

.rof-share-card-score {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.rof-share-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 14px auto;
  max-width: 220px;
}

.rof-share-dot {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background: #6b3a4c;
}

.rof-share-dot.is-ok {
  background: var(--rof-ok);
}

.rof-share-dot.is-bad {
  background: var(--rof-bad);
}

.rof-share-card-rank {
  margin: 0 0 8px;
  font-weight: 800;
}

.rof-copy-msg {
  margin: 0;
  color: var(--rof-ok);
}

.rof-fallback-url {
  margin: 0;
  word-break: break-all;
  user-select: all;
  padding: 10px;
  border-radius: 10px;
  background: var(--rof-card);
  color: var(--rof-text);
}

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

.rof-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--rof-text);
  border-radius: 50%;
  animation: rof-spin 0.8s linear infinite;
}

.rof-flash {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.rof-flash.is-ok {
  animation: rof-flash-ok 0.55s ease;
}

.rof-flash.is-bad {
  animation: rof-flash-bad 0.55s ease;
}

.rof.is-pop .rof-name {
  animation: rof-pop 0.35s ease;
}

.rof.is-shake .rof-name {
  animation: rof-shake 0.4s ease;
}

.rof-confetti {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.rof-confetti i {
  position: absolute;
  top: -8px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  animation: rof-fall 0.9s ease-out forwards;
}

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

@keyframes rof-spin {
  to { transform: rotate(360deg); }
}

@keyframes rof-flash-ok {
  0% { background: rgba(52, 211, 153, 0.28); }
  100% { background: transparent; }
}

@keyframes rof-flash-bad {
  0% { background: rgba(251, 113, 133, 0.28); }
  100% { background: transparent; }
}

@keyframes rof-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes rof-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes rof-fall {
  to {
    transform: translateY(420px) rotate(220deg);
    opacity: 0;
  }
}

@media (hover: hover) and (pointer: fine) {
  .rof-product:hover .rof-image-wrap,
  .rof-gallery-tile:hover .rof-image-wrap {
    border-color: rgba(255, 255, 255, 0.35);
  }

  .rof-gallery-tile:hover {
    border-color: rgba(255, 255, 255, 0.35);
  }

  .rof-btn-primary:hover {
    filter: brightness(1.06);
  }

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

@media (min-width: 480px) {
  .rof-gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

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

@media (max-width: 360px) {
  .rof-actions .rof-btn-answer {
    font-size: 0.95rem;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rof-progress-bar,
  .rof-btn,
  .rof-spinner {
    transition: none;
    animation: none;
  }

  .rof-flash.is-ok,
  .rof-flash.is-bad,
  .rof.is-pop .rof-name,
  .rof.is-shake .rof-name,
  .rof-confetti i {
    animation: none;
  }
}
