/* CSS Document */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --accent: #ec4899;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: #fff;
}

.font-display {
    font-family: 'Space Grotesk', sans-serif;
}

/* FIXED: Single glass-strong definition - keep the darker one for player */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-strong {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gradient-text {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-gradient {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.1) 50%, rgba(10, 10, 10, 1) 100%);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 60px rgba(139, 92, 246, 0.6); }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 4s ease-in-out infinite; }
.animate-slide-up { animation: slideUp 0.6s ease-out forwards; }

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

.album-card { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.album-card:hover { transform: translateY(-8px) scale(1.02); }
.album-card:hover .album-overlay { opacity: 1; }

.album-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.track-row { transition: all 0.2s ease; }
.track-row:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(8px);
}

.track-row.active {
    background: rgba(139, 92, 246, 0.1);
    border-left: 3px solid #8b5cf6;
}

.newsletter-input:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

.play-button { transition: all 0.3s ease; }
.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
}

.social-icon { transition: all 0.3s ease; }
.social-icon:hover {
    transform: translateY(-4px) scale(1.1);
}

/* ============================================
   MUSIC PLAYER - CRITICAL FIXES
   ============================================ */

/* CRITICAL: Hide Alpine elements until loaded */
[x-cloak] { 
    display: none !important; 
}

/* Player visibility and positioning */
#music-player {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999999 !important;
    transform: translateZ(0);
    will-change: transform;
    pointer-events: auto !important; /* Ensure clickable */
}

/* FIXED: Only remove transform from direct children of body, not all elements */
body > main, 
body > section {
    transform: none;
}

/* Player-specific scrollbar */
#music-player ::-webkit-scrollbar {
    width: 6px;
}
#music-player ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}
#music-player ::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 3px;
}

/* Spinning artwork animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin 8s linear infinite;
}

/* Ensure player content is visible */
#music-player .glass-strong {
    background: rgba(17, 24, 39, 0.98) !important; /* Slightly more opaque */
}

/* Progress bar hover states */
#music-player .group:hover .bg-white\/20 {
    opacity: 1;
}

/* Volume slider styling */
#music-player input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

#music-player input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

/* Mobile responsiveness fixes */
@media (max-width: 640px) {
    #music-player .max-w-7xl {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    #music-player canvas {
        display: none !important; /* Hide visualizer on mobile */
    }
}

/* Ensure audio element is hidden but functional */
#music-player audio {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Queue panel positioning fix */
#music-player .absolute.bottom-full {
    bottom: 100%;
    margin-bottom: 0.5rem;
}

/* Prevent text selection on player controls */
#music-player button,
#music-player .cursor-pointer {
    user-select: none;
    -webkit-user-select: none;
}

/* Loading state animation */
#music-player .fa-spinner {
    animation: spin 1s linear infinite;
}

/* Disabled state */
#music-player button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Focus states for accessibility */
#music-player button:focus-visible {
    outline: 2px solid rgba(139, 92, 246, 0.5);
    outline-offset: 2px;
}

/* Smooth transitions for all player elements */
#music-player * {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Override for elements that shouldn't transition */
#music-player audio,
#music-player .fa-spinner {
    transition: none;
}

.opacity-0 {
    opacity: 1;
}