/* 80's Retro Music Player */

.music-player-sidebar {
    position: fixed;
    right: -350px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    background: linear-gradient(135deg, 
        rgba(255, 0, 255, 0.1) 0%, 
        rgba(0, 255, 255, 0.1) 50%, 
        rgba(255, 0, 255, 0.1) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid var(--vw-primary);
    border-radius: 20px 0 0 20px;
    padding: 20px;
    z-index: 500;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 
        0 0 40px rgba(255, 0, 255, 0.5),
        inset 0 0 20px rgba(0, 255, 255, 0.2);
}

.music-player-sidebar.open {
    right: 0;
}

/* Toggle button */
.music-player-toggle {
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 100px;
    background: linear-gradient(90deg, 
        rgba(255, 0, 255, 0.3) 0%, 
        rgba(0, 255, 255, 0.3) 100%);
    border: 2px solid var(--vw-primary);
    border-right: none;
    border-radius: 20px 0 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.music-player-toggle:hover {
    background: linear-gradient(90deg, 
        rgba(255, 0, 255, 0.5) 0%, 
        rgba(0, 255, 255, 0.5) 100%);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.8);
}

.music-player-toggle i {
    font-size: 24px;
    animation: pulse 2s infinite;
}

/* Player header */
.player-header {
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Orbitron', monospace;
}

.player-header h3 {
    font-size: 1.5em;
    margin: 0;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

.player-subtitle {
    font-size: 0.8em;
    color: var(--vw-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Cassette tape visualization */
.cassette-container {
    position: relative;
    width: 250px;
    height: 150px;
    margin: 20px auto;
    background: #2a2a2a;
    border-radius: 10px;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 5px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.cassette-label {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 60px;
    background: linear-gradient(135deg, #ff1493, #00ced1);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.cassette-reels {
    position: absolute;
    bottom: 20px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
}

.reel {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 3px solid #444;
    position: relative;
    animation: rotate 2s linear infinite paused;
}

.playing .reel {
    animation-play-state: running;
}

.reel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #666;
    border-radius: 50%;
}

.reel-spokes {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #333;
    transform: translate(-50%, -50%);
}

.reel-spokes::before,
.reel-spokes::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #333;
}

.reel-spokes::before {
    transform: rotate(60deg);
}

.reel-spokes::after {
    transform: rotate(120deg);
}

/* Track info */
.track-info {
    text-align: center;
    margin: 20px 0;
}

.track-title {
    font-size: 1.1em;
    color: var(--vw-text-success);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 0.9em;
    color: var(--vw-text-muted);
}

/* Progress bar */
.progress-container {
    margin: 15px 0;
}

.progress-bar-custom {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff00ff, #00ffff);
    width: 0%;
    transition: width 0.3s ease;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: var(--vw-text-muted);
    margin-top: 5px;
}

/* Controls */
.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--vw-primary);
    color: var(--vw-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 0, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.8);
    transform: scale(1.1);
}

.control-btn.play-pause {
    width: 50px;
    height: 50px;
    font-size: 1.2em;
}

/* Playlist */
.playlist-container {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 20px;
    border-top: 1px solid var(--vw-border);
    padding-top: 10px;
}

.playlist-title {
    font-size: 0.9em;
    color: var(--vw-text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.playlist-item {
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85em;
}

.playlist-item:hover {
    background: rgba(255, 0, 255, 0.1);
    border-radius: 5px;
}

.playlist-item.active {
    color: var(--vw-primary);
    background: rgba(255, 0, 255, 0.2);
    border-radius: 5px;
}

.playlist-item i {
    font-size: 0.8em;
}

/* Volume control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--vw-primary);
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--vw-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Animations */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* EQ Visualizer */
.eq-visualizer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 40px;
    gap: 3px;
    margin: 10px 0;
}

.eq-bar {
    width: 4px;
    background: linear-gradient(to top, #ff00ff, #00ffff);
    border-radius: 2px;
    transition: height 0.1s ease;
}

.playing .eq-bar:nth-child(1) { animation: eq-dance 0.5s ease-in-out infinite; }
.playing .eq-bar:nth-child(2) { animation: eq-dance 0.5s ease-in-out 0.1s infinite; }
.playing .eq-bar:nth-child(3) { animation: eq-dance 0.5s ease-in-out 0.2s infinite; }
.playing .eq-bar:nth-child(4) { animation: eq-dance 0.5s ease-in-out 0.3s infinite; }
.playing .eq-bar:nth-child(5) { animation: eq-dance 0.5s ease-in-out 0.4s infinite; }

@keyframes eq-dance {
    0%, 100% { height: 10px; }
    50% { height: 30px; }
}

/* Responsive */
@media (max-width: 768px) {
    .music-player-sidebar {
        width: 280px;
        right: -330px;
    }
    
    .cassette-container {
        width: 230px;
        height: 140px;
    }
}