/* ─── Host Dashboard ───────────────────────────────────────────────────────── */

.dashboard-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

/* ─── Dashboard intro box ──────────────────────────────────────────────────── */
.dashboard-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(223,255,0,0.07) 0%, rgba(0,245,255,0.05) 100%);
  border: 1px solid rgba(223,255,0,0.15);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
}
.dashboard-intro-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--accent);
}
.dashboard-intro-text p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}
/* Tutorial buttons inside the intro box — keep them left-aligned with the text */
.dashboard-intro-text .tutorial-btns {
  margin-top: 10px;
}
.btn-add-playlist {
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .dashboard-intro {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-add-playlist { width: 100%; text-align: center; }
}

/* ─── Section ──────────────────────────────────────────────────────────────── */
.section { margin-bottom: 40px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.section-header h2 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── App logo ──────────────────────────────────────────────────────────────── */
.app-logo    { width: 480px; height: 480px; object-fit: contain; filter: drop-shadow(0 0 32px rgba(223, 255, 0, 0.4)) drop-shadow(0 0 60px rgba(0, 245, 255, 0.2)); }
.app-logo-sm { width: auto; height: 44px; object-fit: contain; display: block; filter: drop-shadow(0 0 10px rgba(223, 255, 0, 0.35)); }
@media (max-width: 480px) { .app-logo { width: 240px; height: 240px; } }
.app-header-brand { display: flex; align-items: center; gap: 10px; }

/* ─── Landing ──────────────────────────────────────────────────────────────── */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 12px;
  text-align: center;
  padding: 0 20px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

/* High-energy background orbs — acid and teal */
.landing-hero::before,
.landing-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.landing-hero::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(223, 255, 0, 0.12) 0%, transparent 70%);
  top: -160px;
  left: -140px;
  animation: blob-drift 14s ease-in-out infinite alternate;
}
.landing-hero::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(0, 245, 255, 0.1) 0%, transparent 70%);
  bottom: -120px;
  right: -100px;
  animation: blob-drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes blob-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, 18px) scale(1.06); }
  100% { transform: translate(-16px, 35px) scale(0.96); }
}

.landing-hero h1 {
  font-size: 56px;
  font-weight: 900;
  background: var(--gradient-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
  line-height: 1.05;
  position: relative;
  z-index: 1;
}

.landing-hero-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  margin-top: -40px;
}
.landing-hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
  letter-spacing: 0.01em;
  margin-top: -105px;
}

/* Google sign-in */
.btn-google {
  background: rgba(255, 255, 255, 0.96);
  color: #1A1A1B;
  font-weight: 700;
  gap: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  position: relative;
  z-index: 1;
  animation: none;
  letter-spacing: 0.02em;
}
.btn-google:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: none;
}

@media (max-width: 480px) {
  .landing-hero h1 { font-size: 38px; }
  .landing-hero p { font-size: 15px; margin-top: -52px; }
}

/* ─── Party list ───────────────────────────────────────────────────────────── */
.party-list { display: flex; flex-direction: column; gap: 10px; }

.party-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: rgba(40, 40, 41, 0.5);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s;
  position: relative;
  overflow: hidden;
}
/* Shimmer sweep on hover */
.party-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.04) 50%, transparent 65%);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s;
}
/* Thin left accent stripe */
.party-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-accent);
  border-radius: 2px 0 0 2px;
  opacity: 0;
  transition: opacity 0.22s;
}
.party-card:hover {
  border-color: rgba(0, 245, 255, 0.35);
  box-shadow: var(--shadow-glow-purple), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}
.party-card:hover::before {
  opacity: 1;
  animation: shimmer-sweep 1.4s ease-in-out;
}
.party-card:hover::after { opacity: 1; }

.party-card.party-closed .party-card-info,
.party-card.party-closed .party-card-date { opacity: 0.45; }
.party-card.party-closed::after { background: var(--text-muted); }

.party-card-info { display: flex; align-items: center; gap: 14px; }
.party-card-info strong { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.party-card-right { display: flex; align-items: center; gap: 12px; }
.party-card-date { font-size: 12px; color: var(--text-muted); letter-spacing: 0.02em; }

/* ─── Party detail ─────────────────────────────────────────────────────────── */
.party-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 28px;
  flex-wrap: wrap;
}
.party-detail-header h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

