/* ================================================================
   NEOMORPH PLAYER – style.css
   Desain Neumorphism dengan dukungan Dark/Light Mode
   Penulis : NeumorphPlayer Team
   Versi   : 1.0.0
================================================================ */

/* ================================================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   – Light Mode & Dark Mode didefinisikan masing-masing
================================================================ */

/* ── Light Mode (Default) ──────────────────────────────────── */
:root,
body.light-mode {
  /* Warna Dasar Neumorphism */
  --bg:             #e8ecf1;
  --surface:        #e8ecf1;
  --shadow-dark:    #b8bec8;
  --shadow-light:   #ffffff;

  /* Warna Aksen */
  --accent:         #7c5cbf;
  --accent-2:       #e44d7b;
  --accent-glow:    rgba(124, 92, 191, 0.35);
  --accent-grad:    linear-gradient(135deg, #7c5cbf 0%, #e44d7b 100%);

  /* Teks */
  --text-primary:   #2d3142;
  --text-secondary: #6b7280;
  --text-muted:     #9ca3af;

  /* Elemen UI */
  --border-radius:  18px;
  --border-radius-sm: 10px;
  --border-radius-pill: 50px;

  /* Shadows Neumorphism */
  --neu-shadow:
    6px 6px 14px var(--shadow-dark),
    -6px -6px 14px var(--shadow-light);
  --neu-shadow-sm:
    3px 3px 8px var(--shadow-dark),
    -3px -3px 8px var(--shadow-light);
  --neu-shadow-inset:
    inset 4px 4px 10px var(--shadow-dark),
    inset -4px -4px 10px var(--shadow-light);
  --neu-shadow-pressed:
    inset 3px 3px 8px var(--shadow-dark),
    inset -3px -3px 8px var(--shadow-light);
  --neu-shadow-lg:
    10px 10px 24px var(--shadow-dark),
    -10px -10px 24px var(--shadow-light);

  /* Transisi */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow:   0.5s ease;
}

/* ── Dark Mode ─────────────────────────────────────────────── */
body.dark-mode {
  --bg:             #1e2030;
  --surface:        #1e2030;
  --shadow-dark:    #14161f;
  --shadow-light:   #282b3a;

  --accent:         #a07cff;
  --accent-2:       #ff6b9d;
  --accent-glow:    rgba(160, 124, 255, 0.35);
  --accent-grad:    linear-gradient(135deg, #a07cff 0%, #ff6b9d 100%);

  --text-primary:   #e8ecf1;
  --text-secondary: #9aa1b9;
  --text-muted:     #6b7280;

  /* Re-define Shadows Neumorphism for Safari/Chrome compatibility */
  --neu-shadow:
    6px 6px 14px var(--shadow-dark),
    -6px -6px 14px var(--shadow-light);
  --neu-shadow-sm:
    3px 3px 8px var(--shadow-dark),
    -3px -3px 8px var(--shadow-light);
  --neu-shadow-inset:
    inset 4px 4px 10px var(--shadow-dark),
    inset -4px -4px 10px var(--shadow-light);
  --neu-shadow-pressed:
    inset 3px 3px 8px var(--shadow-dark),
    inset -3px -3px 8px var(--shadow-light);
  --neu-shadow-lg:
    10px 10px 24px var(--shadow-dark),
    -10px -10px 24px var(--shadow-light);
}

/* ================================================================
   2. RESET & BASE STYLES
================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  position: relative;
}

ul { list-style: none; }
button { cursor: pointer; border: none; outline: none; background: none; font-family: inherit; }
input { font-family: inherit; border: none; outline: none; }
a { text-decoration: none; color: inherit; }

/* ================================================================
   3. BACKGROUND BLOB ANIMASI
================================================================ */
.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: blobFloat 15s ease-in-out infinite;
}

.blob-1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -150px; left: -150px;
  animation-delay: 0s;
}
.blob-2 {
  width: 400px; height: 400px;
  background: var(--accent-2);
  bottom: -100px; right: -100px;
  animation-delay: -5s;
}
.blob-3 {
  width: 300px; height: 300px;
  background: #06b6d4;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -10s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -30px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.95); }
}

/* ================================================================
   4. APP WRAPPER & LAYOUT
================================================================ */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ================================================================
   5. HEADER
