/* ====================================================
   Jamstash — Style.css (Modernized)
   ==================================================== */

/* ——— 1. Custom Properties ——— */
:root {
    /* Accent */
    --accent:           #4f6bed;
    --accent-hover:     #3d59d8;
    --accent-subtle:    #eef1fd;

    /* Surfaces */
    --bg-base:          #f4f4f7;
    --bg-surface:       #ffffff;
    --bg-elevated:      #f8f8fb;

    /* Borders */
    --border-light:     #e6e6ee;
    --border:           #d2d2de;

    /* Text */
    --text-1:           #1c1c1e;
    --text-2:           #5a5a6e;
    --text-3:           #a0a0b8;
    --text-link:        #4f6bed;

    /* States */
    --hover-bg:         #eeeef5;
    --selected-bg:      #e6ecfc;
    --playing-bg:       #eef1fd;

    /* Header (always dark) */
    --header-bg:        #1c1c26;
    --header-border:    #2a2a38;
    --header-text:      #e4e4f0;
    --header-muted:     #8080a0;
    --header-hover:     #28283a;
    --header-active-bg: #34344e;

    /* Player (always dark) */
    --player-bg:        #101018;
    --player-border:    #22222e;
    --player-text:      #e4e4f0;
    --player-muted:     #7878a0;
    --player-track:     #303048;
    --player-fill:      #c8caff;

    /* Layout */
    --header-h:         48px;
    --player-h:         68px;
    --panel-w:          280px;
    --queue-w:          320px;

    /* Typography */
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Radius */
    --r-sm:  3px;
    --r:     5px;
    --r-lg:  8px;

    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
    --shadow:    0 4px 16px rgba(0,0,0,0.10);
}

/* ——— 2. Base Reset ——— */
html, body { height: 100%; width: 100%; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    background: var(--bg-base);
    margin: 0;
    padding: 0;
    text-align: center;
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { border: none; background: none; }
a { color: var(--text-link); }

h3.title {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    padding: 0;
    margin: 8px 0 4px;
}
span.alert   { color: var(--text-link); font-size: 12px; margin: 0 0 0 10px; }
span.apiversion { color: var(--text-1); font-weight: 700; font-size: 14px; }

/* ——— 3. Utility Classes ——— */
.floatleft   { float: left; }
.floatright  { float: right; }
.clear       { clear: both; }
.clearright  { clear: right; }
.clearleft   { clear: left; }
.alignleft   { text-align: left; }
.alignright  { text-align: right; }
.aligncenter { text-align: center; }
.padright    { padding: 0 10px 0 0; }
.hide        { display: none; }
.red         { color: #e64f4c; }
.italic      { font-style: italic; }
.beer        { font-size: 17px; }
.codesyntax  { font-family: "Courier New", Courier, monospace; }
.border      { border: 1px solid var(--border); }
.shadow      { box-shadow: var(--shadow-sm); }
.on          { display: block; }
.infolink    { float: right; margin: 0 5px 5px; }
.infolink a  { padding: 0 4px; }
.noselect {
    -ms-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}
.tag {
    padding: 2px 6px;
    border-radius: var(--r-sm);
    display: inline-block;
    background: var(--accent-subtle);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
}

/* ——— 4. Page Layout ——— */
#container {
    text-align: left;
    overflow: hidden;
    width: 100%;
    height: 100%;
}
#content {
    background: var(--bg-base);
    width: 100%;
    height: 100%;
}
#content h2 { font-size: 18px; margin: 5px; padding: 0; }
.tabcontent { margin: 0; }

.smcolumn {
    overflow-y: auto;
    outline: none;
    width: var(--panel-w);
    border-right: 1px solid var(--border-light);
    border-top: 1px solid var(--border-light);
    position: fixed;
    top: var(--header-h);
    bottom: var(--player-h);
    left: 0;
    background: var(--bg-surface);
}
.smcolumn .leftactions {
    margin: 6px 0 0 0;
    position: fixed;
    left: calc(var(--panel-w) - 48px);
}
.lgcolumn {
    height: 100%;
    overflow-y: auto;
    outline: none;
    margin-left: var(--panel-w);
    margin-right: var(--queue-w);
    min-width: 400px;
}
.lgcolumn_expanded     { margin-right: 0 !important; }
.lgcolumn_expandedleft { margin-left:  0 !important; }

