body{
  margin:0;
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background:#121212;
  color:white;
  display:flex;
  flex-direction: column;
}

.sidebar{
  width:100%;
  background:#000;
  height:auto;
  padding:15px 20px;
  overflow-x: auto;
  border-bottom: 1px solid #282828;
  display: flex;
  align-items: center;
  gap: 30px;
}

.hamburger {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
}

.sidebar h1 {
  margin: 0;
  font-size: 24px;
  color: #1db954;
  white-space: nowrap;
}

.nav-section {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-section.show {
  display: flex;
}

.section-title {
  display: none;
}

.sidebar ul{
  display:none;
}

.nav-items{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-item{
  background: transparent;
  border: 1px solid #282828;
  border-radius: 12px;
  color: white;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-item:hover,
.nav-item:focus {
  background: #282828;
  color: #1db954;
  outline: none;
}

.main{
  flex: 1;
  padding:30px;
  overflow-y: auto;
  background: linear-gradient(135deg, #1a1a1a 0%, #121212 100%);
  padding-bottom: 100px;
}

.main h2 {
  font-size: 32px;
  margin: 0 0 30px 0;
  color: #fff;
}

.song-row,
.song-list,
.artist-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.song-row::-webkit-scrollbar,
.song-list::-webkit-scrollbar {
  height: 8px;
}

.song-row::-webkit-scrollbar-thumb,
.song-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
}

.song-row .song-card,
.song-list .song-card,
.artist-row .song-card {
  min-width: 220px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.song-card{
  background: linear-gradient(135deg, #282828 0%, #1e1e1e 100%);
  padding:12px;
  border-radius:12px;
  transition: all 0.3s ease;
  border: 1px solid #404040;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.song-card:hover {
  background: linear-gradient(135deg, #333333 0%, #282828 100%);
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(29, 185, 84, 0.2);
}

.song-image {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #121212;
}

button{
  background:#1db954;
  border:none;
  padding:7px 12px;
  border-radius:30px;
  cursor:pointer;
  color:white;
  margin-right: 5px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 12px;
}

button:hover {
  background: #1ed760;
  transform: scale(1.05);
}

.play-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}

.play-btn:hover {
  transform: scale(1.1);
}

.btn-create {
  background: #1db954;
  padding: 12px 24px;
  font-size: 14px;
  margin-bottom: 20px;
}

#searchInput {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: none;
  border-radius: 30px;
  background: #282828;
  color: white;
  font-size: 14px;
}

#searchInput::placeholder {
  color: #b3b3b3;
}

#searchResults, #libraryList, #recentList, #recommendList, #likedList, .song-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  justify-items: stretch;
  align-items: start;
}

.playlist-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.playlist-item {
  background: linear-gradient(135deg, #282828 0%, #1e1e1e 100%);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #404040;
  transition: all 0.3s ease;
  cursor: pointer;
}

.playlist-item:hover {
  background: linear-gradient(135deg, #333333 0%, #282828 100%);
  transform: translateY(-4px);
}

.player{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  background:#181818;
  border-top: 1px solid #282828;
  padding: 12px 16px;
  z-index: 1000;
}

.player-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.now-playing-info {
  display: flex;
  align-items: center;
  min-width: 200px;
  flex: 1;
}

.album-art {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  margin-right: 12px;
  background: #282828;
  object-fit: cover;
}

.track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-title {
  font-size: 14px;
  font-weight: 500;
  color: white;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.track-artist {
  font-size: 12px;
  color: #b3b3b3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.like-btn {
  background: transparent;
  border: none;
  color: #b3b3b3;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
  flex-shrink: 0;
}

.like-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.like-btn.liked {
  color: #1db954;
}

.player-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 600px;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.control-btn {
  background: transparent;
  border: none;
  color: #b3b3b3;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.control-btn.play-btn {
  background: white;
  color: black;
  font-size: 20px;
  width: 40px;
  height: 40px;
  margin: 0 8px;
}

.control-btn.play-btn:hover {
  transform: scale(1.05);
  background: white;
}

.progress-container {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
}

#progressBar {
  flex: 1;
  height: 4px;
  background: #535353;
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

#progressBar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

#progressBar::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

#currentTime, #duration {
  font-size: 11px;
  color: #b3b3b3;
  min-width: 35px;
  text-align: center;
}

.player-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  justify-content: flex-end;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-btn {
  background: transparent;
  border: none;
  color: #b3b3b3;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
}

.volume-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

#volumeBar {
  width: 100px;
  height: 4px;
  background: #535353;
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

#volumeBar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

#volumeBar::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.player audio {
  display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body{
    flex-direction: column;
  }

  .sidebar{
    width: 100%;
    height: auto;
    padding: 15px;
    overflow-x: auto;
    border-bottom: 1px solid #282828;
    gap: 15px;
    flex-wrap: wrap;
  }

  .hamburger {
    display: block;
    order: -1;
  }

  .nav-section {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
  }

  .nav-section.show {
    display: flex;
  }

  .sidebar h1 {
    font-size: 18px;
    margin: 0;
  }

  .nav-items {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .nav-item {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
  }

  .main{
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    padding-bottom: 100px;
  }

  .main h2 {
    font-size: 24px;
  }

  #searchResults, #libraryList, #recentList, #recommendList, #likedList, .song-list {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .player{
    left: 0;
    padding: 8px 10px;
  }

  .song-card{
    padding: 12px;
  }

  .song-image {
    height: 140px;
  }

  button{
    padding: 6px 12px;
    font-size: 11px;
  }

  h3 {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .sidebar h1 {
    font-size: 16px;
  }

  .hamburger {
    font-size: 20px;
  }

  .nav-section.show {
    margin-top: 15px;
  }

  .nav-item {
    padding: 8px 12px;
    font-size: 14px;
  }

  .main{
    padding: 10px;
    padding-bottom: 90px;
  }

  .main h2 {
    font-size: 18px;
    margin: 0 0 15px 0;
  }

  #searchResults, #libraryList, #recentList, #recommendList, #likedList, .song-list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .song-card{
    padding: 10px;
  }

  .song-image {
    height: 120px;
    margin-bottom: 8px;
  }

  button{
    padding: 5px 10px;
    font-size: 10px;
    margin-right: 3px;
    margin-bottom: 5px;
  }

  h3 {
    font-size: 12px;
  }

  #searchInput {
    padding: 8px;
    font-size: 12px;
  }

  .player h3 {
    font-size: 11px;
  }

  .player audio {
    height: 20px;
  }

  .playlist-list {
    grid-template-columns: 1fr;
  }
}
