:root {
  /* Paleta inspirada en Spotify: fondo casi negro, superficies grises y verde de acento */
  --bg: #121212;
  --surface: #181818;
  --surface-hover: #282828;
  --text: #ffffff;
  --muted: #b3b3b3;
  --border: #2a2a2a;
  --accent: #1db954;
  --accent-hover: #1ed760;
  --accent-soft: rgb(29 185 84 / 0.16);
  --on-accent: #000000;
  --success: #1ed760;
  --error: #f15e6c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  padding: 2rem 1rem;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
main { max-width: 40rem; margin: 0 auto; }

/* Cabecera */
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
h1 .accent { color: var(--accent); }
h1 a { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; }
.logo { width: 2.25rem; height: 2.25rem; }
.subtitle { color: var(--muted); margin: 0 0 1.5rem; }

/* Portada */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
  text-align: center;
}
.landing-logo { width: 6rem; height: 6rem; margin-bottom: 1rem; }
.landing h1 { font-size: clamp(2.5rem, 10vw, 4rem); margin-bottom: 0.75rem; }
.landing .subtitle { max-width: 26rem; font-size: 1.1rem; margin-bottom: 2.5rem; }
.button.play {
  padding: 1rem 4rem;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgb(29 185 84 / 0.3);
}

/* Botones */
.button {
  padding: 0.5rem 1.25rem;
  border: 1px solid #727272;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.1s, border-color 0.1s;
}
.button:hover:not(:disabled) { border-color: var(--text); transform: scale(1.04); }
.button:disabled { opacity: 0.5; cursor: default; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Campos de texto */
input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--text);
  font: inherit;
}
input::placeholder { color: var(--muted); }
input:hover { border-color: #3e3e3e; }
input:focus { outline: 2px solid var(--text); outline-offset: -1px; }
.status { margin: 1.5rem 0 0; color: var(--muted); }
.status.error { color: var(--error); }

/* Lista de colaboradores */
section h2 { font-size: 1.15rem; margin: 2rem 0 0.25rem; }
section h2 a { color: inherit; }
.current-artist { display: flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0 1rem; }
.current-artist .count { margin: 0; }
.avatar.medium { width: 4rem; height: 4rem; font-size: 1.5rem; }
.filter { margin: 0 0 1rem; }
.count { color: var(--muted); margin: 0 0 1rem; }
.progress { margin: 0 0 1rem; color: var(--muted); font-size: 0.9rem; }
.progress-track { height: 6px; margin-bottom: 0.4rem; border-radius: 3px; background: var(--border); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.4s; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 2rem 0 0.25rem; }
section .list-heading h2 { margin: 0; }
.reorder { flex: none; padding: 0.25rem 0.75rem; font-size: 0.9rem; }
.loading-more { color: var(--muted); text-align: center; margin: 1rem 0 0; }
.sentinel { height: 1px; }
.scroll-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 1rem auto 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-hover);
  color: var(--accent);
  cursor: pointer;
  animation: nudge 1.6s ease-in-out infinite;
}
.scroll-more:hover { border-color: var(--accent); }
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-more { animation: none; }
}
.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
ol.collaborators { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
@media (max-width: 480px) {
  ol.collaborators { grid-template-columns: repeat(2, 1fr); }
}
li.collaborator { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface); }
.card {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.card:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.avatar.cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  font-size: 3rem;
}
.avatar.cover img { transition: transform 0.3s; }
.card:hover .avatar.cover img { transform: scale(1.06); }
.card-info {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 0.1rem;
  padding: 2rem 0.75rem 0.65rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.85));
}
.card .name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}
.card:hover .name { text-decoration: underline; }
.card .tracks { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.rank, .deezer-link {
  position: absolute;
  top: 0.5rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.6);
  font-size: 0.8rem;
  font-weight: 700;
}
.rank { left: 0.5rem; font-variant-numeric: tabular-nums; }
.deezer-link { right: 0.5rem; color: var(--muted); text-decoration: none; }
.deezer-link:hover { color: var(--text); }

/* Juego */
.challenges { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.challenge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  transition: background-color 0.2s;
}
.challenge:hover { background: var(--surface-hover); }
.challenge strong { font-size: 1.05rem; }
.meta { color: var(--muted); font-size: 0.9rem; }
.goal {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: linear-gradient(180deg, rgb(29 185 84 / 0.35), var(--surface));
}
.goal p { margin: 0; }
.goal-text { text-align: center; }
.goal-artist { display: grid; justify-items: center; gap: 0.3rem; margin: 0; }
.goal-artist figcaption { color: var(--muted); font-size: 0.8rem; }
.avatar.large {
  width: 5.5rem;
  height: 5.5rem;
  font-size: 2rem;
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent);
}
@media (max-width: 480px) {
  .goal { gap: 0.6rem; padding: 0.75rem; }
  .avatar.large { width: 4rem; height: 4rem; font-size: 1.5rem; }
}
.goal .route { font-size: 1.15rem; font-weight: 600; }
.goal .timer { margin-top: 0.25rem; font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.result .result-time { margin: 0.75rem 0 0; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1rem 0 0; }
.toolbar .spacer { flex: 1; }
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 1rem 0 0; padding: 0; list-style: none; color: var(--muted); }
.path li { display: inline-flex; align-items: center; gap: 0.4rem; }
.path li:not(:last-child)::after { content: "→"; }
.avatar.small { width: 1.75rem; height: 1.75rem; font-size: 0.8rem; }
.path li:last-child .avatar { box-shadow: 0 0 0 2px var(--accent); }
.path li:last-child { color: var(--text); font-weight: 600; }
.path-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.path-step span:last-child { text-decoration: underline dotted; text-underline-offset: 3px; }
.path-step:hover { color: var(--accent); }
.path-step:hover span:last-child { text-decoration-style: solid; }
.result { text-align: center; }
.result .score { font-size: 2rem; font-weight: 800; margin: 0.5rem 0; }
.result .score.perfect { color: var(--success); }
.result h3 { margin: 1.5rem 0 0.25rem; font-size: 1rem; }
.result .path { justify-content: center; }
.song-path { display: inline-block; max-width: 100%; margin: 0.5rem 0 0; padding: 0; list-style: none; text-align: left; }
.song-path .artist { font-weight: 600; }
.song-path .songs {
  margin: 0.2rem 0 0.2rem 0.4rem;
  padding: 0.1rem 0 0.1rem 0.9rem;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: 0.9rem;
}
