@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #0b0b10;
  --bg-raised: #131319;
  --border: #24242e;
  --text: #f2f1f7;
  --text-dim: #8d8a9c;
  --twitch: #9146ff;
  --spotify: #1db954;
  --danger: #ff5d5d;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
}

body {
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(145, 70, 255, 0.18), transparent),
    radial-gradient(ellipse 900px 500px at 85% 10%, rgba(29, 185, 84, 0.14), transparent);
  background-repeat: no-repeat;
}

a { color: inherit; }

.mono { font-family: 'Space Mono', monospace; }

/* ---------- Landing ---------- */

.landing {
  max-width: 620px;
  margin: 0 auto;
  padding: 100px 24px 60px;
  text-align: center;
}

.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.dot-twitch, .dot-spotify {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.dot-twitch { background: var(--twitch); }
.dot-spotify { background: var(--spotify); }

h1 {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

h1 .accent {
  background: linear-gradient(90deg, var(--twitch), var(--spotify));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 40px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-bottom: 40px;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.step-num {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--text-dim);
  font-size: 14px;
  padding-top: 2px;
}

.step-body strong { display: block; margin-bottom: 4px; }
.step-body span { color: var(--text-dim); font-size: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 22px;
  border-radius: 10px;
  border: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-twitch { background: var(--twitch); color: white; }
.btn-spotify { background: var(--spotify); color: #04150a; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255,93,93,0.4);
}

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

/* ---------- Dashboard ---------- */

.dash {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.dash-header h2 { margin: 0; font-size: 22px; }
.dash-header .sub { color: var(--text-dim); font-size: 14px; margin-top: 4px; }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.card h3 {
  margin: 0 0 16px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-weight: 400;
}

.connect-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.connect-row .btn { width: auto; flex: 1; min-width: 200px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.status-pill.ok { color: #6ee7a0; }

/* now playing */
.now-playing {
  display: flex;
  align-items: center;
  gap: 16px;
}
.now-playing img {
  width: 64px; height: 64px; border-radius: 8px; object-fit: cover;
  background: var(--bg);
}
.now-playing .track-title { font-weight: 600; }
.now-playing .track-artist { color: var(--text-dim); font-size: 14px; }
.playing-indicator {
  display: inline-flex;
  gap: 3px;
  align-items: flex-end;
  height: 16px;
  margin-left: auto;
}
.playing-indicator span {
  width: 3px;
  background: var(--spotify);
  border-radius: 2px;
  animation: bounce 1s infinite ease-in-out;
}
.playing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.playing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 100% { height: 4px; } 50% { height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .playing-indicator span { animation: none; height: 10px; }
}

/* settings */
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-row input {
  width: 100px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Mono', monospace;
}
.settings-row .btn { width: auto; padding: 10px 18px; }
.settings-hint { color: var(--text-dim); font-size: 13px; margin-top: 10px; }

/* queue list */
.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.queue-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.queue-item img {
  width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
}
.queue-item .placeholder-art {
  width: 44px; height: 44px; border-radius: 6px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--twitch), var(--spotify));
  opacity: 0.5;
}
.queue-meta { flex: 1; min-width: 0; }
.queue-meta .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-meta .a { color: var(--text-dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-meta .who { color: var(--text-dim); font-size: 12px; font-family: 'Space Mono', monospace; margin-top: 2px; }

.badge {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.badge.added { background: rgba(29,185,84,0.15); color: #6ee7a0; }
.badge.failed { background: rgba(255,93,93,0.15); color: #ff9b9b; }
.badge.queued { background: rgba(255,255,255,0.08); color: var(--text-dim); }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 30px 10px;
  font-size: 14px;
}

.footer-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 30px;
}

@media (max-width: 480px) {
  h1 { font-size: 32px; }
  .connect-row { flex-direction: column; }
}
