/* Winamp Classic Skin Theme CSS */

/* -------------------------------------------------------------
   1. Design System & CSS Variables (Theme Base)
   ------------------------------------------------------------- */
:root {
    /* Classic Winamp Skin Dimensions */
    --win-width: 275px;
    --win-height-main: 116px;
    --win-height-eq: 116px;
    --win-height-pl: 116px;
    
    /* Default Classic Theme (Gray & Green) */
    --desktop-bg: #2d3c4d;
    --app-bar-bg: #1c2530;
    --app-bar-text: #8e9fae;
    
    /* Panel colors */
    --win-bg: #28292d;
    --win-border-light: #6e7075;
    --win-border-dark: #101113;
    --win-border-silver: #c0c4cc;
    
    /* Screen */
    --screen-bg: #000000;
    --screen-text: #3bf12d; /* Glowing lime green */
    --screen-text-shadow: 0 0 3px rgba(59, 241, 45, 0.6);
    
    /* Buttons */
    --btn-bg: #3c3d40;
    --btn-border-light: #7a7c82;
    --btn-border-dark: #191a1c;
    --btn-text: #ffffff;
    
    /* Playlist */
    --playlist-bg: #000000;
    --playlist-text: #3bf12d;
    --playlist-selected-bg: #002244;
    --playlist-selected-text: #ffffff;
    
    /* Visualizer (Default Classic) */
    --visualizer-color-1: #00e600; /* Green */
    --visualizer-color-2: #ffff00; /* Yellow */
    --visualizer-color-3: #ff3300; /* Red */
    --visualizer-peak-color: #ff3333; /* Red peak */
    --visualizer-line-color: #22cc22; /* Green line */
    
    --scale-factor: 1;
}

/* Cyberpunk Theme overrides */
body.theme-cyberpunk {
    --desktop-bg: #0a0513;
    --win-bg: #120921;
    --win-border-light: #ff0055;
    --win-border-dark: #00f0ff;
    --screen-bg: #05020a;
    --screen-text: #00f0ff;
    --screen-text-shadow: 0 0 5px rgba(0, 240, 255, 0.7);
    --btn-bg: #1d0e33;
    --btn-border-light: #4c1b7a;
    --btn-border-dark: #000000;
    --btn-text: #ff007f;
    --playlist-bg: #05020a;
    --playlist-text: #ff007f;
    --playlist-selected-bg: #ff0055;
    --playlist-selected-text: #ffffff;
    
    /* Visualizer */
    --visualizer-color-1: #00f0ff; /* Cyan */
    --visualizer-color-2: #ff00aa; /* Pink */
    --visualizer-color-3: #ff0055; /* Neon red */
    --visualizer-peak-color: #ffffff; /* White peak */
    --visualizer-line-color: #ff00aa; /* Pink line */
}

