/* #style.css (Must be the very first line) */
@charset "UTF-8";

/* --- Mood Quiz Styling --- */

/* Z-MOOSIC/style.css (FINAL CODE - ROBUST CONTENT CLEARANCE with NEON FLICKER) */

/* ---------------------------------- */
/* 0. NEON PALETTE DEFINITIONS */
/* ---------------------------------- */
:root {
    --bg-dark: #121212; /* Deep Black/Gray Background */
    --text-light: #E0E0E0; /* Light Gray Text */
    --neon-blue: #00F0FF; /* Primary Glow Color (Cyan/Aqua) */
    --neon-pink: #FF0099; /* Accent Glow Color (Magenta) */
    --neon-shadow-blue: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
    --neon-shadow-pink: 0 0 5px var(--neon-pink), 0 0 10px var(--neon-pink);
    --border-color: #333333; /* Dark divider lines */
    --active-bg: #222222;
}

/* --- PREVIOUS: NEON FLICKER ANIMATION (Kept for Mood Boxes/Song Items) --- */
@keyframes neon-flicker {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.8), 0 0 25px rgba(0, 240, 255, 0.3); /* Blue glow */
    }
    5% {
        box-shadow: 0 0 5px var(--neon-pink), 0 0 10px var(--neon-pink); /* Pink flash */
    }
    10% {
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.8), 0 0 25px rgba(0, 240, 255, 0.3);
    }
    15% {
        box-shadow: none; /* Brief darkness */
    }
    20% {
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.8), 0 0 25px rgba(0, 240, 255, 0.3);
    }
    /* Subsequent frames return to blue, creating the flicker illusion */
    25%, 99% {
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.8), 0 0 25px rgba(0, 240, 255, 0.3);
    }
}

/* === NEW: NEON PLASMA UNDULATE (Fire-like effect for the fixed bar) === */
@keyframes neon-plasma-undulate {
    0%, 100% {
        /* Base Blue Glow: High blur, low spread */
        box-shadow: 0 -10px 20px var(--neon-blue), 0 -5px 5px rgba(0, 240, 255, 0.6);
        border-color: var(--neon-blue);
    }
    25% {
        /* Shift up slightly, introduce pink accent */
        box-shadow: 0 -15px 30px var(--neon-blue), 0 -10px 10px var(--neon-pink);
        border-color: var(--neon-pink);
    }
    50% {
        /* Shift down slightly, deepen the blur */
        box-shadow: 0 -5px 15px rgba(0, 240, 255, 1.0), 0 -2px 3px var(--neon-pink);
        border-color: var(--neon-blue);
    }
    75% {
        /* Stronger upward wave and color pulse */
        box-shadow: 0 -12px 25px var(--neon-pink), 0 -8px 8px var(--neon-blue);
        border-color: var(--neon-pink);
    }
}


/* --- ADDED: Album Cover Inner Background Animation (Plasma Glow) --- */
@keyframes album-inner-glow {
    0% {
        background: radial-gradient(circle at 30% 70%, rgba(0, 240, 255, 0.1), transparent 70%),
                    radial-gradient(circle at 70% 30%, rgba(255, 0, 153, 0.1), transparent 70%),
                    #101010;
    }
    50% {
        background: radial-gradient(circle at 70% 30%, rgba(0, 240, 255, 0.15), transparent 60%),
                    radial-gradient(circle at 30% 70%, rgba(255, 0, 153, 0.15), transparent 60%),
                    #0a0a0a;
    }
    100% {
        background: radial-gradient(circle at 30% 70%, rgba(0, 240, 255, 0.1), transparent 70%),
                    radial-gradient(circle at 70% 30%, rgba(255, 0, 153, 0.1), transparent 70%),
                    #101010;
    }
}
/* ---------------------------------- */


/* ---------------------------------- */
/* 1. Global Reset & Typography (UPDATED) */
/* ---------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    /* Updated background to a flat, deep dark for better neon contrast */
    background-color: var(--bg-dark); 
    /* Removed the previous background image gradients for a cleaner dark look */
    color: var(--text-light);
}

