/* 2Bfy — Spotify-inspired music player */

.bfy-body {
  margin: 0;
  background: #0a0d14;
  color: #f1f1f1;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  overflow: hidden;
  height: 100vh;
}

.bfy-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 1fr 96px;
  grid-template-areas:
    "side main"
    "player player";
  height: 100vh;
}

/* ---------- Sidebar ---------- */
.bfy-sidebar {
  grid-area: side;
  background: #060810;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.75rem;
  gap: 1.25rem;
  overflow-y: auto;
}

.bfy-brand {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  text-decoration: none;
  color: inherit;
  padding: 0 0.75rem;
}

.bfy-brand-mark {
  background: linear-gradient(135deg, #ffb02e 0%, #ff3dbd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bfy-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bfy-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: #b8b8b8;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s, background 0.15s;
}

.bfy-nav-item:hover {
  color: #fff;
}

.bfy-nav-item.active {
  color: #fff;
}

.bfy-nav-item svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.bfy-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
  flex: 1;
}

.bfy-sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7a7a7a;
}

.bfy-playlists {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow-y: auto;
}

.bfy-playlists li a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: #b8b8b8;
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 4px;
}

.bfy-playlists li a:hover,
.bfy-playlists li a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.bfy-sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.bfy-back-site,
#openSettings {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #7a7a7a;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.bfy-back-site:hover,
#openSettings:hover {
  color: #fff;
}

.bfy-back-site svg,
#openSettings svg {
  width: 1rem;
  height: 1rem;
}

/* ---------- Main area ---------- */
.bfy-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #15131f 0%, #0a0d14 240px);
  overflow: hidden;
}

.bfy-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: rgba(10, 13, 20, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  z-index: 2;
}

.bfy-mobile-nav {
  display: none;
}

.bfy-nav-arrows {
  display: flex;
  gap: 0.4rem;
}

.bfy-icon-btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 50%;
  color: #f1f1f1;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.bfy-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.bfy-icon-btn:active {
  transform: scale(0.94);
}

.bfy-icon-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.bfy-icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.bfy-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  max-width: 380px;
  color: #000;
}

.bfy-search svg {
  width: 1rem;
  height: 1rem;
  color: #555;
}

.bfy-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9rem;
  font-family: inherit;
  color: #000;
  min-width: 0;
}

.bfy-top-actions {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.bfy-link {
  color: #b8b8b8;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bfy-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ---------- Content views ---------- */
.bfy-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem 2.5rem;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  scrollbar-width: thin;
}

.bfy-content::-webkit-scrollbar {
  width: 8px;
}

.bfy-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.bfy-loading {
  color: #7a7a7a;
  padding: 2rem;
  text-align: center;
}

.bfy-h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 1rem;
}

.bfy-h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 2rem 0 0.85rem;
}

.bfy-greeting {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 1rem;
}