/* Glassmorphism Theme overrides */
body.theme-glass {
    --desktop-bg: linear-gradient(135deg, #161424 0%, #4a4768 100%);
    --win-bg: rgba(255, 255, 255, 0.08);
    --win-border-light: rgba(255, 255, 255, 0.25);
    --win-border-dark: rgba(0, 0, 0, 0.25);
    --screen-bg: rgba(0, 0, 0, 0.4);
    --screen-text: #ffffff;
    --screen-text-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
    --btn-bg: rgba(255, 255, 255, 0.1);
    --btn-border-light: rgba(255, 255, 255, 0.2);
    --btn-border-dark: rgba(0, 0, 0, 0.1);
    --btn-text: #ffffff;
    --playlist-bg: rgba(0, 0, 0, 0.3);
    --playlist-text: rgba(255, 255, 255, 0.9);
    --playlist-selected-bg: rgba(255, 255, 255, 0.2);
    --playlist-selected-text: #ffffff;
    
    /* Visualizer */
    --visualizer-color-1: rgba(255,255,255,0.4);
    --visualizer-color-2: rgba(255,255,255,0.7);
    --visualizer-color-3: rgba(255,255,255,0.9);
    --visualizer-peak-color: rgba(255,255,255,0.95);
    --visualizer-line-color: #ffffff;
}

/* Synthwave Sunset Theme overrides */
body.theme-synthwave {
    --desktop-bg: linear-gradient(180deg, #1f0b2f 0%, #0d0413 100%);
    --win-bg: #220e35;
    --win-border-light: #ff5e00;
    --win-border-dark: #86008b;
    --screen-bg: #120520;
    --screen-text: #ff007f;
    --screen-text-shadow: 0 0 6px rgba(255, 0, 127, 0.8);
    --btn-bg: #3b1456;
    --btn-border-light: #ff00aa;
    --btn-border-dark: #0c0214;
    --btn-text: #ffdd00;
    --playlist-bg: #10031d;
    --playlist-text: #ff9000;
    --playlist-selected-bg: #ff007f;
    --playlist-selected-text: #ffffff;
    
    /* Visualizer */
    --visualizer-color-1: #ff5e00; /* Sunset orange */
    --visualizer-color-2: #ff00aa; /* Neon magenta */
    --visualizer-color-3: #ff007f; /* Neon pink */
    --visualizer-peak-color: #ffea00; /* Sun yellow */
    --visualizer-line-color: #ff00aa;
}
body.theme-synthwave .winamp-window {
    border: 2px solid #ff00aa;
    box-shadow: 0 0 10px rgba(255, 0, 170, 0.4), inset 0 0 4px rgba(255, 0, 170, 0.2);
}
body.theme-synthwave .window-titlebar {
    background-image: linear-gradient(90deg, #ff007f, #ff9000);
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
    border: none;
}
body.theme-synthwave .winamp-window.active .window-titlebar {
    background-image: linear-gradient(90deg, #ff00aa, #ff5e00);
}
body.theme-synthwave .player-screen {
    border: 1.5px solid #ff5e00;
    background-image: linear-gradient(180deg, rgba(31, 11, 47, 0.8) 0%, rgba(13, 4, 19, 0.9) 100%);
    box-shadow: 0 0 8px rgba(255, 94, 0, 0.3);
}

/* Obsidian Minimal Theme overrides */
body.theme-obsidian {
    --desktop-bg: #0a0a0c;
    --win-bg: #121214;
    --win-border-light: #2e2e33;
    --win-border-dark: #070708;
    --screen-bg: #08080a;
    --screen-text: #00d8ff;
    --screen-text-shadow: 0 0 4px rgba(0, 216, 255, 0.5);
    --btn-bg: #1a1a1e;
    --btn-border-light: #313137;
    --btn-border-dark: #0e0e10;
    --btn-text: #a0a0ab;
    --playlist-bg: #09090b;
    --playlist-text: #d4d4d8;
    --playlist-selected-bg: #00d8ff;
    --playlist-selected-text: #000000;
    
    /* Visualizer */
    --visualizer-color-1: #005577; /* Deep ocean */
    --visualizer-color-2: #00aaee; /* Mid blue */
    --visualizer-color-3: #00d8ff; /* Ice blue */
    --visualizer-peak-color: #ffffff; /* White */
    --visualizer-line-color: #00d8ff;
}
body.theme-obsidian .winamp-window {
    border: 1px solid #2e2e33;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    padding: 3px;
}
body.theme-obsidian .window-titlebar {
    background-image: none;
    background-color: #121214;
    color: #a0a0ab;
    border: none;
}
body.theme-obsidian .winamp-window.active .window-titlebar {
    color: #ffffff;
    background-color: #1a1a1e;
}
body.theme-obsidian .player-screen {
    border: 1px solid #2e2e33;
    border-radius: 3px;
    background-image: none;
}
body.theme-obsidian .playlist-tracks {
    border: 1px solid #2e2e33;
    border-radius: 3px;
}
body.theme-obsidian .pl-stats-box {
    border: 1px solid #2e2e33;
    background: #09090b;
}

/* 90s Macintosh Classic Theme overrides */
body.theme-mac {
    --desktop-bg: #336699; /* Macintosh Classic Blue */
    --win-bg: #dcdcdc; /* Platinum Gray */
    --win-border-light: #ffffff;
    --win-border-dark: #808080;
    --screen-bg: #ffffff; /* Black on white */
    --screen-text: #000000;
    --screen-text-shadow: none;
    --btn-bg: #eaeaea;
    --btn-border-light: #ffffff;
    --btn-border-dark: #a0a0a0;
    --btn-text: #000000;
    --playlist-bg: #ffffff;
    --playlist-text: #000000;
    --playlist-selected-bg: #000000;
    --playlist-selected-text: #ffffff;
    
    /* Visualizer */
    --visualizer-color-1: #000000; /* Monochrome black visualizer */
    --visualizer-color-2: #404040;
    --visualizer-color-3: #808080;
    --visualizer-peak-color: #000000;
    --visualizer-line-color: #000000;
}
body.theme-mac .winamp-window {
    border: 1px solid #000;
    box-shadow: 2px 2px 0 #000; /* Flat Chicago-style shadow */
    padding: 3px;
}
body.theme-mac .window-titlebar {
    background-image: repeating-linear-gradient(0deg, #000, #000 1px, transparent 1px, transparent 3px);
    background-color: #eaeaea;
    color: #000000;
    border: 1px solid #000;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
}
body.theme-mac .winamp-window.active .window-titlebar {
    background-image: repeating-linear-gradient(0deg, #000, #000 1px, transparent 1px, transparent 3px);
    background-color: #eaeaea;
    color: #000000;
}
body.theme-mac .win-btn {
    border: 1px solid #000;
    background: #ffffff;
    box-shadow: 1px 1px 0 #000;
}
body.theme-mac .win-btn:active {
    background: #000000;
    border-color: #000;
}
body.theme-mac .player-screen {
    border: 1px solid #000;
    background-image: none; /* No scanlines */
}
body.theme-mac .playlist-tracks {
    border: 1px solid #000;
}
body.theme-mac .pl-stats-box {
    border: 1px solid #000;
    background: #ffffff;
    color: #000000;
}


/* -------------------------------------------------------------
   2. Reset & Drag settings
   ------------------------------------------------------------- */
* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--desktop-bg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.double-size {
    --scale-factor: 2;
}

.app-menu-bar {
    height: 38px;
    background-color: var(--app-bar-bg);
    color: var(--app-bar-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--win-border-dark);
    font-size: 13px;
    z-index: 1000;
}

.logo-text {
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #ffffff;
}

.version-tag {
    font-size: 9px;
    background-color: #3bf12d;
    color: black;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: bold;
}

.menu-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    background: var(--btn-bg);
    border: 1px solid var(--win-border-light);
    color: #ffffff;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 11px;
}

.skin-select {
    background: var(--btn-bg);
    color: #ffffff;
    border: 1px solid var(--win-border-light);
    padding: 2px 6px;
    font-size: 11px;
    outline: none;
}

.winamp-desktop {
    flex: 1;
    position: relative;
    width: 100%;
}

/* -------------------------------------------------------------
   3. Retro Snappable Windows
   ------------------------------------------------------------- */
.winamp-window {
    position: absolute;
    width: var(--win-width);
    background: var(--win-bg);
    border: 2px solid;
    border-color: var(--win-border-light) var(--win-border-dark) var(--win-border-dark) var(--win-border-light);
    box-shadow: inset 1px 1px 0 #888, inset -1px -1px 0 #18191c, 0 8px 16px rgba(0,0,0,0.5);
    padding: 4px;
    z-index: 10;
    transform-origin: top left;
    display: flex;
    flex-direction: column;
}

body.double-size .winamp-window {
    transform: scale(2);
}

.winamp-window.shade-mode {
    height: 22px !important;
    overflow: hidden;
}

/* Repeating horizontal stripe gradient on titlebars */
.window-titlebar {
    height: 14px;
    background-color: #2c2c36;
    background-image: repeating-linear-gradient(0deg, #1a1a20, #1a1a20 1px, #3d3d4a 1px, #3d3d4a 2px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    cursor: move;
    font-family: 'Share Tech Mono', monospace;
    font-size: 8px;
    font-weight: bold;
    color: #b0b4bd;
    letter-spacing: 1px;
    border: 1px solid #000;
    margin-bottom: 2px;
}

.winamp-window.active .window-titlebar {
    color: #ffffff;
    background-image: repeating-linear-gradient(0deg, #24252e, #24252e 1px, #444558 1px, #444558 2px);
}

.title-logo {
    width: 8px;
    height: 8px;
    background-color: #ffaa00;
    border-radius: 1px;
    margin-right: 4px;
    background-image: radial-gradient(circle, #fff 10%, #ff8800 80%);
}

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

/* Beveled titlebar buttons */
.win-btn {
    width: 9px;
    height: 9px;
    background-color: #44454a;
    border: 1px solid;
    border-color: #7a7c82 #1e1f22 #1e1f22 #7a7c82;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.win-btn:active {
    border-color: #1e1f22 #7a7c82 #7a7c82 #1e1f22;
}

.shade-btn::before {
    content: '';
    position: absolute;
    width: 5px;
    height: 1px;
    background: #ccc;
    left: 1px;
    top: 3px;
}

.close-btn::before, .close-btn::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 1px;
    background: #ff4444;
    left: 1px;
    top: 3px;
}
.close-btn::before { transform: rotate(45deg); }
.close-btn::after { transform: rotate(-45deg); }

.window-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Prevent nested flexbox overflow */
}

/* -------------------------------------------------------------
   4. Main Display Screen (Classic CRT Notched Style)
   ------------------------------------------------------------- */
.player-screen {
    height: 52px;
    background: var(--screen-bg);
    border: 1.5px solid;
    border-color: var(--win-border-dark) var(--win-border-light) var(--win-border-light) var(--win-border-dark);
    display: flex;
    padding: 3px 4px;
    margin-bottom: 4px;
    position: relative;
    /* Simulated CRT grid scanline pattern */
    background-image: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                      linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
}

.screen-left {
    width: 78px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 4px;
    border-right: 1px dashed rgba(59, 241, 45, 0.15);
}

/* Play/Pause Indicators */
.play-state-indicators {
    display: flex;
    gap: 4px;
    font-size: 8px;
    font-family: monospace;
    color: #102010;
}

.indicator-play.active {
    color: #3bf12d;
    text-shadow: var(--screen-text-shadow);
}
.indicator-pause.active {
    color: #2299ff;
    text-shadow: 0 0 3px #2299ff;
}
.indicator-stop.active {
    color: #ff3333;
    text-shadow: 0 0 3px #ff3333;
}

/* Large Clock Display */
.time-display {
    display: flex;
    align-items: flex-end;
    font-family: 'Share Tech Mono', 'Courier Prime', monospace;
    font-size: 20px;
    line-height: 18px;
    color: var(--screen-text);
    text-shadow: var(--screen-text-shadow);
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 2px;
}

.time-display .minus-sign {
    font-size: 16px;
    width: 6px;
    text-align: center;
    visibility: hidden;
}

.time-display .minus-sign.active {
    visibility: visible;
}

.time-display .digit {
    width: 11px;
    text-align: center;
}

.time-display .colon {
    width: 10px;
    text-align: center;
    animation: blink 1s step-end infinite;
}

/* Visualizer Frame */
.visualizer-container {
    height: 16px;
    border: 1px solid #1a1a1a;
    background: #000;
}

.visualizer-container canvas {
    width: 76px;
    height: 16px;
    display: block;
}

/* Right Screen (Song Title & Audio Stats) */
.screen-right {
    flex: 1;
    padding-left: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.title-marquee-container {
    height: 18px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px dashed rgba(59, 241, 45, 0.15);
}

.title-marquee {
    position: absolute;
    top: 0px;
    white-space: nowrap;
    font-family: 'VT323', monospace;
    font-size: 13px;
    line-height: 1.2;
    color: var(--screen-text);
    text-shadow: var(--screen-text-shadow);
}

@keyframes marquee-anim {
    0% {
        transform: translateX(0);
    }
    10% {
        transform: translateX(0);
    }
    85% {
        transform: translateX(calc(-1 * var(--scroll-dist, 0px)));
    }
    90%, 100% {
        transform: translateX(calc(-1 * var(--scroll-dist, 0px)));
    }
}

/* Bitrate & Sample rate Stats */
.stats-row {
    display: flex;
    align-items: center;
    font-family: 'VT323', monospace;
    font-size: 11px;
    line-height: 10px;
    color: var(--screen-text);
    margin-top: 2px;
}

.stat-box {
    color: #ffffff;
    background: #151515;
    padding: 0 3px;
    border-radius: 1px;
    font-weight: bold;
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    border: 0.5px solid #222;
}

.stat-unit {
    margin-left: 2px;
    margin-right: 6px;
    font-size: 9px;
    opacity: 0.85;
}

.mono-stereo-indicators {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.stat-light {
    font-size: 9px;
    font-weight: bold;
    color: #1a2318;
}

.stat-light.active {
    color: #3bf12d;
    text-shadow: var(--screen-text-shadow);
}

/* Volume/Balance Slider & EQ/PL toggle Row */
.sliders-eq-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
}

/* -------------------------------------------------------------
   5. Custom Notched Volume/Balance Range Slider
   ------------------------------------------------------------- */
.vol-slider-wrapper, .bal-slider-wrapper {
    flex: 1;
    height: 10px;
    background: #111;
    border: 1px solid #3c3d40;
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 1px;
}

/* Volume notched gradient background */
.vol-slider-wrapper::before {
    content: '';
    position: absolute;
    left: 2px;
    right: 2px;
    top: 3px;
    bottom: 3px;
    background: repeating-linear-gradient(90deg, #1a4d1a, #1a4d1a 1px, transparent 1px, transparent 3px);
    z-index: 0;
    pointer-events: none;
}

.winamp-small-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    height: 4px;
    outline: none;
    margin: 0;
    z-index: 1;
}

/* Volume Slider thumb: classic silver-beveled circle knob */
.winamp-small-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 11px;
    height: 8px;
    background: #c0c4cc;
    border: 1px solid;
    border-color: #fff #222 #222 #fff;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Small EQ / PL Buttons inside screen */
.eq-pl-toggles {
    display: flex;
    gap: 1.5px;
}

.tiny-toggle-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 7px;
    font-weight: bold;
    height: 9px;
    width: 16px;
    background: #404145;
    color: #8c8f96;
    border: 1.5px solid;
    border-color: #6a6c72 #101113 #101113 #6a6c72;
    padding: 0;
    line-height: 6px;
    cursor: pointer;
}

.tiny-toggle-btn.active {
    color: #3bf12d;
    text-shadow: var(--screen-text-shadow);
    border-color: #101113 #6a6c72 #6a6c72 #101113;
}

/* -------------------------------------------------------------
   6. Custom Seek Bar Slot (Full Width)
   ------------------------------------------------------------- */
.seek-container {
    height: 12px;
    background: #0f1012;
    border: 1px solid;
    border-color: #101113 #525458 #525458 #101113;
    padding: 0 2px;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    position: relative;
}

.winamp-seek-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    height: 4px;
    outline: none;
}

/* Seek thumb: classic rectangular brass/gold block */
.winamp-seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 8px;
    background: #a98f4e; /* Gold block */
    background-image: linear-gradient(to bottom, #d2bd88 0%, #7e652a 100%);
    border: 1px solid;
    border-color: #fff #222 #222 #fff;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* -------------------------------------------------------------
   7. Control Buttons Row
   ------------------------------------------------------------- */
.control-panel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.playback-buttons {
    display: flex;
    gap: 2.5px;
}

/* Heavy beveled retro buttons */
.retro-btn {
    width: 22px;
    height: 16px;
    background: var(--btn-bg);
    border: 2px solid;
    border-color: var(--btn-border-light) var(--btn-border-dark) var(--btn-border-dark) var(--btn-border-light);
    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15);
    cursor: pointer;
    position: relative;
    padding: 0;
    
    /* Center icons perfectly */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.retro-btn:active {
    border-color: var(--btn-border-dark) var(--btn-border-light) var(--btn-border-light) var(--btn-border-dark);
    box-shadow: none;
}

/* Retro Icons (Play triangle, Pause lines, Stop box, etc.) */
#btn-prev::before {
    content: '';
    display: block;
    border-style: solid;
    border-width: 3.5px 4px 3.5px 0;
    border-color: transparent #e2e8f0 transparent transparent;
    margin-right: -1px;
}
#btn-prev::after {
    content: '';
    display: block;
    border-style: solid;
    border-width: 3.5px 4px 3.5px 0;
    border-color: transparent #e2e8f0 transparent transparent;
}

#btn-play::before {
    content: '';
    display: block;
    border-style: solid;
    border-width: 4px 0 4px 7px;
    border-color: transparent transparent transparent #3bf12d; /* Active green triangle */
    margin-left: 1px; /* Align visual mass center */
}

#btn-pause::before, #btn-pause::after {
    content: '';
    display: block;
    width: 2px;
    height: 7px;
    background-color: #2299ff;
}
#btn-pause::before {
    margin-right: 1.5px;
}

#btn-stop::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    background-color: #ff3333;
}

