* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    all: unset;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: inherit;
    cursor: pointer;
    color: #fff;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.player-container {
    width: 100%;
    max-width: 500px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.artwork {
    width: 100%;
    aspect-ratio: 1;
    background: #333;
    background-size: cover;
    background-position: center;
}

.controls {
    padding: 24px;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
}

.song-info {
    margin-bottom: 24px;
    text-align: center;
}

.song-info h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.song-info p {
    font-size: 14px;
    color: #ccc;
}

.progress-section {
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    cursor: pointer;
    accent-color: #00dd00;
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
}


.btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: scale(1.15);
}

.btn-play {
    padding: 16px;
}

.icon {
    width: 28px;
    height: 28px;
    filter: invert(1);
}

.btn-play .icon {
    width: 40px;
    height: 40px;
}

.btn-shuffle.active .icon,
.btn-loop.active .icon {
    filter: brightness(0) saturate(100%) invert(73%) sepia(94%) hue-rotate(90deg) brightness(0.7) drop-shadow(0 0 8px #00dd00);
}






.player-container {
    position: relative; /* Add this */
    width: 100%;
    max-width: 500px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.logo-watermark {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0.5;
    pointer-events: none;
}

.watermark-icon {
    width: 140px;
    height: auto;
    fill: #fff;
}

.lyrics-section {
    margin-bottom: 16px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lyrics-display {
    font-size: 20px;
    color: #ccc;
    text-align: center;
    line-height: 1.4;
    padding: 2px;
    font-style: italic;
}
#songComment {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    font-style: italic;
}



/* Song List Modal */
.song-list-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s;
}

.song-list-modal.hidden {
  display: none;
  opacity: 0;
}

.song-list-content {
  background: #1a1a1a;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.song-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #333;
}

.song-list-header h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.close-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #fff;
}

.song-list-container {
  overflow-y: auto;
  flex: 1;
}

.song-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #2a2a2a;
  cursor: pointer;
  transition: background 0.2s;
}

.song-list-item:hover {
  background: #2a2a2a;
}

.song-list-item-thumb {
  width: 48px;
  height: 48px;
  background: #333;
  border-radius: 4px;
  flex-shrink: 0;
  object-fit: cover;
}

.song-list-item-text {
  flex: 1;
  min-width: 0;
}

.song-list-item-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.song-list-item-artist {
  color: #aaa;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 0 0;
}

#songTitleSection{
  position: relative;
  display: flex;
  align-items: center;     /* vertical center */
  justify-content: center; /* center the title block */
  text-align: center;      /* ensure text centers */
  width: 100%;
}

/* Make sure the text block behaves like a centered column */
#songTitleSection .song-info{
  display: flex;
  flex-direction: column;
  align-items: center;    /* center text horizontally */
}

/* Song list button styling */
.song-list-btn{
  position: absolute;
  left: -8px;            /* tweak as desired */
  top: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
  margin-right: 0;      /* important: remove layout spacing */
}

.song-list-btn:hover {
  opacity: 1;
}
.progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#shareBtn{
  left: auto !important;   /* overrides .song-list-btn left:-8px */
  right: -8px;             /* mirror the left offset */
  top: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 5;
}

#shareBtn:hover{
  opacity: 1;
}

.progress-left-right {
  display: flex;
  justify-content: space-between;
  color: #aaa;
  font-size: 12px;
  white-space: nowrap;
  padding: 0 2px;
}

.copy-notification {
  position: fixed;
  background-color: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.copy-notification.hidden {
  display: none;
}
.left-icons,
.right-icons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.playlist-btn {
    position: absolute;
    top: 40px;
    left: -8px;
}
.add-to-playlist-btn {
    position: absolute;
    top: 40px;
    right: -8px;
}

/* Tablet/larger screens */
@media (min-width: 768px) {
    .player-container {
        max-width: 600px;
    }
    
    .song-info h2 {
        font-size: 24px;
    }
    
    .song-info p {
        font-size: 16px;
    }
    
    .lyrics-display {
        font-size: 24px;
    }
    
    .button-row {
        gap: 20px;
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .player-container {
        max-width: 700px;
    }
    
    .song-info h2 {
        font-size: 28px;
    }
    
    .song-info p {
        font-size: 18px;
    }
    
    .lyrics-display {
        font-size: 28px;
    }
    
    .icon {
        width: 32px;
        height: 32px;
    }
    
    .btn-play .icon {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 600px) {
    .player-container {
        max-width: 100%;
        border-radius: 0;
    }
    
    .controls {
        padding: 16px;
    }
        body {
        padding: 2px;
    }
    .controls {
        padding: 8px;
    }
    #rewindBtn, #forwardBtn {
        display: none;
    }
    }
}
}
