
/* Base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  :root {
    --music-background: #121212;
    --music-card: #222222;
    --music-text: #ffffff;
    --music-subtext: #b3b3b3;
    --music-primary: #1ed760;
    --music-primary-hover: #1db954;
    --border-color: #333333;
    --progress-bg: #535353;
  }
  
  @keyframes pulse {
    0% {
      opacity: 0.6;
    }
    50% {
      opacity: 1;
    }
    100% {
      opacity: 0.6;
    }
  }
  
  @keyframes wave-1 {
    0%, 100% { height: 4px; }
    50% { height: 16px; }
  }
  
  @keyframes wave-2 {
    0%, 100% { height: 8px; }
    30% { height: 14px; }
    60% { height: 6px; }
  }
  
  @keyframes wave-3 {
    0%, 100% { height: 8px; }
    35% { height: 12px; }
    70% { height: 4px; }
  }
  
  @keyframes wave-4 {
    0%, 100% { height: 10px; }
    40% { height: 8px; }
    80% { height: 16px; }
  }
  
  @keyframes wave-5 {
    0%, 100% { height: 6px; }
    45% { height: 12px; }
    85% { height: 8px; }
  }
  
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #000000, #121212);
    color: var(--music-text);
    min-height: 100vh;
    padding-bottom: 80px;
    line-height: 1.5;
    overflow-x: hidden;
  }
  
  .container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
  }
  
  /* Header */
  .header {
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 1rem;
  }
  
  .header-content {
    display: flex;
    align-items: center;
  }
  
  .music-icon {
    color: var(--music-primary);
    margin-right: 0.5rem;
  }
  
  .header h1 {
    font-size: 1.5rem;
    font-weight: 700;
  }
  
  /* Main content */
  .main-content {
    padding: 1rem;
    margin-top: 1rem;
    padding-bottom: 6rem;
  }
  
  /* Featured track */
  .featured-track {
    position: relative;
    padding: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
  }
  
  .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background-image: linear-gradient(to top, var(--music-background), transparent);
    z-index: 1;
  }
  
  .track-info {
    position: relative;
    display: flex;
    align-items: flex-end;
    z-index: 2;
  }
  
  .album-art {
    width: 12rem;
    height: 12rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    margin-right: 1.5rem;
    flex-shrink: 0;
  }
  
  .album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .track-details {
    flex: 1;
  }
  
  .now-playing {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--music-subtext);
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .track-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
    line-height: 1.2;
  }
  
  .track-artist {
    font-size: 1.25rem;
    color: var(--music-subtext);
  }
  
  /* Playlist section */
  .playlist-container {
    margin-top: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
  }
  
  .error-message {
    padding: 1rem;
    background-color: rgba(255, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    color: #ff6b6b;
  }
  
  .tracks-container {
    margin-top: 1rem;
  }
  
  .track-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .track-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .track-item.active {
    background-color: var(--music-card);
    color: var(--music-primary);
  }
  
  .track-index {
    width: 2rem;
    text-align: center;
    margin-right: 1rem;
    color: var(--music-subtext);
    font-size: 0.875rem;
  }
  
  .track-item.active .track-index {
    color: var(--music-primary);
  }
  
  .track-thumbnail {
    width: 3rem;
    height: 3rem;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
  }
  
  .track-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .track-content {
    flex: 1;
    overflow: hidden;
  }
  
  .track-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .track-item-artist {
    font-size: 0.75rem;
    color: var(--music-subtext);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .track-duration {
    font-size: 0.75rem;
    color: var(--music-subtext);
    margin-left: 1rem;
  }
  
  /* Loading state */
  .loading-tracks {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .loading-track-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
  }
  
  .skeleton {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    animation: pulse 1.5s infinite;
  }
  
  .skeleton.index {
    width: 2rem;
    height: 1rem;
    margin-right: 1rem;
  }
  
  .skeleton.thumbnail {
    width: 3rem;
    height: 3rem;
    border-radius: 4px;
    margin-right: 1rem;
  }
  
  .skeleton-content {
    flex: 1;
  }
  
  .skeleton.title {
    width: 100%;
    height: 0.875rem;
    margin-bottom: 0.5rem;
  }
  
  .skeleton.artist {
    width: 70%;
    height: 0.75rem;
  }
  
  .skeleton.duration {
    width: 2rem;
    height: 0.75rem;
    margin-left: 1rem;
  }
  
  /* Music player */
  .music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--music-card);
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    z-index: 20;
  }
  
  .player-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1300px;
    margin: 0 auto;
  }
  
  .player-track-info {
    display: flex;
    align-items: center;
    width: 25%;
    min-width: 180px;
  }
  
  .player-thumbnail {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 4px;
    margin-right: 0.75rem;
    object-fit: cover;
  }
  
  .player-track-details {
    overflow: hidden;
  }
  
  .player-title {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .player-artist {
    font-size: 0.75rem;
    color: var(--music-subtext);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
  }
  
  .control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .control-button {
    background: none;
    border: none;
    color: var(--music-subtext);
    cursor: pointer;
    transition: color 0.2s;
    font-size: 1rem;
  }
  
  .control-button:hover {
    color: var(--music-text);
  }
  
  .play-button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--music-text);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
  }
  
  .play-button:hover {
    background-color: white;
    transform: scale(1.05);
  }
  
  .progress-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
  }
  
  .time {
    font-size: 0.75rem;
    color: var(--music-subtext);
    min-width: 45px;
    text-align: center;
  }
  
  .progress-bar-container {
    flex: 1;
    cursor: pointer;
  }
  
  .progress-bar {
    height: 4px;
    background-color: var(--progress-bg);
    border-radius: 2px;
    position: relative;
  }
  
  .progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--music-primary);
    border-radius: 2px;
    width: 0;
  }
  
  .volume-controls {
    display: flex;
    align-items: center;
    width: 25%;
    min-width: 120px;
    justify-content: flex-end;
    gap: 0.5rem;
  }
  
  .volume-button {
    background: none;
    border: none;
    color: var(--music-subtext);
    cursor: pointer;
    font-size: 1rem;
    min-width: 24px;
  }
  
  .volume-button:hover {
    color: var(--music-text);
  }
  
  .volume-slider-container {
    width: 100px;
  }
  
  .volume-slider {
    height: 4px;
    background-color: var(--progress-bg);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
  }
  
  .volume-level {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--music-primary);
    border-radius: 2px;
    width: 80%;
  }
  
  /* Visualizer for playing track */
  .wave-container {
    display: flex;
    align-items: flex-end;
    height: 16px;
    gap: 2px;
  }
  
  .wave-bar {
    width: 2px;
    background-color: var(--music-primary);
    border-radius: 1px;
  }
  
  .wave-bar-1 { animation: wave-1 1.2s infinite; }
  .wave-bar-2 { animation: wave-2 1.2s infinite; }
  .wave-bar-3 { animation: wave-3 1.2s infinite; }
  .wave-bar-4 { animation: wave-4 1.2s infinite; }
  .wave-bar-5 { animation: wave-5 1.2s infinite; }
  
  /* Responsive design */
  @media (max-width: 768px) {
    .track-info {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
    
    .album-art {
      margin-right: 0;
      margin-bottom: 1rem;
      width: 10rem;
      height: 10rem;
    }
    
    .track-title {
      font-size: 2rem;
    }
    
    .player-content {
      flex-direction: column;
    }
    
    .player-track-info,
    .player-controls,
    .volume-controls {
      width: 100%;
      margin-bottom: 1rem;
    }
    
    .player-track-info {
      justify-content: center;
    }
    
    .volume-controls {
      justify-content: center;
    }
  }
  
  @media (max-width: 480px) {
    .track-title {
      font-size: 1.5rem;
    }
    
    .album-art {
      width: 8rem;
      height: 8rem;
    }
  }

  ::selection {
    background-color: #00ffc8;
    color: #ffffff;
  }
  p::selection {
    background-color: #ff4081;
    color: white;
  }
  