#btn-next::before {
    content: '';
    display: block;
    border-style: solid;
    border-width: 3.5px 0 3.5px 4px;
    border-color: transparent transparent transparent #e2e8f0;
}
#btn-next::after {
    content: '';
    display: block;
    border-style: solid;
    border-width: 3.5px 0 3.5px 4px;
    border-color: transparent transparent transparent #e2e8f0;
    margin-left: -1px;
}

#btn-eject {
    flex-direction: column;
    gap: 1px;
}
#btn-eject::before {
    content: '';
    display: block;
    border-style: solid;
    border-width: 0 4px 4px 4px;
    border-color: transparent transparent #a0aec0 transparent;
}
#btn-eject::after {
    content: '';
    display: block;
    width: 8px;
    height: 1.5px;
    background-color: #a0aec0;
}

/* Options & Toggles */
.options-buttons {
    display: flex;
    gap: 3px;
    align-items: center;
}

.option-btn {
    height: 15px;
    background: var(--btn-bg);
    border: 2px solid;
    border-color: var(--btn-border-light) var(--btn-border-dark) var(--btn-border-dark) var(--btn-border-light);
    color: #e2e8f0;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 7px;
    font-weight: bold;
    padding: 0 4px;
    line-height: 11px;
}

.option-btn:active, .option-btn.active {
    border-color: var(--btn-border-dark) var(--btn-border-light) var(--btn-border-light) var(--btn-border-dark);
}

