/* SpinSelect — static stylesheet (CSS3 only) */

:root {
  --canvas: oklch(0.962 0.018 272.3);
  --ink: oklch(0.387 0.049 282.3);
  --muted: oklch(0.658 0.049 279.5);
  --lilac: oklch(0.833 0.072 290);
  --mint: oklch(0.897 0.079 161.8);
  --peach: oklch(0.889 0.059 31.3);
  --sky: oklch(0.888 0.061 241);
  --lemon: oklch(0.934 0.08 91);
  --rose: oklch(0.884 0.067 358.5);
  --amber: oklch(0.808 0.157 79.7);
  --blush: oklch(0.724 0.179 6.8);
  --radius: 1rem;
  --font-display: "Fredoka", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Nunito", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
}

/* decorative background blobs */
.blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
}
.b1 {
  width: 14rem;
  height: 14rem;
  left: -2.5rem;
  top: -2.5rem;
  background: color-mix(in oklab, var(--lilac) 60%, transparent);
}
.b2 {
  width: 13rem;
  height: 13rem;
  right: -4rem;
  top: 6rem;
  background: color-mix(in oklab, var(--sky) 60%, transparent);
}
.b3 {
  width: 12rem;
  height: 12rem
  ;
  left: 1.5rem;
  bottom: 2.5rem;
  background: color-mix(in oklab, var(--rose) 50%, transparent);
}
.b4 {
  width: 10rem;
  height: 10rem;
  right: 1rem;
  bottom: 10rem;
  background: color-mix(in oklab, var(--lemon) 60%, transparent);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

/* header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  font-size: 20px;
  box-shadow: 0 8px 20px -8px color-mix(in oklab, var(--lilac) 80%, black 25%);
}
.topbar h1 {
  font-size: 18px;
  line-height: 1;
}
.brand-sub {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.pill-count {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  color: color-mix(in oklab, var(--lilac) 70%, black 30%);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px -4px rgba(0, 0, 0, 0.2);
}

/* cards */
.card {
  margin-top: 16px;
  border-radius: 24px;
  padding: 16px;
  background: color-mix(in oklab, white 55%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 34px -18px color-mix(in oklab, var(--lilac) 90%, black 25%);
  outline: 1px solid rgba(255, 255, 255, 0.7);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}
.step {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--lilac) 50%, transparent);
  font-size: 11px;
  font-weight: 800;
}
.aside {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
.switch {
  display: flex;
  align-items: center;
  gap: 6px;
}
.switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--blush);
}
.badge-amber {
  border-radius: 999px;
  background: color-mix(in oklab, var(--amber) 22%, transparent);
  padding: 2px 10px;
  font-size: 10px;
  font-weight: 800;
  color: color-mix(in oklab, var(--amber) 70%, black 30%);
}
.hint {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.hint.center,
.center {
  text-align: center;
}
.hidden {
  display: none !important;
}

/* inputs */
.row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.row-tight select {
  flex: 1 1 0;
  min-width: 0;
  font-size: 12px;
}
input[type="text"],
input:not([type]),
select {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  outline: 1px solid white;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
input::placeholder {
  color: var(--muted);
}
input:focus,
select:focus {
  outline: 2px solid var(--lilac);
}
select {
  flex: 0 1 auto;
  padding: 10px 8px;
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 16px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  transition: transform 0.12s ease;
}
.btn:active {
  transform: scale(0.96);
}
.btn-lilac {
  background: var(--lilac);
}
.btn-mint {
  background: var(--mint);
  font-size: 12px;
  padding: 10px 12px;
}
.btn-blush {
  background: var(--blush);
  color: white;
  flex: 1;
}
.btn-ghost {
  background: var(--canvas);
  flex: 1;
}
.btn-reset {
  margin-top: 20px;
  width: 100%;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  outline: 1px solid rgba(255, 255, 255, 0.85);
}

/* chips + lists */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chips.center {
  justify-content: center;
}
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
}
.chip button {
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.7;
  color: inherit;
  padding: 0;
}
.chip-plain {
  background: rgba(255, 255, 255, 0.8);
  color: color-mix(in oklab, var(--ink) 85%, transparent);
  backdrop-filter: blur(8px);
}
.c0 { background: var(--lilac); }
.c1 { background: var(--sky); }
.c2 { background: var(--mint); }
.c3 { background: var(--peach); }
.c4 { background: var(--rose); }
.c5 { background: var(--lemon); }

.stack {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}
.list-row .left,
.list-row .right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.list-row .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.tag {
  border-radius: 999px;
  background: var(--canvas);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
.tag-team {
  background: color-mix(in oklab, var(--lilac) 25%, transparent);
  color: color-mix(in oklab, var(--ink) 75%, transparent);
}
.icon-btn {
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
}
.empty {
  margin: 12px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

/* wheel */
.wheel-wrap {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  margin: 18px auto 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.wheel-wrap:active {
  cursor: grabbing;
}
.wheel-wrap.is-locked {
  cursor: not-allowed;
  opacity: 0.75;
}
.pointer {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translateX(-50%);
  z-index: 3;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 18px solid var(--blush);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15));
}
.wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 8px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 40px -16px color-mix(in oklab, var(--lilac) 85%, black 30%);
  will-change: transform;
}
.labels {
  position: absolute;
  inset: 0;
}
.slot-label {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.slot-label span {
  position: absolute;
  left: 50%;
  top: 8%;
  max-width: 72px;
  transform: translateX(-50%);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  pointer-events: none;
}
.hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: white;
  border: 4px solid rgba(255, 255, 255, 0.7);
  font-size: 24px;
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 8px 20px -6px color-mix(in oklab, var(--lilac) 80%, black 20%);
  cursor: default;
}
.wheel-status {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

/* result */
.result-card {
  text-align: center;
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--lilac) 70%, transparent),
    rgba(255, 255, 255, 0.6),
    color-mix(in oklab, var(--sky) 60%, transparent)
  );
  padding: 20px;
}
.result-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blush);
}
.result-names {
  margin-top: 8px;
  animation: pop-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.result-names h3 {
  font-size: 34px;
  line-height: 1.1;
}
@keyframes pop-in {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  60% {
    transform: scale(1.12);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

/* grids */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.grid2 .card {
  margin-top: 0;
  padding: 14px;
}

/* separate status boxes — In the Wheel vs Selected Players */
.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}
@media (min-width: 560px) {
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.status-card {
  margin-top: 0;
  padding: 16px;
  border-radius: 20px;
}
.status-open {
  background: color-mix(in oklab, var(--sky) 24%, rgba(255, 255, 255, 0.6));
  outline: 1px solid color-mix(in oklab, var(--sky) 50%, transparent);
  box-shadow: 0 16px 30px -18px color-mix(in oklab, var(--sky) 90%, black 25%);
}
.status-picked {
  background: color-mix(in oklab, var(--mint) 28%, rgba(255, 255, 255, 0.6));
  outline: 1px solid color-mix(in oklab, var(--mint) 55%, transparent);
  box-shadow: 0 16px 30px -18px color-mix(in oklab, var(--mint) 90%, black 25%);
}
.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.status-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.status-emoji {
  font-size: 18px;
}
.status-count {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}
.status-sub {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.status-card .stack {
  margin-top: 10px;
  gap: 8px;
}
.status-card .list-row {
  background: rgba(255, 255, 255, 0.85);
  padding: 9px 12px;
  font-size: 13px;
}

.final {
  margin-top: 16px;
}
.card-head.plain {
  padding: 0 2px;
}
.team-card {
  border-radius: 24px;
  padding: 14px;
  backdrop-filter: blur(12px);
  outline: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 34px -18px color-mix(in oklab, var(--lilac) 90%, black 25%);
}
.team-1 {
  background: color-mix(in oklab, var(--lilac) 40%, white 40%);
}
.team-2 {
  background: color-mix(in oklab, var(--sky) 40%, white 40%);
}
.team-card p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}
.team-card ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.team-card li {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}
.team-card li small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}
.team-card li.slot-empty {
  background: none;
  border: 1px dashed color-mix(in oklab, var(--lilac) 60%, transparent);
  color: var(--muted);
}

/* modal + toasts */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in oklab, var(--ink) 40%, transparent);
  backdrop-filter: blur(4px);
}
.modal-box {
  width: 100%;
  max-width: 320px;
  border-radius: 24px;
  background: white;
  padding: 20px;
  text-align: center;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.4);
}
.modal-box h3 {
  font-size: 16px;
}
.modal-box p {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}
.toast {
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 800;
  background: white;
  color: var(--ink);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45);
  animation: pop-in 0.3s ease both;
}
.toast.error {
  background: var(--blush);
  color: white;
}
.toast.success {
  background: var(--mint);
}

@media (max-width: 360px) {
  .row {
    flex-wrap: wrap;
  }
  .result-names h3 {
    font-size: 28px;
  }
}

/* one hard divider per wheel segment so every slice is a visible box */
.spoke {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 50%;
  margin-left: -1px;
  transform-origin: 50% 100%;
  background: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}