/* ─── Tabs ─────────────────────────────────────────────────────────────────── */
.party-detail-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 28px;
  background: rgba(40, 40, 41, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 6px 6px 0;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  margin-bottom: -1px;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
}
.tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(223, 255, 0, 0.05);
}

/* ─── Guest actions ────────────────────────────────────────────────────────── */
.guest-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }

/* ─── Import tooltip ───────────────────────────────────────────────────────── */
.import-tooltip-wrap { position: relative; display: inline-flex; align-items: center; }
.import-tooltip-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent-cyan);
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: default;
  user-select: none;
}
.import-tooltip-box {
  display: none;
  position: absolute;
  left: 28px; top: 50%;
  transform: translateY(-50%);
  width: 280px;
  background: #1F1F20;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 100;
  pointer-events: none;
}
.import-tooltip-box code {
  background: rgba(0,245,255,0.1);
  color: var(--accent-cyan);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}
.import-tooltip-wrap:hover .import-tooltip-box { display: block; }

/* ─── Guest rows ───────────────────────────────────────────────────────────── */
.guest-list { display: flex; flex-direction: column; gap: 8px; }

.guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(40, 40, 41, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  gap: 12px;
  flex-wrap: wrap;
  transition: border-color 0.18s, background 0.18s;
}
.guest-row:hover {
  border-color: rgba(0, 245, 255, 0.3);
  background: rgba(48, 48, 50, 0.6);
}
.guest-row-info { display: flex; flex-direction: column; flex: 1; min-width: 120px; gap: 2px; }
.guest-display-name { font-weight: 700; font-size: 14px; }
.guest-phone { font-size: 12px; color: var(--text-muted); }
.guest-row-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); }
.guest-row-actions { display: flex; gap: 6px; }
.status-submitted { color: var(--success); font-weight: 700; }
.status-pending { color: var(--text-muted); }

/* ─── Party Playlist table ─────────────────────────────────────────────────── */
.playlist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.playlist-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: rgba(40, 40, 41, 0.5);
}
.playlist-table th:first-child { border-radius: var(--radius-xs) 0 0 0; }
.playlist-table th:last-child  { border-radius: 0 var(--radius-xs) 0 0; }

.playlist-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
.playlist-table tbody tr:last-child td { border-bottom: none; }
.playlist-table tbody tr {
  transition: background 0.18s;
}
.playlist-table tbody tr:hover { background: rgba(48, 48, 50, 0.5); }

.pl-rank {
  width: 40px;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}
/* Gold rank #1 */
.playlist-table tbody tr:nth-child(1) .pl-rank { color: var(--accent-yellow); }
.playlist-table tbody tr:nth-child(2) .pl-rank { color: #B0B0C0; }
.playlist-table tbody tr:nth-child(3) .pl-rank { color: #B07040; }

.pl-title { font-weight: 700; }
.pl-artist { color: var(--text-muted); }
.pl-submitters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pl-score {
  width: 64px;
  text-align: right;
  font-weight: 800;
}
.pl-score-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 16px;
  font-weight: 900;
}
.pl-think-alike { width: 48px; text-align: center; }
.pl-think-alike-ico { width: 36px; height: 36px; object-fit: contain; }
.pl-youtube { width: 44px; text-align: center; }
.pl-yt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  opacity: 0.65;
  transition: opacity 0.15s, transform 0.15s;
}
.pl-yt-btn:hover:not(:disabled) { opacity: 1; transform: scale(1.1); }
.pl-yt-btn:disabled { opacity: 0.3; cursor: default; }
.pl-yt-icon { width: 24px; height: 24px; fill: #FF0000; }
.pl-yt-stop { fill: #888; }

/* ─── YouTube mini-player bar ───────────────────────────────────────────────── */
.yt-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: #0a0a0a;
  display: flex;
  align-items: stretch;
  z-index: 1000;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.yt-player-bar.hidden { display: none; }
.yt-player-bar iframe { flex: 1; width: 100%; height: 100%; border: none; }
.yt-close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.yt-close-btn:hover { background: rgba(223, 255, 0, 0.4); }

.loading-state { color: var(--text-muted); font-size: 14px; padding: 24px 0; }
.error-state   { color: var(--danger); font-size: 14px; padding: 24px 0; }

/* ─── Playlist Player bar ───────────────────────────────────────────────────── */
.pp-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0d0d0d;
  border-top: 2px solid var(--accent);
  box-shadow: 0 -6px 40px rgba(0, 0, 0, 0.8);
  z-index: 1100;
  display: flex;
  flex-direction: column;
}
.pp-bar.hidden { display: none; }

.pp-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  background: rgba(223,255,0,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.pp-controls { justify-self: center; }

.pp-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  justify-self: start;
}
.pp-idx {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}
.pp-song-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s;
}
.pp-song-title.pp-loading { opacity: 0.5; }
.pp-song-sep {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 12px;
}
.pp-song-artist {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .pp-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
  }

  .pp-info {
    justify-self: unset;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
    width: 100%;
    overflow: visible;
  }

  .pp-idx {
    width: 100%;
    text-align: center;
    font-size: 10px;
  }

  .pp-song-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    text-align: center;
  }

  .pp-song-sep {
    flex-shrink: 0;
  }

  .pp-song-artist {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    text-align: center;
  }

  .pp-controls {
    justify-content: center;
    width: 100%;
  }
}