.option-btn.active {
    color: #3bf12d;
    background-color: #101c10;
    text-shadow: var(--screen-text-shadow);
}

.rep-btn-icon::before {
    content: '🗘'; /* repeat symbol */
    font-size: 9px;
}

.bolt-btn {
    color: #ffaa00;
}
.bolt-btn:hover {
    text-shadow: 0 0 3px #ffaa00;
}

/* -------------------------------------------------------------
   8. Equalizer Window
   ------------------------------------------------------------- */
#equalizer-window {
    height: var(--win-height-eq);
}

.eq-header {
    height: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2px;
    margin-bottom: 4px;
}

.eq-toggles {
    display: flex;
    gap: 2px;
}

.eq-toggle-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 7px;
    font-weight: bold;
    width: 24px;
    height: 13px;
    background: var(--btn-bg);
    color: #8c8f96;
    border: 1.5px solid;
    border-color: var(--btn-border-light) var(--btn-border-dark) var(--btn-border-dark) var(--btn-border-light);
    cursor: pointer;
    padding: 0;
}

.eq-toggle-btn.active {
    color: #3bf12d;
    border-color: var(--btn-border-dark) var(--btn-border-light) var(--btn-border-light) var(--btn-border-dark);
    text-shadow: var(--screen-text-shadow);
}