.colspacer {
    height: 100px;
    width: 100%;
    display: block;
    float: left;
}
.lgsection {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    width: 100%;
    overflow: hidden;
    position: fixed;
    top: var(--header-h);
    bottom: var(--player-h);
}
.fullsection {
    min-width: 300px;
    overflow: auto;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    position: absolute;
    top: var(--header-h);
    bottom: calc(var(--player-h) + 4px);
    width: 100%;
}
.padder    { padding: 5px; }
.subsection     { margin: 12px 20px; }
.subsection a   { font-size: 12px; }
.subsection small { font-size: 10px; margin: 0 5px; }
.leftsubsection { border-top: 1px solid var(--border-light); }

/* ——— 5. Header ——— */
#header {
    height: var(--header-h);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    display: flex;
    align-items: center;
    padding: 0 12px 0 10px;
    gap: 8px;
    position: relative;
    z-index: 200;
    flex-shrink: 0;
}

#jslogo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: url('../images/favicon_32x32.png') no-repeat center / 26px;
    cursor: pointer;
    border-radius: var(--r-sm);
    opacity: 0.85;
    transition: opacity 0.15s;
    text-decoration: none;
    display: block;
}
#jslogo:hover { opacity: 1; }

#sslogo {
    width: 44px;
    height: 36px;
    flex-shrink: 0;
    background: url('../images/subsonic_36.png') no-repeat center / contain;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s;
    text-decoration: none;
    display: block;
}
#sslogo:hover {
    opacity: 1;
    background-image: url('../images/subsonic_dn_36.png');
}

#nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    z-index: 99;
}
#nav ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}
#nav li { margin: 0; }
#nav a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    color: var(--header-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--r);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    background: transparent;
    border: none;
    height: auto;
    letter-spacing: 0;
}
#nav a img {
    display: block;
    margin: 0;
    opacity: 0.55;
    transition: opacity 0.15s;
}
#nav a span {
    display: inline;
}
#nav a:hover {
    color: var(--header-text);
    background: var(--header-hover);
    border: none;
}
#nav a:hover img { opacity: 0.85; }
#nav a.active {
    color: var(--header-text);
    background: var(--header-active-bg);
    border: none;
    box-shadow: none;
}
#nav a.active img { opacity: 1; }
#nav a.active:hover { border: none; }

.pagetabcenter {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 52px;
    height: 20px;
    background: url('../images/favicon_32x32.png') no-repeat center var(--bg-elevated);
    background-size: 18px;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-left: 1px solid var(--border);
    cursor: pointer;
    z-index: 200;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.pagetabcenter:hover { opacity: 0.8; }

#globalactions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

#version {
    font-size: 10px;
    opacity: 0.5;
    color: var(--header-muted);
    flex-shrink: 0;
}

/* ——— 6. Loading & Messages ——— */
#loading {
    width: 52px;
    height: 52px;
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 9999;
    margin-top: -26px;
    margin-left: -26px;
    background: url('../images/spinner.gif') #1a1a28 no-repeat center;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
}
#messages {
    display: none;
    width: 220px;
    max-height: 200px;
    overflow: hidden;
    font-size: 12px;
    position: fixed;
    z-index: 9999;
    bottom: calc(var(--player-h) + 10px);
    right: 10px;
}
#messages .message {
    color: var(--accent);
    float: right;
    clear: both;
    padding: 8px 12px;
    font-size: 13px;
    margin: 3px 0;
    background: var(--bg-surface);
    border: 1px solid var(--accent-subtle);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    opacity: 0.96;
    cursor: pointer;
}
.status {
    overflow: hidden;
    font-size: 12px;
    text-align: center;
    position: absolute;
    z-index: 99;
    bottom: calc(var(--player-h) + 2px);
    right: 0;
    background: var(--bg-elevated);
    padding: 2px 10px;
    border-top: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
    color: var(--text-2);
    opacity: 0.9;
}
.status a, .pager a { color: var(--text-2); text-decoration: none; font-size: 12px; }
.status a:hover, .pager a:hover { text-decoration: underline; }
.pager { display: none; font-size: 12px; padding: 0 5px; float: right; }

/* ——— 7. Queue Sidebar (#SideBar) ——— */
#SideBar {
    display: none;
    min-height: 100%;
    height: 100%;
    overflow-y: auto;
    width: var(--queue-w);
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
    position: fixed;
    top: var(--header-h);
    right: 0;
    margin-bottom: -50px;
}
#SideBar .header {
    padding: 10px 12px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-3);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
