/* Whip or Dip — hidden joke page. Leans on styles.css for fonts/tokens.
   Romantic reskin: OSRS bones, dating-app dress. All scoped under .wod-*. */

/* whip-or-dip.css only loads on this page, so styling html here is safe.
   Backs the fixed gradient so scrolling never reveals a bare gap. */
html { background: #170810; }

.wod-body {
  align-items: center;
  /* Dusky wine backdrop with a warm glow up top */
  --wod-rose: #ff5c8a;
  --wod-rose-soft: #ff9cba;
  --wod-panel-border: #86405b;
  --wod-glow: rgba(255, 92, 138, .40);
  --wod-dip: #6f97c2;
  --wod-dip-border: #3f5c7a;
  background:
    radial-gradient(120% 80% at 50% -10%, #4a1a2e 0%, rgba(74, 26, 46, 0) 55%),
    linear-gradient(180deg, #2b0f1c 0%, #170810 100%);
  background-attachment: fixed;
}

/* Content rides above the ambient heart layer */
.wod-container { position: relative; z-index: 1; }

.wod-container {
  width: min(560px, 94vw);
  margin: 0 auto;
  padding: 20px 0 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Extra bottom buffer: the brand is pulled up into the title, so the title
   image's boot/tail overhang would otherwise crowd the card below. */
.wod-header { text-align: center; margin-bottom: 36px; }
.wod-title {
  margin: 0;
  line-height: 0;
}
.wod-title-image {
  display: block;
  width: min(760px, 100%);
  height: auto;
  margin: 0 auto;
}
/* Small site brand tucked into the empty center gap directly under the
   WHIP OR DIP lettering (the title image has a tall transparent lower area
   — the boot/tail hang lower on the sides). Percentage margin so it scales
   with the responsive header. */
.wod-brand {
  display: block;
  width: 210px;
  max-width: 62%;
  height: auto;
  margin: -13% auto 0;
  opacity: .85;
  position: relative; /* sit above the title image's transparent area */
}
.wod-card {
  background: linear-gradient(180deg, #3c1a29 0%, #2c1320 100%);
  border: 2px solid var(--wod-panel-border);
  border-radius: 16px;
  padding: 14px 16px 18px;
  text-align: center;
  box-shadow:
    0 0 26px var(--wod-glow),
    0 8px 0 rgba(0, 0, 0, .3),
    inset 0 0 34px rgba(255, 92, 138, .06);
}

.wod-progress {
  color: var(--osrs-yellow);
  font-family: 'RuneScape Small', Arial, sans-serif;
  opacity: .8;
  margin-bottom: 6px;
}

.wod-image-wrap {
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wod-image {
  max-height: 260px;
  max-width: min(340px, 70vw);
  object-fit: contain;
  image-rendering: auto; /* wiki renders aren't pixel art at this scale */
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45));
}

.wod-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 56px;
  border: 2px solid var(--wod-panel-border);
  border-radius: 8px;
  background: #2c1320;
  color: var(--wod-rose-soft);
  font-size: 22px;
  cursor: pointer;
}
.wod-arrow:hover { border-color: var(--wod-rose); color: #fff; }
.wod-arrow-prev { left: 0; }
.wod-arrow-next { right: 0; }

.wod-name {
  margin: 8px 0 2px;
  font-size: 28px;
  color: var(--osrs-gold);
}
.wod-examine {
  margin: 0 0 14px;
  min-height: 22px;
  color: var(--osrs-yellow);
  font-family: 'Quill 8', 'RuneScape Small', Arial, sans-serif;
  font-size: 18px;
  opacity: .9;
}

.wod-vote-row {
  display: flex;
  gap: 18px;
  justify-content: center;
}
.wod-btn {
  min-width: 150px;
  padding: 14px 20px;
  font-family: 'RuneScape Bold', Arial, sans-serif;
  font-size: 26px;
  border-radius: 14px;
  cursor: pointer;
  background: var(--osrs-ui-bg);
  transition: transform 80ms ease, box-shadow 120ms ease, background 120ms ease;
}
.wod-btn:active { transform: translateY(2px); }
.wod-btn-whip,
.wod-btn-dip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* WHIP = the love button: warm rose, softly breathing */
.wod-btn-whip {
  border: 3px solid var(--wod-rose);
  color: #ffd9e4;
  background: linear-gradient(180deg, #5b2036 0%, #3f1526 100%);
  box-shadow: 0 0 12px var(--wod-glow), inset 0 0 10px rgba(255, 92, 138, .2);
  animation: wod-whip-pulse 3.2s ease-in-out infinite;
}
.wod-btn-whip:hover {
  background: linear-gradient(180deg, #6d2742 0%, #4a1a2e 100%);
  box-shadow: 0 0 22px var(--wod-rose), inset 0 0 12px rgba(255, 92, 138, .32);
}
/* DIP = the cool pass button */
.wod-btn-dip {
  border: 3px solid var(--wod-dip-border);
  color: #d3e2f2;
  background: linear-gradient(180deg, #223447 0%, #182634 100%);
  box-shadow: inset 0 0 8px rgba(111, 151, 194, .15);
}
.wod-btn-dip:hover {
  border-color: var(--wod-dip);
  background: linear-gradient(180deg, #2a4054 0%, #1d2e3e 100%);
  box-shadow: 0 0 14px rgba(111, 151, 194, .45), inset 0 0 10px rgba(111, 151, 194, .22);
}

.wod-btn[disabled] { opacity: .45; cursor: default; box-shadow: none; animation: none; }

/* A gentle breathing glow — subtle, not a strobe */
@keyframes wod-whip-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 92, 138, .26), inset 0 0 10px rgba(255, 92, 138, .18); }
  50%      { box-shadow: 0 0 17px rgba(255, 92, 138, .48), inset 0 0 11px rgba(255, 92, 138, .26); }
}

/* Your personal vote tallies, riding inside the buttons */
.wod-chip {
  min-width: 38px;
  padding: 4px 8px;
  border-radius: 8px;
  font-family: 'RuneScape Bold', Arial, sans-serif;
  font-size: 20px;
  color: #fff;
}
.wod-chip-dip { background: #4f7093; }
.wod-chip-whip { background: #e84d7d; }

/* "What others chose" — bars flanking a thumbnail, pokesmash-style */
.wod-results { margin-top: 16px; }
.wod-others-title {
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--osrs-yellow);
  font-family: 'RuneScape', Arial, sans-serif;
}
.wod-others-name { color: var(--wod-rose-soft); }
.wod-others {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.wod-others-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.wod-others-side-dip { align-items: flex-end; }
.wod-others-side-whip { align-items: flex-start; }
.wod-others-label {
  color: var(--osrs-yellow);
  font-family: 'RuneScape Small', Arial, sans-serif;
  font-size: 16px;
}
.wod-others-bar {
  height: 32px;
  border-radius: 8px;
  min-width: 12%;
  transition: width 400ms ease;
}
.wod-others-bar-dip { background: #6f97c2; }
.wod-others-bar-whip { background: #ff5c8a; }
.wod-others-count {
  color: var(--osrs-yellow);
  font-family: 'RuneScape Small', Arial, sans-serif;
  font-size: 16px;
}
.wod-others-thumb {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border: 3px solid var(--wod-panel-border);
  border-radius: 14px;
  background: #2c1320;
  box-shadow: 0 0 12px var(--wod-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wod-others-thumb img {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
}
.wod-verdict {
  margin: 10px 0 12px;
  color: var(--osrs-yellow);
  font-size: 18px;
}
.wod-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.wod-small-btn {
  padding: 6px 16px;
  border: 2px solid var(--osrs-brown);
  border-radius: 6px;
  background: var(--osrs-ui-panel);
  color: var(--osrs-yellow);
  cursor: pointer;
}
.wod-small-btn:hover { border-color: var(--osrs-gold); }

.wod-keys {
  text-align: center;
  margin-top: 12px;
  color: var(--osrs-yellow);
  opacity: .55;
  font-family: 'RuneScape Small', Arial, sans-serif;
}

/* Stats modal */
.wod-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
  z-index: 100;
  padding: 16px;
}
.wod-modal[hidden] { display: none; }
.wod-dialog {
  position: relative;
  width: min(480px, 94vw);
  background: linear-gradient(180deg, #3c1a29 0%, #2c1320 100%);
  border: 2px solid var(--wod-panel-border);
  border-radius: 16px;
  padding: 18px 20px;
  text-align: center;
  box-shadow: 0 0 30px var(--wod-glow);
}
.wod-dialog h2 { margin: 0 0 8px; color: var(--osrs-gold); }
.wod-dialog h3 { margin: 8px 0 4px; color: var(--osrs-gold); font-size: 17px; }
.wod-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: none;
  color: var(--osrs-yellow);
  font-size: 24px;
  cursor: pointer;
}
/* Degeneracy diagnosis — the headline verdict */
.wod-diagnosis {
  margin: 6px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--wod-panel-border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 92, 138, .10), rgba(255, 92, 138, .03));
}
.wod-persona {
  margin: 0;
  font-family: 'RuneScape Bold', 'RuneScape', Arial, sans-serif;
  font-size: 24px;
  color: var(--wod-rose-soft);
  text-shadow: 0 0 12px var(--wod-glow);
}
.wod-persona-sub {
  margin: 4px 0 0;
  color: var(--osrs-yellow);
  font-family: 'Quill 8', 'RuneScape Small', Arial, sans-serif;
  font-size: 16px;
  opacity: .92;
}
.wod-rate {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wod-rate[hidden] { display: none; }
.wod-rate-track {
  height: 12px;
  border-radius: 7px;
  overflow: hidden;
  /* blue "dip" side showing through behind the rose "whip" fill */
  background: var(--wod-dip);
}
.wod-rate-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff7ba3, var(--wod-rose));
  transition: width 500ms ease;
}
.wod-rate-label {
  color: var(--osrs-yellow);
  font-family: 'RuneScape Small', Arial, sans-serif;
  font-size: 15px;
  opacity: .85;
}

.wod-stat-line { color: var(--osrs-yellow); margin: 4px 0 10px; }

/* Share button on the report */
.wod-share-btn {
  margin: 2px auto 0;
  padding: 10px 22px;
  border: 2px solid var(--wod-rose);
  border-radius: 12px;
  background: linear-gradient(180deg, #5b2036 0%, #3f1526 100%);
  color: #ffd9e4;
  font-family: 'RuneScape Bold', 'RuneScape', Arial, sans-serif;
  font-size: 19px;
  cursor: pointer;
  box-shadow: 0 0 12px var(--wod-glow), inset 0 0 8px rgba(255, 92, 138, .18);
  transition: box-shadow 120ms ease, background 120ms ease;
}
.wod-share-btn:hover {
  background: linear-gradient(180deg, #6d2742 0%, #4a1a2e 100%);
  box-shadow: 0 0 18px var(--wod-rose), inset 0 0 10px rgba(255, 92, 138, .28);
}
.wod-share-status {
  margin: 8px 0 0;
  color: var(--wod-rose-soft);
  font-family: 'RuneScape Small', Arial, sans-serif;
  font-size: 15px;
}
.wod-share-status[hidden] { display: none; }

/* Community rankings — a pokedex-style grid */
.wod-dialog-wide { width: min(900px, 96vw); }
.wod-ranks-sub {
  margin: -2px 0 12px;
  color: var(--osrs-yellow);
  font-family: 'Quill 8', 'RuneScape Small', Arial, sans-serif;
  font-size: 16px;
  opacity: .9;
}
.wod-dex {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  max-height: 64vh;
  overflow-y: auto;
  padding: 4px 6px;
}
.wod-dex-msg {
  grid-column: 1 / -1;
  color: var(--osrs-yellow);
  font-family: 'RuneScape Small', Arial, sans-serif;
  opacity: .8;
}
.wod-dex-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 8px;
  border: 1px solid var(--wod-panel-border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 92, 138, .07), rgba(0, 0, 0, .12));
}
.wod-dex-rank {
  position: absolute;
  top: 5px;
  left: 7px;
  font-family: 'RuneScape Small', Arial, sans-serif;
  font-size: 13px;
  color: var(--osrs-yellow);
  opacity: .7;
}
.wod-dex-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .5));
}
.wod-dex-name {
  color: var(--osrs-gold);
  font-family: 'RuneScape', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.wod-dex-stat {
  color: var(--wod-rose-soft);
  font-family: 'RuneScape Small', Arial, sans-serif;
  font-size: 14px;
}
.wod-stat-foot {
  margin: 12px 0 0;
  font-family: 'RuneScape Small', Arial, sans-serif;
  opacity: .6;
  color: var(--osrs-yellow);
}

/* Heart burst on whip — a fixed overlay so it survives the card auto-advancing.
   Each heart is positioned at the whip button and flies outward via CSS vars. */
.wod-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90; /* above the card, below the stats modal (100) */
  overflow: hidden;
}
.wod-heart {
  position: fixed;
  will-change: transform, opacity;
  transform: translate(-50%, -50%);
  /* OSRS Hitpoints icon — keep the hard pixel edges when scaled up */
  background: url('assets/whip-or-dip/heart.png') center / contain no-repeat;
  image-rendering: pixelated;
  animation: wod-heart-fly var(--dur, 950ms) cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes wod-heart-fly {
  0%   { opacity: 0; transform: translate(-50%, -50%) translate(0, 0) scale(.3) rotate(0deg); }
  18%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(var(--sc)) rotate(var(--rot)); }
}
@media (prefers-reduced-motion: reduce) {
  .wod-heart { animation: none; display: none; }
  .wod-btn-whip { animation: none; }
}

/* Ambient hearts — faint HP hearts drifting up behind the content */
.wod-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.wod-ambient-heart {
  position: absolute;
  bottom: -48px;
  background: url('assets/whip-or-dip/heart.png') center / contain no-repeat;
  image-rendering: pixelated;
  opacity: 0;
  will-change: transform, opacity;
  animation: wod-ambient-rise var(--dur, 12s) linear forwards;
}
@keyframes wod-ambient-rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  12%  { opacity: var(--maxop, .1); }
  88%  { opacity: var(--maxop, .1); }
  100% { transform: translateY(-112vh) translateX(var(--sway, 0)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wod-ambient { display: none; }
}

/* End-of-list state */
.wod-card.wod-done .wod-image { filter: drop-shadow(0 0 18px rgba(230, 165, 25, .5)); }

@media (max-width: 480px) {
  .wod-image-wrap { height: 220px; }
  .wod-image { max-height: 200px; }
  .wod-btn { min-width: 120px; font-size: 22px; }
  .wod-title-image { width: 100%; }
  .wod-subtitle { margin-top: -2px; }
}