.eq-graph-container {
    width: 86px;
    height: 18px;
    border: 1.5px solid;
    border-color: var(--win-border-dark) var(--win-border-light) var(--win-border-light) var(--win-border-dark);
    background: #000;
}

.eq-graph-container canvas {
    width: 86px;
    height: 18px;
    display: block;
}

.presets-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 15px;
    background: #252628;
    border: 1px solid #5d5f63;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    width: 100px;
}

.presets-menu.show {
    display: block;
}

.preset-item {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    text-align: left;
    padding: 4px 8px;
    font-size: 9px;
    cursor: pointer;
}

.preset-item:hover {
    background: #3e4044;
}

.eq-presets-btn {
    background: var(--btn-bg);
    border: 1.5px solid;
    border-color: var(--btn-border-light) var(--btn-border-dark) var(--btn-border-dark) var(--btn-border-light);
    color: #ffffff;
    font-size: 7px;
    padding: 2px 5px;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
}

.eq-sliders-container {
    display: flex;
    justify-content: space-between;
    height: 60px;
    padding: 0 2px;
}

.eq-slider-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 18px;
    height: 100%;
}

.eq-slider-label {
    font-family: monospace;
    font-size: 6px;
    color: #8a8f98;
    margin-bottom: 2px;
    text-align: center;
}

