// Shared JavaScript across all pages // Album data structure let albumData = { id: "still-lie-right-next-to-me", artist: "Mr.FLEN", title: "Still Lie Right Next to Me", description: "Intimate deep house for late lights and long shadows—warm pads, patient grooves, and urban after-hours emotion.", colors: { primary: "#0B2D2F", accent: "#FF914D", magenta: "#C5427A" }, tags: ["Deep House", "Melodic House", "AfterHours", "Hypnotic"], tracks: [ { no: "01", slug: "still-lie-right-next-to-me", title: "Still Lie Right Next to Me", desc: "The title track sets the mood with deep, atmospheric pads and a hypnotic groove that pulls you into the late-night world of Mr.FLEN.", duration: "5:24", bpm: 122, key: "Am", tags: ["Deep House", "Atmospheric", "Hypnotic"], cover: "http://static.photos/monochrome/200x200/1", embeds: [ { provider: "soundcloud", url: "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/1900000001&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true", label: "SoundCloud" } ] }, { no: "02", slug: "midnight-walks", title: "Midnight Walks", desc: "A journey through empty city streets with pulsing basslines and ethereal melodies.", duration: "6:12", bpm: 124, key: "Gm", tags: ["Deep House", "Melodic", "Urban"], cover: "http://static.photos/monochrome/200x200/2", embeds: [ { provider: "soundcloud", url: "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/1900000002&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true", label: "SoundCloud" } ] }, { no: "03", slug: "neon-reflections", title: "Neon Reflections", desc: "Capturing the glow of city lights in sound, with shimmering synths and deep grooves.", duration: "5:48", bpm: 123, key: "Bbm", tags: ["Deep House", "Atmospheric", "Urban"], cover: "http://static.photos/monochrome/200x200/3", embeds: [ { provider: "soundcloud", url: "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/1900000003&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true", label: "SoundCloud" } ] }, { no: "04", slug: "after-hours", title: "After Hours", desc: "The perfect soundtrack for those late-night sessions when the world is asleep.", duration: "6:35", bpm: 121, key: "Fm", tags: ["Deep House", "AfterHours", "Hypnotic"], cover: "http://static.photos/monochrome/200x200/4", embeds: [ { provider: "soundcloud", url: "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/1900000004&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true", label: "SoundCloud" } ] }, { no: "05", slug: "urban-dreams", title: "Urban Dreams", desc: "A dreamy exploration of city life with floating melodies and deep bass foundations.", duration: "5:59", bpm: 122, key: "Em", tags: ["Deep House", "Melodic", "Atmospheric"], cover: "http://static.photos/monochrome/200x200/5", embeds: [ { provider: "soundcloud", url: "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/1900000005&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true", label: "SoundCloud" } ] } ] }; // Initialize app document.addEventListener('DOMContentLoaded', function() { console.log('Neon Noir Soundscapes loaded'); loadAlbumData(); initializeAnalytics(); }); // Load album data from localStorage or default function loadAlbumData() { const savedData = localStorage.getItem('mrflen_album_data'); if (savedData) { try { albumData = JSON.parse(savedData); } catch (e) { console.error('Error loading album data:', e); } } return albumData; } // Save album data to localStorage function saveAlbumData() { localStorage.setItem('mrflen_album_data', JSON.stringify(albumData)); } // Load featured tracks on homepage function loadFeaturedTracks() { const featuredContainer = document.querySelector('.grid'); if (!featuredContainer) return; // Show loading state featuredContainer.innerHTML = `
No tracks available
${track.desc}
` : ''} ${track.tags && track.tags.length > 0 ? `