#SideBar .headeractions {
    position: fixed;
    right: 4px;
    top: calc(var(--header-h) + 2px);
    display: flex;
    align-items: center;
    padding: 4px;
    gap: 2px;
}
#SideBar .submit { padding: 0 2px; position: absolute; bottom: 0; }

/* Queue rows */
#SideQueue { }
#SideQueue .row {
    display: block;
    margin: 0;
    padding: 5px 8px;
    font-size: 12px;
    text-align: left;
    overflow: hidden;
    float: none;
    border: none;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    line-height: 22px;
    transition: background 0.1s;
}
#SideQueue .row:hover { background: var(--hover-bg); }
#SideQueue .row.playing { background: var(--playing-bg); color: var(--accent); }
#SideQueue .row.selected { background: var(--selected-bg); }
#SideQueue .row .title { width: 65%; float: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#SideQueue .row .time  { float: left; color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; margin-left: 6px; }
#SideQueue .row .itemactions { float: left; }
#SideQueue .row .itemactions a { width: 20px; height: 20px; display: block; float: left; }

/* ——— 8. Library Style ——— */
ul.simplelist {
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.simplelist li {
    font-size: 13px;
    cursor: pointer;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.1s;
}
ul.simplelist .item .itemactions { float: left; margin: 0 5px; }
ul.simplelist .item .itemactions a { float: left; width: 20px; height: 20px; display: block; margin: 0; }
ul.simplelist li a { text-decoration: none; color: var(--text-1); }
ul.simplelist li:hover { background: var(--hover-bg); }
ul.simplelist li.index {
    color: var(--text-3);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 6px 8px;
    text-align: center;
    border: none;
    background: var(--bg-elevated);
}
ul.simplelist li.index a { color: var(--text-3); }
ul.simplelist li.heading {
    background: var(--bg-elevated);
    border-left: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px;
}
ul.simplelist li.heading a { color: var(--text-link); font-size: 13px; }

ul.actionlist { list-style: none; margin: 0; padding: 0; }
ul.actionlist li { font-size: 13px; cursor: pointer; padding: 0; }
#right-component ul.actionlist li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 8px;
}
#right-component ul.actionlist li .form { float: none; margin: 0; }
#right-component ul.actionlist li jamstash-breadcrumbs { flex-basis: 100%; }
#right-component ul.actionlist li jamstash-breadcrumbs .breadcrumbs { float: none; margin-top: 4px; }

#AutoAlbumContainer li.item { padding: 6px 8px; }
#AutoAlbumContainer a.nextprev { padding: 4px; }
#AutoAlbumContainer a.nextprev:hover { background: var(--accent); color: #fff; border-radius: var(--r-sm); }

