.music-player {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    height: 85px;
    background: linear-gradient(135deg, #4c89ff, #7aa8ff);
    border-radius: 20px;
    box-shadow: 0 0 25px #4c89ff88;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    transition: background 0.6s ease;
    backdrop-filter: blur(12px);
    box-sizing: border-box;
    z-index: 999;
  }

  @media (min-width: 768px) {
    .music-player {
      max-width: 555px;
      height: 96px;
      padding: 16px 24px;
      gap: 16px;
    }

    .disc {
      width: 80px;
      height: 80px;
    }

    .btn svg {
      width: 24px;
      height: 24px;
    }

    .volume {
      width: 80px;
    }
  }

  .music-player * {
    box-sizing: border-box;
  }

  .disc {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    animation: none;
    background-color: #ddd;
  }

  .disc.playing {
    animation: spin 6s linear infinite;
  }

  .disc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

  .disc::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #e0eaff, #4c89ff);
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }

  .song-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .song-title,
.song-artist {
  position: relative;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* MOBILE: Chạy hiệu ứng cuộn nếu chữ dài */
@media (max-width: 767px) {
  .song-title,
  .song-artist {
    /* Bỏ ellipsis và overflow hidden khi chạy chữ */
    overflow: visible;
    text-overflow: unset;
    animation: scrollIfOverflow 10s linear infinite;
  }

  @keyframes scrollIfOverflow {
    0% {
      transform: translateX(100%);
    }
    100% {
      transform: translateX(-100%);
    }
  }
}

  .song-title {
    font-size: 1.1rem;
  }

  .song-artist {
    font-size: 0.9rem;
    opacity: 0.8;
  }

  .controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s;
  }

  .btn svg {
    fill: white;
    width: 20px;
    height: 20px;
  }

  .btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }

  .volume {
    width: 60px;
  }

  .volume input {
    width: 100%;
  }

  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }

    100% {
      transform: rotate(360deg);
    }
  }