/* BeatDesk DJ Console — premium host controls */

.game-player {
  --bd-ink: #07040f;
  --bd-bg-deep: #0f0a1c;
  --bd-bg-card: rgba(31, 18, 56, 0.55);
  --bd-bg-raised: rgba(31, 18, 56, 0.78);
  --bd-bg-soft: rgba(255, 255, 255, 0.06);
  --bd-violet: #7c3aed;
  --bd-violet-light: #a78bfa;
  --bd-violet-dark: #5b21b6;
  --bd-teal: #34d399;
  --bd-coral: #e879f9;
  --bd-cream: #f5f3ff;
  --bd-cream-muted: #b6afcc;
  --bd-text-muted: #8d86a5;
  --bd-border: rgba(167, 139, 250, 0.18);
  --bd-track: rgba(255, 255, 255, 0.12);
  --bd-glow: rgba(124, 58, 237, 0.4);

  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  padding-block: 0 2.5rem;
}

.sp-player,
.sp-queue {
  background: var(--bd-bg-card) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bd-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 40px rgba(7, 4, 15, 0.45) !important;
}

.sp-brand-name {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bd-cream);
}

.sp-brand-tag {
  color: var(--bd-teal) !important;
  font-weight: 700;
}

.sp-game-bar {
  height: 5px;
  background: var(--bd-track);
  border-radius: 999px;
}

.sp-game-bar-fill {
  background: linear-gradient(90deg, var(--bd-violet-dark), var(--bd-violet), var(--bd-teal)) !important;
  box-shadow: 0 0 12px var(--bd-glow);
}

.sp-artwork {
  width: min(80vw, 240px) !important;
  max-width: 240px !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(167, 139, 250, 0.15) !important;
}

.sp-title {
  font-family: "Sora", system-ui, sans-serif !important;
  font-size: clamp(1.375rem, 4vw, 1.75rem) !important;
  font-weight: 800 !important;
  color: var(--bd-cream) !important;
}

.sp-artist {
  font-size: 1rem !important;
  color: var(--bd-cream-muted) !important;
}

.sp-status {
  color: var(--bd-teal) !important;
  font-weight: 700;
}

.sp-controls {
  gap: 2rem !important;
  padding: 0.5rem 0;
}

.sp-ctrl--ghost {
  width: 3.25rem !important;
  height: 3.25rem !important;
  border-radius: 50%;
  background: var(--bd-bg-soft);
  color: var(--bd-cream-muted) !important;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

.sp-ctrl--ghost:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.2);
  color: var(--bd-cream) !important;
  transform: scale(1.06);
}

.sp-ctrl--play {
  width: 4.5rem !important;
  height: 4.5rem !important;
  background: linear-gradient(135deg, var(--bd-violet), var(--bd-violet-dark)) !important;
  box-shadow: 0 8px 32px var(--bd-glow) !important;
}

.sp-ctrl--play:not(:disabled):hover {
  transform: scale(1.08) !important;
  box-shadow: 0 12px 40px var(--bd-glow) !important;
}

.sp-ctrl-label {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bd-text-muted) !important;
}

.sp-scrubber-track {
  height: 6px !important;
}

.sp-scrubber-fill {
  background: var(--bd-violet-light) !important;
}

.sp-autodj-btn {
  border-radius: 9999px !important;
  background: linear-gradient(135deg, var(--bd-violet), var(--bd-violet-dark)) !important;
  border: none !important;
  font-weight: 700 !important;
  min-height: 2.75rem;
  box-shadow: 0 4px 16px var(--bd-glow);
}

.sp-autodj-btn--stop {
  background: transparent !important;
  border: 1px solid var(--bd-border) !important;
  box-shadow: none !important;
}

.sp-vol-slider {
  accent-color: var(--bd-violet);
}

.sp-queue-title {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 1.125rem !important;
  font-weight: 800 !important;
}

.sp-queue-row {
  border-radius: 8px !important;
  padding: 0.75rem 0.625rem !important;
  font-size: 0.9375rem !important;
  transition: background 0.12s;
}