/* ── Playlist player controls ── */
.pp-ctrl-btn {
  position: relative;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(223,255,0,0.22);
  color: var(--text);
  font-size: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.14s, color 0.18s;
  box-shadow: 0 0 0 0 rgba(223,255,0,0);
  overflow: hidden;
}

/* Subtle inner glow ring on the button face */
.pp-ctrl-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(223,255,0,0.12) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
}

/* Hover state — neon yellow glow */
.pp-ctrl-btn:hover:not(:disabled) {
  background: rgba(223,255,0,0.12);
  border-color: rgba(223,255,0,0.7);
  color: var(--accent);
  transform: scale(1.1);
  box-shadow:
    0 0 10px rgba(223,255,0,0.45),
    0 0 24px rgba(223,255,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.pp-ctrl-btn:hover:not(:disabled)::before { opacity: 1; }

/* Active / press feedback */
.pp-ctrl-btn:active:not(:disabled) {
  transform: scale(0.95);
  box-shadow: 0 0 6px rgba(223,255,0,0.3);
}

.pp-ctrl-btn:disabled { opacity: 0.25; cursor: default; transform: none; box-shadow: none; border-color: rgba(255,255,255,0.08); }

/* Prev / Next — pill-shaped with cyan accent on the icon */
#pp-prev,
#pp-next {
  width: 48px;
  height: 48px;
  font-size: 22px;
  border-radius: 50%;
  background: rgba(0,245,255,0.06);
  border-color: rgba(0,245,255,0.25);
  color: rgba(0,245,255,0.85);
}
#pp-prev::before,
#pp-next::before {
  background: radial-gradient(circle at 50% 30%, rgba(0,245,255,0.14) 0%, transparent 70%);
}
#pp-prev:hover:not(:disabled),
#pp-next:hover:not(:disabled) {
  background: rgba(0,245,255,0.14);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow:
    0 0 12px rgba(0,245,255,0.5),
    0 0 28px rgba(0,245,255,0.18),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Close button — danger red */
.pp-ctrl-close {
  background: rgba(255,60,60,0.1);
  border-color: rgba(255,80,80,0.3);
  color: #ff6b6b;
  font-size: 15px;
}
.pp-ctrl-close::before {
  background: radial-gradient(circle at 50% 30%, rgba(255,80,80,0.15) 0%, transparent 70%);
}
.pp-ctrl-close:hover:not(:disabled) {
  background: rgba(255,60,60,0.22);
  border-color: rgba(255,80,80,0.8);
  color: #ff4444;
  box-shadow:
    0 0 10px rgba(255,60,60,0.5),
    0 0 22px rgba(255,60,60,0.18),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

#pp-player-div,
#pp-player-div > div,
#pp-player-div iframe {
  display: block;
  width: 100%;
  height: 195px;
  border: none;
}

.playlist-header-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pl-song-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: auto;
}