a {
    /* Base links use the NEON BLUE */
    color: var(--neon-blue); 
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover {
    /* Hover links use the NEON PINK GLOW */
    color: var(--neon-pink);
    text-shadow: var(--neon-shadow-pink); 
}

/* ---------------------------------- */
/* 1.5. Global Utilities */
/* ---------------------------------- */
/* This class is used to hide the Admin button and controls by default */
.hidden-control {
    display: none !important; /* CRITICAL: Use !important to ensure hiding */
}

/* ---------------------------------- */
/* 1.6. Admin Visibility Override (FINAL EXHAUSTIVE FIX) */
/* ---------------------------------- */

/* These rules use the highest possible CSS specificity to force visibility
    when the 'hidden-control' class is REMOVED by JavaScript. */

/* 1. Force the separator line to show */
#sidebar #admin-separator:not(.hidden-control) {
    display: block !important;
}

/* 3. Force the Admin wrapper section to show */
#sidebar #admin-controls-section:not(.hidden-control) {
    display: block !important;
    /* Reset any potential overriding padding/margin */
    padding: 0 !important;
    margin: 0 !important;
}

/* 4. Force the UL and its list items to show as blocks inside the sidebar */
#sidebar #admin-controls-section ul {
    display: block !important;
    padding: 0 !important;
}

#sidebar #admin-controls-section ul li {
    /* This ensures the list items themselves are drawn */
    display: block !important;
}

#sidebar #admin-controls-section ul li a {
    /* This ensures the anchor tags (the links) are definitely drawn */
    display: block !important;
}
/* ---------------------------------- */

/* 🔥 NEW SECTION: Creator-Only Features Hidden by Default */
/* This forces the two feature sections to be hidden for all users at load time. */
/* The JavaScript will override the inline style to 'display: block' when Admin is ON. */
.content-section#recommended-songs,
.content-section#top-songs-chart {
    /* CRITICAL: Must be hidden initially */
    display: none ;
}
/* ---------------------------------- */


/* ---------------------------------- */
/* 2. Header and Main Layout (UPDATED) */
/* ---------------------------------- */
header {
    background-color: #1f1f1f;
    padding: 10px 20px;
    /* Use a NEON BLUE border for high contrast */
    border-bottom: 1px solid var(--neon-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 60px;
    /* Subtle outer glow */
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2); 
}

header h1 {
    cursor: pointer;
    font-size: 1.8em;
    color: var(--text-light);
    /* Subtle neon glow for the title */
    /* text-shadow: 0 0 5px rgba(0, 240, 255, 0.5); /* Removed for animation */
    /* === FIX: RHYTHM GLOW ADDED HERE === */
    animation: rhythm-glow 2s infinite alternate; /* Apply the pulsing animation */
}
/* * Define the keyframes for the pulsing glow effect.
 * The glow strength changes between 0% and 100% of the animation cycle.
 */
@keyframes rhythm-glow {
    0% {
        /* Faint glow */
        text-shadow: 0 0 5px rgba(0, 240, 255, 0.4),
                     0 0 10px rgba(0, 100, 255, 0.1);
    }
    100% {
        /* Bright glow (the "beat") */
        text-shadow: 0 0 10px rgba(0, 240, 255, 0.8),
                     0 0 20px rgba(0, 100, 255, 0.5),
                     0 0 30px rgba(0, 50, 255, 0.3);
    }
}

/* Z-MOOSIC/style.css - New rule to ensure the button is on the far right */
#admin-toggle {
    /* This tells the button to consume all available space to its left,
        pushing itself to the right edge of the header */
    margin-left: auto;
    
    /* NEON PINK BUTTON STYLE */
    background-color: var(--bg-dark);
    color: var(--neon-pink);
    border: 1px solid var(--neon-pink);
    box-shadow: 0 0 5px var(--neon-pink); /* Neon Button Glow */
    transition: all 0.2s;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
}

#admin-toggle:hover {
    background-color: var(--neon-pink);
    color: var(--bg-dark); /* Dark text on bright background for punch */
    box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
}


/* Main content area (ADJUSTED PADDING) */
main {
    padding: 20px;
    padding-top: 80px;
    /* INCREASED bottom padding to make space for the fixed bar */
    padding-bottom: 120px; /* 90px bar height + 30px extra margin */
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

/* ---------------------------------- */
/* 3. Sidebar (Navigation) - PRECISE HOVER TRIGGER FIX (UPDATED) */
/* ---------------------------------- */

/* --- NEW: Sidebar Trigger Zone (The 10px invisible bar) --- */
#sidebar-trigger {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 100vh;
    z-index: 1001;
}