.sp-queue-row--now {
  background: rgba(124, 58, 237, 0.18) !important;
  border: 1px solid rgba(124, 58, 237, 0.35) !important;
}

.sp-queue-row:hover {
  background: var(--bd-bg-soft) !important;
}

.sp-countdown-ring {
  box-shadow: 0 0 40px var(--bd-glow) !important;
}

.sp-countdown-ring::before {
  background: var(--bd-bg-raised) !important;
}

.sp-upnext {
  background: var(--bd-bg-soft) !important;
  border: 1px solid var(--bd-border) !important;
  border-radius: 12px !important;
}

.sp-options summary {
  font-weight: 700;
  color: var(--bd-cream-muted);
}

.sp-pill--on {
  background: var(--bd-violet) !important;
  color: #fff !important;
}

@media (min-width: 1024px) {
  .game-player {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 340px !important;
    gap: 1.5rem !important;
    align-items: start !important;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2rem);
  }

  .sp-player {
    max-width: none !important;
    margin: 0 !important;
  }

  .sp-queue {
    max-width: none !important;
    margin: 0 !important;
    max-height: calc(100vh - 7rem) !important;
    position: sticky;
    top: 5.5rem;
  }

  .sp-controls {
    gap: 1.75rem !important;
  }

  .sp-ctrl--play {
    width: 4.5rem !important;
    height: 4.5rem !important;
  }
}

@media (max-width: 1023px) {
  .game-player {
    max-width: 36rem;
    margin-inline: auto;
    padding-inline: 1.25rem;
  }
}


/* ── Main player card ── */

.sp-player {
  background: var(--bd-bg-card);
  border: none;
  border-radius: 8px;
  padding: 1.25rem 1.25rem 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.sp-player-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
}

.sp-player-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

.sp-player-visual {
  width: 100%;
  display: flex;
  justify-content: center;
}

.sp-player-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.sp-player-actions {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  width: 100%;
}

@media (min-width: 640px) {
  .sp-player {
    padding: 1.75rem 2rem 1.25rem;
    gap: 1.5rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .game-player {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }

  .sp-player,
  .sp-queue {
    max-width: none;
  }
}

/* Brand lockup */
.sp-brand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.sp-brand-name {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bd-cream);
}

.sp-brand-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bd-violet-light);
}

/* Game progress strip */
.sp-game-bar {
  position: relative;
  width: 100%;
  height: 4px;
  background: var(--bd-track);
  border-radius: 9999px;
  overflow: hidden;
}

.sp-game-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bd-violet-dark), var(--bd-violet), var(--bd-violet-light));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.sp-game-bar-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bd-text-muted);
  text-align: center;
}

/* ── Artwork (letter badge as album art) ── */

.sp-artwork {
  width: min(72vw, 220px);
  aspect-ratio: 1;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--bd-violet-dark) 0%, var(--bd-violet) 50%, var(--bd-violet-light) 100%);
  box-shadow:
    0 16px 40px rgba(124, 58, 237, 0.35),
    0 8px 24px rgba(7, 4, 15, 0.4);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.sp-artwork--live {
  box-shadow:
    0 16px 40px rgba(124, 58, 237, 0.45),
    0 0 0 2px rgba(167, 139, 250, 0.45);
}

.sp-letter {
  font-family: "Sora", "DM Sans", system-ui, sans-serif;
  font-size: clamp(3.5rem, 18vw, 5.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-shadow: 0 4px 24px rgba(19, 13, 37, 0.45);
}

/* ── Track info ── */

.sp-track {
  text-align: center;
  width: 100%;
  min-width: 0;
  padding: 0 0.25rem;
}

.sp-title {
  margin: 0;
  font-family: "Sora", "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.25rem, 5vw, 1.625rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--bd-cream);
  word-break: break-word;
}

.sp-artist {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--bd-cream-muted);
  word-break: break-word;
}

.sp-status {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bd-teal);
  letter-spacing: 0.02em;
}

