/* ==========================================================
   ESENCY SPOTIFY-STYLE MUSIC PLAYER (with color variables)
   ========================================================== */

/* === Color System (inherits from global styles.css) === */
:root {
  --gradient-start: #461a1a; /* optional purple tone for header */
  --gradient-end: var(--bg-1);
  --overlay-dark: rgba(0, 0, 0, 0.7);
  --shadow-strong: rgba(0, 0, 0, 0.7);
  --shadow-soft: rgba(255, 204, 0, 0.1);
  --tag-bg: rgba(255, 255, 255, 0.1);
  --tag-border: rgba(255, 255, 255, 0.2);
  --hover-bg: rgba(255, 255, 255, 0.08);
}

/* ===== MAIN WRAPPER ===== */
.music-wrap {
  max-width: 900px;
  margin: 80px auto;
  padding: 20px;
  background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-end) 60%);
  border-radius: 20px;
  color: var(--text);
  box-shadow: 0 8px 40px var(--shadow-strong);
}

/* ===== HEADER ===== */
.playlist-header {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 30px;
}

.playlist-cover {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 20px var(--shadow-strong);
}

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

.playlist-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.playlist-info h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 6px 0 12px;
  color: var(--text);
}

.playlist-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}

.artist-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== CONTROLS ===== */
.player-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 25px 0;
}

.player-controls button {
  background: var(--brand);
  color: var(--black);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.player-controls button:hover {
  background: var(--accent);
  color: var(--text);
  transform: scale(1.1);
}

/* ===== TAGS ===== */
.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.genre-tags .tag {
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  color: var(--text);
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.genre-tags .tag:hover {
  background: var(--brand);
  color: var(--black);
}

/* ===== PLAYLIST TABLE ===== */
.playlist-table {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.playlist-table li {
  display: grid;
  grid-template-columns: 30px 60px 1fr 50px;
  align-items: center;
  gap: 15px;
  padding: 10px 15px;
  border-radius: 8px;
  transition: background 0.3s;
}

.playlist-table li:hover {
  background: var(--hover-bg);
}

.playlist-table img {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
}

.song-info {
  display: flex;
  flex-direction: column;
}

.song-title {
  font-weight: 600;
  color: var(--text);
}

.song-artist {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.song-duration {
  text-align: right;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .playlist-header {
    flex-direction: column;
    text-align: center;
  }
  .playlist-cover {
    width: 150px;
    height: 150px;
  }
  .music-wrap {
    margin: 40px 10px;
  }
}
