.tunes-shell {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 2rem;
  z-index: 50;
  pointer-events: none;
}

.tunes-demo body {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(29, 185, 84, .2), transparent 13rem),
    radial-gradient(circle at 82% 18%, rgba(65, 49, 244, .26), transparent 13rem),
    linear-gradient(135deg, #111827, #020617);
}

.tunes-demo .tunes-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .75rem;
  pointer-events: auto;
}

.tunes-demo .tunes-phone {
  width: min(21.5rem, calc(100vw - 1.5rem));
  height: min(37.5rem, calc(100vh - 1.5rem));
  border-width: 3px;
  box-shadow: 0 1.25rem 3rem #000b;
}

.tunes-shell--open {
  display: flex;
  pointer-events: auto;
}

.tunes-phone {
  width: 25rem;
  max-width: calc(100vw - 2rem);
  height: 45rem;
  max-height: calc(100vh - 2rem);
  background: #0f0f0f;
  border: 4px solid #000;
  border-radius: .75rem;
  box-shadow: 0 1.5rem 4rem #000d;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tunes-hero {
  background: linear-gradient(135deg, #4131f4 0%, #262626 52%, #0f0f0f 100%);
  padding: 1.25rem 1.25rem 2rem;
}

.tunes-topbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 2.75rem;
}

.tunes-round-btn,
.tunes-player-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #00000080;
  transition: background .15s, transform .15s;
}

.tunes-close {
  margin-left: auto;
}

.tunes-round-btn:hover,
.tunes-player-btn:hover {
  background: #ffffff20;
  transform: translateY(-1px);
}

.tunes-kicker {
  color: #ffffffbf;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: .35rem;
}

.tunes-title {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
}

.tunes-connection {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: .85rem;
  padding: .35rem .65rem;
  border-radius: 9999px;
  background: #00000080;
  color: #ffffffbf;
  font-size: .78rem;
  font-weight: 700;
}

.tunes-connection span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tunes-connection.is-connected {
  background: #1db954;
  color: #000;
}

.tunes-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem;
  padding-bottom: .75rem;
}

.tunes-content::-webkit-scrollbar,
.tunes-results::-webkit-scrollbar {
  display: none;
}

.tunes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.tunes-tile {
  min-height: 4.25rem;
  border-radius: .5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
  background: #262626;
  text-align: left;
  padding-right: .75rem;
}

.tunes-tile i {
  width: 4.25rem;
  height: 4.25rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4131f4, #c3f0d8);
  color: #fff;
  flex-shrink: 0;
}

.tunes-tile span,
.tunes-featured strong,
.tunes-player-meta strong,
.tunes-result strong,
.tunes-library-card strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tunes-featured {
  width: 100%;
  min-height: 8rem;
  border-radius: .5rem;
  background: linear-gradient(135deg, #1db954, #0f0f0f);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1rem;
  text-align: left;
  margin-bottom: 1.25rem;
}

.tunes-featured small,
.tunes-library-card small,
.tunes-player-meta small,
.tunes-result small {
  display: block;
  color: #ffffff80;
  font-size: .8rem;
  line-height: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tunes-featured strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.tunes-featured i {
  font-size: 2.75rem;
  color: #fff;
}

.tunes-section-title {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

.tunes-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.tunes-section-row .tunes-section-title {
  margin-bottom: 0;
}

.tunes-small-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: #1db954;
  color: #000;
}

.tunes-search {
  height: 3rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #fff;
  color: #111;
  border-radius: .5rem;
  padding: 0 .75rem;
  margin-bottom: .75rem;
}

.tunes-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  color: #111;
}

.tunes-search button {
  color: #111;
  font-weight: 700;
  font-size: .875rem;
}

.tunes-notice {
  min-height: 1.25rem;
  color: #fca5a5;
  font-size: .8rem;
}

.tunes-results {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.tunes-result {
  width: 100%;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) 2rem 2rem;
  align-items: center;
  gap: .75rem;
  min-height: 4rem;
  padding: .35rem;
  border-radius: .5rem;
  color: #fff;
  text-align: left;
}

.tunes-result:hover {
  background: #ffffff12;
}

.tunes-result img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: .25rem;
  background: #262626;
  flex-shrink: 0;
}

.tunes-result span {
  min-width: 0;
  overflow: hidden;
}

.tunes-add-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  color: #1ed760;
}

.tunes-result > i:last-child {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  justify-self: end;
}

.tunes-result--playlist {
  grid-template-columns: 3.5rem minmax(0, 1fr) 2rem;
}

.tunes-empty {
  color: #ffffff80;
  text-align: center;
  padding: 2rem 0;
}

.tunes-library {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.tunes-library-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 5rem;
  border-radius: .5rem;
  background: #262626;
  color: #fff;
  padding: .75rem;
  text-align: left;
}

.tunes-library-card span {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: .25rem;
  background: #404040;
  flex-shrink: 0;
}

.tunes-library-card span img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: .25rem;
}

.tunes-library-card .tunes-liked {
  background: linear-gradient(135deg, #4131f4, #c3f0d8);
}

.tunes-back {
  color: #ffffffbf;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  font-size: .875rem;
}

.tunes-playlist-head {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tunes-playlist-art {
  width: 7rem;
  height: 7rem;
  border-radius: .35rem;
  background: linear-gradient(135deg, #404040, #181818);
  display: grid;
  place-items: center;
  color: #1ed760;
  overflow: hidden;
  flex-shrink: 0;
}

.tunes-playlist-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tunes-playlist-head small,
.tunes-playlist-head p {
  color: #ffffff80;
  font-size: .8rem;
}

.tunes-playlist-head h2 {
  font-size: 1.75rem;
  line-height: 2rem;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tunes-playlist-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}

.tunes-play-btn {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  background: #1db954;
  color: #000;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.tunes-small-text-btn {
  color: #ffffff80;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
}

.tunes-player {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) 2.5rem 2.5rem;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: #181818;
  border-top: 1px solid #ffffff12;
}

.tunes-player-art {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: .25rem;
  overflow: hidden;
  background: #262626;
  color: #1ed760;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.tunes-player-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tunes-player-meta {
  min-width: 0;
  overflow: hidden;
}

.tunes-player-meta strong,
.tunes-player-meta small {
  display: block;
}

.tunes-player-meta input {
  width: 100%;
  height: .3rem;
  margin-top: .35rem;
}

.tunes-player-btn {
  background: #262626;
  flex-shrink: 0;
}

.tunes-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #000;
  padding: .5rem .75rem .75rem;
}

.tunes-tabs button {
  color: #ffffff80;
  display: grid;
  place-items: center;
  gap: .2rem;
  font-size: .72rem;
}

.tunes-tabs button.active {
  color: #fff;
}

.tunes-tabs i {
  font-size: 1.1rem;
}

@media (max-width: 700px) {
  .tunes-shell {
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }

  .tunes-phone {
    height: calc(100vh - 2rem);
  }
}
