/* Cyberpunk Neon Theme - CSS Custom Properties */
:root {
    /* Neon Color Palette */
    --neon-pink: #ff006e;
    --neon-cyan: #00f5ff;
    --neon-purple: #8338ec;
    --neon-yellow: #ffbe0b;
    --neon-green: #3bff00;
    
    /* Dark Base Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #161616;
    --bg-tertiary: #1e1e1e;
    --bg-glass: rgba(10, 10, 10, 0.85);
    
    /* Glow Effects */
    --glow-pink: 0 0 20px rgba(255, 0, 110, 0.5), 0 0 40px rgba(255, 0, 110, 0.3);
    --glow-cyan: 0 0 20px rgba(0, 245, 255, 0.5), 0 0 40px rgba(0, 245, 255, 0.3);
    --glow-purple: 0 0 20px rgba(131, 56, 236, 0.5), 0 0 40px rgba(131, 56, 236, 0.3);
    
    /* Typography */
    --font-primary: 'Orbitron', monospace;
    --font-secondary: 'Roboto Mono', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
}

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Roboto+Mono:wght@300;400;700&display=swap');

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    background: var(--bg-primary);
    color: var(--neon-cyan);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 0, 110, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 245, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(131, 56, 236, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Main Player Container */
.media-player {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-container {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 0, 110, 0.3);
    border-radius: 20px;
    padding: var(--spacing-xl);
    box-shadow: 
        0 0 50px rgba(255, 0, 110, 0.2),
        inset 0 0 50px rgba(0, 245, 255, 0.1);
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Glitch Effect Overlay */
.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    animation: glitch 10s infinite;
}

@keyframes glitch {
    0%, 90%, 100% { opacity: 0; }
    92% { 
        opacity: 1;
        background: repeating-linear-gradient(
            0deg,
            rgba(255, 0, 110, 0.1),
            rgba(255, 0, 110, 0.1) 2px,
            transparent 2px,
            transparent 4px
        );
    }
    94% {
        opacity: 1;
        transform: translateX(2px);
    }
    96% {
        opacity: 1;
        transform: translateX(-2px);
    }
}

/* Visualizer Section */
.visualizer-section {
    position: relative;
    margin-bottom: var(--spacing-lg);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 245, 255, 0.3);
}

.waveform-canvas {
    width: 100%;
    height: 200px;
    display: block;
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}

/* Media Display */
.media-display {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    align-items: center;
}

.album-art-container {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--neon-pink);
    box-shadow: var(--glow-pink);
}

.album-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hologram-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 245, 255, 0.1) 50%,
        transparent 70%
    );
    animation: hologram 3s infinite;
}

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

.track-info {
    padding: var(--spacing-md);
}

.track-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--neon-pink);
    text-shadow: var(--glow-pink);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.track-artist {
    font-size: 1.25rem;
    color: var(--neon-cyan);
    margin-bottom: var(--spacing-md);
    opacity: 0.8;
}

.track-metadata {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.metadata-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--neon-purple);
    color: var(--neon-purple);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 20px;
    font-size: 0.875rem;
    text-transform: uppercase;
    box-shadow: var(--glow-purple);
    transition: var(--transition-fast);
}

.metadata-tag:hover {
    background: var(--neon-purple);
    color: var(--bg-primary);
}

/* Progress Section */
.progress-section {
    margin-bottom: var(--spacing-lg);
}

.time-display {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.time-current,
.time-duration {
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(59, 255, 0, 0.5);
    min-width: 60px;
}

.progress-container {
    flex: 1;
    position: relative;
    height: 10px;
}

.progress-bar {
    width: 100%;
    height: 100%;
    background: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 245, 255, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-glow {
    position: absolute;
    top: -5px;
    right: -10px;
    width: 20px;
    height: 20px;
    background: var(--neon-cyan);
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.8;
}

.seek-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Control Panel */
.control-panel {
    margin-bottom: var(--spacing-lg);
}

.main-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
}

.control-btn {
    background: var(--bg-tertiary);
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--glow-cyan);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn-primary {
    width: 80px;
    height: 80px;
    border-color: var(--neon-pink);
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.control-btn-primary:hover {
    box-shadow: var(--glow-pink);
}

.control-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.control-btn-primary .control-icon {
    width: 32px;
    height: 32px;
}

.control-btn[data-active="true"] {
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: var(--glow-cyan);
}

/* Audio Controls */
.audio-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid rgba(131, 56, 236, 0.3);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.volume-slider-container {
    position: relative;
    width: 150px;
}

.volume-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    border: 1px solid rgba(255, 0, 110, 0.3);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--neon-pink);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--glow-pink);
    transition: var(--transition-fast);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-level {
    position: absolute;
    top: -30px;
    right: 0;
    font-size: 0.875rem;
    color: var(--neon-yellow);
    font-family: var(--font-primary);
}

.equalizer {
    display: flex;
    gap: var(--spacing-xs);
}

.eq-preset {
    background: var(--bg-tertiary);
    border: 1px solid var(--neon-purple);
    color: var(--neon-purple);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.eq-preset:hover,
.eq-preset.active {
    background: var(--neon-purple);
    color: var(--bg-primary);
    box-shadow: var(--glow-purple);
}

/* Playlist Section */
.playlist-section {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: var(--spacing-md);
    border: 1px solid rgba(0, 245, 255, 0.3);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.playlist-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    text-transform: uppercase;
}

.playlist-action {
    background: transparent;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.playlist-action:hover {
    background: var(--neon-green);
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(59, 255, 0, 0.5);
}

.action-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.playlist-container {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-purple) var(--bg-tertiary);
}

.playlist-container::-webkit-scrollbar {
    width: 8px;
}

.playlist-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.playlist-container::-webkit-scrollbar-thumb {
    background: var(--neon-purple);
    border-radius: 4px;
}

.playlist {
    list-style: none;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 0, 110, 0.1);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.playlist-item:hover {
    background: rgba(0, 245, 255, 0.1);
    padding-left: var(--spacing-md);
}

.playlist-item.active {
    background: rgba(255, 0, 110, 0.1);
    border-left: 3px solid var(--neon-pink);
}

.playlist-item.active::before {
    content: '▶';
    position: absolute;
    left: var(--spacing-sm);
    color: var(--neon-pink);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.track-number {
    min-width: 30px;
    color: var(--neon-purple);
    font-family: var(--font-primary);
    margin-right: var(--spacing-sm);
}

.track-details {
    flex: 1;
}

.track-name {
    color: var(--neon-cyan);
    font-weight: 500;
    display: block;
}

.track-duration {
    color: var(--neon-green);
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .media-player {
        padding: var(--spacing-sm);
    }
    
    .player-container {
        padding: var(--spacing-md);
    }
    
    .media-display {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .album-art-container {
        margin: 0 auto;
        width: 200px;
        height: 200px;
    }
    
    .track-title {
        font-size: 1.75rem;
    }
    
    .main-controls {
        gap: var(--spacing-sm);
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
    }
    
    .control-btn-primary {
        width: 60px;
        height: 60px;
    }
    
    .audio-controls {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}

/* Animations */
@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    41.99% { opacity: 1; }
    42% { opacity: 0.8; }
    43% { opacity: 1; }
    45% { opacity: 0.3; }
    46% { opacity: 1; }
}

.track-title {
    animation: neon-flicker 5s infinite;
}