/* ===================================
   WINAMP-STYLE RETRO PLAYER
   Classic 90s/2000s Aesthetic
   =================================== */

/* Main Player Container */
.winamp-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 275px;
    font-family: 'Arial', sans-serif;
    z-index: 10000;
    user-select: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.2s ease;
    image-rendering: pixelated;
}

.winamp-player.visible {
    transform: scale(1);
    opacity: 1;
}

.winamp-player.minimized .winamp-main {
    display: flex;
}

.winamp-player.minimized .winamp-eq,
.winamp-player.minimized .winamp-playlist,
.winamp-player.minimized .winamp-video {
    display: none;
}

/* Shared Panel Styles */
.winamp-panel {
    background: linear-gradient(180deg, #3a3a4a 0%, #2a2a3a 50%, #1a1a2a 100%);
    border: 2px solid #1a1a2a;
    border-top-color: #5a5a6a;
    border-left-color: #5a5a6a;
    box-shadow: 
        inset 1px 1px 0 #4a4a5a,
        inset -1px -1px 0 #0a0a1a,
        2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* ===================================
   MAIN PLAYER WINDOW
   =================================== */

.winamp-main {
    padding: 3px;
}

/* Title Bar */
.winamp-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #1a1a6a 0%, #3a3a8a 50%, #1a1a6a 100%);
    padding: 2px 4px;
    margin-bottom: 2px;
    cursor: move;
}

.winamp-title {
    color: #ffffff;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000;
}

.winamp-controls {
    display: flex;
    gap: 1px;
}

.winamp-ctrl-btn {
    width: 9px;
    height: 9px;
    background: linear-gradient(180deg, #4a4a5a 0%, #2a2a3a 100%);
    border: 1px solid #1a1a2a;
    border-top-color: #6a6a7a;
    border-left-color: #6a6a7a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    color: #aaa;
}

.winamp-ctrl-btn:hover {
    background: linear-gradient(180deg, #5a5a6a 0%, #3a3a4a 100%);
}

.winamp-ctrl-btn:active {
    border-color: #6a6a7a;
    border-top-color: #1a1a2a;
    border-left-color: #1a1a2a;
}

/* Display Area */
.winamp-display {
    background: #0a0a0a;
    border: 2px solid #0a0a1a;
    border-top-color: #1a1a2a;
    border-left-color: #1a1a2a;
    padding: 4px;
    margin: 2px;
}

.winamp-display-inner {
    background: linear-gradient(180deg, #000a14 0%, #001a28 100%);
    padding: 4px 6px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
}

/* Time Display */
.winamp-time {
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: bold;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00aa00;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

/* Track Info */
.winamp-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.winamp-bitrate {
    display: flex;
    gap: 8px;
    font-size: 8px;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.winamp-bitrate span {
    background: #001a14;
    padding: 1px 4px;
    border: 1px solid #003322;
}

/* Scrolling Track Title */
.winamp-track-scroll {
    overflow: hidden;
    white-space: nowrap;
}

.winamp-track-title {
    color: #00ff00;
    font-size: 9px;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff00;
    display: inline-block;
    animation: scrollTrack 10s linear infinite;
    padding-right: 50px;
}

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

/* Stereo/Mono Indicators */
.winamp-stereo {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.winamp-stereo span {
    font-size: 7px;
    padding: 1px 3px;
    background: #001a14;
    border: 1px solid #003322;
}

.winamp-stereo span.active {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.winamp-stereo span:not(.active) {
    color: #004400;
}

/* Volume & Balance */
.winamp-sliders {
    display: flex;
    gap: 8px;
    padding: 4px;
    align-items: center;
}

.winamp-slider-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.winamp-slider-label {
    font-size: 7px;
    color: #aaa;
    width: 20px;
}

.winamp-slider {
    -webkit-appearance: none;
    width: 68px;
    height: 10px;
    background: linear-gradient(180deg, #1a1a2a 0%, #2a2a3a 50%, #1a1a2a 100%);
    border: 1px solid #0a0a1a;
    border-top-color: #3a3a4a;
    border-left-color: #3a3a4a;
    cursor: pointer;
}

.winamp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 10px;
    background: linear-gradient(180deg, #6a6a7a 0%, #4a4a5a 50%, #3a3a4a 100%);
    border: 1px solid #2a2a3a;
    border-top-color: #8a8a9a;
    border-left-color: #8a8a9a;
    cursor: pointer;
}

/* Main Controls */
.winamp-main-controls {
    display: flex;
    justify-content: center;
    gap: 2px;
    padding: 4px;
}

.winamp-btn {
    width: 23px;
    height: 18px;
    background: linear-gradient(180deg, #4a4a5a 0%, #3a3a4a 50%, #2a2a3a 100%);
    border: 1px solid #1a1a2a;
    border-top-color: #6a6a7a;
    border-left-color: #6a6a7a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 10px;
}

.winamp-btn:hover {
    background: linear-gradient(180deg, #5a5a6a 0%, #4a4a5a 50%, #3a3a4a 100%);
}

.winamp-btn:active {
    border-color: #6a6a7a;
    border-top-color: #1a1a2a;
    border-left-color: #1a1a2a;
    background: linear-gradient(180deg, #2a2a3a 0%, #3a3a4a 50%, #4a4a5a 100%);
}

.winamp-btn.playing {
    background: linear-gradient(180deg, #2a4a3a 0%, #1a3a2a 50%, #0a2a1a 100%);
    color: #00ff00;
}

.winamp-btn svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

/* Shuffle & Repeat */
.winamp-toggles {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 2px 4px 4px;
}

.winamp-toggle {
    font-size: 7px;
    padding: 2px 6px;
    background: linear-gradient(180deg, #3a3a4a 0%, #2a2a3a 100%);
    border: 1px solid #1a1a2a;
    border-top-color: #5a5a6a;
    border-left-color: #5a5a6a;
    color: #666;
    cursor: pointer;
}

.winamp-toggle.active {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    background: linear-gradient(180deg, #1a3a2a 0%, #0a2a1a 100%);
}

/* ===================================
   EQUALIZER WINDOW
   =================================== */

.winamp-eq {
    margin-top: -2px;
    padding: 3px;
}

.winamp-eq-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #1a1a6a 0%, #3a3a8a 50%, #1a1a6a 100%);
    padding: 2px 4px;
    margin-bottom: 2px;
}

.winamp-eq-title {
    color: #ffffff;
    font-size: 8px;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000;
}

.winamp-eq-controls {
    display: flex;
    gap: 8px;
    padding: 4px;
}

.winamp-eq-toggle {
    font-size: 7px;
    padding: 2px 6px;
    background: linear-gradient(180deg, #3a3a4a 0%, #2a2a3a 100%);
    border: 1px solid #1a1a2a;
    border-top-color: #5a5a6a;
    border-left-color: #5a5a6a;
    color: #666;
    cursor: pointer;
}

.winamp-eq-toggle.active {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.winamp-eq-sliders {
    display: flex;
    gap: 3px;
    padding: 4px;
    justify-content: center;
    background: #0a0a14;
    margin: 2px;
    border: 1px solid #1a1a2a;
}

.winamp-eq-slider-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.winamp-eq-slider {
    -webkit-appearance: none;
    width: 14px;
    height: 50px;
    background: linear-gradient(180deg, 
        #ff0000 0%, 
        #ffff00 25%, 
        #00ff00 50%, 
        #00ff00 75%, 
        #00ff00 100%
    );
    border: 1px solid #0a0a1a;
    cursor: pointer;
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
}

.winamp-eq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 6px;
    background: linear-gradient(180deg, #8a8a9a 0%, #5a5a6a 100%);
    border: 1px solid #3a3a4a;
    border-top-color: #aaaaaa;
    cursor: pointer;
}

.winamp-eq-label {
    font-size: 6px;
    color: #00ff00;
    text-shadow: 0 0 3px #00ff00;
}

/* ===================================
   VIDEO/PLAYLIST WINDOW
   =================================== */

.winamp-video {
    margin-top: -2px;
    padding: 3px;
}

.winamp-video-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #1a1a6a 0%, #3a3a8a 50%, #1a1a6a 100%);
    padding: 2px 4px;
    margin-bottom: 2px;
}

.winamp-video-title {
    color: #ffffff;
    font-size: 8px;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000;
}

.winamp-video-container {
    background: #000;
    border: 2px solid #0a0a1a;
    border-top-color: #1a1a2a;
    border-left-color: #1a1a2a;
    margin: 2px;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
}

.winamp-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.winamp-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #000a14 0%, #001428 100%);
    color: #00ff00;
    font-size: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.winamp-video-placeholder:hover {
    background: linear-gradient(180deg, #001428 0%, #002850 100%);
}

.winamp-video-placeholder .play-icon {
    font-size: 32px;
    margin-bottom: 8px;
    text-shadow: 0 0 20px #00ff00;
}

/* ===================================
   PLAYLIST WINDOW
   =================================== */

.winamp-playlist {
    margin-top: -2px;
    padding: 3px;
}

.winamp-playlist-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #1a1a6a 0%, #3a3a8a 50%, #1a1a6a 100%);
    padding: 2px 4px;
    margin-bottom: 2px;
}

.winamp-playlist-title {
    color: #ffffff;
    font-size: 8px;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000;
}

.winamp-playlist-content {
    background: #0a0a14;
    border: 2px solid #0a0a1a;
    border-top-color: #1a1a2a;
    border-left-color: #1a1a2a;
    margin: 2px;
    max-height: 80px;
    overflow-y: auto;
}

.winamp-playlist-item {
    display: flex;
    justify-content: space-between;
    padding: 2px 4px;
    font-size: 8px;
    color: #00ff00;
    cursor: pointer;
    border-bottom: 1px solid #001a14;
}

.winamp-playlist-item:hover {
    background: #001a28;
}

.winamp-playlist-item.active {
    background: #002850;
    color: #ffffff;
}

.winamp-playlist-item .track-num {
    color: #00aa00;
    margin-right: 4px;
}

.winamp-playlist-item .track-duration {
    color: #00aa00;
}

.winamp-playlist-footer {
    display: flex;
    justify-content: space-between;
    padding: 2px 4px;
    font-size: 7px;
    color: #00ff00;
    background: #0a0a14;
    margin: 2px;
    margin-top: 0;
    border: 1px solid #001a14;
    border-top: none;
}

/* ===================================
   VISUALIZER
   =================================== */

.winamp-visualizer {
    display: flex;
    gap: 1px;
    height: 20px;
    align-items: flex-end;
    background: #000a14;
    padding: 2px;
    margin: 2px 4px;
    border: 1px solid #001a14;
}

.winamp-viz-bar {
    width: 3px;
    background: linear-gradient(180deg, #ff0000 0%, #ffff00 30%, #00ff00 100%);
    animation: vizBounce 0.3s ease-in-out infinite alternate;
}

.winamp-viz-bar:nth-child(1) { animation-delay: 0s; height: 60%; }
.winamp-viz-bar:nth-child(2) { animation-delay: 0.05s; height: 80%; }
.winamp-viz-bar:nth-child(3) { animation-delay: 0.1s; height: 40%; }
.winamp-viz-bar:nth-child(4) { animation-delay: 0.15s; height: 90%; }
.winamp-viz-bar:nth-child(5) { animation-delay: 0.2s; height: 50%; }
.winamp-viz-bar:nth-child(6) { animation-delay: 0.25s; height: 70%; }
.winamp-viz-bar:nth-child(7) { animation-delay: 0.3s; height: 85%; }
.winamp-viz-bar:nth-child(8) { animation-delay: 0.35s; height: 45%; }
.winamp-viz-bar:nth-child(9) { animation-delay: 0.4s; height: 65%; }
.winamp-viz-bar:nth-child(10) { animation-delay: 0.45s; height: 55%; }
.winamp-viz-bar:nth-child(11) { animation-delay: 0.5s; height: 75%; }
.winamp-viz-bar:nth-child(12) { animation-delay: 0.55s; height: 40%; }
.winamp-viz-bar:nth-child(13) { animation-delay: 0.6s; height: 60%; }
.winamp-viz-bar:nth-child(14) { animation-delay: 0.65s; height: 80%; }
.winamp-viz-bar:nth-child(15) { animation-delay: 0.7s; height: 50%; }
.winamp-viz-bar:nth-child(16) { animation-delay: 0.75s; height: 70%; }
.winamp-viz-bar:nth-child(17) { animation-delay: 0.8s; height: 90%; }
.winamp-viz-bar:nth-child(18) { animation-delay: 0.85s; height: 35%; }
.winamp-viz-bar:nth-child(19) { animation-delay: 0.9s; height: 65%; }

@keyframes vizBounce {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

.winamp-player:not(.playing) .winamp-viz-bar {
    animation: none;
    height: 4px !important;
    background: #003300;
}

/* ===================================
   OPEN PLAYER BUTTON
   =================================== */

.winamp-open-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(180deg, #4a4a5a 0%, #2a2a3a 100%);
    border: 2px solid #1a1a2a;
    border-top-color: #6a6a7a;
    border-left-color: #6a6a7a;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.winamp-open-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 255, 0, 0.4);
}

.winamp-open-btn svg {
    width: 28px;
    height: 28px;
    fill: #00ff00;
    filter: drop-shadow(0 0 5px #00ff00);
}

.winamp-open-btn.hidden {
    display: none;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .winamp-player {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: 300px;
    }
    
    .winamp-open-btn {
        bottom: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
    }
}

/* ===================================
   FEATURED ARTIST BADGE
   =================================== */

.winamp-featured-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: linear-gradient(135deg, #ff0066 0%, #ff3399 100%);
    color: white;
    font-size: 6px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(255, 0, 102, 0.5);
    animation: badgePulse 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Artist Highlight */
.winamp-artist-highlight {
    background: linear-gradient(90deg, #ff006620 0%, transparent 100%);
    border-left: 2px solid #ff0066;
    padding-left: 4px;
    margin: 2px 4px;
}

.winamp-artist-name {
    color: #ff0066;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 0 0 10px #ff0066;
}

.winamp-artist-track {
    color: #00ff00;
    font-size: 8px;
}