ul.mainlist { padding: 0 2px; }
ul.mainlist li.selected { color: #fff; background: var(--accent); }
ul.mainlist li.item a.play {
    width: 20px; height: 18px; display: block;
    background: url('../images/play_gl_6x8.png') no-repeat 6px center;
}
ul.mainlist li.item a.play:hover {
    background: url('../images/play_6x8.png') no-repeat 6px center var(--hover-bg);
}
ul.mainlist li.item a.add {
    width: 20px; height: 18px; display: block;
    background: url('../images/plus_gl_8x8.png') no-repeat 6px center;
}
ul.mainlist li.item a.add:hover {
    background: url('../images/plus_8x8.png') no-repeat 6px center var(--hover-bg);
}
ul.mainlist li.item a.download {
    float: left; width: 20px; height: 18px; display: block;
    background: url('../images/download_gl_9x12.png') no-repeat 5px center;
}
ul.mainlist li.item a.download:hover {
    background: url('../images/download_gd_9x12.png') no-repeat 5px center var(--hover-bg);
}
ul.mainlist li.item .submenu a {
    color: var(--text-link); text-decoration: none; overflow: hidden;
    white-space: nowrap; font-size: 11px;
}
ul.mainlist li.item .submenu a:hover { text-decoration: underline; }

ul.tablist { list-style: none; margin: 4px 0 0 4px; padding: 0; }
ul.tablist li {
    float: left;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-bottom: none;
    font-size: 12px;
    font-weight: 600;
    margin: 0 2px 0 0;
    padding: 6px 10px;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
}
ul.tablist li a { color: var(--text-2); font-size: 13px; text-decoration: none; }
ul.tablist li a:hover { color: var(--text-1); }

/* ——— 9. Song List (Albums + Rows) ——— */
ul.songlist {
    border-collapse: collapse;
    padding: 0;
    margin: 0;
    text-align: left;
}
ul.songlist .album:hover { }
ul.songlist .album {
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    padding: 4px;
    transition: background 0.1s;
}
ul.songlist .album:hover { background: var(--hover-bg); }
ul.songlist .album a {
    color: var(--text-link);
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    font-size: 12px;
}
ul.songlist .album a:hover { text-decoration: underline; }
ul.songlist .album .description {
    background: var(--bg-surface);
    clear: both;
    color: var(--text-1);
    font-size: 13px;
    margin: 5px;
    padding: 6px 12px;
    line-height: 1.6;
    border-radius: var(--r-sm);
}
ul.songlist .album .itemactions {
    width: 100px; padding: 0; margin: 4px 0 0 2px; float: left;
}
ul.songlist .album .itemactions a { float: left; width: 20px; height: 56px; display: block; margin: 0; }
ul.songlist .album .albumart { padding: 0; float: left; }
ul.songlist .album .albumart img {
    margin: 4px 10px 0 6px;
    padding: 0;
    width: 50px;
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-sm);
}
ul.songlist .album .title { padding: 4px 0 0 0; line-height: 1.4; font-weight: 600; }
ul.songlist .album .artist { font-size: 12px; color: var(--text-2); line-height: 14px; }
ul.songlist .album .date   { font-size: 11px; color: var(--text-3); line-height: 14px; }
ul.songlist .album .details { font-size: 11px; color: var(--text-3); line-height: 14px; }

/* Album action icons */
ul.songlist .album a.play     { background: url('../images/play_gl_6x8.png')     no-repeat 7px center; }
ul.songlist .album a.add      { background: url('../images/plus_gl_8x8.png')     no-repeat 6px center; }
ul.songlist .album a.download { background: url('../images/download_gl_9x12.png') no-repeat 5px center; }
ul.songlist .album a.remove   { display: none; }
ul.songlist .album a.rate     { background: url('../images/star_lgo_12x12.png') 4px center no-repeat; }
ul.songlist .album a.favorite { background: url('../images/star_yo_12x12.png')  4px center no-repeat; }
ul.songlist .album a.info     { background: url('../images/info_gl_4x8.png')     no-repeat 7px center; }

/* Album grid */
ul.songlist .albumgrid {
    width: 190px;
    height: 200px;
    float: left;
    margin: 6px;
    border: none;
    padding: 4px 4px 26px 4px;
    border-radius: var(--r);
    transition: background 0.15s;
}
ul.songlist li:hover .albumgrid { background: var(--hover-bg); }
ul.songlist .albumgrid .title {
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    display: block;
    height: 18px;
    text-overflow: ellipsis;
    font-weight: 600;
    color: var(--text-1);
    font-size: 12px;
    position: relative;
    top: 4px;
}
ul.songlist .albumgrid .albumart img {
    width: 160px;
    height: 160px;
    background: url(../images/albumdefault_160.jpg) no-repeat;
    margin: 3px 0 0 15px;
    padding: 0;
    border-radius: var(--r);
    box-shadow: 0 4px 14px rgba(0,0,0,0.16);
    transition: box-shadow 0.2s, transform 0.2s;
}
ul.songlist li:hover .albumgrid .albumart img {
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    transform: translateY(-2px);
    border: none;
    position: static;
    top: auto;
    left: auto;
}
ul.songlist .albumgrid .albuminfo {
    float: left;
    margin: 0 10px;
    overflow: hidden;
    width: 175px;
    text-align: center;
}
ul.songlist li:hover .albumgrid .albuminfo { position: static; top: auto; }
ul.songlist .albumgrid .itemactions { margin: 0 auto; float: none; }
ul.songlist .albumgrid .itemactions a { height: 20px; }
ul.songlist .albumgrid .itemactions a:hover { box-shadow: var(--shadow-sm); border-radius: var(--r-sm); }