/* ─── Playlist action buttons ───────────────────────────────────────────────── */
.pl-actions-cell { width: 80px; text-align: right; white-space: nowrap; }
.pl-actions { display: inline-flex; gap: 4px; align-items: center; }
.pl-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.08);
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.pl-action-btn:hover:not(:disabled) { background: rgba(255,255,255,0.15); }
.pl-action-btn:disabled { opacity: 0.3; cursor: default; }
.pl-action-icon { width: 15px; height: 15px; }
.pl-delete-btn { color: #ff6b6b; }
.pl-delete-btn:hover:not(:disabled) { background: rgba(255,80,80,0.15); color: #ff4444; }
.pl-hide-btn { color: var(--accent-cyan); }
.pl-hide-btn:hover:not(:disabled) { background: rgba(0,245,255,0.12); }

/* Hidden song rows */
.pl-row-hidden td { opacity: 0.5; }
.pl-row-hidden .pl-actions-cell td,
.pl-row-hidden .pl-action-btn { opacity: 1; }
.pl-score-hidden {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* Submitter chips with delete button */
.pl-submitter-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 2px 2px 2px 7px;
  font-size: 12px;
  margin: 1px 2px;
}
.pl-submitter-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,80,80,0.2);
  border: none;
  cursor: pointer;
  color: #ff6b6b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.pl-submitter-del:hover { background: rgba(255,80,80,0.45); color: #fff; }

/* ─── Playlist table — mobile responsive ────────────────────────────────────── */
@media (max-width: 640px) {

  /* Flatten table and tbody so rows are the direct layout containers */
  .playlist-table,
  .playlist-table tbody {
    display: block;
  }
  .playlist-table thead { display: none; }

  /*
   * Each row becomes a CSS grid.
   *
   * Columns:
   *   [rank]  32px  — rank number, vertically centred across all rows
   *   [main]  1fr   — title (row 1) + artist (row 2), takes all spare space
   *   [meta]  auto  — score + think-alike icon stacked
   *   [act]   auto  — youtube button + action buttons stacked
   *
   * All <td> children participate directly via display:contents on the <tr>.
   * We then place each cell explicitly onto the grid.
   */
  .playlist-table tr {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 0;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    align-items: start;
  }
  .playlist-table tbody tr:last-child { border-bottom: none; }

  /* Strip default table-cell behaviour from every td */
  .playlist-table td {
    display: block;
    padding: 0;
    border: none;
    vertical-align: unset;
  }

  /* ── Rank: hidden on mobile ── */
  .playlist-table td.pl-rank { display: none; }

  /* ── Column 1 row 1: Song title ── */
  .pl-title {
    grid-column: 1;
    grid-row: 1;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 2px;
  }

  /* ── Column 1 row 2: Artist — visually below title, Spotify-style ── */
  .pl-artist {
    grid-column: 1;
    grid-row: 2;
    display: block;           /* override the desktop hidden state */
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 3px;
    padding-bottom: 4px;
  }

  /* ── Submitters: hidden on mobile — too much noise ── */
  .pl-submitters { display: none; }

  /* ── Column 2: Score (row 1) + Think-alike (row 2) ── */
  .pl-score {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    text-align: center;
    padding-top: 2px;
  }
  .pl-score-inner { font-size: 13px; }

  .pl-think-alike {
    grid-column: 2;
    grid-row: 2;
    width: auto;
    text-align: center;
    padding-top: 3px;
  }
  .pl-think-alike-ico { width: 20px; height: 20px; }

  /* ── Column 3: YouTube (row 1) + Actions (row 2) ── */
  .pl-youtube {
    grid-column: 3;
    grid-row: 1;
    width: auto;
    text-align: center;
  }
  .pl-yt-btn { padding: 2px; }
  .pl-yt-icon { width: 22px; height: 22px; }

  .pl-actions-cell {
    grid-column: 3;
    grid-row: 2;
    width: auto;
    text-align: right;
    white-space: nowrap;
  }
  .pl-actions { gap: 2px; }
  .pl-action-icon { width: 14px; height: 14px; }
  .pl-action-btn  { padding: 5px; }
}

/* ─── Leaderboard actions ──────────────────────────────────────────────────── */
.leaderboard-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

/* ─── Settings form ────────────────────────────────────────────────────────── */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 420px;
}
.settings-form fieldset {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(40, 40, 41, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.settings-form legend {
  padding: 0 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── Invite template ──────────────────────────────────────────────────────── */
.invite-template-section { margin-top: 36px; max-width: 500px; }
.invite-template-section h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}
.invite-template-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.6; }
.invite-template-hint code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  color: var(--accent-cyan);
}
.invite-template-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.invite-template-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.14);
}
.invite-template-actions { display: flex; gap: 10px; margin-top: 12px; }

/* ─── Guest code badge ─────────────────────────────────────────────────────── */
.guest-code-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.22);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
}

/* ─── Field hint ───────────────────────────────────────────────────────────── */
.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
