:root {
  color-scheme: dark;
  --bg: #101114;
  --fg: #e6e6e6;
  --muted: #888;
  --accent: #6aa9ff;
  --accent-press: #4d8be6;
  --card: #1a1c22;
  --chip: #24272e;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0 auto;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: 1rem;
  max-width: 640px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
header { margin-bottom: 1rem; }
h1 { margin: 0; font-size: 1.4rem; }
main { flex: 1; display: flex; flex-direction: column; }
.muted { color: var(--muted); font-size: 0.9em; min-height: 1.2em; }

/* URL input */
#url-form { display: flex; gap: 0.4rem; margin-bottom: 0.4rem; }
#url-input {
  flex: 1;
  background: #0c0d10;
  color: var(--fg);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  font-family: monospace;
  font-size: 0.95em;
}
#url-input:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
#play-btn {
  background: var(--accent);
  color: #000;
  border: 0;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
#play-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Player layout */
#player-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.card { background: var(--card); padding: 1rem; border-radius: 10px; }
.title { font-weight: 600; margin-bottom: 0.6rem; }
.timeline { display: flex; align-items: center; gap: 0.5rem; font-variant-numeric: tabular-nums; font-size: 0.85em; }
#scrubber { flex: 1; accent-color: var(--accent); }

/* Transport — outside the card, vertically centered on tall screens */
.transport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 6vw, 2.5rem);
  padding: 1.5rem 0;
}
.transport button {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  color: var(--fg);
  background: var(--chip);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, background 0.12s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.transport button:active { transform: scale(0.94); }
.transport .skip {
  width: clamp(64px, 18vw, 84px);
  height: clamp(64px, 18vw, 84px);
  border-radius: 50%;
  font-size: clamp(1.8rem, 6vw, 2.2rem);
  line-height: 1;
  padding-bottom: 0.15em;
}
.transport .skip:hover { background: #2c3038; }
.transport .play-main {
  width: clamp(120px, 36vw, 168px);
  height: clamp(120px, 36vw, 168px);
  border-radius: 50%;
  font-size: clamp(1.5rem, 5vw, 2rem);
  letter-spacing: 0.04em;
  background: var(--accent);
  color: #000;
  box-shadow: 0 10px 30px -10px rgba(106, 169, 255, 0.55);
}
.transport .play-main:hover { background: var(--accent-press); }

/* Sleep */
.sleep { display: flex; gap: 0.8rem; align-items: center; justify-content: center; font-size: 0.95em; padding-bottom: 0.5rem; }
select { background: #0c0d10; color: var(--fg); border: 1px solid #333; border-radius: 4px; padding: 0.3rem 0.4rem; }

/* Toast */
#toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  z-index: 10;
}
