/* css/music-player.css */

/* --- New Color Palette Suggestion --- */
:root {
    --player-bg: #181818; /* Very dark grey / off-black */
    --player-text: #ffffff;
    --player-text-subtle: #b3b3b3; /* Lighter grey for less important text */
    --player-accent: #1DB954; /* Spotify-like green for accents */
    --player-hover-bg: #282828; /* Slightly lighter for hover states */
    --player-progress-bar-bg: #535353;
    --player-progress-bar-fill: var(--player-accent); /* Use accent for filled part */
    --slider-thumb-bg: #ffffff;

    --list-item-hover-bg: #f0f0f0; /* For song list items */
    --list-item-playing-bg: #e0f2fe; /* Light blue for playing item */
    --list-item-playing-text: #0c5464;
}

/* Album Page Specific (Keep or integrate with main style.css) */
.album-header { margin-bottom: 30px; text-align: center; padding: 20px 0; border-bottom: 1px solid #e9ecef; }
.album-cover {
    max-width: 220px; width: 60%; min-width: 150px; height: auto; aspect-ratio: 1 / 1;
    border-radius: 12px; /* Softer radius */
    margin: 0 auto 20px auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2); /* More pronounced shadow */
    object-fit: cover; display: block;
}
.album-cover-placeholder {
    width: 200px; height: 200px; background-color: #333; color: #777;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; margin: 0 auto 20px auto; font-size: 0.9em;
}
.album-header h1 { margin-bottom: 8px; font-size: 2.2em; color: #212529;}
.album-header .meta-info { color: #495057; font-size: 0.95em; margin-bottom: 10px; }
.album-header .meta-info span { margin: 0 7px; }
.album-header .stars-info {font-size: 0.9em; color: #555;}
.content-placeholder { text-align:center; padding: 50px; color: #6c757d; }
.content-placeholder h1 { color: #343a40; }


.song-list { list-style: none; padding: 0; margin-top: 20px; }
.song-item {
    display: flex; align-items: center; padding: 14px 10px;
    border-bottom: 1px solid #f0f0f0; cursor: pointer;
    transition: background-color 0.15s ease-in-out;    justify-content: space-around;
    
}
.song-item:hover { background-color: var(--list-item-hover-bg); }
.song-item:last-child { border-bottom: none; }

.song-play-action { margin-right: 15px; display: flex; align-items: center; }
.play-pause-btn-list {
    background: transparent; border: none; color: var(--player-accent); cursor: pointer;
    padding: 6px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; width: 40px; height: 40px; transition: background-color 0.2s;
}
.play-pause-btn-list svg { width: 22px; height: 22px; fill: #555; }
.play-pause-btn-list:hover svg { fill: var(--player-accent); }
.play-pause-btn-list:hover { background-color: rgba(0,0,0,0.05); }


.song-item .play-pause-btn-list .icon-pause { display: none; }
.song-item .play-pause-btn-list .icon-play { display: inline-block; }
.song-item.playing .play-pause-btn-list .icon-play { display: none; }
.song-item.playing .play-pause-btn-list .icon-pause { display: inline-block; }
.song-item.playing .play-pause-btn-list svg { fill: var(--player-accent); }
.song-item.playing { background-color: var(--list-item-playing-bg); }
.song-item.playing .song-main-title { font-weight: bold; color: var(--list-item-playing-text); }

.song-number { margin-right: 15px; color: #888; min-width: 20px; text-align: right; font-size: 0.9em; }
.song-title-container { flex-grow: 1; }
.song-main-title { font-weight: 500; display: block; color: #333; font-size: 1em;}
.song-duration { font-size: 0.85em; color: #777; display: block; margin-top: 3px; }

.song-actions { white-space: nowrap; margin-left:15px; display: flex; align-items: center; }
.song-actions .action-btn {
    margin-left: 8px; text-decoration: none; color: #777; padding: 6px;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; transition: background-color 0.2s, color 0.2s;
}
.song-actions .action-btn svg { width: 18px; height: 18px; }
.song-actions .action-btn:hover { background-color: #eee; color: var(--player-accent); }

/* --- Bottom Audio Player --- */
#audioPlayerContainer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--player-bg);
    color: var(--player-text);
    padding: 10px 0; /* Padding top/bottom only, sides handled by .player-content */
    box-shadow: 0 -3px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#audioPlayerContainer.visible {
    transform: translateY(0%);
}

/* css/music-player.css */

/* ... (other styles like :root, album page styles, song list styles) ... */


/* --- Bottom Audio Player --- */
#audioPlayerContainer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--player-bg, #181818); /* Fallback color */
    color: var(--player-text, #ffffff);
    /* Padding handled by internal elements now for more flexible branding */
    box-shadow: 0 -3px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#audioPlayerContainer.visible {
    transform: translateY(0%);
}

.player-branding {
    text-align: center;
    padding: 12px 15px 8px; /* Adjusted padding */
    /* border-bottom: 1px solid #383838; Slightly lighter separator */
    /* margin-bottom: 8px; */ /* Removed if content below handles its own margin */
    background-color: var(--player-bg, #181818); /* Ensure branding has player background */
    position: relative; /* For potential absolute elements inside if needed */
}

.player-branding .brand-main {
    font-size: 35px;
    font-weight: bold; /* Or a more specific font-weight like 700 or 800 */
    letter-spacing: 1px; /* Optional: adjust letter spacing */
    line-height: 1.1; /* Adjust line height for large text */
    margin-bottom: 2px; /* Small space between main and sub brand */

    /* Gradient Text */
    background: -webkit-linear-gradient(45deg, #FF005C, #FF54A6); /* Red to Pink gradient */
    /* background: linear-gradient(45deg, #D62828, #F77F00); /* Red to Orange example */
    /* background: linear-gradient(45deg, #E94057, #F27121); /* Another Red/Orange variant */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; /* Standard property */
    /* text-fill-color: transparent; /* Standard property, but -webkit- might still be needed */

    /* For browsers not supporting background-clip: text */
    color: #FF005C; /* Fallback color - the start of your gradient */
}

.player-branding .brand-sub {
    font-size: 10px; /* Small subtitle */
    color: var(--player-text-subtle, #b3b3b3);
    text-transform: uppercase;
    letter-spacing: 1.5px; /* Wider letter spacing for small caps */
    font-weight: 500; /* Medium weight */
}


#audioPlayerContainer .player-content {
    display: grid;
    grid-template-areas:
        "info"
        "progress"
        "controlsmain"
        "options";
    grid-template-columns: 1fr;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 15px; /* Add padding for the content area below branding */
fill: #ffffff;
    
}

/* Tablet and Desktop Layout for Player Content */
@media (min-width: 768px) {
    #audioPlayerContainer {
        /* If branding is outside the grid, player-content might need padding-top */
    }
    .player-branding {
        /* On wider screens, you might want branding and content side-by-side */
        /* This example keeps branding on top */
        padding-bottom: 10px;
    }
    #audioPlayerContainer .player-content {
        grid-template-columns: minmax(180px, 1.5fr) 2fr minmax(220px, 1.5fr) auto;
        grid-template-areas: "info controlsmain progress options";
        gap: 15px;
        padding-top: 5px; /* Less top padding if branding is distinct */
    }
}


/* ... (rest of your #audioPlayerContainer .player-content, .track-art-and-info, etc. styles) ... */






#audioPlayerContainer .track-art-and-info { grid-area: info; display: flex; align-items: center; overflow: hidden; }
#player-track-info { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 0px; }
#now-playing-title { display: block; font-weight: 500; font-size: 0.9em; color: var(--player-text); }
#now-playing-artist { display: block; font-size: 0.8em; color: var(--player-text-subtle); }

#audioPlayerContainer .player-controls-main { grid-area: controlsmain; display: flex; align-items: center; justify-content: center; }
#audioPlayerContainer .control-btn {
    background: none; border: none; color: var(--player-text-subtle); cursor: pointer;
    padding: 8px; margin: 0 5px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; transition: color 0.2s, background-color 0.2s;
}
#audioPlayerContainer .control-btn:hover { color: var(--player-text); background-color: var(--player-hover-bg); }
#audioPlayerContainer .control-btn svg { width: 22px; height: 22px; }
#player-play-pause-btn svg { width: 32px; height: 32px; }

#player-play-pause-btn.play .icon-pause,
#player-play-pause-btn.pause .icon-play { display: none; }
/* Default: show play icon */
#player-play-pause-btn .icon-pause { display: none; } 
#player-play-pause-btn .icon-play { display: inline-block; }


#audioPlayerContainer .player-progress-and-time { grid-area: progress; display: flex; align-items: center; flex-grow: 1; }
#player-current-time, #player-duration {
    font-size: 0.75em; color: var(--player-text-subtle); min-width: 38px; text-align: center;
}
#player-progress-bar {
    flex-grow: 0.75; margin: 0 10px; height: 5px; -webkit-appearance: none; appearance: none;
    background: var(--player-progress-bar-bg); border-radius: 5px; cursor: pointer; outline: none;
}
#player-progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px;
  background: var(--slider-thumb-bg); border-radius: 50%; cursor: pointer;
  margin-top: -4.5px; /* Adjust to center on bar */
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}
#player-progress-bar::-moz-range-thumb {
  width: 14px; height: 14px; background: var(--slider-thumb-bg);
  border-radius: 50%; cursor: pointer; border: none;
}

#audioPlayerContainer .player-options { grid-area: options; display: flex; align-items: center; }
#player-loop-btn svg, #player-lyrics-btn svg, #player-download-btn svg, #player-volume-btn svg {
    width: 20px; height: 20px;
}
#player-loop-btn svg { display:none; } /* All loop icons hidden initially */
#player-loop-btn svg.active { display:inline-block !important; } /* JS shows the active one */

.volume-control-container { display: flex; align-items: center; }
#player-volume-bar {
    width: 70px; height: 4px; -webkit-appearance: none; appearance: none;
    background: var(--player-progress-bar-bg); border-radius: 5px; cursor: pointer;
    margin-left: 8px; outline: none;
}
#player-volume-bar::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 12px; height: 12px;
  background: var(--slider-thumb-bg); border-radius: 50%; cursor: pointer; margin-top: -4px;
}
#player-volume-bar::-moz-range-thumb {
  width: 12px; height: 12px; background: var(--slider-thumb-bg);
  border-radius: 50%; cursor: pointer; border:none;
}
#player-volume-btn .icon-volume-mute { display: none; } /* Initially show full volume icon */

