:root {
  /* Warm Sunset identity — its own look, not tied to any streaming service. */
  --accent: #ff6b6b;        /* coral */
  --accent-2: #ffb05c;      /* amber */
  --amber: #ffb05c;
  --accent-grad: linear-gradient(135deg, #ff6b6b 0%, #ffb05c 100%);
  --accent-ink: #2a1114;    /* readable text on the warm accent */
  --accent-soft: rgba(255, 122, 92, 0.12);

  /* Warm tints reused by a few older rules. */
  --green: #ff7a5c;
  --green-bright: #ffa46b;

  --bg: #17131a;
  --bg-elev: #1f1922;
  --bg-elev-2: #271f2b;
  --bg-hover: #2e2533;
  --text: #f7f2ef;
  --text-muted: #b9aeb4;
  --text-dim: #7c7076;
  --border: #322a38;
  --radius: 10px;
  --font: "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
/* Warm backdrop for the showcase. */
body {
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(255,107,107,0.10), transparent 62%),
    var(--bg);
}

.hidden { display: none !important; }

/* ------------------------------- buttons -------------------------------- */
.btn {
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  transition: transform .1s ease, background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-grad); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); transform: scale(1.03); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid #7a7a7a;
}
.btn-outline:hover { border-color: var(--text); transform: scale(1.03); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ------------------------------- inputs --------------------------------- */
input[type="text"], select {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border .15s, background .15s;
}
input[type="text"]:focus, select:focus {
  border-color: var(--green);
  background: #262626;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%23b3b3b3' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
/* Small select used in the results header (sort). */
.mini-select {
  width: auto; padding: 7px 30px 7px 12px; font-size: 13px;
  background-position: right 10px center;
}
.hint { color: var(--text-dim); font-size: 12px; margin: 8px 0 0; line-height: 1.5; }

/* ------------------------------ read-only top bar ----------------------- */
.showcase-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; gap: 12px;
  background: rgba(23,19,26,0.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.brand-mark { width: 30px; height: 30px; }
.showcase-top .top-actions { display: flex; align-items: center; gap: 12px; }
.get-app { color: var(--text-muted); font-size: 13px; font-weight: 600; }
@media (max-width: 620px) { .get-app { display: none; } }

.coffee-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  font-size: 18px; line-height: 1; text-decoration: none;
  border: 1px solid #7a7a7a; background: transparent;
  transition: background .15s, border-color .15s, transform .1s;
}
.coffee-btn:hover { background: rgba(240,192,64,0.14); border-color: #f0c040; transform: scale(1.05); }

/* -------------------------------- layout -------------------------------- */
.showcase {
  max-width: 760px; margin: 0 auto; padding: 22px 18px 60px;
}
.get-app-note {
  color: var(--text-muted); font-size: 13px; line-height: 1.6;
  background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; margin: 4px 0 14px;
}

/* ------------------------------- results head --------------------------- */
.results-head {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px;
}
.results-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.results-head .head-right { display: flex; align-items: center; gap: 12px; }
.results-meta { color: var(--text-dim); font-size: 13px; }
.actions { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }

/* Segmented toggle (search: Playlists / People) */
.seg-toggle {
  display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 14px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 999px;
}
.seg {
  border: none; background: transparent; color: var(--text-muted);
  font-family: inherit; font-weight: 700; font-size: 13px;
  padding: 7px 18px; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s;
}
.seg:hover { color: var(--text); }
.seg.active { background: var(--accent-grad); color: var(--accent-ink); }

/* -------------------------------- feed ---------------------------------- */
.discover-search { margin-bottom: 12px; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 14px; }
.discover-feed { display: flex; flex-direction: column; gap: 10px; }
.discover-card {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border .15s, background .15s;
}
.discover-card:hover { border-color: #5a5a5a; background: #232323; }
.dc-head { display: flex; align-items: center; gap: 10px; }
.dc-title { font-weight: 700; font-size: 15px; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-desc { color: var(--text-muted); font-size: 13px; margin: 6px 0 0; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-foot {
  color: var(--text-dim); font-size: 12px; margin-top: 8px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.dc-foot .dc-by { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-stats { display: flex; align-items: center; gap: 12px; flex: none; }
.dc-added, .dc-comments { display: inline-flex; align-items: center; gap: 4px; }

/* Playlist type + challenge badges */
.dc-badge {
  display: inline-flex; align-items: center; flex: none;
  font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
}
.dc-badge.asis { background: #2a2a2a; color: var(--text-muted); border: 1px solid var(--border); }
.dc-badge.community { background: rgba(255,107,107,0.15); color: var(--green-bright); border: 1px solid var(--green); }
.dc-badge.entry { background: rgba(255,107,107,0.12); color: var(--green-bright); border: 1px solid var(--green); }
.dc-badge.winner { background: rgba(240,192,64,0.18); color: #f0c040; border: 1px solid #f0c040; }

/* Moderator-pinned featured playlist */
.discover-card.featured {
  border-color: #f0c040;
  background: linear-gradient(180deg, rgba(240,192,64,0.12), rgba(240,192,64,0.04));
}
.dc-featured-tag {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; color: #f0c040; margin-bottom: 8px;
}

/* Clickable curator name */
.curator-link { color: var(--text-muted); cursor: pointer; }
.curator-link:hover { color: var(--text); text-decoration: underline; }

/* ---------------------------- challenge banner -------------------------- */
.challenge-banner {
  border: 1px solid var(--green);
  background: linear-gradient(180deg, rgba(255,107,107,0.16), rgba(255,176,92,0.05));
  border-radius: 10px; padding: 16px 18px; margin-bottom: 14px;
}
.challenge-banner .ch-theme { color: var(--amber); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; }
.challenge-banner .ch-title { font-size: 18px; font-weight: 800; margin-top: 4px; color: var(--text); }
.challenge-banner .ch-desc { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.challenge-banner .btn { margin-top: 10px; }

/* ------------------------------ detail tracks --------------------------- */
.track-list { display: flex; flex-direction: column; }
.dt-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.dt-row:last-child { border-bottom: none; }
.dt-idx { width: 22px; text-align: right; color: var(--text-dim); font-size: 13px; }
.dt-row img, .dt-noart { width: 42px; height: 42px; border-radius: 5px; object-fit: cover; background: var(--bg-elev-2); }
.dt-meta { min-width: 0; }
.dt-name { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-sub { color: var(--text-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-votes { margin-left: auto; flex: none; color: var(--text-dim); font-size: 12px; white-space: nowrap; padding-left: 10px; }

/* -------------------------------- comments ------------------------------ */
.comments-head { font-size: 15px; font-weight: 800; margin: 22px 0 10px; }
.comments-head span { color: var(--text-dim); font-weight: 600; font-size: 13px; }
.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.comment .c-head { display: flex; align-items: center; gap: 8px; }
.comment .c-name { font-weight: 700; font-size: 13px; }
.comment .c-text { font-size: 14px; margin-top: 4px; color: var(--text); word-break: break-word; }

/* -------------------------- curator profile stats ----------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-tile {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.stat-tile .num { font-size: 24px; font-weight: 800; color: var(--green-bright); line-height: 1.1; }
.stat-tile .lbl {
  color: var(--text-muted); font-size: 11px; margin-top: 5px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.stat-tile.tappable { cursor: pointer; transition: border-color .15s, background .15s; }
.stat-tile.tappable:hover { border-color: var(--accent); background: var(--bg-hover); }
.stat-tile.tappable .lbl::after { content: " ›"; color: var(--accent); }

/* Follower / following list rows */
.follow-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; margin-bottom: 8px; cursor: pointer;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px;
  font-weight: 600; transition: border-color .15s, background .15s;
}
.follow-row:hover { border-color: var(--accent); background: var(--bg-hover); }
.follow-chev { color: var(--text-dim); font-size: 18px; }

/* ------------------------------ empty state ----------------------------- */
.empty-state {
  text-align: center; color: var(--text-dim); padding: 40px 20px;
}
.empty-state p { font-size: 14px; line-height: 1.6; max-width: 300px; margin: 0 auto; }

/* -------------------------------- footer -------------------------------- */
.site-footer {
  display: flex; gap: 18px; justify-content: center;
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border);
}
.site-footer a { color: var(--text-dim); font-size: 13px; text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* --------------------------------- toast -------------------------------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--green-bright); color: #000;
  padding: 14px 24px; border-radius: 8px; font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); z-index: 100;
  animation: rise .25s ease;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ------------------------------- scrollbar ------------------------------ */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #565656; background-clip: content-box; }