.eq-slider {
    -webkit-appearance: none;
    appearance: none;
    background: #111;
    width: 4px;
    height: 38px;
    border-radius: 2px;
    outline: none;
    margin: 0;
    writing-mode: vertical-lr;
    direction: rtl; /* Sets top=max, bottom=min natively */
}

.eq-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 11px;
    height: 6px;
    background: #c0c4cc;
    border: 1px solid;
    border-color: #fff #222 #222 #fff;
    cursor: pointer;
}

.eq-val-label {
    font-family: monospace;
    font-size: 6px;
    color: #a0a5b0;
    margin-top: 1px;
}

.eq-sliders-divider {
    width: 1px;
    height: 50px;
    background: var(--win-border-dark);
    margin-top: 6px;
}

.preamp-block {
    margin-right: 4px;
}

/* -------------------------------------------------------------
   9. Playlist Window (CRT Green Monospace)
   ------------------------------------------------------------- */
#playlist-window {
    height: var(--win-height-pl);
    display: flex;
    flex-direction: column;
}

.playlist-tracks {
    flex: 1;
    background-color: var(--playlist-bg);
    border: 1.5px solid;
    border-color: var(--win-border-dark) var(--win-border-light) var(--win-border-light) var(--win-border-dark);
    margin-bottom: 2px;
    overflow-y: auto;
    font-family: 'Share Tech Mono', 'Courier Prime', monospace;
    font-size: 11px;
    padding: 2px 4px;
    color: var(--playlist-text);
    min-height: 50px; /* Reduced min-height to prevent vertical overflow */
}