================================================================ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-radius: var(--border-radius);
  background: var(--surface);
  box-shadow: var(--neu-shadow);
  transition: box-shadow var(--transition-normal), background var(--transition-slow);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.app-title {
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* ================================================================
   6. MAIN CONTENT (PLAYER + PLAYLIST)
================================================================ */
.main-content {
  flex: 1;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

/* ================================================================
   7. TOMBOL NEUMORPHISM (NEU-BTN)
================================================================ */
.neu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 50%;
  box-shadow: var(--neu-shadow-sm);
  transition:
    box-shadow var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.neu-btn:hover {
  color: var(--accent);
}

.neu-btn:active,
.neu-btn.active {
  box-shadow: var(--neu-shadow-pressed);
  transform: scale(0.96);
}

/* Ukuran tombol */
.neu-btn.xs { width: 34px; height: 34px; font-size: 13px; }
.neu-btn.sm { width: 42px; height: 42px; font-size: 15px; }
.neu-btn.icon-btn { width: 46px; height: 46px; font-size: 16px; }
.neu-btn.md { width: 52px; height: 52px; font-size: 20px; }

/* Tombol Play Utama */
.play-btn {
  width: 70px !important;
  height: 70px !important;
  border-radius: 50% !important;
  background: var(--accent-grad) !important;
  color: #fff !important;
  font-size: 24px !important;
  box-shadow:
    6px 6px 14px var(--shadow-dark),
    -6px -6px 14px var(--shadow-light),
    0 0 30px var(--accent-glow) !important;
  transition:
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    filter var(--transition-fast) !important;
}

.play-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.06);
  color: #fff !important;
  box-shadow:
    6px 6px 14px var(--shadow-dark),
    -6px -6px 14px var(--shadow-light),
    0 0 40px var(--accent-glow) !important;
}

.play-btn:active {
  transform: scale(0.95);
  box-shadow:
    inset 3px 3px 8px rgba(0,0,0,0.3),
    inset -3px -3px 8px rgba(255,255,255,0.1),
    0 0 20px var(--accent-glow) !important;
}

/* Tombol Aktif (shuffle, repeat) */
.neu-btn.is-active {
  color: var(--accent) !important;
  box-shadow:
    var(--neu-shadow-pressed),
    0 0 12px var(--accent-glow) !important;
}

/* ================================================================
   8. PLAYER PANEL
================================================================ */
.player-panel {
  background: var(--surface);
  border-radius: 28px;
  padding: 32px 28px;
  box-shadow: var(--neu-shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  transition: box-shadow var(--transition-normal), background var(--transition-slow);
}

/* ── Album Art ─────────────────────────────────────────────── */
.album-art-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.album-ring {
  width: 240px; height: 240px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--neu-shadow-lg);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  z-index: 2;
  transition: box-shadow var(--transition-normal);
}

/* Efek vinyl berputar saat musik diputar */
.album-ring.spinning {
  animation: vinylSpin 6s linear infinite;
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.album-cover-container {
  width: 220px; height: 220px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}

#album-canvas {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: block;
}

/* Bayangan bawah album */
.album-shadow {
  width: 180px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(18px);
  opacity: 0.25;
  margin-top: -10px;
  z-index: 1;
  transition: opacity var(--transition-normal);
}

.album-ring.spinning ~ .album-shadow {
  opacity: 0.45;
  animation: shadowPulse 2s ease-in-out infinite;
}

@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.45; }
  50%       { transform: scaleX(1.1); opacity: 0.6; }
}

/* ── Equalizer Bars ────────────────────────────────────────── */
.eq-bars {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.eq-bars.active { opacity: 1; }

.eq-bars span {
  display: block;
  width: 4px;
  background: #fff;
  border-radius: 2px;
  animation: eqAnim 0.8s ease-in-out infinite alternate;
  min-height: 4px;
}

/* Setiap bar memiliki delay berbeda untuk tampilan dinamis */
.eq-bars span:nth-child(1) { animation-delay: 0.0s; }
.eq-bars span:nth-child(2) { animation-delay: 0.1s; }
.eq-bars span:nth-child(3) { animation-delay: 0.2s; }
.eq-bars span:nth-child(4) { animation-delay: 0.05s; }
.eq-bars span:nth-child(5) { animation-delay: 0.15s; }
.eq-bars span:nth-child(6) { animation-delay: 0.25s; }
.eq-bars span:nth-child(7) { animation-delay: 0.08s; }
.eq-bars span:nth-child(8) { animation-delay: 0.18s; }

@keyframes eqAnim {
  from { height: 4px; }
  to   { height: 22px; }
}

/* ── Info Lagu ─────────────────────────────────────────────── */
.song-info {
  text-align: center;
  width: 100%;
}

.song-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
  transition: color var(--transition-slow);
}

.song-artist {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 2px;
}

.song-album-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Action Row (Like & Share) ──────────────────────────────── */
.action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  justify-content: center;
}

