/* ── Base button ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0.55rem 1.1rem;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), opacity var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
  line-height: 1.4;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── Button variants ── */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover:not(:disabled) {
  background: var(--color-tag-bg);
  border-color: var(--color-text-light);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

/* ── Reveal button ── */
.btn-reveal {
  width: 100%;
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-md);
  letter-spacing: 0.01em;
  transition: background var(--t-fast), color var(--t-fast), opacity 0.2s ease, transform var(--t-fast);
}

.btn-reveal:hover:not(:disabled) {
  background: var(--color-accent);
  color: #fff;
}

.btn-reveal.fading-out {
  opacity: 0;
  pointer-events: none;
}

/* ── Navigation row ── */
.card-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.btn-nav {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.btn-nav:hover:not(:disabled) {
  background: var(--color-tag-bg);
  border-color: var(--color-text-light);
}

.card-counter {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 500;
  min-width: 90px;
  text-align: center;
}

/* ── Keyboard hint ── */
.keyboard-hint {
  text-align: center;
  font-size: 0.72rem;
  color: var(--color-text-light);
  letter-spacing: 0.01em;
}

/* ── Playlist header group ── */
.playlist-header-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.playlist-select {
  padding: 0.45rem 0.65rem;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  outline: none;
  cursor: pointer;
  max-width: 160px;
  transition: border-color var(--t-fast);
}

.playlist-select:focus {
  border-color: var(--color-accent);
}

.playlist-card-count {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.btn-manage {
  padding: 0.45rem 0.55rem;
}

/* ── Filter icon ── */
.icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ── Mode toggle ── */
.btn-mode-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  padding: 0;
  flex-shrink: 0;
}

.btn-mode-toggle:hover {
  background: var(--color-tag-bg);
  border-color: var(--color-text-light);
}

/* ── Header auth ── */
.header-auth {
  display: flex;
  align-items: center;
  margin-left: 0.25rem;
  flex-shrink: 0;
}

.btn-sign-in {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-light);
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}

.btn-sign-in:hover {
  background: var(--color-tag-bg);
  color: var(--color-text);
  border-color: var(--color-text-light);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .card-nav {
    gap: 0.75rem;
  }

  .btn-nav {
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
  }

  .card-counter {
    font-size: 0.78rem;
    min-width: 70px;
  }

  .keyboard-hint {
    display: none;
  }

  .playlist-header-group {
    gap: 0.25rem;
  }

  .playlist-select {
    max-width: 120px;
    font-size: 0.78rem;
    padding: 0.35rem 0.45rem;
  }

  .btn-mode-toggle {
    width: 28px;
    height: 28px;
  }
}
