/* ============================================
   WINAMP 2.91 - PIXEL PERFECT RECREATION
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Tahoma', 'Arial', sans-serif;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transition: background 0.4s ease, color 0.4s ease;
}

#winamp {
    display: flex;
    width: 550px;
    gap: 0;
    transform: scale(1.5);
    transform-origin: top center;
    margin: 50px auto;
}

.winamp-left {
    display: flex;
    flex-direction: column;
    width: 275px;
}

/* ============================================
   WINDOW BASE STYLES
   ============================================ */

.window {
    background: #3c3c44;
    border: 1px solid;
    border-color: #606068 #101010 #101010 #606068;
    position: relative;
}

.titlebar {
    height: 13px;
    background: linear-gradient(90deg, #244e94 0%, #2456a4 50%, #1c4e8c 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3px;
    border-bottom: 1px solid #1a1a1a;
}

.title {
    color: #fff;
    font-size: 8px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.titlebar-buttons {
    display: flex;
    gap: 2px;
}

.titlebar-buttons button {
    width: 9px;
    height: 9px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #fff #555 #555 #fff;
    padding: 0;
    cursor: pointer;
    position: relative;
}

.btn-minimize::after {
    content: '_';
    font-size: 6px;
    position: absolute;
    top: -2px;
    left: 1px;
    color: #000;
}

.btn-shade::after {
    content: '=';
    font-size: 6px;
    position: absolute;
    top: -1px;
    left: 1px;
    color: #000;
}

.btn-close::after {
    content: 'x';
    font-size: 6px;
    position: absolute;
    top: -1px;
    left: 2px;
    color: #000;
}

.titlebar-buttons button:active {
    border-color: #555 #fff #fff #555;
    background: #a0a0a0;
}

/* ============================================
   MAIN WINDOW - 275x116px
   ============================================ */

#main-window {
    grid-column: 1;
    grid-row: 1;
    width: 275px;
    height: 116px;
}

/* Display Area */
.main-display {
    position: absolute;
    top: 24px;
    left: 11px;
    width: 254px;
    height: 41px;
    background: #000;
    border: 1px solid #1a1a1a;
    display: flex;
    overflow: hidden;
}

.visualizer {
    width: 76px;
    height: 43px;
    background: #000;
    display: flex;
    align-items: flex-end;
    padding: 0 2px;
    gap: 1px;
}

.vis-bar {
    flex: 1;
    background: linear-gradient(to top, #00ff00 0%, #00ff00 50%, #ffff00 70%, #ff0000 100%);
    min-height: 2px;
}

.info-area {
    flex: 1;
    padding: 4px;
    position: relative;
}

.song-title {
    color: #00ff19;
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-shadow: 0 0 2px #00ff19;
}

.track-info {
    position: absolute;
    bottom: 4px;
    left: 4px;
    font-size: 7px;
    color: #00ff19;
    text-shadow: 0 0 2px #00ff19;
}

.track-info span::after {
    font-size: 6px;
    color: #00aa00;
}

.bitrate::after {
    content: 'kbps';
    margin-left: 1px;
}

.khz::after {
    content: 'kHz';
    margin-left: 2px;
}

.time-display {
    width: 60px;
    height: 36px;
    background: #000;
    color: #00ff00;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 4px;
    letter-spacing: -1px;
    font-family: 'Courier New', monospace;
    position: absolute;
    right: 2px;
    top: 2px;
}

/* Clutter Bar */
.clutter-bar {
    position: absolute;
    top: 28px;
    left: 4px;
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.clutter-bar .led {
    font-size: 8px;
    font-family: 'Arial', sans-serif;
    color: #303030;
    line-height: 9px;
    font-weight: bold;
}

.clutter-bar .led.active {
    color: #ffffff;
    text-shadow: 0 0 2px #fff;
}

/* Position Slider */
.position-slider {
    position: absolute;
    top: 72px;
    left: 11px;
    width: 254px;
    height: 10px;
    background: #111;
    border: 1px solid #333;
}

.position-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: var(--handle-pos, 60px);
    width: 28px;
    height: 8px;
    background: #b2b2b2;
    border: 1px solid #777;
    pointer-events: none;
}

/* Controls */
.controls {
    position: absolute;
    top: 88px;
    left: 16px;
    display: flex;
    gap: 0;
}

.controls button {
    width: 23px;
    height: 18px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #fff #555 #555 #fff;
    font-size: 7px;
    padding: 0;
    cursor: pointer;
}

.controls button:active {
    border-color: #555 #fff #fff #555;
    background: #a0a0a0;
}

.btn-eject {
    position: absolute;
    left: 120px;
    width: 22px !important;
    height: 16px !important;
}

/* Volume Area */
.volume-area {
    position: absolute;
    top: 58px;
    left: 107px;
}

.volume-slider,
.balance-slider {
    width: 68px;
    height: 13px;
    background: #000;
    border: 1px solid #333;
    position: relative;
    margin-bottom: 2px;
}

.balance-slider {
    width: 38px;
    position: absolute;
    left: 72px;
    top: 0;
}

.volume-slider::after {
    content: '';
    position: absolute;
    top: 0px;
    left: var(--vol-pos, 30px);
    width: 14px;
    height: 9px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #fff #555 #555 #fff;
    pointer-events: none;
}

.balance-slider::after {
    content: '';
    position: absolute;
    top: 0px;
    left: 11px;
    width: 14px;
    height: 9px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #fff #555 #555 #fff;
    pointer-events: none;
}

/* EQ/PL Buttons */
.eq-pl-buttons {
    position: absolute;
    top: 58px;
    left: 219px;
    display: flex;
    gap: 1px;
}

.btn-eq,
.btn-pl {
    width: 23px;
    height: 12px;
    background: #3c3c44;
    border: 1px solid;
    border-color: #606068 #000 #000 #606068;
    color: #00ff00;
    font-size: 7px;
    font-weight: bold;
    padding: 0;
    cursor: pointer;
}

.btn-eq.active,
.btn-pl.active {
    color: #ffffff;
    text-shadow: 0 0 2px #fff;
}

/* Shuffle/Repeat */
.shuffle-repeat {
    position: absolute;
    top: 89px;
    left: 164px;
    display: flex;
    gap: 4px;
}

.btn-shuffle,
.btn-repeat {
    height: 15px;
    background: #3c3c44;
    border: 1px solid;
    border-color: #606068 #000 #000 #606068;
    color: #444;
    font-size: 7px;
    font-weight: bold;
    padding: 0 4px;
    cursor: pointer;
}

.btn-shuffle.active,
.btn-repeat.active {
    color: #00ff00;
    text-shadow: 0 0 2px #00ff00;
}

.btn-shuffle {
    width: 48px;
}

.btn-repeat {
    width: 30px;
}

/* ============================================
   EQUALIZER WINDOW - 275x116px
   ============================================ */

#equalizer-window {
    width: 275px;
    height: 116px;
}

.eq-controls {
    position: absolute;
    top: 20px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
}

.btn-on,
.btn-auto,
.btn-presets {
    width: 30px;
    height: 12px;
    background: #2c2c34;
    border: 1px solid;
    border-color: #606068 #000 #000 #606068;
    color: #00ff19;
    font-size: 8px;
    font-weight: bold;
    padding: 0;
    cursor: pointer;
    text-shadow: 0 0 2px #00ff19;
}

.btn-presets {
    width: 50px;
}

.eq-sliders {
    position: absolute;
    top: 38px;
    left: 14px;
    right: 14px;
    height: 65px;
    background: #000;
    border: 1px solid #333;
    display: flex;
    padding: 6px 2px;
    gap: 0;
    justify-content: space-between;
}

.slider-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.eq-slider {
    width: 12px;
    height: 48px;
    background: repeating-linear-gradient(to top,
            #1a1a1a 0px,
            #1a1a1a 1px,
            #000 1px,
            #000 2px);
    position: relative;
    border: 1px solid #222;
}

.eq-slider::after {
    content: '';
    position: absolute;
    top: 22px;
    left: 0;
    width: 10px;
    height: 6px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #fff #555 #555 #fff;
}

.slider-group .label {
    font-size: 6px;
    color: #888;
    text-align: center;
    margin-top: 2px;
    transform: scale(0.9);
}

/* ============================================
   PLAYLIST WINDOW - 275x232px
   ============================================ */

#playlist-window {
    width: 275px;
    height: 232px;
    margin-left: 0;
}

.playlist-content {
    position: absolute;
    top: 20px;
    left: 12px;
    right: 12px;
    height: 172px;
    background: #000;
    border: 1px solid #333;
    overflow-y: scroll;
    padding: 0;
}

.playlist-content::-webkit-scrollbar {
    width: 10px;
    background: #3c3c44;
}

.playlist-content::-webkit-scrollbar-thumb {
    background: #909090;
    border: 1px solid;
    border-color: #fff #303030 #303030 #fff;
}

.playlist-item {
    color: #00ff19;
    font-size: 8px;
    line-height: 10px;
    white-space: nowrap;
    overflow: hidden;
    padding: 1px 4px;
    font-family: 'Arial', sans-serif;
    cursor: pointer;
    letter-spacing: 0.2px;
}

.playlist-item.selected {
    background: #244e94;
    color: #fff;
    text-shadow: none;
}

.playlist-item .duration {
    float: right;
}

.playlist-buttons {
    position: absolute;
    bottom: 32px;
    left: 12px;
    display: flex;
    gap: 2px;
}

.playlist-buttons button {
    width: 32px;
    height: 18px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #fff #555 #555 #fff;
    font-size: 7px;
    font-weight: bold;
    padding: 0;
    cursor: pointer;
    color: #000;
}

.playlist-buttons button:active {
    border-color: #555 #fff #fff #555;
    background: #a0a0a0;
}

.playlist-info {
    position: absolute;
    bottom: 32px;
    right: 12px;
    width: 75px;
    height: 18px;
    background: #000;
    border: 1px solid;
    border-color: #000 #606068 #606068 #000;
    color: #00ff19;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 2px #00ff19;
}