/* ── Between-song countdown ── */

.sp-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.5rem 0 0.25rem;
}

.sp-countdown-ring {
  --pct: 0%;
  position: relative;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: conic-gradient(var(--bd-violet) var(--pct), var(--bd-track) 0);
  display: grid;
  place-items: center;
  animation: sp-ring-in 0.35s ease;
  box-shadow: 0 0 32px rgba(124, 58, 237, 0.25);
}

.sp-countdown-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--bd-bg-card);
}

.sp-countdown-num {
  position: relative;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 2.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--bd-cream);
  line-height: 1;
}

.sp-countdown-unit {
  position: relative;
  display: block;
  margin-top: -0.15rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bd-text-muted);
}

@keyframes sp-ring-in {
  from {
    transform: scale(0.92);
    opacity: 0.6;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.sp-countdown-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bd-cream-muted);
}

.sp-countdown-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.sp-upnext {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 20rem;
  padding: 0.75rem 1rem;
  background: var(--bd-bg-soft);
  border: 1px solid var(--bd-border);
  border-radius: 12px;
}

.sp-upnext-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bd-violet), var(--bd-violet-light));
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.sp-upnext-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
}

.sp-upnext-kicker {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bd-text-muted);
}

.sp-upnext-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bd-cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Scrubber (clip timer) ── */

.sp-scrubber {
  width: 100%;
}

.sp-scrubber-track {
  height: 4px;
  background: var(--bd-track);
  border-radius: 9999px;
  overflow: hidden;
}

.sp-scrubber-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bd-violet-light), var(--bd-cream));
  border-radius: inherit;
  transition: width 0.25s linear;
}

.sp-scrubber-times {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--bd-text-muted);
}

/* ── Transport controls ── */

.sp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  width: 100%;
}

.sp-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--bd-cream-muted);
  transition: color 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.sp-ctrl:not(:disabled):hover {
  color: var(--bd-cream);
}

.sp-ctrl:not(:disabled):active {
  transform: scale(0.94);
}

.sp-ctrl:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.sp-ctrl--ghost {
  width: 2.75rem;
  height: 2.75rem;
}

.sp-ctrl-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.sp-ctrl--play {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bd-violet-light), var(--bd-violet));
  color: #fff;
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.45);
}

.sp-ctrl--play:not(:disabled):hover {
  transform: scale(1.04);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.55);
}

.sp-ctrl-play-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.sp-ctrl--labeled {
  flex-direction: column;
  gap: 0.3rem;
  height: auto;
  min-height: 3.25rem;
}

.sp-ctrl-play-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.sp-ctrl-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--bd-cream-muted);
  line-height: 1;
}

.sp-ctrl-label--play {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--bd-cream-muted);
}

/* ── Auto DJ ── */

.sp-autodj {
  width: 100%;
}

.sp-autodj-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--bd-violet-light), var(--bd-violet));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  -webkit-tap-highlight-color: transparent;
}

.sp-autodj-btn:not(:disabled):hover {
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.5);
}

.sp-autodj-btn:not(:disabled):active {
  transform: scale(0.98);
}

.sp-autodj-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sp-autodj-btn--stop {
  background: transparent;
  color: var(--bd-cream-muted);
  border: 1px solid var(--bd-border);
  box-shadow: none;
}

.sp-autodj-btn--stop:hover {
  background: var(--bd-bg-soft);
  border-color: rgba(167, 139, 250, 0.4);
  color: var(--bd-cream);
}

.sp-autodj-icon {
  width: 1rem;
  height: 1rem;
}

/* ── Volume ── */

.sp-volume {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  max-width: 16rem;
}

.sp-vol-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--bd-cream-muted);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.sp-vol-btn:hover {
  color: var(--bd-cream);
}

.sp-vol-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.sp-vol-slider {
  flex: 1;
  min-width: 0;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 9999px;
  background: var(--bd-track);
  cursor: pointer;
}

