/* Previously engagement widgets v3 — "Midnight Marquee" BORDERLESS.
 * (James's order 2026-10-02 ~08:05 PDT: "Borderless please".)
 * Premium, mobile-first, thumb-friendly. Editorial serif questions (Playfair),
 * Inter UI, ambient glows, springy result bars, versus-arena pick-ems,
 * game-show trivia. Dark luxury, elevated. NO card borders or outlines —
 * separation comes from spacing, soft backgrounds, and light.
 */

.pvx {
  --pvx-red: #ff3b47;
  --pvx-red-deep: #c11119;
  --pvx-violet: #b7a4ff;
  --pvx-violet-deep: #7c5cff;
  --pvx-green: #34d399;
  --pvx-ink: #f4f2fa;
  --pvx-dim: rgba(244, 242, 250, 0.62);
  --pvx-faint: rgba(244, 242, 250, 0.38);
  --pvx-sans: var(--pv-sans, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  --pvx-serif: var(--pv-serif, 'Playfair Display', Georgia, 'Times New Roman', serif);

  position: relative;
  margin: 44px 0;
  padding: 30px 28px 26px;
  max-width: 680px;
  border: none;
  border-radius: 26px;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 45%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(120% 90% at 50% 0%, rgba(26, 26, 36, 0.9) 0%, rgba(10, 10, 15, 0.55) 70%);
  box-shadow:
    0 30px 70px -30px rgba(0, 0, 0, 0.85);
  color: var(--pvx-ink);
  font-family: var(--pvx-sans);
  overflow: hidden;
  isolation: isolate;
  animation: pvx-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Ambient color glow behind the card */
.pvx-ambient {
  position: absolute;
  inset: -40%;
  z-index: -1;
  background:
    radial-gradient(42% 38% at 18% 0%, rgba(229, 9, 20, 0.15), transparent 70%),
    radial-gradient(46% 42% at 88% 108%, rgba(229, 9, 20, 0.09), transparent 70%);
  filter: blur(2px);
  pointer-events: none;
}
.pvx-trivia .pvx-ambient {
  background:
    radial-gradient(42% 38% at 18% 0%, rgba(124, 92, 255, 0.19), transparent 70%),
    radial-gradient(46% 42% at 88% 108%, rgba(124, 92, 255, 0.11), transparent 70%);
}

/* ---- Header ---- */
.pvx-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.pvx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pvx-red);
}
.pvx-kicker-violet { color: var(--pvx-violet); }
.pvx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pvx-red);
  box-shadow: 0 0 10px 2px rgba(255, 59, 71, 0.65);
  animation: pvx-pulse-dot 1.8s ease-in-out infinite;
}
.pvx-kicker-violet .pvx-dot {
  background: var(--pvx-violet-deep);
  box-shadow: 0 0 10px 2px rgba(124, 92, 255, 0.6);
}
.pvx-votes {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pvx-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pvx-q {
  margin: 0 0 22px;
  font-family: var(--pvx-serif);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ---- Standard poll options ---- */
.pvx-opts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pvx-opt {
  --i: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 66px;
  padding: 12px 18px 12px 12px;
  border: none;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--pvx-ink);
  font-family: var(--pvx-sans);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s ease, background 0.18s ease, box-shadow 0.25s ease;
}
.pvx-opt:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.75);
}
.pvx-opt:active { transform: translateY(0) scale(0.985); }