/* Hero */
.bfy-hero {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  background: linear-gradient(135deg, #3a1c5a 0%, #6a1c4d 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.bfy-hero-art {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  background: #111;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.bfy-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.bfy-hero-meta .type {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.bfy-hero-meta h2 {
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.05;
}

.bfy-hero-meta .desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.bfy-hero-meta .play-btn {
  align-self: flex-start;
  background: #ffb02e;
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.85rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.bfy-hero-meta .play-btn:hover {
  background: #ffc55e;
}

/* Quick grid */
.bfy-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.bfy-quick {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.bfy-quick:hover {
  background: rgba(255, 255, 255, 0.12);
}

.bfy-quick-art {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.85);
  flex-shrink: 0;
}

.bfy-quick-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card grids */
.bfy-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.bfy-card {
  background: #16181f;
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bfy-card:hover {
  background: #1d2029;
}

.bfy-card-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: rgba(0, 0, 0, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.bfy-card h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bfy-card p {
  margin: 0;
  color: #a0a0a0;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Track list */
.bfy-tracklist {
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
}

.bfy-track {
  display: grid;
  grid-template-columns: 24px 36px 1fr 80px 40px;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  color: inherit;
  transition: background 0.15s;
}

.bfy-track:hover {
  background: rgba(255, 255, 255, 0.06);
}

.bfy-track.playing {
  color: #ffb02e;
}

.bfy-track .num {
  text-align: right;
  color: #a0a0a0;
  font-size: 0.9rem;
}

.bfy-track .art {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.85);
}

.bfy-track .name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bfy-track .name .title {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bfy-track .name .artist {
  color: #a0a0a0;
  font-size: 0.8rem;
}

.bfy-track .dur {
  color: #a0a0a0;
  font-size: 0.85rem;
  text-align: right;
}

.bfy-track .track-act {
  display: flex;
  justify-content: flex-end;
}

.bfy-track .track-act svg {
  width: 1rem;
  height: 1rem;
}

/* Search results */
.bfy-search-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  flex-wrap: wrap;
}

.bfy-search-tab {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  color: #f1f1f1;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

.bfy-search-tab.active {
  background: #fff;
  color: #000;
}

.bfy-search-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #7a7a7a;
}

/* Artist page */
.bfy-artist-hero {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  padding: 1.5rem 0 1.25rem;
  margin-bottom: 1rem;
}

.bfy-artist-portrait {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  color: rgba(0, 0, 0, 0.8);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.bfy-artist-meta .verified {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.bfy-artist-meta h1 {
  font-family: 'Syne', sans-serif;
  font-size: 4rem;
  font-weight: 800;
  margin: 0;
  line-height: 1;
}

.bfy-artist-meta .bio {
  margin: 0.85rem 0 0;
  color: #b8b8b8;
  max-width: 40rem;
}

.bfy-artist-stats {
  margin: 0.85rem 0 0;
  color: #a0a0a0;
  font-size: 0.85rem;
}

.bfy-artist-stats strong {
  color: #f1f1f1;
  font-weight: 700;
}

.bfy-artist-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.bfy-artist-actions .play-btn {
  background: #ffb02e;
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.bfy-artist-actions .play-btn:hover {
  background: #ffc55e;
}

.bfy-artist-actions .follow-btn {
  background: transparent;
  color: #f1f1f1;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.bfy-artist-actions .follow-btn.following {
  border-color: transparent;
  color: #a0a0a0;
}

/* Album page */
.bfy-album-hero {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  padding: 1.5rem 0 1.25rem;
  margin-bottom: 1rem;
}

.bfy-album-cover {
  width: 220px;
  height: 220px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 3rem;
  color: rgba(0, 0, 0, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.bfy-album-meta .type {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.bfy-album-meta h1 {
  font-family: 'Syne', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0.4rem 0 0.6rem;
  line-height: 1;
}

.bfy-album-meta .info {
  color: #b8b8b8;
  font-size: 0.9rem;
}

.bfy-album-meta .info strong {
  color: #f1f1f1;
}

.bfy-album-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.bfy-album-actions .play-btn {
  background: #ffb02e;
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Player bar ---------- */
.bfy-player {
  grid-area: player;
  background: #060810;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0 1rem;
  z-index: 5;
}

.bfy-now {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.bfy-now-art {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  background: #1d2029;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.bfy-now-meta {
  min-width: 0;
  flex: 1;
}

.bfy-now-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bfy-now-artist {
  color: #a0a0a0;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#nowLike.is-liked svg path {
  fill: #ffb02e;
  stroke: #ffb02e;
}

.bfy-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.bfy-ctrl-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bfy-play-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #fff;
  color: #000;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}

.bfy-play-btn:hover {
  transform: scale(1.04);
  background: #f1f1f1;
}

.bfy-play-btn svg {
  width: 1.4rem;
  height: 1.4rem;
}

#btnShuffle.is-on,
#btnRepeat.is-on {
  color: #ffb02e;
}

.bfy-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

.bfy-time {
  color: #a0a0a0;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
  text-align: center;
}

.bfy-progress-track {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  cursor: pointer;
}

.bfy-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: #fff;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.bfy-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s;
}

.bfy-progress-track:hover .bfy-progress-thumb {
  opacity: 1;
}

.bfy-progress-track:hover .bfy-progress-fill {
  background: #ffb02e;
}

.bfy-extras {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
}

#volSlider {
  width: 100px;
  accent-color: #ffb02e;
}

.bfy-viz {
  width: 200px;
  height: 36px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  margin-left: 0.5rem;
}

.bfy-viz[hidden] {
  display: none;
}

/* Toast */
.bfy-toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #ffb02e;
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 100;
}

.bfy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Queue panel */
.bfy-queue {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 96px;
  width: 360px;
  background: #0d0f17;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 10;
  transform: translateX(100%);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}

.bfy-queue.is-open {
  transform: translateX(0);
}

.bfy-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.bfy-queue-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.bfy-queue-empty {
  color: #7a7a7a;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

/* ---------- Modals ---------- */
.bfy-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.bfy-modal[hidden] {
  display: none;
}

.bfy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.bfy-modal-card {
  position: relative;
  background: #16181f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}

.bfy-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  background: #16181f;
  z-index: 1;
}

.bfy-modal-head h2 {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
}

.bfy-modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ---------- Settings ---------- */
.bfy-setting {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bfy-setting-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a0a0a0;
  font-weight: 700;
}

.bfy-setting-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bfy-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f1f1;
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.bfy-chip:hover {
  background: rgba(255, 255, 255, 0.12);
}

.bfy-chip.is-on {
  background: var(--bfy-accent, #ffb02e);
  color: #000;
  border-color: transparent;
  font-weight: 700;
}

.bfy-color-grid {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.bfy-color {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s, border-color 0.15s;
}

.bfy-color:hover {
  transform: scale(1.06);
}

.bfy-color.is-on {
  border-color: #fff;
}

.bfy-setting-note {
  color: #7a7a7a;
  font-size: 0.8rem;
  margin: 0;
}

/* ---------- Premium modal ---------- */
.bfy-premium-intro {
  background: rgba(255, 176, 46, 0.12);
  border: 1px solid rgba(255, 176, 46, 0.3);
  color: #ffd479;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  border-radius: 8px;
  margin: 0;
}

.bfy-premium-tier {
  background: #0d0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.bfy-premium-tier--pro {
  background: linear-gradient(180deg, rgba(255, 176, 46, 0.08), rgba(255, 61, 189, 0.08));
  border-color: rgba(255, 176, 46, 0.3);
}

.bfy-premium-tier h3 {
  margin: 0 0 0.4rem 0;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bfy-premium-tier p {
  color: #a0a0a0;
  margin: 0 0 0.85rem 0;
  font-size: 0.9rem;
}

.bfy-premium-tier ul {
  list-style: none;
  margin: 0 0 0.85rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bfy-premium-tier li {
  font-size: 0.9rem;
  padding-left: 1.25rem;
  position: relative;
}

.bfy-premium-tier li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--bfy-accent, #ffb02e);
  font-weight: 700;
}

.bfy-premium-cta {
  background: var(--bfy-accent, #ffb02e);
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.4rem;
  font-weight: 700;
  font-family: inherit;
  cursor: not-allowed;
  opacity: 0.85;
}

/* ---------- Share modal ---------- */
.bfy-share-link {
  display: flex;
  gap: 0.5rem;
}

.bfy-share-link input {
  flex: 1;
  background: #0d0f17;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  color: #f1f1f1;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  outline: none;
  min-width: 0;
}

.bfy-share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}

.bfy-share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.85rem 0.5rem;
  color: #f1f1f1;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.8rem;
  transition: background 0.15s;
}

.bfy-share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.bfy-share-btn svg {
  width: 1.4rem;
  height: 1.4rem;
}

/* ---------- Quality badge ---------- */
.bfy-q {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
}

.bfy-q--mp3 {
  background: rgba(255, 255, 255, 0.08);
  color: #b8b8b8;
}

.bfy-q--flac {
  background: rgba(255, 176, 46, 0.15);
  color: #ffb02e;
  border: 1px solid rgba(255, 176, 46, 0.3);
}

.bfy-q--wav {
  background: linear-gradient(135deg, rgba(255, 176, 46, 0.15), rgba(255, 61, 189, 0.15));
  color: #fff;
  border: 1px solid rgba(255, 61, 189, 0.4);
}

.bfy-track .qcol {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.bfy-track .act-col {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
}

.bfy-icon-btn--xs {
  width: 1.6rem;
  height: 1.6rem;
}

.bfy-icon-btn--xs svg {
  width: 0.85rem;
  height: 0.85rem;
}

.bfy-reduced * {
  transition: none !important;
  animation: none !important;
}

/* Light theme */
body.bfy-light.bfy-body,
body.bfy-light {
  --bfy-bg: #f5f5f7;
  --bfy-bg-deep: #ffffff;
  --bfy-panel: #ffffff;
  --bfy-text: #1a1a1a;
  --bfy-muted: #666;
  --bfy-line: rgba(0, 0, 0, 0.08);
}

body.bfy-light.bfy-body,
body.bfy-light {
  background: #f5f5f7;
  color: #1a1a1a;
}

body.bfy-light .bfy-sidebar {
  background: #fff;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

body.bfy-light .bfy-main {
  background: linear-gradient(180deg, #fff 0%, #f5f5f7 240px);
}

body.bfy-light .bfy-topbar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.bfy-light .bfy-content {
  color: #1a1a1a;
}

body.bfy-light .bfy-card {
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

body.bfy-light .bfy-card:hover {
  background: #fafafa;
}

body.bfy-light .bfy-quick {
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

body.bfy-light .bfy-quick:hover {
  background: #fafafa;
}

body.bfy-light .bfy-track:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.bfy-light .bfy-track .name .artist,
body.bfy-light .bfy-track .num,
body.bfy-light .bfy-track .dur,
body.bfy-light .bfy-card p,
body.bfy-light .bfy-now-artist,
body.bfy-light .bfy-time,
body.bfy-light .bfy-search-empty,
body.bfy-light .bfy-queue-empty,
body.bfy-light .bfy-artist-stats {
  color: #888;
}

body.bfy-light .bfy-nav-item {
  color: #555;
}

body.bfy-light .bfy-nav-item.active,
body.bfy-light .bfy-nav-item:hover {
  color: #000;
}

body.bfy-light .bfy-modal-card {
  background: #fff;
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.08);
}

body.bfy-light .bfy-modal-head {
  background: #fff;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.bfy-light .bfy-premium-tier {
  background: #fafafa;
  color: #1a1a1a;
}

body.bfy-light .bfy-chip {
  background: rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.1);
}

body.bfy-light .bfy-chip.is-on {
  color: #000;
}

body.bfy-light .bfy-share-btn {
  background: #fafafa;
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.08);
}

body.bfy-light .bfy-icon-btn {
  background: rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
}

body.bfy-light .bfy-icon-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

body.bfy-light .bfy-progress-track {
  background: rgba(0, 0, 0, 0.1);
}

body.bfy-light .bfy-progress-fill,
body.bfy-light .bfy-progress-thumb {
  background: var(--bfy-accent, #ffb02e);
}

body.bfy-light .bfy-play-btn {
  background: var(--bfy-accent, #ffb02e);
  color: #000;
}

body.bfy-light .bfy-player {
  background: #fff;
  border-top-color: rgba(0, 0, 0, 0.08);
}

body.bfy-light .bfy-viz {
  background: rgba(0, 0, 0, 0.04);
}

body.bfy-light .bfy-search input {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #000;
}

body.bfy-light .bfy-search {
  background: #fff;
  color: #000;
}

body.bfy-light .bfy-link {
  color: #555;
  border-color: rgba(0, 0, 0, 0.15);
}

body.bfy-light .bfy-share-link input {
  background: #fafafa;
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.1);
}

body.bfy-light .bfy-modal-backdrop {
  background: rgba(0, 0, 0, 0.4);
}

body.bfy-light .bfy-back-site,
body.bfy-light #openSettings {
  color: #555;
}

body.bfy-light .bfy-back-site:hover,
body.bfy-light #openSettings:hover {
  color: #000;
}

body.bfy-light .bfy-queue {
  background: #fff;
  border-left-color: rgba(0, 0, 0, 0.08);
}

body.bfy-light .bfy-queue-head {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.bfy-light .bfy-playlists li a {
  color: #555;
}

body.bfy-light .bfy-playlists li a:hover,
body.bfy-light .bfy-playlists li a.active {
  background: rgba(0, 0, 0, 0.06);
  color: #000;
}

body.bfy-light .bfy-search-tab.active,
body.bfy-light .bfy-chip.is-on {
  background: #000;
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .bfy-extras .bfy-viz {
    display: none;
  }
}

@media (max-width: 900px) {
  .bfy-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "player";
  }

  .bfy-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 96px;
    width: 280px;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }

  .bfy-sidebar.is-open {
    transform: translateX(0);
  }

  .bfy-mobile-nav {
    display: inline-flex;
  }

  .bfy-extras #volSlider {
    display: none;
  }

  .bfy-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .bfy-hero-art {
    width: 140px;
    height: 140px;
  }

  .bfy-hero-meta h2 {
    font-size: 2rem;
  }

  .bfy-artist-meta h1,
  .bfy-album-meta h1 {
    font-size: 2.4rem;
  }

  .bfy-artist-hero,
  .bfy-album-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .bfy-artist-portrait,
  .bfy-album-cover {
    width: 160px;
    height: 160px;
  }

  .bfy-queue {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .bfy-content {
    padding: 1rem;
  }

  .bfy-player {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .bfy-now {
    grid-column: 1 / -1;
  }

  .bfy-controls {
    grid-column: 1 / -1;
  }

  .bfy-extras {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .bfy-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