/* Song rows */
ul.songlist .row {
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    line-height: 30px;
    transition: background 0.08s;
}
ul.songlist .row a { color: var(--text-link); text-decoration: none; }
ul.songlist .row a:hover { text-decoration: underline; }
ul.songlist .row span.albumblock { color: var(--text-link); font-size: 12px; overflow: hidden; height: 30px; }
ul.songlist .row img {
    display: block; float: left; margin: 0 5px; padding: 1px;
    height: 25px; width: 25px; border-radius: var(--r-sm);
}
ul.songlist .row .itemactions { float: left; padding: 3px 8px 0 12px; }
ul.songlist .row .itemactions a { float: left; width: 24px; height: 24px; display: block; margin: 0; }
ul.songlist .row .track    { width: 5%;  text-align: left; color: var(--text-3); }
ul.songlist .row .title    { width: 25%; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
ul.songlist .row .albumblock { width: 25%; overflow: hidden; height: 30px; }
ul.songlist .row .albumblock img { width: 25px; height: 25px; }
ul.songlist .row .artist   { width: 15%; padding: 0 10px 0 0; color: var(--text-2); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
ul.songlist .row .albumtext { padding: 2px 0 0 5px; }
ul.songlist .row .time     { width: 5%; text-align: right; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Row action icons */
ul.songlist .row a.play     { background: url('../images/play_gl_6x8.png')         no-repeat 7px center; }
ul.songlist .row a.play:hover { background: url('../images/play_6x8.png')          no-repeat 7px center var(--hover-bg); }
ul.songlist .row a.add      { background: url('../images/plus_gl_8x8.png')         no-repeat 6px center; }
ul.songlist .row a.add:hover { background: url('../images/plus_8x8.png')           no-repeat 6px center var(--hover-bg); }
ul.songlist .row a.next     { background: url('../images/arrow_right_gl_8x8.png')  no-repeat center center; }
ul.songlist .row a.next:hover { background: url('../images/arrow_right_gl_8x8.png') no-repeat center center var(--hover-bg); border-radius: var(--r-sm); }
ul.songlist .row a.download { background: url('../images/download_gl_9x12.png') no-repeat 5px center; }
ul.songlist .row a.download:hover { background: url('../images/download_gd_9x12.png') no-repeat 5px center var(--hover-bg); }
ul.songlist .row a.rate     { background: url('../images/star_lgo_12x12.png') center 3px no-repeat; }
ul.songlist .row a.rate:hover { background: url('../images/star_lg_12x12.png') center 3px no-repeat; }
ul.songlist .row a.favorite { background: url('../images/star_yo_12x12.png') center 3px no-repeat; }
ul.songlist .row a.remove {
    width: 20px; height: 20px; display: block; float: left; margin: 0;
    background: url('../images/minus_gl_8x2.png') no-repeat 6px center;
}
ul.songlist .row a.remove:hover { background: url('../images/minus_8x2.png') no-repeat 6px center var(--hover-bg); }

/* Row states */
ul.songlist li:nth-child(odd)  { background: var(--bg-surface); }
ul.songlist li:nth-child(even) { background: var(--bg-elevated); }
ul.songlist li:hover           { background: var(--hover-bg); }
ul.songlist li.playing {
    background: var(--playing-bg) !important;
    border-left: 3px solid var(--accent);
}
ul.songlist li.selected {
    background: var(--selected-bg) !important;
}
ul.songlist li.selected:hover  { background: var(--selected-bg); }
ul.songlist li.album  { background: transparent !important; }

/* ——— 10. Player Bar ——— */
#player {
    border-top: 1px solid var(--player-border);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}
#playercontainer {
    background: var(--player-bg);
    display: flex;
    align-items: center;
    height: var(--player-h);
    padding: 0 14px 0 calc(var(--panel-w) + 14px);
    gap: 10px;
}
#playerleft {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 2px;
}
.playeractions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 6px 0 0;
}
#panel-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 199;
    background: rgba(0, 0, 0, 0.3);
}

#panel-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 20px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    border-radius: var(--r-sm);
    flex-shrink: 0;
    transition: background 0.15s;
    padding: 0;
}
#panel-toggle:hover { background: var(--header-hover); }
#panel-toggle.active { background: var(--header-active-bg); }
#playdeck_1 { width: 0; height: 0; overflow: hidden; flex-shrink: 0; }
#playdeck_2 { display: none; }
#submenu_CurrentPlaylist {
    width: 400px; height: 200px; overflow-y: auto; overflow-x: hidden;
    border: 1px solid var(--border); background: var(--bg-surface);
    box-shadow: var(--shadow); border-radius: var(--r);
    position: fixed;
}

