/* ── Product Face-Off — modern product studio theme ─────────────────
   Warm gray seamless backdrop, deep teal accent, editorial sans,
   floating card shadows. Hand-coded. */

:root {
  --backdrop: #f2f0ed;
  --backdrop-2: #e9e6e1;
  --card: #ffffff;
  --ink: #23211e;
  --ink-soft: #7b766e;
  --teal: #0e6e66;
  --teal-deep: #0a544e;
  --teal-tint: #dcecea;
  --line: #dcd8d2;
  --err: #c94f43;
  --font: 'Sora', sans-serif;
}

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

.hidden { display: none !important; }

body {
  font-family: var(--font);
  background: linear-gradient(180deg, var(--backdrop) 0%, var(--backdrop-2) 100%);
  color: var(--ink);
  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: 880px; margin: 0 auto; padding: 0 22px; }

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

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { padding: 72px 0 46px; }

.badge {
  display: inline-block;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-tint);
  border-radius: 999px;
  padding: 7px 18px;
  margin-bottom: 22px;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero h1 .accent { color: var(--teal); }

.hero .sub {
  max-width: 460px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

/* ── Round headline ───────────────────────────────────────────────── */
.round-head { margin: 30px 0 26px; }

.round-name { font-weight: 800; font-size: clamp(1.7rem, 5.5vw, 2.4rem); letter-spacing: -0.02em; }

.round-sub { color: var(--ink-soft); font-size: 0.94rem; margin-top: 4px; }
.round-dates { color: var(--teal); font-weight: 700; font-size: 0.86rem; margin-top: 4px; }

/* ── Matchups ─────────────────────────────────────────────────────── */
.matchups { display: grid; grid-template-columns: 1fr; gap: 18px; }

@media (min-width: 720px) { .matchups { grid-template-columns: 1fr 1fr; } }

.matchup {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 48px rgba(35, 33, 30, 0.09), 0 2px 6px rgba(35, 33, 30, 0.05);
}

.match-tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.song-row { display: flex; flex-direction: column; gap: 10px; }

.song-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: var(--backdrop);
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.song-btn .disc {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal-tint), #cfe0dd);
  border: 1.5px solid rgba(14, 110, 102, 0.25);
}

.song-btn img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }

.song-btn:hover { transform: translateY(-1px); border-color: var(--teal); }

.song-btn.is-picked {
  background: var(--teal);
  border-color: var(--teal-deep);
  color: #fff;
}

.song-btn.is-picked .disc { background: rgba(255, 255, 255, 0.25); border-color: rgba(255, 255, 255, 0.4); }

.song-btn.is-dimmed { opacity: 0.45; }

.vs-chip {
  align-self: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Result bars */
.result-pair { display: flex; flex-direction: column; gap: 10px; }

.result-line { position: relative; }

.result-fill {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(14, 110, 102, 0.1);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.result-line.is-pick .result-fill { background: rgba(14, 110, 102, 0.22); }

.result-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
}

.result-pct { font-weight: 800; font-variant-numeric: tabular-nums; }

.pick-star {
  color: var(--teal);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Submit row ───────────────────────────────────────────────────── */
.submit-row { text-align: center; margin-top: 30px; }

.picks-status { font-weight: 600; color: var(--ink-soft); margin-bottom: 14px; font-size: 0.94rem; }

/* ── Results banner ───────────────────────────────────────────────── */
.results-banner {
  background: var(--card);
  border-left: 5px solid var(--teal);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(35, 33, 30, 0.08);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.results-banner h3 { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.results-banner p { color: var(--ink-soft); font-size: 0.94rem; }

/* ── Coupon unlock ────────────────────────────────────────────────── */
.unlock-card {
  margin-top: 30px;
  background: var(--teal);
  color: #fff;
  border-radius: 18px;
  padding: 30px 28px;
  box-shadow: 0 24px 50px rgba(14, 110, 102, 0.35);
}

.unlock-copy h3 { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.01em; }
.unlock-copy p { color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; margin: 6px 0 18px; }

.unlock-form { display: flex; flex-wrap: wrap; gap: 10px; }

.unlock-form input {
  flex: 1 1 180px;
  padding: 14px 16px;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid transparent;
  border-radius: 10px;
}

.unlock-form input:focus { outline: none; border-color: var(--teal-tint); }

.unlock-form input.error { border-color: #ffb3a8; }

.form-error { color: #ffd9d3; font-weight: 700; font-size: 0.9rem; margin-top: 12px; }

/* ── Coupon reveal ────────────────────────────────────────────────── */
.coupon-card {
  margin-top: 30px;
  background: var(--card);
  border: 2px dashed var(--teal);
  border-radius: 18px;
  padding: 32px 28px;
  text-align: center;
}

.coupon-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.code-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

.coupon-code {
  font-weight: 800;
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  letter-spacing: 0.14em;
  color: var(--teal);
}

.coupon-hint { color: var(--ink-soft); font-size: 0.88rem; margin-top: 12px; }

/* ── Bracket tree ─────────────────────────────────────────────────── */
.tree-section { margin-top: 60px; }

.tree-title {
  font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.tree-scroll { overflow-x: auto; padding-bottom: 14px; -webkit-overflow-scrolling: touch; }

.tree { display: flex; gap: 24px; min-width: 560px; }

.tree-round { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; flex: 1; }

.tree-round-label {
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.tree-slot {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 165px;
}

.tree-slot.is-empty { border-style: dashed; color: var(--ink-soft); background: transparent; }
.tree-slot.is-winner { border-color: var(--teal); background: var(--teal-tint); }
.tree-slot.is-champ {
  background: var(--teal);
  border-color: var(--teal-deep);
  color: #fff;
  font-weight: 800;
  text-align: center;
  font-size: 0.85rem;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  line-height: 1.2;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 3px solid rgba(14, 110, 102, 0.4); outline-offset: 2px; }

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 30px rgba(35, 33, 30, 0.25);
}

.unlock-form .btn-primary { background: var(--ink); }

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--teal);
  color: var(--teal);
  padding: 10px 20px;
  font-size: 0.88rem;
}

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

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 26px 20px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  border-top: 1.5px solid var(--line);
}

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

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