#audioPlayerContainer audio { display: none; }
/* Lyrics Panel */
#lyricsDisplayPanel {
    position: fixed;
    /* bottom: 0; JS will adjust this based on player height */
    left: 0;
    width: 100%;
    max-height: 45vh; /* Max height to not cover too much */
    
    /* --- MODIFIED --- */
    background-color: #111111; /* Dark background - almost black */
    color: #e0e0e0;         /* Light grey text for contrast on dark background */
    
    box-shadow: 0 -4px 12px rgba(0,0,0,0.25); /* Slightly stronger shadow */
    z-index: 998; 
    overflow-y: auto;
    padding: 0; 
    box-sizing: border-box;
    transform: translateY(100%); 
    opacity: 0;
    visibility: hidden; 
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; /* Consistent font */
}
#lyricsDisplayPanel.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s 0s;
}

.lyrics-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px; /* Adjusted padding */
    
    /* --- MODIFIED --- */
    background-color: #222222; /* Slightly lighter dark for header */
    border-bottom: 1px solid #383838; /* Darker border */
    
    position: sticky; 
    top: 0;
    z-index: 1; 
}
.lyrics-panel-header h3 {
    margin: 0;
    font-size: 1em; /* Slightly smaller header text */
    font-weight: 500; /* Medium weight */
    color: #f0f0f0; /* Lighter header text */
}
#closeLyricsPanel {
    background: none;
    border: none;
    font-size: 1.8em; /* Make X slightly larger */
    line-height: 1;
    cursor: pointer;
    
    /* --- MODIFIED --- */
    color: #FF5A5F; /* Red color for close button */
    padding: 0 5px;
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}
#closeLyricsPanel:hover {
    color: #FF2A2F; /* Brighter red on hover */
    transform: scale(1.1); /* Slight scale effect on hover */
}

#lyricsContent {
    padding: 15px 20px 20px; /* Added more bottom padding */
    line-height: 1.6;
    
    /* --- MODIFIED --- */
    font-size: 0.90em; /* Smaller text for lyrics */
    color: #cccccc;     /* Adjust text color for readability on dark bg */
    
    white-space: pre-wrap; 
}
#lyricsContent p:first-child { margin-top: 0; }
#lyricsContent p:last-child { margin-bottom: 0; }
#lyricsContent h3 { /* If lyrics title is inside lyricsContent */
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em; /* Relative to parent (0.90em) */
    color: #efefef; /* Title color */
    font-weight: 600;
}

@media only screen and (max-width: 600px) {
  .song-item {
    display: flex; align-items: center; padding: 1px 1px;
    border-bottom: 1px solid #f0f0f0; cursor: pointer;
    transition: background-color 0.15s ease-in-out;
        font-size: 14px;
}
}
@media only screen and (min-width: 768px) {
    
    li.song-item {
    width: 95%;
    margin: 0 auto;
}

h2 {
    align-content: center;
    text-align: center;
}
} 