.sp-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--bd-violet-light);
  border: 2px solid var(--bd-cream);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.sp-vol-slider::-moz-range-thumb {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--bd-violet-light);
  border: 2px solid var(--bd-cream);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

/* ── Collapsible settings ── */

.sp-options {
  width: 100%;
  border-top: 1px solid var(--bd-border);
  padding-top: 0.75rem;
}

.sp-options summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bd-cream-muted);
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.sp-options summary::-webkit-details-marker {
  display: none;
}

.sp-options summary::after {
  content: " ▾";
  font-size: 0.75rem;
  color: var(--bd-violet-light);
}

.sp-options[open] summary::after {
  content: " ▴";
}

.sp-options summary:hover {
  color: var(--bd-cream);
}

.sp-options-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
}

.sp-opt-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sp-opt-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bd-text-muted);
}

.sp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.sp-pill {
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--bd-border);
  background: transparent;
  color: var(--bd-cream-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sp-pill:hover:not(:disabled) {
  border-color: rgba(167, 139, 250, 0.45);
  color: var(--bd-cream);
}

.sp-pill--on {
  background: var(--bd-violet);
  border-color: var(--bd-violet);
  color: #fff;
}

.sp-pill:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sp-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--bd-border);
  background: rgba(19, 13, 37, 0.85);
  color: var(--bd-cream);
  font-size: 0.875rem;
}

.sp-opt-actions {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-top: 0.25rem;
}

.sp-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border: none;
  background: transparent;
  color: var(--bd-cream-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.sp-link-btn:hover:not(:disabled) {
  color: var(--bd-cream);
}

.sp-link-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sp-link-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

/* ── Alerts & complete ── */

.sp-alert {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bd-coral);
  text-align: center;
}

.sp-alert--muted {
  color: var(--bd-text-muted);
}

.sp-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--bd-text-muted);
  text-align: center;
}

.sp-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
}

.sp-complete-icon {
  width: 3rem;
  height: 3rem;
  color: var(--bd-teal);
}

/* ── Queue panel ── */

.sp-queue {
  background: var(--bd-bg-card);
  border: none;
  border-radius: 8px;
  padding: 1rem 1rem 0.75rem;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.sp-queue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.sp-queue-title {
  margin: 0;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--bd-cream);
}

.sp-queue-sub {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--bd-text-muted);
}

.sp-queue-shuffle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--bd-border);
  border-radius: 9999px;
  background: transparent;
  color: var(--bd-cream-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.sp-queue-shuffle:hover:not(:disabled) {
  border-color: rgba(167, 139, 250, 0.45);
  color: var(--bd-cream);
}

.sp-queue-shuffle:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sp-queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(45vh, 24rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sp-queue-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.5rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--bd-cream-muted);
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.sp-queue-row:hover {
  background: var(--bd-bg-soft);
  color: var(--bd-cream);
}

.sp-queue-row--now {
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: var(--bd-cream);
}

.sp-queue-row--done {
  opacity: 0.45;
}

.sp-queue-letter {
  width: 1.75rem;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--bd-text-muted);
}

.sp-queue-row--now .sp-queue-letter {
  color: var(--bd-violet-light);
}

.sp-queue-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-queue-now {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--bd-teal);
}

.sp-queue-check {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--bd-teal);
}

.sp-queue-item {
  list-style: none;
}

.sp-queue-item.sp-queue-item--drag-over .sp-queue-row {
  outline: 2px dashed rgba(139, 92, 246, 0.55);
  outline-offset: 2px;
}

.sp-queue-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sp-queue-drag {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--bd-text-muted);
  font-size: 0.75rem;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.sp-queue-drag:active {
  cursor: grabbing;
}

.sp-queue-play {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--bd-cream);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.sp-queue-play:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.45);
}

.sp-queue-play-icon {
  width: 0.85rem;
  height: 0.85rem;
}

.sp-queue-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--bd-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sp-queue-toggle:hover {
  border-color: rgba(45, 212, 191, 0.45);
  color: var(--bd-teal);
}

.sp-queue-toggle--on {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.45);
  color: var(--bd-teal);
}