/* --- Sidebar Styling --- */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 250px;
    background-color: #0d0d0d; /* Very deep dark */
    
    padding-top: 65px;
    
    /* Use NEON BLUE border contrast */
    border-right: 1px solid var(--neon-blue);
    
    /* Default state: Sidebar is hidden off the screen */
    transform: translateX(-250px);
    transition: transform 0.3s ease;
    z-index: 999;
    
    /* === FIX 1: Allow the entire sidebar content to scroll if needed === */
    overflow-y: auto; 
    /* Subtle neon shadow */
    box-shadow: 2px 0 10px rgba(0, 240, 255, 0.2);
}

/* * CRITICAL FIX: The sidebar slides out ONLY when hovering the trigger zone
 * OR when hovering the sidebar itself.
 */
#sidebar-trigger:hover ~ #sidebar,
#sidebar:hover {
    transform: translateX(0); /* Slide into view */
}

#sidebar nav ul {
    list-style: none;
    padding: 20px 0;
}

/* Ensure the parent <li> for dropdowns is positioned correctly */
#sidebar nav ul li {
    position: relative;
}

#sidebar nav ul li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-light); /* Start with light text */
    font-weight: 500;
    font-size: 1.1em;
    transition: background-color 0.2s, color 0.2s, border-left 0.2s;
}

#sidebar nav ul li a:hover,
#sidebar nav ul li a.active {
    color: var(--neon-blue); /* Neon Blue Text */
    background-color: var(--active-bg);
    /* Active/Hover bar gets a NEON GLOW and border */
    border-left: 3px solid var(--neon-blue);
    text-shadow: var(--neon-shadow-blue); 
    padding-left: 17px;
}

/* ---------------------------------- */
/* --- DROPDOWN (SUBMENU) PUSH-DOWN LOGIC FIX (UPDATED) --- */
/* ---------------------------------- */

#sidebar nav ul .submenu {
    list-style: none;
    padding: 0;
    
    /* CRITICAL FIX: Use max-height to hide it and allow transition */
    max-height: 0;
    overflow: hidden; /* Hide the content when max-height is 0 */
    transition: max-height 0.3s ease-out; /* Smooth slide effect */
    
    background-color: #121212;
    border-top: 1px solid transparent;
    box-shadow: none;
}

/* SHOW THE SUBMENU ON HOVER - this expands the max-height */
#sidebar nav ul li:hover > .submenu {
    /* FIX 2: Set a constrained max-height to leave space for other menu items */
    max-height: 400px; 
    
    /* FIX 3: Enable scrolling ONLY for the expanded moods list */
    overflow-y: auto;
}

/* Ensure submenu links are styled correctly (no extra padding/border) */
#sidebar nav ul .submenu li {
    position: static;
}

#sidebar nav ul .submenu li a {
    /* Style for the links inside the dropdown */
    padding: 10px 20px 10px 25px; /* Slight indent */
    background-color: #181818; /* Slightly different dark */
    border-left: none; /* Remove green border from sub-links */
}

#sidebar nav ul .submenu li a:hover {
    background-color: #282828; /* Hover style for sub-links */
    border-left: none;
    padding-left: 25px; /* Maintain padding without the border */
    color: var(--neon-pink); /* Subtle accent color on sub-links hover */
}
/* ---------------------------------- */

/* ---------------------------------- */
/* 4. Main Page (index.html) Styles - FINAL GRID FIX (Mood Boxes) (UPDATED) */
/* ---------------------------------- */
/* Using 'main #mood-selection' for high specificity */
main #mood-selection {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding-top: 30px;
}

.mood-box {
    background-color: #1f1f1f;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border 0.3s;
    
    /* CORE LOOK: Deep dark background and thin neon border */
    background-color: #101010; /* Deeper black for high contrast */
    border: 1px solid var(--neon-blue); /* Thin cyan border */
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.4); /* Subtle inner/outer glow */
}

.mood-box:hover {
    transform: scale(1.05);
    /* NEW: Apply the flicker animation on hover */
    animation: neon-flicker 4s infinite alternate; /* SLOWED DOWN for accessibility */
    
    background-color: #181818;
    border: 1px solid var(--neon-pink); /* Hover color change to pink */
}

.mood-box h2 {
    /* Headings look bold and clean */
    font-weight: 700;
    color: var(--neon-blue);
    text-shadow: 0 0 3px rgba(0, 240, 255, 0.6);
}

.mood-box p {
    color: #b3b3b3;
    margin-bottom: 20px;
}

.mood-box .emoji {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
    /* Use a contrasting color for the emoji to make it pop */
    filter: drop-shadow(0 0 5px var(--neon-pink));
}


