:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c232c;
  --line: #2a3038;
  --text: #e6edf3;
  --muted: #8b949e;
  --spotify: #1db954;
  --deezer: #a238ff;
  --warn: #e3b341;
  --bad: #f85149;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 20px 80px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}

header { max-width: 1000px; margin: 0 auto; padding: 40px 0 24px; }
h1 { margin: 0; font-size: 30px; letter-spacing: -0.4px; }
h1 .arrow { color: var(--deezer); }
.sub { margin: 6px 0 0; color: var(--muted); }

main { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

.step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.step h2 { margin: 0 0 14px; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.num {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--spotify); color: #06210f;
  font-size: 13px; font-weight: 700;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.row label { color: var(--muted); font-size: 14px; }

input[type=text] {
  flex: 1; min-width: 220px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; font: inherit;
}
input[type=text]:focus { outline: 2px solid var(--deezer); outline-offset: -1px; }

button {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 14px; font: inherit; cursor: pointer;
}
button:hover:not(:disabled) { border-color: #3d4653; background: #232b35; }
button:disabled { opacity: 0.5; cursor: default; }
button.primary { background: var(--spotify); border-color: var(--spotify); color: #06210f; font-weight: 600; }
button.primary:hover:not(:disabled) { background: #1ed760; border-color: #1ed760; }
button.small { padding: 4px 9px; font-size: 13px; }

.chip { border-radius: 999px; padding: 5px 13px; font-size: 13px; }
.chip.active { background: var(--deezer); border-color: var(--deezer); color: #fff; }

.playlists { list-style: none; margin: 12px 0 0; padding: 0; max-height: 340px; overflow-y: auto; }
.playlists li {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.playlists li:hover { background: var(--panel-2); }
.playlists img { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; background: var(--panel-2); }
.playlists .pl-name { font-weight: 500; }
.playlists .pl-meta { color: var(--muted); font-size: 13px; }

.progress { height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin: 12px 0; }
#progress-bar { height: 100%; width: 0; background: var(--deezer); transition: width 0.2s; }

.stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 16px; }
.stat { background: var(--panel-2); border-radius: 8px; padding: 10px 16px; min-width: 96px; }
.stat b { display: block; font-size: 22px; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 12px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; padding: 6px 8px; }
td { padding: 8px; border-top: 1px solid var(--line); vertical-align: top; }
tr.skipped td { opacity: 0.42; }

.title { font-weight: 500; }
.by { color: var(--muted); font-size: 13px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.exact { background: #10331d; color: #3fb950; }
.badge.high { background: #10331d; color: #3fb950; }
.badge.review { background: #3a2d10; color: var(--warn); }
.badge.low, .badge.none { background: #3d1518; color: var(--bad); }
.badge.error { background: #3d1518; color: var(--bad); }

.reasons { color: var(--warn); font-size: 12px; margin-top: 3px; }
.cell-actions { display: flex; gap: 6px; flex-wrap: wrap; }

select {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 8px; font: inherit; font-size: 13px; max-width: 380px;
}

.howto { color: var(--muted); font-size: 14px; line-height: 1.7; }
.howto b { color: var(--text); }
code, kbd {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px; font-size: 13px;
  font-family: ui-monospace, Consolas, monospace;
}
a { color: var(--deezer); }

pre {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; overflow: auto; max-height: 340px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.5;
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 11px 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}

audio { height: 30px; vertical-align: middle; }

footer {
  max-width: 1000px;
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
footer p { margin: 0 0 8px; }
footer b { color: var(--text); font-weight: 600; }