/* Song Details */
#songdetails {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 290px;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
    visibility: hidden;
    color: var(--player-text);
}
#songdetails.hover { /* no additional styling needed */ }
#coverart {
    width: 44px;
    height: 44px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: var(--r-sm);
}
#coverart img { border-radius: var(--r-sm); display: block; }
#songdetails ul {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}
#songdetails ul li { display: block; height: auto; }
#songdetails li.song  { font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; color: var(--player-text); }
#songdetails li.artist { font-size: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; color: var(--player-muted); }
#songdetails li.album  { font-size: 11px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; color: var(--player-muted); }
#songdetails li span.label { color: var(--player-muted); display: inline; margin: 0 4px 0 0; text-align: right; width: 37px; }

#songdetails_controls {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}
#songdetails .jp-volume-bar {
    overflow: hidden; background: #4a4a68; width: 46px; height: 4px;
    cursor: pointer; display: inline-block; margin: 0 4px; border-radius: 2px;
}
#songdetails .jp-volume-bar-value { background: var(--player-fill); width: 0; height: 4px; }

/* Player icon buttons */
#songdetails a.rate    { float: none; flex-shrink: 0; height: 16px; width: 16px; margin: 2px; display: block; background: url('../images/star_w_12x12.png')    center no-repeat; }
#songdetails a.rate:hover { background-image: url('../images/star_wo_12x12.png'); }
#songdetails a.favorite { float: none; flex-shrink: 0; height: 16px; width: 16px; margin: 2px; display: block; background: url('../images/star_yo_12x12.png')  center no-repeat; }
#songdetails a.mute    { float: none; flex-shrink: 0; height: 16px; width: 20px; margin: 2px; display: block; background: url('../images/volume_mute_gl_12x9.png') center no-repeat; }
#songdetails a.unmute  { float: none; flex-shrink: 0; height: 16px; width: 20px; margin: 2px; display: block; background: url('../images/volume_gl_12x9.png')   center no-repeat; }
#songdetails a.volume  { float: none; flex-shrink: 0; height: 16px; width: 20px; margin: 2px; display: block; background: url('../images/volume_gd_12x9.png')   center no-repeat; }
#songdetails a.lock    { float: none; flex-shrink: 0; height: 16px; width: 12px; margin: 2px; display: block; background: url('../images/lock_stroke_gl_9x12.png') center no-repeat; }
#songdetails a.jukebox { float: none; flex-shrink: 0; height: 12px; width: 16px; margin: 2px; display: block; background: url('../images/cloud_w_12x8.png')    center no-repeat; }
#songdetails a.shuffle { float: none; flex-shrink: 0; height: 14px; width: 16px; margin: 2px; display: block; background: url('../images/fork_gd_11x12.png')    center no-repeat; }
#songdetails a.first   { margin: 2px 2px 2px 0; }

