/* ─── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Page layout (landing + setup) ────────────────────────────── */
body.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d0d;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #e0e0e0;
  padding: 2rem;
}

.card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 3rem 2.5rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
}

.logo svg {
  width: 100%;
  height: 100%;
  fill: #1db954;
}

.card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 1rem;
  color: #999;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.btn-connect {
  display: inline-block;
  background: #1db954;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.btn-connect:hover { background: #1ed760; }
.btn-connect:active { transform: scale(0.97); }

.note {
  font-size: 0.8rem !important;
  color: #555 !important;
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

/* ─── Setup page ────────────────────────────────────────────────── */
.check {
  width: 56px;
  height: 56px;
  background: #1db954;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
}

.url-box {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.url-box input {
  flex: 1;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: #ccc;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  outline: none;
  min-width: 0;
}

.url-box button {
  background: #1db954;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s;
}

.url-box button:hover { background: #1ed760; }

.instructions {
  text-align: left;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.instructions h2 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.instructions ol {
  padding-left: 1.25rem;
  color: #bbb;
  font-size: 0.9rem;
  line-height: 1.9;
}

.instructions strong { color: #e0e0e0; }

.btn-back {
  display: inline-block;
  color: #555;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.btn-back:hover { color: #999; }

/* ─── Setup page – wider card ───────────────────────────────────── */
.setup-card {
  max-width: 620px;
}

/* ─── Live preview ───────────────────────────────────────────────── */
.preview-wrap {
  display: flex;
  justify-content: flex-start;
  background: #2a2a2a;
  border-radius: 10px;
  padding: 20px 16px;
  margin: 1.5rem 0 0;
  transition: justify-content 0.2s;
}

.preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 10px;
  padding: 12px 16px;
  max-width: 380px;
}

.preview-accent {
  width: 4px;
  height: 38px;
  background: #1db954;
  border-radius: 4px;
  flex-shrink: 0;
}

.preview-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.preview-song {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.preview-artist {
  font-size: 0.78rem;
  color: #aaaaaa;
  white-space: nowrap;
}

/* ─── Configurator ───────────────────────────────────────────────── */
.config-section {
  text-align: left;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}

.config-section h2 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.config-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #1e1e1e;
}

.config-row:last-child {
  border-bottom: none;
}

.config-row > label {
  width: 90px;
  font-size: 0.85rem;
  color: #bbb;
  flex-shrink: 0;
}

.toggle-group {
  display: flex;
  gap: 0.4rem;
}

.toggle {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #888;
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.toggle.active {
  background: #1db954;
  color: #000;
  border-color: #1db954;
  font-weight: 700;
}

.color-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.color-control input[type="color"] {
  width: 36px;
  height: 28px;
  border: 1px solid #444;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  padding: 2px;
}

.color-hex {
  font-size: 0.78rem;
  font-family: 'Courier New', monospace;
  color: #777;
  min-width: 54px;
}

.color-control input[type="range"] {
  width: 90px;
  accent-color: #1db954;
}

.opacity-label {
  font-size: 0.78rem;
  color: #777;
  min-width: 32px;
}

/* ─── Overlay (OBS browser source) ──────────────────────────────── */
body.overlay-body {
  background: transparent;
  margin: 0;
  padding: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.overlay-body.right {
  justify-content: flex-end;
}

.overlay-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 14px 20px;
  max-width: 480px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.overlay-card.right {
  flex-direction: row-reverse;
}

.overlay-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.overlay-accent {
  width: 4px;
  height: 44px;
  background: #1db954;
  border-radius: 4px;
  flex-shrink: 0;
}

.overlay-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.overlay-text.right {
  text-align: right;
}

.overlay-song {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overlay-artist {
  font-size: 0.82rem;
  font-weight: 400;
  color: #aaaaaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