/* ---------------------------------- */
/* 5. Mood Page (Moods/*.html) Styles - General (UPDATED) */
/* ---------------------------------- */

/* General Section Styling */
.content-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #181818;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 3px rgba(0, 240, 255, 0.1); /* Subtle container glow */
}

main > h2 {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 20px;
    color: var(--text-light);
}

.content-section h2 {
    color: var(--neon-blue); /* Section titles get the glow */
    border-bottom: 2px solid var(--neon-blue);
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* ADMIN CONTROLS (UPDATED) */
#admin-controls {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
    background-color: #282828;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid var(--neon-pink); /* Admin controls use the accent color */
    box-shadow: 0 0 10px rgba(255, 0, 153, 0.4);
}

.control-item {
    display: flex;
    align-items: center;
    color: var(--text-light);
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-left: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555555;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--neon-pink); /* Neon Pink when ON */
    box-shadow: 0 0 5px var(--neon-pink);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ---------------------------------- */
/* 6. Dynamic Playlist Card Grid (Songs) (UPDATED) */
/* ---------------------------------- */

#curated-playlist ul {
    list-style: none;
    padding: 0;
    
    /* Use CSS Grid for the card layout for SONGS */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Responsive columns for songs */
    gap: 20px;
    margin-top: 20px;
}

.song-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    /* Deep background for the card */
    background-color: #101010; 
    border-radius: 8px;
    
    /* Hover Effect */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s, border 0.3s;
    cursor: pointer; /* Changed to pointer to reflect interaction */
    
    /* CORE LOOK: Thin neon blue border */
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.song-item:hover {
    transform: scale(1.05);
    
    /* NEW: Apply the flicker animation on hover */
    /* *** ACCESSIBILITY FIX: SLOWED DOWN TO 4s *** */
    animation: neon-flicker 4s infinite alternate; 
    
    background-color: #181818;
    border: 1px solid var(--neon-pink);
}

.album-cover {
    width: 100%;
    max-width: 150px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin-bottom: 10px;
    border-radius: 4px;
    object-fit: cover;
    
    /* Subtle neon shadow for depth, not affected by flicker */
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2); 

    /* CORE CHANGE: Apply animation to the border */
    border: 2px solid var(--neon-blue); /* Start with blue border */
    
    /* ADDED: Combined animations for border and inner glow */
    animation: album-border-flicker 2s infinite alternate, 
             album-inner-glow 4s infinite ease-in-out alternate;
    
    background-color: transparent; /* Ensures the inner glow is visible */
}

.song-details {
    width: 100%;
    margin-bottom: 15px;
    overflow: hidden;
}

.song-details strong {
    display: block;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--neon-blue); /* Neon blue title */
    text-shadow: 0 0 2px rgba(0, 240, 255, 0.5); /* Subtle title glow */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.artist-genre {
    display: block;
    font-size: 0.85em;
    color: #b3b3b3;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Play Link Button Styling (Re-included for aesthetic, even though JS intercepts it) */
.play-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 140px;
    height: 35px;
    color: #000; /* Dark text on bright button */
    /* Use NEON PINK for the button */
    background-color: var(--neon-pink);
    padding: 5px 10px;
    border-radius: 4px; /* Square/Boxy buttons like in the reference */
    font-size: 0.85em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.15s, box-shadow 0.15s;
    cursor: pointer; /* Critical to show it's clickable */
    box-shadow: 0 0 5px var(--neon-pink); /* Neon glow on the button */
}

.play-link:hover {
    background-color: #ff33b3;
    box-shadow: 0 0 15px var(--neon-pink);
}

.spotify-icon {
    width: 18px;
    height: 18px;
    margin-right: 5px;
}


/* ---------------------------------- */
/* 6.5. Spotify Embed Styling (Removed as it's now in the fixed bar) */
/* ---------------------------------- */


/* ---------------------------------- */
/* 7. Form Styles (recommend/submit.html) (UPDATED) */
/* ---------------------------------- */

#recommendation-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background-color: #181818;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--neon-blue); /* Neon labels */
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: #282828;
    color: #ffffff;
    font-size: 1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--neon-pink); /* Focus border is neon pink */
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 0, 153, 0.5); /* Neon pink shadow on focus */
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #b3b3b3;
    font-size: 0.8em;
}

#submit-recommendation {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--neon-blue); /* Submit button is neon blue */
    color: #000000;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 10px var(--neon-blue); /* Neon glow */
}

#submit-recommendation:hover {
    background-color: #4dffff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--neon-blue);
}

