/* ============================================
    BEATLRC  - COMPLETE STYLES
    Deep-space theme with Glassmorphism
============================================ */

:root {
    --current-song-rgb: 236, 72, 153; /* Default value (Fuchsia) */
    --dark-accent-background: hsl(330, 100%, 5%); /* Default value (Fuchsia HSL) */
    --transition-speed: 0.5s; /* Controls the fade speed */
    --lyric-highlight-color: rgb(var(--current-song-rgb));
    --glass-background: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* DISABLE TEXT SELECTION AND IMAGE DRAGGING */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

img {
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    background-color: var(--dark-accent-background);
    /* FADE: Background color transition */
    transition: background-color var(--transition-speed) ease-in-out;
}

html {
    scroll-behavior: smooth;
}

/* ENHANCEMENT: Update deep-space-bg to use dynamic dark background and a subtle glow */
.deep-space-bg {
    background: radial-gradient(at 0% 0%, rgba(var(--current-song-rgb), 0.15) 0%, transparent 50%), 
                radial-gradient(at 100% 100%, #0a0410 0%, transparent 50%),
                linear-gradient(135deg, var(--dark-accent-background), #14081c);
    background-attachment: fixed;
    /* FADE: Background gradient transition */
    transition: background var(--transition-speed) ease-in-out;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.8;
    display: block;
    pointer-events: none;
}

.site-content {
    position: relative;
    z-index: 10;
}

.accent-text {
    color: var(--lyric-highlight-color);
    /* FADE: Text color transition */
    transition: color var(--transition-speed) ease-in-out;
}

.accent-bg {
    background-color: rgb(var(--current-song-rgb));
    transition: background-color var(--transition-speed) ease-in-out;
}

.glass-effect {
    background: var(--glass-background);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    transition: background-color 0.3s ease;
}

.hover-lift {
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
}

/* ENHANCEMENT: Hover lift shadow now uses the accent color */
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(var(--current-song-rgb), 0.3); /* Increased opacity for effect */
}

.orbitron-font {
    font-family: 'Orbitron', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ENHANCEMENT: Main Heading Gradient Text */
.gradient-accent-text {
    background: linear-gradient(to right, 
        rgba(var(--current-song-rgb), 0.8),
        rgba(var(--current-song-rgb), 0.4),
        rgb(var(--current-song-rgb))
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* FADE: Background clip/gradient transition */
    transition: background var(--transition-speed) ease-in-out;
}

/* ENHANCEMENT: Section titles will have a subtle accent color shadow */
.accent-text-shadow {
    color: #e5e5e5; /* Keep text white/gray */
    text-shadow: 0 0 10px rgba(var(--current-song-rgb), 0.3), 0 0 5px rgba(var(--current-song-rgb), 0.2);
    /* FADE: Text shadow transition */
    transition: text-shadow var(--transition-speed) ease-in-out;
}

.nav-link {
    position: relative;
    transition: color 0.3s, transform 0.3s;
}

/* ENHANCEMENT: Nav link underline uses accent color */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: rgb(var(--current-song-rgb));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.primary-button {
    padding: 10px 24px;
    background-color: rgb(var(--current-song-rgb));
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    /* FADE: Button shadow transition (uses general transition on all 0.3s ease) */
    box-shadow: 0 10px 15px -3px rgba(var(--current-song-rgb), 0.4), 0 4px 6px -4px rgba(var(--current-song-rgb), 0.4);
    transition: all 0.3s ease;
    /* FADE: Button border transition (uses general transition on all 0.3s ease) */
    border: 1px solid rgba(var(--current-song-rgb), 0.5); 
    animation: pulse-glow 3s infinite;
    cursor: pointer;
    text-decoration: none;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(var(--current-song-rgb), 0.6);
}

.primary-hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    background-color: rgb(var(--current-song-rgb));
    color: white;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 800;
    /* FADE: Button shadow transition (uses general transition on all 0.3s ease) */
    box-shadow: 0 20px 25px -5px rgba(var(--current-song-rgb), 0.6), 0 8px 10px -6px rgba(var(--current-song-rgb), 0.6);
    transition: all 0.3s ease;
    /* FADE: Button border transition (uses general transition on all 0.3s ease) */
    border: 2px solid rgba(var(--current-song-rgb), 0.6);
    animation: pulse-glow 3s infinite;
    cursor: pointer;
    text-decoration: none;
}

.primary-hero-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 35px rgba(var(--current-song-rgb), 0.8);
}

.secondary-hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    background: var(--glass-background);
    backdrop-filter: blur(12px);
    color: #e5e5e5;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 600;
    /* FADE: Secondary button border transition (uses general transition on all 0.3s ease) */
    border: 1px solid rgba(var(--current-song-rgb), 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.secondary-hero-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    /* FADE: Secondary button hover shadow transition (uses general transition on all 0.3s ease) */
    box-shadow: 0 5px 15px rgba(var(--current-song-rgb), 0.3);
}

.feature-card {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

/* ENHANCEMENT: Pulse glow animation now uses accent color */
@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(var(--current-song-rgb), 0.5);
    }
    50% { 
        box-shadow: 0 0 30px rgba(var(--current-song-rgb), 0.9);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Mobile menu animations */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

#mobile-menu.active {
    max-height: 400px;
    opacity: 1;
}

/* Store button styles */
.store-button {
    display: inline-flex;
    align-items: center;
    padding: 12px 32px;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.store-button-green {
    background: #10b981;
    color: white;
}

.store-button-green:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
}

.store-button-disabled {
    background: #374151;
    color: #9ca3af;
    opacity: 0.7;
    cursor: not-allowed;
}

/* Prevent context menu on images */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* --- NEW STYLES FOR DYNAMIC PREVIEWS --- */

.preview-container {
    padding: 1rem;
    transition: background-color var(--transition-speed) ease-in-out;
    display: flex; /* Ensure inner content can be centered/aligned */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Theme Preview - Mock Player Interface */
#dynamic-theme-preview {
    background: #1e1e2d; /* Dark base color */
    border: none;
}
.player-container {
    width: 100%;
    max-width: 400px;
    padding: 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}
.album-art {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, rgb(var(--current-song-rgb)), #333);
    box-shadow: 0 10px 20px rgba(var(--current-song-rgb), 0.4);
    transition: all var(--transition-speed) ease-in-out;
}
.animated-lyrics {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}
.lyric-highlight {
    color: var(--lyric-highlight-color);
    text-shadow: 0 0 5px rgba(var(--current-song-rgb), 0.5);
    transition: color var(--transition-speed), text-shadow var(--transition-speed);
}
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 1rem;
}
.progress-bar {
    height: 100%;
    width: 45%; /* Mock progress */
    background: var(--lyric-highlight-color);
    border-radius: 3px;
    transition: background-color var(--transition-speed);
}

/* Stats Preview - Mock Dashboard */
#stats-dashboard-preview {
    background: #1e1e2d;
    border: none;
    align-items: flex-start;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}
.stat-card {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    text-align: left;
    height: 100%;
}
.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--lyric-highlight-color);
    transition: color var(--transition-speed);
}
.stat-label {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}
.bar-chart-container {
    grid-column: span 2;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    height: 100px; /* Fixed height for the chart */
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}
.bar {
    width: 15%;
    background: var(--lyric-highlight-color);
    opacity: 0.7;
    transition: height 0.5s ease-out, background-color var(--transition-speed);
    border-radius: 2px 2px 0 0;
}
.bar:nth-child(even) {
    background: rgba(255, 255, 255, 0.3);
}