/* Result fill: full-bleed gradient behind content */
.pvx-fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 0%;
  background: linear-gradient(100deg, rgba(193, 17, 25, 0.36), rgba(255, 59, 71, 0.20));
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i) * 90ms);
  overflow: hidden;
}
.pvx-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.22) 48%, transparent 62%);
  transform: translateX(-110%);
}
.pvx.show-results .pvx-fill::after {
  animation: pvx-sheen 1.1s ease 0.55s 1;
  animation-delay: calc(var(--i) * 90ms + 0.55s);
}
.pvx-letter {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--pvx-dim);
  background: rgba(255, 255, 255, 0.07);
  transition: all 0.25s ease;
}
.pvx-label {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1.3;
}
.pvx-pct {
  position: relative;
  z-index: 1;
  font-size: 21px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--pvx-ink);
  min-width: 64px;
  text-align: right;
}
.pvx-check {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, var(--pvx-red), var(--pvx-red-deep));
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.55);
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Voted states */
.pvx-opt.is-mine {
  background: rgba(229, 9, 20, 0.13);
  box-shadow: 0 0 38px -8px rgba(229, 9, 20, 0.55), 0 12px 30px -14px rgba(0, 0, 0, 0.6);
}
.pvx-opt.is-mine .pvx-letter {
  background: linear-gradient(140deg, var(--pvx-red), var(--pvx-red-deep));
  color: #fff;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.5);
}
.pvx-opt.is-mine .pvx-check { transform: scale(1); }
.pvx-opt.is-winner .pvx-pct { color: #ffb3b8; }

/* ---- Versus arena (pick-em, 2 options) ---- */
.pvx-arena {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 6px;
}
.pvx-side {
  --i: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 148px;
  padding: 22px 14px 18px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--pvx-ink);
  font-family: var(--pvx-sans);
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, box-shadow 0.3s ease, opacity 0.3s ease, background 0.2s ease;
}
.pvx-side:hover {
  transform: translateY(-3px) scale(1.015);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 38px -16px rgba(0, 0, 0, 0.8);
}
.pvx-side:active { transform: scale(0.97); }
.pvx-side-fill {
  position: absolute;
  inset: auto 0 0 0;
  height: 0%;
  background: linear-gradient(0deg, rgba(193, 17, 25, 0.44), rgba(255, 59, 71, 0.12));
  transition: height 1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i) * 110ms);
}
.pvx-side-name {
  position: relative;
  z-index: 1;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.pvx-side-pct {
  position: relative;
  z-index: 1;
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.pvx-side-check {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, var(--pvx-red), var(--pvx-red-deep));
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.55);
  transform: scale(0);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pvx-side.is-mine {
  background: rgba(229, 9, 20, 0.13);
  box-shadow: 0 0 40px -6px rgba(229, 9, 20, 0.6), 0 16px 34px -16px rgba(0, 0, 0, 0.8);
}
.pvx-side.is-mine .pvx-side-check { transform: scale(1); }
.pvx-side.is-winner .pvx-side-pct { color: #ffb3b8; }
.pvx.show-results .pvx-side:not(.is-mine):not(.is-winner) { opacity: 0.62; }
.pvx-vs {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  background: radial-gradient(circle at 32% 28%, #2e2e3d, #0e0e14 72%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.7);
}
/* Pick-em with 3+ options: contender card grid */
.pvx-opts.pvx-multi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.pvx-opts.pvx-multi .pvx-opt {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 12px;
}
.pvx-opts.pvx-multi .pvx-pct { min-width: 0; text-align: center; }
.pvx-opts.pvx-multi .pvx-check { position: absolute; top: 10px; right: 10px; }

/* ---- Share row ---- */
.pvx-share {
  display: none;
  margin-top: 16px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--pvx-ink);
  font-family: var(--pvx-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}
.pvx-share:hover { background: rgba(255, 255, 255, 0.12); }
.pvx-share:active { transform: scale(0.98); }
.pvx.voted .pvx-share { display: block; animation: pvx-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ---- Footnote ---- */
.pvx-note {
  margin: 16px 2px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--pvx-faint);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.pvx-note:empty { display: none; }

/* ---- Trivia: game-show ---- */
.pvx-streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.14);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--pvx-violet);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pvx-streak.pop { animation: pvx-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.pvx-topts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pvx-topt {
  --i: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 14px 12px 10px;
  border: none;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--pvx-ink);
  font-family: var(--pvx-sans);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s ease, background 0.18s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.pvx-topt:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(124, 92, 255, 0.12);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.7);
}
.pvx-topt:active:not(:disabled) { transform: scale(0.97); }
.pvx-topt:disabled { cursor: default; }
.pvx-topt .pvx-letter {
  width: 34px;
  height: 34px;
  font-size: 13px;
}
.pvx-topt.is-right {
  background: rgba(52, 211, 153, 0.13);
  box-shadow: 0 0 36px -8px rgba(52, 211, 153, 0.55);
  opacity: 1;
  animation: pvx-win-pulse 0.6s ease;
}
.pvx-topt.is-right .pvx-letter {
  background: linear-gradient(140deg, #34d399, #059669);
  color: #04120c;
}
.pvx-topt.is-wrong {
  background: rgba(255, 59, 71, 0.12);
  box-shadow: 0 0 30px -10px rgba(255, 59, 71, 0.5);
  opacity: 1;
  animation: pvx-shake 0.45s ease;
}
.pvx-topt.is-wrong .pvx-letter {
  background: linear-gradient(140deg, var(--pvx-red), var(--pvx-red-deep));
  color: #fff;
}
.pvx-topt.is-dim { opacity: 0.42; }
.pvx-verdict {
  margin: 16px 2px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  min-height: 21px;
}
.pvx-verdict.good { color: #6ee7b7; }
.pvx-verdict.bad { color: #ff9aa1; }
.pvx-verdict.idle { color: var(--pvx-faint); font-weight: 600; }

/* ---- Keyframes ---- */
@keyframes pvx-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pvx-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}
@keyframes pvx-sheen {
  from { transform: translateX(-110%); }
  to { transform: translateX(110%); }
}
@keyframes pvx-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes pvx-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
@keyframes pvx-win-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  100% { box-shadow: 0 0 0 16px rgba(52, 211, 153, 0); }
}

@media (max-width: 480px) {
  .pvx { padding: 24px 20px 20px; border-radius: 22px; }
  .pvx-q { font-size: 23px; margin-bottom: 16px; }
  .pvx-opt { min-height: 62px; gap: 12px; padding: 10px 14px 10px 10px; }
  .pvx-letter { width: 34px; height: 34px; font-size: 13px; }
  .pvx-label { font-size: 15px; }
  .pvx-pct { font-size: 19px; min-width: 58px; }
  .pvx-side { min-height: 132px; padding: 18px 10px 14px; }
  .pvx-side-name { font-size: 17px; }
  .pvx-side-pct { font-size: 26px; }
  .pvx-vs { width: 46px; height: 46px; font-size: 12px; }
  .pvx-topts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .pvx, .pvx-opt, .pvx-side, .pvx-topt, .pvx-share { animation: none !important; transition: none !important; }
  .pvx-dot { animation: none !important; }
  .pvx-fill, .pvx-side-fill { transition: none !important; }
}
