:root {
  color-scheme: light;
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --border: #d9d9d9;
  --accent: #3b5bfd;
  --accent-fg: #ffffff;
  --correct: #1f9d55;
  --incorrect: #d64545;
  --card-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.4;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  min-height: 100vh;
}

h1, h2, h3 {
  margin: 0 0 8px;
}

p {
  margin: 0 0 12px;
}

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

.btn {
  display: inline-block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--fg);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.divider {
  text-align: center;
  color: var(--muted);
  margin: 16px 0;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.join-form label {
  font-size: 14px;
  color: var(--muted);
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--fg);
}

.error {
  color: var(--incorrect);
  margin-top: 12px;
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.room-code {
  font-weight: 700;
  letter-spacing: 2px;
}

.share-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.share-row input {
  flex: 1;
}

.share-row .btn {
  width: auto;
  flex-shrink: 0;
}

.player-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-row {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.player-row.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.player-row-header {
  font-size: 14px;
}

.mini-timeline {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mini-timeline li {
  font-size: 12px;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
}

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

.now-playing {
  font-size: 24px;
  text-align: center;
  margin: 24px 0 8px;
}

#listening-heading {
  text-align: center;
  color: var(--muted);
  margin-bottom: 16px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-card {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.slot-btn {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--accent);
  background: transparent;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  cursor: pointer;
}

.reveal-card {
  padding: 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--card-bg);
  text-align: center;
  margin-bottom: 16px;
}

.reveal-card.correct {
  border-color: var(--correct);
}

.reveal-card.incorrect {
  border-color: var(--incorrect);
}

.reveal-result {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.reveal-card.correct .reveal-result {
  color: var(--correct);
}

.reveal-card.incorrect .reveal-result {
  color: var(--incorrect);
}

.reveal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.reveal-artist {
  color: var(--muted);
  margin-bottom: 12px;
}

.players-footer {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.players-footer h3 {
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