.playlist-tracks::-webkit-scrollbar {
    width: 11px;
}

.playlist-tracks::-webkit-scrollbar-track {
    background: #111;
    border-left: 1px solid var(--win-border-dark);
}

.playlist-tracks::-webkit-scrollbar-thumb {
    background: var(--btn-bg);
    border: 1px solid;
    border-color: #777 #111 #111 #777;
}

.playlist-item {
    display: flex;
    justify-content: space-between;
    padding: 1px 4px;
    cursor: pointer;
    line-height: 12px;
}

/* Active item highlight: white text on dark blue background */
.playlist-item.active {
    background-color: var(--playlist-selected-bg);
    color: var(--playlist-selected-text);
}

.playlist-item:hover:not(.active) {
    background-color: rgba(59, 241, 45, 0.05);
}

.track-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
    flex: 1;
}

.track-duration {
    flex-shrink: 0;
}

.playlist-placeholder {
    font-size: 9px;
    color: #555555;
    text-align: center;
    padding-top: 18px;
}

/* Playlist Footer Buttons */
.playlist-footer {
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--win-border-dark);
    padding-top: 2px; /* Tightened padding to prevent vertical overflow */
}

.pl-actions-left {
    display: flex;
    gap: 3px;
    align-items: center;
}

.pl-action-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Retro gray playlist control buttons */
.pl-retro-btn {
    background: var(--btn-bg);
    border: 1.5px solid;
    border-color: var(--btn-border-light) var(--btn-border-dark) var(--btn-border-dark) var(--btn-border-light);
    color: #ffffff;
    font-size: 7px;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    cursor: pointer;
    
    /* Fixed equal size & flex center text */
    width: 28px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.pl-retro-btn:active {
    border-color: var(--btn-border-dark) var(--btn-border-light) var(--btn-border-light) var(--btn-border-dark);
}

.pl-action-menu {
    display: none;
    position: absolute;
    left: 0;
    bottom: 16px;
    background: #252628;
    border: 1px solid #5d5f63;
    z-index: 100;
    width: 120px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.5);
}

