:root {
  --bg: #0d0d12;
  --panel: #16161f;
  --text: #f2f2f5;
  --muted: #9b9ba6;
  --accent: #ffde59; /* Genius yellow */
  --accent-dim: #3a3a1a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1c1c2b 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #23232f;
  position: sticky;
  top: 0;
  background: rgba(13, 13, 18, 0.85);
  backdrop-filter: blur(8px);
}

h1 { font-size: 1.15rem; margin: 0; letter-spacing: 0.2px; }

.header__right { display: flex; align-items: center; gap: 0.75rem; }
#source {
  background: #1d1d28;
  color: var(--text);
  border: 1px solid #2a2a38;
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.status {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.status--idle { color: var(--muted); background: #1d1d28; }
.status--playing { color: #0d0d12; background: var(--accent); font-weight: 600; }
.status--paused { color: var(--accent); background: var(--accent-dim); }
.status--error { color: #ff9d9d; background: #3a1a1a; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem;
}

.track {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--panel);
  border: 1px solid #23232f;
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.art {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #23232f;
  flex-shrink: 0;
}
.track__title { font-size: 1.1rem; font-weight: 700; }
.track__artist { color: var(--muted); margin-top: 2px; }
.track__link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}
.track__link:hover { text-decoration: underline; }

.lyrics {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 1.02rem;
  background: var(--panel);
  border: 1px solid #23232f;
  border-radius: 14px;
  padding: 1.5rem;
  min-height: 200px;
}
.placeholder, .error {
  color: var(--muted);
  text-align: center;
  margin-top: 3rem;
  white-space: normal;
}
.error { color: #ff9d9d; }

.loader {
  width: 22px; height: 22px;
  border: 3px solid #2a2a38;
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 3rem auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.choices { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0.7rem 0.9rem;
  border: 1px solid #2a2a38;
  border-radius: 10px;
  background: #1d1d28;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.choice:hover, .choice:focus-visible { border-color: var(--accent); outline: none; }
.choice__title { font-weight: 600; }
.choice__artist { color: var(--muted); font-size: 0.9rem; }
.track__wrong {
  display: block;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}
.track__wrong:hover, .track__wrong:focus-visible { color: var(--accent); }
.choice-search { display: flex; gap: 0.5rem; margin-top: 1rem; }
.choice-search input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid #2a2a38;
  border-radius: 10px;
  background: #1d1d28;
  color: var(--text);
  font: inherit;
}
.choice-search input:focus { border-color: var(--accent); outline: none; }
.choice-search button {
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #0d0d12;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