/* Progress bar */
#playermiddle {
    flex: 1;
    min-width: 0;
    visibility: hidden;
}
#audiocontainer { width: 100%; }
.audiojs {
    width: 100%;
    height: auto;
    margin: 0;
    background: none;
    font-family: var(--font);
    font-size: 11px;
    box-shadow: none;
    overflow: visible;
    display: flex;
    align-items: center;
    gap: 10px;
}
.audiojs .play-pause { display: none; }
.audiojs .scrubber {
    flex: 1;
    min-width: 0;
    height: 4px;
    float: none;
    width: auto;
    position: relative;
    background: var(--player-track);
    border: none;
    overflow: hidden;
    cursor: pointer;
    border-radius: 2px;
    margin: 0;
}
.audiojs .scrubber:hover { height: 5px; }
.audiojs .progress {
    position: absolute; top: 0; left: 0;
    height: 100%; width: 0;
    background: var(--player-fill);
    border-radius: 2px;
    z-index: 1;
}
.audiojs .loaded {
    position: absolute; top: 0; left: 0;
    height: 100%; width: 0;
    background: var(--player-track);
    filter: brightness(2);
}
.audiojs .time {
    flex-shrink: 0;
    float: none;
    border: none;
    line-height: 1;
    padding: 0;
    font-size: 12px;
    color: var(--player-muted);
    height: auto;
    margin: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.audiojs .time em { padding: 0 2px 0 0; font-style: normal; color: var(--player-text); }
.audiojs .error-message { display: none; }
#preview { display: none; }
.vertshade {
    position: relative;
    top: 0;
    left: 259px;
    width: 32px;
    height: 66px;
    background-image: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
}

/* ——— 11. Action Bars ——— */
.actions {
    height: 36px;
    margin: 4px 5px 0 190px;
    padding: 0 0 0 5px;
    display: flex;
    align-items: center;
}
.subactions {
    float: left;
    height: 36px;
    width: auto;
    margin: 4px 0 0 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.subactions > a.button { padding: 5px 10px; }
#search { margin: 5px; float: left; }

/* ——— 12. A-Z Index ——— */
#AZIndex { float: left; margin: 0 5px 0 0; }
#AZIndex a {
    color: var(--text-link);
    font-size: 22px;
    text-decoration: none;
    padding: 4px;
    display: block;
}
#AZIndex a:hover { text-decoration: underline; }
#submenu_AZIndex {
    display: none;
    width: 200px;
    position: fixed;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    z-index: 999;
}
#submenu_AZIndex ul { list-style: none; margin: 0; padding: 8px 8px 8px 10px; }
#submenu_AZIndex li { float: left; height: 22px; padding: 0 2px 4px 2px; }
#submenu_AZIndex li a { color: var(--accent); text-decoration: none; font-size: 22px; padding: 0 4px 0 0; cursor: pointer; }
#submenu_AZIndex li a:hover { text-decoration: underline; }
#submenu_AZIndex a.close { font-size: 12px; padding: 6px 16px; display: block; }
#submenu_AddToPlaylist { width: 100px; }
#submenu_AddToPlaylist a { float: left; padding: 4px; display: block; clear: both; }

/* ——— 13. Submenus ——— */
.submenu {
    position: fixed;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    padding: 6px 12px;
    margin: 2px 0 0 1px;
    z-index: 999;
}
.submenu a { font-size: 12px; color: var(--text-2); border: none; background: none; padding: 0; text-decoration: none; }
.submenu a:hover { text-decoration: underline; }
#submenu_CurrentPlaylist { width: 400px; height: 200px; overflow-y: auto; overflow-x: hidden; border: 1px solid var(--border); }
#welcome { display: none; background: rgba(0,0,0,0.15); border: 1px solid var(--border); border-radius: var(--r); }

/* ——— 14. Misc/Video/Pager ——— */
.darkoverlay {
    display: none; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1001;
}
#videodeck { position: relative; margin: 0 auto; z-index: 1002; }
.fillheight { position: absolute; top: 0; bottom: 0; left: 0; margin: 0; overflow-y: scroll; overflow-x: hidden; }
#songs { width: 1200px; display: none; }
#songs .songlist { padding: 35px 0 0 0; }
#TrackContainer { margin: 5px 5px 5px 0; width: 60%; }
.songpreview li { list-style: none; font-size: 13px; padding: 8px; border-bottom: 1px solid var(--border-light); }
#SideQueue { }
#ChatMsgs { padding: 5px; margin: 0 0 2px; text-align: right; overflow-y: auto; overflow-x: hidden;
    position: absolute; width: 192px; bottom: 38px; top: 220px; border-bottom: 1px solid var(--border-light); }
#ChatMsgs .msg { margin: 0 0 5px 0; }
#ChatMsgs span.msg  { font-size: 12px; }
#ChatMsgs span.user { font-size: 10px; color: var(--text-3); }
#ChatMsgs span.time { font-size: 9px; color: var(--text-3); }
#NowPlaying { border-bottom: 1px solid var(--border-light); margin: 2px 0; }
#NowPlayingList { height: 150px; padding: 5px; text-align: right; overflow-y: auto; overflow-x: hidden; }
#NowPlayingList .msg { margin: 0 0 5px 0; font-size: 11px; }
#NowPlayingList span.user   { font-size: 10px; color: var(--text-3); }
#NowPlayingList span.artist { font-style: italic; }

/* ——— 15. Settings ——— */
ul.preferences { list-style: none; padding: 0; margin: 0 5px; }
ul.preferences li { font-size: 12px; padding: 8px 0; color: var(--text-1); }
ul.preferences li.title { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding: 0; }
ul.preferences li em {
    background: var(--bg-elevated);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    font-style: normal;
    left: -3px;
    padding: 3px 9px;
    margin: 0 0 0 5px;
    position: relative;
}
ul.preferences li.log { padding: 2px 0; }
ul.preferences li span.version { font-weight: 700; font-size: 11px; padding: 0; display: block; color: var(--text-2); }
ul.preferences li.log span.changes { font-size: 11px; padding: 0 0 0 5px; display: block; color: var(--text-2); }
span.code { font-family: "Courier New", Courier, mono; font-size: 11px; }
#donate { text-align: center; background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: var(--r); padding: 12px; width: 200px; }