/* ---------------------------------- */
/* 8. Star Rating Component (Fixed with Animations) (UPDATED) */
/* ---------------------------------- */

/* 1. Define the Pop and Glow Animation */
@keyframes star-pop-glow {
    0% {
        transform: scale(1);
        color: #FFC700;
        text-shadow: 0 0 5px rgba(255, 200, 0, 0.5);
    }
    50% {
        transform: scale(1.2);
        color: gold;
        text-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
    }
    100% {
        transform: scale(1);
        color: #FFC700;
        text-shadow: none;
    }
}

.rating-group {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    margin-top: 5px;
}

.rating-group input {
    display: none; /* Hides the actual radio buttons */
}

.rating-group label {
    font-size: 2.5em;
    color: #444;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
    transition: color 0.2s, transform 0.2s;
}

/* --- Hover Effect: Lights up all stars up to the one being hovered --- */
.rating-group label:hover,
.rating-group label:hover ~ label {
    color: gold;
}

/* --- Click/Checked Effect: Lights up all stars to the one clicked --- */
.rating-group input:checked ~ label {
    color: #FFC700;
}

/* --- Apply Animation to the selected star's label --- */
.rating-group input:checked + label {
    animation: star-pop-glow 0.4s ease-out 1;
    transform-origin: center;
}

/* Optional: Add a subtle lift on hover to every star for extra polish */
.rating-group label:hover {
    transform: translateY(-2px);
}

/* ---------------------------------- */
/* 9. NOW PLAYING BAR (New Fixed Footer) (UPDATED) */
/* ---------------------------------- */

#now-playing-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px; /* Gives space for the player */
    background-color: #0d0d0d; /* Very deep dark for contrast */
    /* Strong neon blue line and glow */
    border-top: 2px solid var(--neon-blue);
    box-shadow: 0 -5px 15px rgba(0, 240, 255, 0.4); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 0 20px;
    /* === FIX: RHYTHM GLOW ADDED HERE === */
    animation: neon-plasma-undulate 4s infinite alternate; /* New plasma effect */
}

#player-content {
    /* Contains the loaded compact Spotify player */
    width: 100%;
    max-width: 400px; /* Keep the player centralized and compact */
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#player-content iframe {
    /* Ensure the embedded player takes up the available space */
    width: 100%;
    height: 80px;
    border: none;
}

/* ---------------------------------- */
/* 10. Media Queries (Responsiveness) */
/* ---------------------------------- */
@media (max-width: 768px) {
    /* On smaller screens, allow the main content to take full width */
    main {
        margin-left: 0;
        /* Re-adjust bottom padding for small screens if needed */
        padding-bottom: 120px;
    }
    
    /* Center the main header title */
    header {
        justify-content: center;
    }

    /* Make the form section wider */
    #recommendation-form {
        max-width: 100%;
        padding: 15px;
    }

    /* Stack admin controls vertically if they overflow */
    #admin-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Allow smaller grid for song cards */
    #curated-playlist ul {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Update Section 6: Dynamic Playlist Card Grid (Songs) */

.album-cover {
    width: 100%;
    max-width: 150px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin-bottom: 10px;
    border-radius: 4px;
    object-fit: cover;
    
    /* Subtle neon shadow for depth, not affected by flicker */
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2); 

    /* CORE CHANGE: Apply animation to the border */
    border: 2px solid var(--neon-blue); /* Start with blue border */
    
    /* ADDED: Combined animations for border and inner glow */
    animation: album-border-flicker 2s infinite alternate, 
             album-inner-glow 4s infinite ease-in-out alternate;
    
    background-color: transparent; /* Ensures the inner glow is visible */
}

/* --- NEW: Album Cover Border Flicker Animation --- */
@keyframes album-border-flicker {
    0%, 100% {
        border-color: var(--neon-blue); /* Start/End with blue */
        box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
    }
    10% {
        border-color: var(--neon-pink); /* Brief pink flash */
        box-shadow: 0 0 12px rgba(255, 0, 153, 0.4);
    }
    20% {
        border-color: var(--neon-blue); /* Back to blue */
    }
    30% {
        border-color: var(--text-light); /* Quick flash of white/light gray */
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
    40% {
        border-color: var(--neon-blue); /* Back to blue */
    }
    50% {
        border-color: var(--neon-pink); /* Another pink flash */
    }
    60%, 99% {
        border-color: var(--neon-blue); /* Mostly blue */
        box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
    }
}