@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --maroon: #5B1A22;
  --maroon-deep: #3E1116;
  --saffron: #C66E19;
  --gold: #E8B84B;
  --cream: #FBF1E2;
  --ink: #2B1B12;
  --card: #FFFBF3;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(232,184,75,0.25), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(91,26,34,0.25), transparent 45%),
    var(--cream);
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 14px 60px;
}

header {
  width: 100%;
  max-width: 480px;
  text-align: center;
  margin-bottom: 18px;
}

header .eyebrow {
  letter-spacing: .18em;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--maroon);
  opacity: .75;
  font-weight: 600;
}

header h1 {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--maroon-deep);
}

header h1 span {
  color: var(--saffron);
}

/* Playlist nav */
nav.playlists {
  width: 100%;
  max-width: 480px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scrollbar-width: none;
}

nav.playlists::-webkit-scrollbar {
  display: none;
}

nav.playlists button {
  flex: 0 0 auto;
  background: var(--card);
  border: 1px solid rgba(91,26,34,0.15);
  color: var(--maroon-deep);
  padding: 9px 16px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}

nav.playlists button.active {
  background: linear-gradient(135deg, var(--saffron), var(--maroon));
  color: #E8B84B;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(91,26,34,0.35);
}

/* Player card */
.player {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(62,17,22,0.15);
  padding: 26px 22px 20px;
  position: relative;
  overflow: hidden;
}

.player:before {
  content: "";
  position: absolute;
  top: -60px;
  left: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(232,184,75,0.35), transparent 70%);
}

.art-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.art-ring {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(from 0deg, var(--saffron), var(--gold), var(--maroon), var(--saffron));
  padding: 6px;
  animation: none;
}

.art-ring.playing {
  animation: spin 10s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.art-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--card);
  background: #eee;
}

.track-info {
  text-align: center;
  margin-bottom: 6px;
}

/* Sindhi typography updates */
.track-title {
  font-family: 'MB Sindhi', 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', serif;
  direction: rtl;
  font-size: 20px;
  line-height: 1.6;
  color: var(--maroon-deep);
  min-height: 34px;
}

.track-album {
  font-family: 'MB Sindhi', 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', serif;
  direction: rtl;
  font-size: 14px;
  color: var(--saffron);
  opacity: .9;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 6px;
  font-size: 11px;
  color: var(--maroon-deep);
  opacity: .8;
}

input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 4px;
  background: rgba(91,26,34,0.15);
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--maroon);
  cursor: pointer;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 14px;
}

.controls button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--maroon-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-play {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #B85B18, #3E1116);
  color: #000 !important;
  box-shadow: 0 6px 18px rgba(62, 17, 22, 0.55);
}

.btn-side svg {
  width: 22px;
  height: 22px;
}

.btn-play svg {
  width: 24px;
  height: 24px;
}

.btn-heart {
  position: absolute;
  top: 14px;
  right: 16px;
}

.btn-heart svg {
  width: 20px;
  height: 20px;
}

.btn-heart.active svg {
  fill: var(--maroon);
}

.status {
  text-align: center;
  font-size: 12px;
  color: var(--maroon-deep);
  opacity: .65;
  margin-top: 14px;
}

/* Track list */
.tracklist {
  width: 100%;
  max-width: 480px;
  margin-top: 18px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(62,17,22,0.1);
  padding: 6px 0;
  max-height: 280px;
  overflow-y: auto;
}

.tracklist .row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(91,26,34,0.07);
}

.tracklist .row:last-child {
  border-bottom: none;
}

.tracklist .row.current {
  background: rgba(217,130,43,0.12);
}

.tracklist .idx {
  font-size: 11px;
  color: var(--saffron);
  width: 20px;
  flex: 0 0 auto;
}

/* Sindhi font for track items */
.tracklist .name {
  font-family: 'MB Sindhi', 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', serif;
  direction: rtl;
  font-size: 15px;
  color: var(--ink);
  flex: 1;
}

footer {
  margin-top: 22px;
  text-align: center;
  font-size: 11px;
  color: var(--maroon-deep);
  opacity: .55;
}

@media (prefers-reduced-motion: reduce) {
  .art-ring.playing { animation: none; }
}