/* ——— 16. Buttons ——— */
a.button {
    color: var(--text-2);
    font: 500 12px var(--font);
    text-decoration: none;
    padding: 5px 12px;
    position: relative;
    display: inline-block;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    cursor: pointer;
    white-space: nowrap;
}
a.button:hover {
    color: var(--text-1);
    border-color: var(--border);
    background: var(--hover-bg);
    box-shadow: var(--shadow-sm);
}
a.button:active { color: var(--text-1); border-color: var(--border); background: var(--bg-elevated); box-shadow: none; }
a.buttonimg { text-decoration: none; padding: 6px; cursor: pointer; display: inline-block; border-radius: var(--r-sm); transition: opacity 0.15s; }
a.buttonimg:hover { opacity: 0.6; }
a.buttonvertical { margin: 2px 0; }
a.blockbutton { display: block; text-align: center; text-decoration: none; }
a.selected {
    color: var(--text-1);
    border-color: var(--border);
    background: var(--bg-elevated);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}
a.disabled { color: var(--text-3); background: var(--bg-elevated); border-color: var(--border-light); opacity: 0.6; cursor: default; }
a.disabled:hover { color: var(--text-3); border-color: var(--border-light); box-shadow: none; background: var(--bg-elevated); }
a.button img.pad { margin: 1px 0 -1px 0; }
a.hover:hover { opacity: 0.65; }
a.hoverSelected { opacity: 0.65; }

/* ——— 17. Forms ——— */
.form {
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    overflow: auto;
    float: left;
    margin: 8px;
    border-radius: var(--r);
    padding: 4px;
}
input {
    font-family: var(--font);
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-1);
    background: var(--bg-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,107,237,0.15); }
input.sm    { border: 1px solid var(--border); width: 50px;  margin: 4px; }
input.m     { border: 1px solid var(--border); width: 80px;  margin: 4px; }
input.mlg   { border: 1px solid var(--border); width: 120px; margin: 4px; }
input.large { border: 1px solid var(--border); width: 180px; margin: 4px; }
input.xlarge { border: 1px solid var(--border); width: 260px; margin: 4px; }
input.chat  { border: 1px solid var(--border-light); width: 150px; margin: 4px; }
input#Search { border: 1px solid var(--border); width: 140px; }
select {
    font-family: var(--font);
    font-size: 13px;
    padding: 5px 8px;
    margin: 4px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-1);
    background: var(--bg-surface);
    cursor: pointer;
    outline: none;
}
select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,107,237,0.15); }
select.m      { width: 100px; }
select.large  { width: 192px; }
select#SearchType { margin: 0; }
select.folders { width: 152px; margin: 4px; float: left; }
.submit { margin: 0 5px; }
#settings .submit { text-align: right; margin: 10px; }
label { font-size: 12px; font-weight: 600; margin: 0 5px; color: var(--text-1); }
.inputwrap { float: left; border: 1px solid var(--border); padding: 3px; margin-bottom: 5px; border-radius: var(--r-sm); }
.checkboxes { margin: 10px 5px; vertical-align: middle; }
.checkboxes input, .checkboxes select { float: left; }
.checkboxes label { float: left; margin: 5px 5px 0 5px; }
fieldset { border: 1px solid var(--border-light); border-radius: var(--r); margin-bottom: 6px; padding: 8px; }
fieldset span { font-size: 13px; font-weight: 600; margin: 4px 0; display: block; float: left; }
legend { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }

/* ——— 18. Scrollbar ——— */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.16); border-radius: 3px; cursor: pointer; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.28); }
::-webkit-scrollbar-thumb:window-inactive { background: rgba(0,0,0,0.07); }

/* ——— 19. jQuery UI / Split pane ——— */
.ui-state-default  { background-color: var(--bg-elevated); }
.ui-state-hover    { background-color: var(--hover-bg); }
.ui-state-highlight { background-color: var(--accent-subtle); }
.ui-state-error    { background-color: #fee; }