.pl-action-menu.show {
    display: block;
}

.pl-menu-item {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    text-align: left;
    padding: 5px 8px;
    font-size: 9px;
    cursor: pointer;
}

.pl-menu-item:hover {
    background: #3e4044;
}

/* Stats box on bottom right of Playlist */
.pl-stats-box {
    display: flex;
    align-items: center;
    background: #111;
    border: 1px solid #3c3d40;
    padding: 0 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 8px;
    font-weight: bold;
    color: #3bf12d;
    height: 14px;
    border-radius: 1px;
}

.pl-tracks-count {
    margin-right: 8px;
}

.pl-brand-tag {
    color: #8c8f96;
    margin-right: 8px;
}

.pl-status-tag {
    color: #ff9900;
}

/* -------------------------------------------------------------
   10. Video Window Component (YouTube)
   ------------------------------------------------------------- */
#video-window {
    height: 172px;
    display: flex;
    flex-direction: column;
}

.video-container {
    flex: 1;
    background: #000;
    border: 1.5px solid;
    border-color: var(--win-border-dark) var(--win-border-light) var(--win-border-light) var(--win-border-dark);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#youtube-player-element {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.video-placeholder {
    color: #6a6f78;
    text-align: center;
    z-index: 1;
    pointer-events: none;
}

.video-placeholder-icon {
    width: 32px;
    height: 32px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%234a4d52"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    margin: 0 auto 8px;
    opacity: 0.5;
}

.video-placeholder p {
    margin: 2px 0;
    font-size: 10px;
}

.video-placeholder .sub-text {
    font-size: 8px;
    color: #4a4d52;
}

/* -------------------------------------------------------------
   11. Modals & Dialogs
   ------------------------------------------------------------- */
.winamp-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.winamp-modal-backdrop.show {
    display: flex;
}

.winamp-modal {
    width: 300px;
    background: var(--win-bg);
    border: 2px solid;
    border-color: var(--win-border-light) var(--win-border-dark) var(--win-border-dark) var(--win-border-light);
    box-shadow: inset 1px 1px 0 #888, inset -1px -1px 0 #18191c, 0 10px 25px rgba(0,0,0,0.6);
    padding: 4px;
}

.modal-titlebar {
    height: 14px;
    background: #2c2c36;
    background-image: repeating-linear-gradient(0deg, #1a1a20, #1a1a20 1px, #3d3d4a 1px, #3d3d4a 2px);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 8px;
    font-weight: bold;
    border: 1px solid #000;
}

.modal-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    line-height: 10px;
}

.modal-body {
    padding: 8px;
    color: #ffffff;
}

.modal-prompt {
    font-size: 10px;
    margin-top: 0;
    margin-bottom: 8px;
    font-family: 'Share Tech Mono', monospace;
}

.modal-input {
    width: 100%;
    background: #000;
    border: 1.5px solid;
    border-color: #101113 #525458 #525458 #101113;
    color: #3bf12d;
    padding: 4px 6px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    outline: none;
    margin-bottom: 12px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.modal-btn {
    background: var(--btn-bg);
    border: 2px solid;
    border-color: var(--btn-border-light) var(--btn-border-dark) var(--btn-border-dark) var(--btn-border-light);
    color: #ffffff;
    font-family: 'Share Tech Mono', monospace;
    font-size: 8px;
    font-weight: bold;
    padding: 4px 10px;
    cursor: pointer;
}

.modal-btn:active {
    border-color: var(--btn-border-dark) var(--btn-border-light) var(--btn-border-light) var(--btn-border-dark);
}

/* -------------------------------------------------------------
   10. Background Visual Effects (WMP Style)
   ------------------------------------------------------------- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    display: block;
    background: var(--desktop-bg);
}

.vs-info-overlay {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: var(--visualizer-line-color, #ff00aa);
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid var(--visualizer-line-color, #ff00aa);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}