.sp-queue-toggle-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.55;
}

/* Legacy progress classes */
.progress-track {
  height: 4px;
  background: var(--bd-track);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bd-violet-dark), var(--bd-violet));
  border-radius: inherit;
}

@media (max-width: 639px) {
  .sp-controls {
    gap: 1rem;
    justify-content: space-between;
    max-width: 100%;
  }

  .sp-ctrl--play {
    width: 3.75rem;
    height: 3.75rem;
  }

  .sp-countdown-ring {
    width: 10rem;
    height: 10rem;
  }

  .sp-countdown-num {
    font-size: 3rem;
  }
}

/* ── Desktop: full-width two-column layout ── */

@media (min-width: 1024px) {
  /* Compact hero handled in beatdesk-layout.css (.game-hero--detail) */

  .game-player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.5rem;
    align-items: start;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2rem);
  }

  .sp-player {
    max-width: none;
    margin: 0;
    align-items: stretch;
    align-self: start;
    padding: 1.125rem 1.5rem 1rem;
    gap: 0.875rem;
    min-height: 0;
  }

  .sp-player-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }

  .sp-brand {
    justify-content: flex-start;
    flex-shrink: 0;
  }

  .sp-game-bar {
    flex: 1;
    max-width: 280px;
  }

  .sp-game-bar-label {
    text-align: right;
    margin-top: 0.25rem;
  }

  .sp-player-body {
    flex: none;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
    min-height: 0;
  }

  .sp-player-visual {
    flex: 0 0 200px;
    justify-content: flex-start;
  }

  .sp-artwork {
    width: 200px;
    max-width: 200px;
  }

  .sp-letter {
    font-size: 3.75rem;
  }

  .sp-player-panel {
    flex: 1;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.75rem;
    min-width: 0;
  }

  .sp-track {
    text-align: left;
    padding: 0;
  }

  .sp-title {
    font-size: 1.375rem;
    line-height: 1.2;
  }

  .sp-artist {
    font-size: 1rem;
  }

  .sp-status {
    font-size: 0.8125rem;
  }

  .sp-alert,
  .sp-hint {
    text-align: left;
    font-size: 0.875rem;
  }

  .sp-scrubber-times {
    font-size: 0.75rem;
  }

  .sp-controls {
    justify-content: flex-start;
    gap: 1.25rem;
    padding-top: 0.25rem;
  }

  .sp-ctrl--labeled {
    flex-direction: column;
    gap: 0.35rem;
    min-width: 4.25rem;
    min-height: auto;
    height: auto;
  }

  .sp-ctrl-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--bd-cream-muted);
  }

  .sp-ctrl-play-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }

  .sp-ctrl-label--play {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bd-cream-muted);
  }

  .sp-ctrl--ghost {
    width: 3.5rem;
    height: 3.5rem;
  }

  .sp-ctrl-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .sp-ctrl--play {
    width: 4.25rem;
    height: 4.25rem;
  }

  .sp-ctrl-play-icon {
    width: 1.65rem;
    height: 1.65rem;
  }

  .sp-player-actions {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
  }

  .sp-autodj {
    flex: 1 1 200px;
    min-width: 180px;
  }

  .sp-autodj-btn {
    padding: 0.8125rem 1.25rem;
    font-size: 0.9375rem;
  }

  .sp-volume {
    flex: 1 1 160px;
    max-width: 220px;
  }

  .sp-vol-slider {
    height: 6px;
  }

  .sp-vol-slider::-webkit-slider-thumb {
    width: 1rem;
    height: 1rem;
  }

  .sp-options {
    margin-top: 0;
    padding-top: 0.5rem;
  }

  .sp-options summary {
    font-size: 0.875rem;
  }

  .sp-options-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem 1.25rem;
  }

  .sp-opt-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 1.25rem;
  }

  .sp-countdown {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
    padding: 0;
  }

  .sp-countdown-ring {
    width: 7.5rem;
    height: 7.5rem;
  }

  .sp-countdown-num {
    font-size: 2.25rem;
  }

  .sp-countdown-copy {
    align-items: flex-start;
    flex: 1;
    min-width: 0;
  }

  .sp-countdown-label {
    text-align: left;
    font-size: 1rem;
  }

  .sp-upnext {
    max-width: none;
    width: 100%;
  }

  .sp-complete {
    align-items: flex-start;
    text-align: left;
    padding: 0.5rem 0 1rem;
  }

  .sp-queue {
    max-width: none;
    margin: 0;
    align-self: start;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 9rem);
    padding: 1rem 1.125rem 0.75rem;
  }

  .sp-queue-list {
    max-height: calc(100vh - 14rem);
    flex: 1;
    min-height: 0;
  }

  .sp-queue-row {
    padding: 0.7rem 0.5rem;
    font-size: 0.9375rem;
  }

  .sp-scrubber-track,
  .sp-game-bar {
    height: 6px;
  }
}

