/* ── This or That — electric split-screen duel ──────────────────────
   Hot magenta vs deep cyan, diagonal seam, ultra-condensed uppercase
   display type, slashed VS badge, tug-of-war results meter. */

:root {
  --bg: #101018;
  --panel: #191926;
  --magenta: #ff2d78;
  --magenta-deep: #b3134f;
  --cyan: #00c2d1;
  --cyan-deep: #00747f;
  --white: #f6f5fa;
  --muted: #9a97ad;
  --err: #ffb347;
  --font-display: 'Anton', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.page { display: flex; flex-direction: column; min-height: 100vh; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }

main { flex: 1 0 auto; padding-bottom: 70px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 64px 20px 36px; }

.kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 5.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero .side-a { color: var(--magenta); text-shadow: 0 0 40px rgba(255, 45, 120, 0.45); }
.hero .side-b { color: var(--cyan); text-shadow: 0 0 40px rgba(0, 194, 209, 0.45); }

.hero .or {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  font-size: 0.4em;
  color: var(--muted);
  vertical-align: middle;
  margin: 0 6px;
}

.hero .sub { max-width: 460px; margin: 16px auto 0; color: var(--muted); font-size: 1.02rem; }

/* ── Notes ────────────────────────────────────────────────────────── */
.note {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid rgba(246, 245, 250, 0.12);
  text-align: center;
}

/* ── Arena ────────────────────────────────────────────────────────── */
.arena {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.side-btn {
  position: relative;
  min-height: 300px;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 26px 18px;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  filter: saturate(0.85);
}

.side-btn.side-0 {
  background: linear-gradient(160deg, var(--magenta) 0%, var(--magenta-deep) 100%);
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}

.side-btn.side-1 {
  background: linear-gradient(200deg, var(--cyan) 0%, var(--cyan-deep) 100%);
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%);
}

.side-btn:hover { transform: scale(1.02); filter: saturate(1.1); }

.side-btn.is-selected {
  filter: saturate(1.15);
  transform: scale(1.03);
}

.side-btn.side-0.is-selected { box-shadow: 0 0 0 4px var(--white), 0 18px 50px rgba(255, 45, 120, 0.45); }
.side-btn.side-1.is-selected { box-shadow: 0 0 0 4px var(--white), 0 18px 50px rgba(0, 194, 209, 0.45); }

.side-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  mix-blend-mode: luminosity;
}

.side-name {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.3rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.side-check {
  position: relative;
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 5px 16px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.side-btn.is-selected .side-check { opacity: 1; background: rgba(0, 0, 0, 0.25); }

.vs-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  z-index: 5;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--bg);
  background: var(--white);
  border-radius: 50%;
  width: 66px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

/* ── Vote form ────────────────────────────────────────────────────── */
.vote-form { margin-top: 26px; }

.field-row { display: flex; gap: 10px; }

input[type="email"] {
  flex: 1;
  padding: 15px 18px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--white);
  background: var(--panel);
  border: 1.5px solid rgba(246, 245, 250, 0.18);
  border-radius: 12px;
  transition: border-color 0.15s ease;
  min-width: 0;
}

input[type="email"]:focus { outline: none; border-color: var(--white); }
input.error { border-color: var(--err); }
input::placeholder { color: var(--muted); }

.fine { margin-top: 10px; text-align: center; color: var(--muted); font-size: 0.84rem; }

.form-error { color: var(--err); font-weight: 500; text-align: center; margin-top: 12px; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 30px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  line-height: 1.2;
  white-space: nowrap;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.1); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(100deg, var(--magenta), var(--cyan));
  color: #fff;
  box-shadow: 0 14px 36px rgba(255, 45, 120, 0.28);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Results ──────────────────────────────────────────────────────── */
.results-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  text-transform: uppercase;
  text-align: center;
  margin: 20px 0 26px;
}

.meter-labels { display: flex; justify-content: space-between; margin-bottom: 10px; gap: 12px; }

.meter-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.label-a { color: var(--magenta); }
.label-b { color: var(--cyan); text-align: right; }

.meter {
  display: flex;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(246, 245, 250, 0.12);
}

.meter-fill {
  display: flex;
  align-items: center;
  min-width: 0;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  width: 50%;
}

.fill-a { background: linear-gradient(160deg, var(--magenta), var(--magenta-deep)); justify-content: flex-start; padding-left: 16px; }
.fill-b { background: linear-gradient(200deg, var(--cyan), var(--cyan-deep)); justify-content: flex-end; padding-right: 16px; }

.meter-pct {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.your-pick-line { text-align: center; margin-top: 18px; color: var(--muted); }
.your-pick-line strong { color: var(--white); }

/* fallback list for 3+ choices */
.results-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }

.result-row {
  position: relative;
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
  padding: 14px 16px;
}

.result-row .bar {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(100deg, rgba(255, 45, 120, 0.3), rgba(0, 194, 209, 0.3));
  transition: width 0.8s ease;
}

.result-row .row-inner { position: relative; display: flex; justify-content: space-between; gap: 10px; }

/* ── Toast ────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--magenta);
  color: #fff;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 700;
  z-index: 120;
  max-width: 92vw;
  text-align: center;
}

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 24px 20px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(246, 245, 250, 0.1);
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .arena { grid-template-columns: 1fr; gap: 10px; }
  .side-btn { min-height: 170px; }
  .side-btn.side-0 { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
  .side-btn.side-1 { clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%); }
  .vs-badge { width: 54px; height: 54px; font-size: 1.3rem; }
  .field-row { flex-direction: column; }
  .btn-primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