.song-genre-badge {
  padding: 4px 16px;
  border-radius: 50px;
  background: var(--surface);
  box-shadow: var(--neu-shadow-sm);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-section {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.time-display {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  min-width: 32px;
  text-align: center;
}

.progress-container {
  flex: 1;
  cursor: pointer;
  padding: 8px 0;
}

.progress-track {
  height: 6px;
  border-radius: 3px;
  background: var(--surface);
  box-shadow: var(--neu-shadow-inset);
  position: relative;
  overflow: visible;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-grad);
  width: 0%;
  transition: width 0.2s linear;
  position: relative;
}

.progress-thumb {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--neu-shadow-sm), 0 0 6px var(--accent-glow);
  top: 50%;
  transform: translate(-50%, -50%);
  left: 0%;
  transition: left 0.2s linear, box-shadow var(--transition-fast);
  z-index: 2;
}

.progress-container:hover .progress-thumb {
  box-shadow: var(--neu-shadow-sm), 0 0 14px var(--accent-glow);
  transform: translate(-50%, -50%) scale(1.2);
}

/* ── Kontrol Utama ─────────────────────────────────────────── */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

/* ── Volume Section ────────────────────────────────────────── */
.volume-section {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.volume-container {
  flex: 1;
  cursor: pointer;
  padding: 6px 0;
}

.volume-track {
  height: 5px;
  border-radius: 3px;
  background: var(--surface);
  box-shadow: var(--neu-shadow-inset);
  position: relative;
  overflow: visible;
}

.volume-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-grad);
  position: relative;
}

.volume-thumb {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--neu-shadow-sm);
  top: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.05s linear, box-shadow var(--transition-fast);
  z-index: 2;
}

.volume-container:hover .volume-thumb {
  box-shadow: var(--neu-shadow-sm), 0 0 10px var(--accent-glow);
}

.volume-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 32px;
  text-align: right;
}

/* ================================================================
   9. PLAYLIST PANEL
================================================================ */
.playlist-panel {
  background: var(--surface);
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: var(--neu-shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow var(--transition-normal), background var(--transition-slow);
  max-height: 680px;
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.playlist-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.playlist-title i { color: var(--accent); }

.playlist-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface);
  box-shadow: var(--neu-shadow-sm);
  padding: 4px 12px;
  border-radius: 50px;
}

/* ── Search ────────────────────────────────────────────────── */
.playlist-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  box-shadow: var(--neu-shadow-inset);
  border-radius: var(--border-radius-sm);
  padding: 10px 16px;
}

.search-icon { color: var(--text-muted); font-size: 13px; }

.search-input {
  flex: 1;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.search-input::placeholder { color: var(--text-muted); }

/* ── Daftar Lagu ───────────────────────────────────────────── */
.playlist-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  /* Scrollbar kustom */
  scrollbar-width: thin;
  scrollbar-color: var(--shadow-dark) transparent;
}

.playlist-list::-webkit-scrollbar { width: 4px; }
.playlist-list::-webkit-scrollbar-track { background: transparent; }
.playlist-list::-webkit-scrollbar-thumb {
  background: var(--shadow-dark);
  border-radius: 4px;
}

/* Item lagu dalam playlist */
.playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--border-radius-sm);
  background: var(--surface);
  box-shadow: var(--neu-shadow-sm);
  cursor: pointer;
  transition:
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.playlist-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-grad);
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: var(--border-radius-sm);
}

.playlist-item:hover {
  box-shadow: var(--neu-shadow-pressed);
  transform: translateX(4px);
}

/* Item lagu yang sedang aktif */
.playlist-item.active {
  box-shadow: var(--neu-shadow-pressed), 0 0 16px var(--accent-glow);
}
.playlist-item.active::before { opacity: 0.08; }

.item-number {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 22px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.item-cover {
  width: 44px; height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Gambar fallback untuk cover item playlist */
.item-cover-fallback {
  width: 44px; height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
}

.item-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-slow);
}

.item-artist {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Item aktif → teks warna aksen */
.playlist-item.active .item-title { color: var(--accent); }

.item-duration {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

/* Indikator equalizer kecil pada item aktif */
.item-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  position: relative;
  z-index: 1;
  display: none;
}

.playlist-item.active .item-eq { display: flex; }
.playlist-item.active .item-number { display: none; }

.item-eq span {
  display: block;
  width: 3px;
  border-radius: 1.5px;
  background: var(--accent);
  animation: eqAnim 0.8s ease-in-out infinite alternate;
  min-height: 3px;
}

.item-eq span:nth-child(1) { animation-delay: 0s; }
.item-eq span:nth-child(2) { animation-delay: 0.15s; }
.item-eq span:nth-child(3) { animation-delay: 0.3s; }

/* ── Storage Info ──────────────────────────────────────────── */
.storage-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  background: var(--surface);
  box-shadow: var(--neu-shadow-inset);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.storage-info i { color: var(--accent); }

/* ================================================================
   10. FOOTER
================================================================ */
.app-footer {
  text-align: center;
  padding: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ================================================================
   11. TOAST NOTIFICATION
================================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface);
  box-shadow: var(--neu-shadow), 0 0 20px var(--accent-glow);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  border-left: 3px solid var(--accent);
}

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