@media (min-width: 1280px) {
  .game-player {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.5rem;
  }

  .sp-player-visual {
    flex-basis: 200px;
  }

  .sp-artwork {
    width: 200px;
    max-width: 200px;
  }

  .sp-title {
    font-size: 1.5rem;
  }
}

/* ── Layout polish: DJ console spacing & alignment ── */

.game-player {
  gap: 1.5rem;
  padding-block: 0 2.5rem;
}

.sp-player,
.sp-queue {
  padding: 1.25rem !important;
  border-radius: 12px !important;
}

.sp-player-top {
  gap: 0.75rem;
  width: 100%;
}

.sp-player-body {
  gap: 1.25rem;
  width: 100%;
}

.sp-player-panel {
  gap: 1rem;
  width: 100%;
}

.sp-player-actions {
  gap: 0.75rem;
  width: 100%;
}

.sp-player-visual {
  display: flex;
  justify-content: center;
  width: 100%;
}

.sp-track {
  text-align: center;
  max-width: 100%;
}

.sp-controls {
  gap: 1.5rem !important;
  width: 100%;
  justify-content: center;
}

.sp-queue-head {
  margin-bottom: 0.75rem;
  align-items: center;
}

.sp-queue-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sp-queue-row {
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem !important;
  align-items: center;
}

.sp-options {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  width: 100%;
}

.sp-options-body {
  gap: 0.75rem;
}

.sp-opt-row {
  gap: 0.5rem;
}

@media (min-width: 1024px) {
  .game-player {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 340px !important;
    gap: 1.5rem !important;
    align-items: start !important;
    max-width: 1200px !important;
    margin-inline: auto !important;
    padding-inline: clamp(1.25rem, 4vw, 2rem) !important;
  }

  .sp-player,
  .sp-queue {
    margin: 0 !important;
    max-width: none !important;
  }

  .sp-queue {
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 7rem) !important;
  }

  .sp-player-top {
    align-items: stretch;
  }

  .sp-player-body {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .sp-player-visual {
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .sp-artwork {
    width: 200px !important;
    max-width: 200px !important;
  }

  .sp-player-panel {
    flex: 1;
    min-width: 0;
    align-items: flex-start;
  }

  .sp-track {
    text-align: left;
  }

  .sp-controls {
    justify-content: flex-start;
    gap: 1.75rem !important;
  }

  .sp-countdown {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
  }

  .sp-countdown-copy {
    align-items: flex-start;
  }
}

@media (max-width: 1023px) {
  .game-player {
    max-width: 36rem;
    margin-inline: auto;
    padding-inline: 1.25rem;
  }

  .sp-player-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sp-autodj,
  .sp-volume {
    width: 100%;
    max-width: none;
  }
}

/* Live mode — defer to beatdesk-control.css layout */
.bd-live-mode .game-player:not(.bd-player-grid) {
  display: flex !important;
  flex-direction: column !important;
}

.bd-live-mode .bd-player-grid {
  display: grid !important;
}

.bd-live-mode .sp-queue {
  position: static !important;
  top: auto !important;
}
