/* ── Song of the Summer — retro poolside sunset theme ───────────────
   Hot pink → tangerine gradients, aqua accents, groovy display type,
   halftone sun, sticker-style cards. Hand-coded. */

:root {
  --sky-top: #ff5f8f;
  --sky-bottom: #ff9e4f;
  --cream: #fff6ec;
  --ink: #35204b;
  --ink-soft: #6b5585;
  --aqua: #2ad4c8;
  --aqua-deep: #10a99e;
  --sun: #ffd166;
  --white: #ffffff;
  --err: #e63946;
  --font-display: 'Righteous', cursive;
  --font-body: 'Nunito', sans-serif;
}

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

.hidden { display: none !important; }

body {
  font-family: var(--font-body);
  background: linear-gradient(175deg, var(--sky-top) 0%, var(--sky-bottom) 42%, var(--cream) 42.2%);
  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: 900px; margin: 0 auto; padding: 0 20px; }

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

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 74px 0 120px;
  overflow: hidden;
  color: var(--white);
}

.sunburst {
  position: absolute;
  left: 50%;
  bottom: -140px;
  transform: translateX(-50%);
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 209, 102, 0.9) 0 34%, transparent 35%),
    repeating-conic-gradient(rgba(255, 255, 255, 0.16) 0deg 6deg, transparent 6deg 16deg);
  pointer-events: none;
}

.badge {
  display: inline-block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 8px 22px;
  margin-bottom: 22px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 9vw, 5rem);
  line-height: 1.02;
  text-shadow: 3px 4px 0 rgba(53, 32, 75, 0.35);
  position: relative;
}

.hero h1 .pop { color: var(--sun); }

.hero .sub {
  max-width: 540px;
  margin: 16px auto 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
  position: relative;
}

/* ── Round headline ───────────────────────────────────────────────── */
.round-head { text-align: center; margin: -58px 0 30px; position: relative; }

.round-eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--aqua-deep);
  border-radius: 999px;
  padding: 6px 18px;
  box-shadow: 0 6px 18px rgba(16, 169, 158, 0.4);
}

.round-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  margin-top: 12px;
  color: var(--ink);
}

.round-dates { color: var(--ink-soft); font-weight: 700; font-size: 0.9rem; 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(--white);
  border-radius: 18px;
  padding: 18px;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(53, 32, 75, 0.18);
  transform: rotate(-0.4deg);
}

.matchup:nth-child(even) { transform: rotate(0.4deg); }

.match-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--sky-top);
  border-radius: 6px;
  padding: 3px 10px;
  margin-bottom: 12px;
}

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

.song-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.song-btn .disc {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ink) 0 22%, var(--sun) 23% 34%, var(--ink) 35% 100%);
}

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

.song-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(53, 32, 75, 0.15); }

.song-btn.is-picked {
  background: var(--aqua);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--white);
}

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

.vs-chip {
  align-self: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--sky-top);
}

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

.result-line { position: relative; }

.result-fill {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(42, 212, 200, 0.35), rgba(42, 212, 200, 0.12));
  width: 0%;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.result-line.is-pick .result-fill {
  background: linear-gradient(90deg, rgba(255, 95, 143, 0.4), rgba(255, 158, 79, 0.22));
}

.result-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  font-weight: 800;
}

.result-pct { font-family: var(--font-display); font-size: 1.05rem; }

.pick-star { color: var(--sky-top); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

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

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

/* ── Results banner ───────────────────────────────────────────────── */
.results-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 rgba(53, 32, 75, 0.18);
  padding: 20px 22px;
  margin-bottom: 26px;
}

.results-icon { font-size: 2.2rem; }

.results-banner h3 { font-family: var(--font-display); font-size: 1.4rem; }
.results-banner p { color: var(--ink-soft); font-weight: 700; font-size: 0.94rem; }

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

.tree-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  text-align: center;
  margin-bottom: 24px;
}

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

.tree { display: flex; gap: 26px; min-width: 640px; }

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

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

.tree-slot {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.tree-slot.is-empty { border-style: dashed; color: var(--ink-soft); background: transparent; }
.tree-slot.is-winner { background: var(--sun); }
.tree-slot.is-champ {
  background: linear-gradient(120deg, var(--sky-top), var(--sky-bottom));
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-align: center;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  padding: 14px 34px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  line-height: 1.2;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }

.btn-primary {
  background: linear-gradient(120deg, var(--aqua), var(--aqua-deep));
  color: var(--white);
  box-shadow: 5px 5px 0 rgba(53, 32, 75, 0.25);
  text-shadow: 1px 1px 0 rgba(53, 32, 75, 0.3);
}

.btn-big { font-size: 1.2rem; padding: 16px 44px; }

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

/* ── Footer ───────────────────────────────────────────────────────── */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 26px 20px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.85rem;
  border-top: 3px dashed rgba(53, 32, 75, 0.2);
}

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

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