/* ================================================================
   12. EMPTY STATE PLAYLIST
================================================================ */
.playlist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
}

.playlist-empty i {
  font-size: 2.5rem;
  opacity: 0.4;
}

.playlist-empty p { font-size: 0.85rem; }

/* ================================================================
   13. LOADING STATE
================================================================ */
.loading-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--shadow-dark);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================================================================
   14. ANIMASI SLIDE-IN (untuk item playlist)
================================================================ */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.playlist-item {
  animation: slideInUp 0.3s ease forwards;
}

/* ================================================================
   15. RESPONSIVE – TABLET (≤ 900px)
================================================================ */
@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .player-panel {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }

  .playlist-panel {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    max-height: 500px;
  }
}

/* ================================================================
   16. RESPONSIVE – MOBILE (≤ 600px)
================================================================ */
/* Sembunyikan handle dan tombol mobile secara default (Desktop) */
.playlist-drag-handle { display: none; }
.mobile-playlist-btn { display: none; }

@media (max-width: 600px) {
  /* Munculkan tombol di HP */
  .mobile-playlist-btn { display: flex !important; }

  /* Kurangi padding utama agar muat lebih banyak */
  .app-wrapper { padding: 10px 10px; gap: 12px; }

  /* Header lebih compact */
  .app-header { 
    padding: 10px 14px; 
    border-radius: var(--border-radius); 
  }
  .app-title { font-size: 1.05rem; }
  .header-actions .neu-btn { width: 36px; height: 36px; font-size: 16px; }

  /* Player panel di HP */
  .player-panel { 
    padding: 20px 14px; 
    gap: 16px; 
    border-radius: var(--border-radius);
  }

  /* Perkecil ukuran album art */
  .album-ring { width: 220px; height: 220px; }
  .album-cover-container { width: 200px; height: 200px; }

  .song-info { gap: 4px; }
  .song-title  { font-size: 1.1rem; max-width: 90%; }
  .song-artist { font-size: 0.85rem; }

  /* Kontrol utama lebih compact */
  .main-controls { gap: 12px; }
  .play-btn { width: 64px !important; height: 64px !important; font-size: 22px !important; }
  .neu-btn.md { width: 44px; height: 44px; font-size: 16px; }

  /* ────────────────────────────────────────────────────────
     PLAYLIST SLIDE-UP (Mobile)
  ──────────────────────────────────────────────────────── */
  .playlist-panel { 
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-width: 100% !important;
    width: 100%;
    height: 85vh; /* Menutupi 85% layar */
    max-height: none;
    border-radius: 30px 30px 0 0;
    z-index: 9999;
    padding: 12px 16px 20px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
    
    /* Disembunyikan di bawah layar secara default */
    transform: translateY(110%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  
  .playlist-panel.show-playlist {
    transform: translateY(0);
  }

  /* Handle / Tuas untuk menutup playlist */
  .playlist-drag-handle {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 20px;
    cursor: pointer;
    width: 100%;
  }
  .handle-bar {
    width: 50px;
    height: 5px;
    border-radius: 10px;
    background: var(--shadow-dark);
  }
  
  .playlist-header { margin-bottom: 12px; }
  .playlist-title { font-size: 1rem; }
  
  .search-input { padding: 10px 16px 10px 38px; font-size: 0.85rem; }
  
  .playlist-item { padding: 10px 12px; gap: 12px; }
  .item-cover { width: 40px; height: 40px; }
  .item-title { font-size: 0.9rem; }
  .item-artist { font-size: 0.75rem; }
}

@media (max-width: 400px) {
  /* Layar sangat kecil (iPhone SE, dsb) */
  .album-ring { width: 180px; height: 180px; }
  .album-cover-container { width: 164px; height: 164px; }
  .play-btn { width: 56px !important; height: 56px !important; font-size: 18px !important; }
  .neu-btn.md { width: 40px; height: 40px; font-size: 14px; }
}

/* ================================================================
   17. FOCUS STYLES (AKSESIBILITAS)
================================================================ */
.neu-btn:focus-visible,
.search-input:focus-visible,
.playlist-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ================================================================
   18. ANIMASI TRANSISI LAGU (pulse cover saat ganti lagu)
================================================================ */
@keyframes coverPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.album-ring.track-change {
  animation: coverPop 0.4s ease;
}

/* ================================================================
   19. MARQUEE TEXT (judul panjang)
================================================================ */
.song-title.marquee {
  animation: marqueeText 8s linear infinite;
  white-space: nowrap;
  overflow: hidden;
  display: block;
}

@keyframes marqueeText {
  0%   { text-indent: 0; }
  40%  { text-indent: -100%; }
  41%  { text-indent: 100%; }
  100% { text-indent: 0; }
}
