* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0e1116;
  --card: #1a1f29;
  --card-hover: #222937;
  --accent: #4fd1c5;
  --accent-dim: #2c7a73;
  --text: #e6e9ef;
  --muted: #8b93a3;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 2.5rem 1.5rem 1.5rem;
  text-align: center;
}

h1 {
  font-size: 2rem;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #4fd1c5, #7f9cf5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  margin-top: 0.6rem;
  color: var(--muted);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  padding: 1rem 1.5rem 2rem;
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
}

.loading { color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid #2a3140;
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
  border-color: var(--accent-dim);
}

.card.playing {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(79, 209, 197, 0.25);
}

.card h2 {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card .num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.card p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  flex: 1;
}

.card .meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--muted);
}

.card .meta span {
  background: #10141b;
  border: 1px solid #2a3140;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.card .status {
  font-size: 0.8rem;
  color: var(--accent);
  min-height: 1.1em;
}

/* progress bar while playing */
.card .bar {
  height: 3px;
  border-radius: 2px;
  background: #2a3140;
  overflow: hidden;
}

.card .bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s linear;
}

footer {
  text-align: center;
  padding: 1.2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

footer code {
  background: var(--card);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
