@import url("https://queye.dev/fonts/master.css");

/* ===========================================================
   GLOBAL / RESETS
   Uses: var(--body-font), var(--heading-font)
   =========================================================== */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, var(--bg-accent-1, rgba(72, 194, 176, 0.12)), transparent 32%),
                radial-gradient(circle at 80% 0%, var(--bg-accent-2, rgba(56, 158, 143, 0.10)), transparent 26%),
                #101010;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-size: 140% 140%, 140% 140%, auto;
    background-attachment: fixed;
    background-position: center;
    color: #fff;
    font-family: var(--body-font), sans-serif;
}

:root {
    --accent-color: rgb(255, 255, 255);
    --accent-strong: rgb(245, 245, 245);
    --accent-shadow: rgba(255, 255, 255, 0.25);
    --accent-sheer: rgba(255, 255, 255, 0.12);
    --accent-contrast: #0d0d12;
    --bg-accent-1: rgba(255, 255, 255, 0.12);
    --bg-accent-2: rgba(255, 255, 255, 0.08);
}

*, *::before, *::after {
    box-sizing: border-box;
}

button, input, select, textarea {
    font-family: var(--body-font), sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}

.ghost-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #262626;
    background: #161616;
    color: #c8d1e0;
    font-size: 14px;
    transition: border-color .15s, background .15s, transform .12s;
}

.ghost-link:hover {
    border-color: #3a3a3a;
    background: #1c1c1c;
    transform: translateY(-1px);
}



/* ===========================================================
   APP LAYOUT
   =========================================================== */

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}

.app-main {
    flex: 1 1 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    margin-left: 240px;
    transition: margin-left 0.2s ease;
}

body.sidebar-collapsed .app-main {
    margin-left: 72px;
}

#content {
    flex: 1 1 auto;
    padding: 20px 28px 120px;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 240px;
    background: #0f0f12;
    border-right: 1px solid #1c1c1c;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 100;
    transition: width 0.2s ease, padding 0.2s ease;
}

body.sidebar-collapsed .sidebar {
    width: 72px;
    padding: 24px 12px;
}

.sidebar-logo a {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

body.sidebar-collapsed .sidebar-logo {
    justify-content: center;
}

.sidebar-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-img {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.sidebar-logo-text {
    display: inline-block;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-nav a {
    padding: 10px 12px;
    border-radius: 10px;
    color: #c8d1e0;
    font-size: 14px;
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav a.active {
    background: #1c1c1c;
    color: #fff;
    border-color: rgba(255,255,255,0.12);
}

.sidebar-nav a:hover {
    background: #1c1c1c;
    color: #fff;
}

.sidebar-search {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #1c1c1c;
}

.sidebar-search input {
    flex: 1;
    min-width: 0;
    background: #161616;
    border: 1px solid #2b2b2b;
    border-radius: 8px;
    padding: 8px 10px;
    color: #e6e6e6;
    font-family: inherit;
}

.sidebar-search button {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #2b2b2b;
    background: #161616;
    color: #e6e6e6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0,0,0,0.35);
}

.sidebar-search button:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--accent-contrast);
}
.sidebar-toggle {
    position: fixed;
    top: 16px;
    left: 260px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #2b2b2b;
    background: #161616;
    color: #e6e6e6;
    cursor: pointer;
    z-index: 110;
    box-shadow: 0 8px 16px rgba(0,0,0,0.35);
    transition: left 0.2s ease, background .12s ease, border-color .12s ease;
}

.sidebar-toggle:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--accent-contrast);
}

body.sidebar-collapsed .sidebar-toggle {
    left: 92px;
}

.back-link-top {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    order: -1;
}

body.sidebar-collapsed .back-link-top {
    left: auto;
}

body.sidebar-collapsed .sidebar {
    width: 72px;
    padding: 24px 12px;
}

body.sidebar-collapsed .app-main {
    margin-left: 72px;
}

body.sidebar-collapsed .sidebar-nav a .nav-text,
body.sidebar-collapsed .sidebar-search input {
    display: none;
}

body.sidebar-collapsed .sidebar-logo .sidebar-logo-text {
    display: none;
}

body.sidebar-collapsed .sidebar-logo-img {
    width: 22px;
    height: 22px;
}


body.sidebar-collapsed .sidebar-search button {
    width: 36px;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 8px 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.page-hero h1 {
    margin: 6px 0;
    font-size: 28px;
    letter-spacing: 0.01em;
}

.page-hero .subhead {
    color: #b6c0d4;
    line-height: 1.45;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-btn {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid #242424;
    background: #151515;
    color: #e6e6e6;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background .12s ease, border-color .12s ease, transform .12s ease, color .12s ease;
}

.action-btn:hover:not(:disabled) {
    border-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-1px);
}

.action-btn.danger {
    border-color: #751c1c;
    background: rgba(117, 28, 28, 0.15);
    color: #f4bebe;
}

.action-btn.danger:hover:not(:disabled) {
    border-color: #ff5d5d;
    color: #ffffff;
}

.action-btn.primary {
    background: var(--accent-strong);
    border-color: var(--accent-color);
    color: var(--accent-contrast);
    box-shadow: 0 10px 22px var(--accent-shadow);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 4px;
}

.page-tab {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #1f1f1f;
    background: #121212;
    color: #c8d1e0;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background .12s ease, border-color .12s ease, color .12s ease, transform .12s ease;
}

.page-tab:hover {
    border-color: var(--accent-color);
    color: #ffffff;
    transform: translateY(-1px);
}

.page-tab.active {
    background: var(--accent-strong);
    border-color: var(--accent-color);
    color: var(--accent-contrast);
    box-shadow: 0 10px 22px var(--accent-shadow);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #1f1f1f;
    color: #c8d1e0;
    font-size: 13px;
    border: 1px solid #262626;
}

.empty-state {
    display: grid;
    gap: 16px;
    padding: 24px;
    border: 1px solid #262626;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 42%),
        #151515;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.24);
}

.empty-state-copy h2 {
    margin: 6px 0 0;
    font-size: 34px;
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.empty-state-copy .subhead {
    margin-top: 10px;
}

.empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.empty-state-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.empty-state-list li {
    position: relative;
    padding-left: 18px;
    color: #d2dae8;
    line-height: 1.5;
}

.empty-state-list li::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-color);
}



/* ===========================================================
   HEADER
   =========================================================== */

.top-header {
    height: 64px;
    background: rgba(15, 15, 18, 0.9);
    border-bottom: 1px solid #1c1c1c;
    padding: 0 28px;
    backdrop-filter: blur(10px);

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;
    z-index: 20;
}

.top-header .logo {
    font-family: var(--heading-font);
}

.top-header .logo a {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .04em;
}

.top-nav {
    display: flex;
    gap: 12px;
}

.top-nav a {
    padding: 8px 14px;
    border-radius: 12px;
    color: #c8d1e0;
    font-size: 14px;
    transition: background .15s, color .15s, border-color .15s;
    border: 1px solid transparent;
}

.top-nav a:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #262626;
}



/* ===========================================================
   NOW PLAYING BAR (BOTTOM)
   =========================================================== */

.now-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;

    height: 76px;
    background: #0f0f12;
    border-top: 1px solid #1c1c1c;

    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 14px;

    cursor: pointer;
    z-index: 50;
}

.now-bar-cover {
    width: 54px;
    height: 54px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: #333;
    box-shadow: 0 10px 20px rgba(0,0,0,0.35);
}

.now-bar-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.now-bar-title {
    font-size: 15px;
    font-family: var(--heading-font);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.now-bar-artist {
    font-size: 13px;
    color: #b3b3b3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.now-bar-controls {
    display: flex;
    gap: 8px;
}

.now-bar-controls button,
.np-controls button {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid #2b2b2b;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08), transparent 60%), #161616;
    color: #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background .12s ease, transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.now-bar-controls .icon,
.np-controls .icon {
    width: 18px;
    height: 18px;
}

#player .mini-controls .icon {
    width: 18px;
    height: 18px;
}

.sidebar-toggle .icon,
.now-close-btn .icon {
    width: 18px;
    height: 18px;
}

.now-bar-controls button:hover,
.np-controls button:hover {
    background: var(--accent-strong);
    border-color: var(--accent-color);
    color: var(--accent-contrast);
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 10px 20px var(--accent-shadow);
}

#player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    background: #0f0f12;
    border-top: 1px solid #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 90;
    margin-left: 240px;
    transition: margin-left 0.2s ease;
}

body {
    padding-bottom: 76px;
}

body.sidebar-collapsed #player {
    margin-left: 72px;
}

.mini-title {
    font-size: 15px;
    font-family: var(--body-font);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mini controls in footer */
.mini-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-controls button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #252525;
    background: linear-gradient(145deg, #1a1a1a, #121214);
    color: #f2f2f2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: background .12s ease, border-color .12s ease, transform .12s ease, box-shadow .12s ease, color .12s ease;
}

.mini-controls button:hover {
    background: linear-gradient(145deg, var(--accent-strong), var(--accent-color));
    border-color: var(--accent-color);
    color: var(--accent-contrast);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 20px var(--accent-shadow), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* ===========================================================
   LIBRARY + ALBUM GRID
   =========================================================== */

.library-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.library-header h1 {
    font-family: var(--heading-font);
    font-size: 28px;
    margin: 0;
}

.album-grid {
    margin-top: 20px;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.album-card {
    border-radius: 14px;
    padding: 12px;
    cursor: pointer;
    display: block;
    transition: background .15s, transform .15s, border-color .15s;
    background: #181818;
    border: 1px solid #242424;
    box-shadow: 0 16px 28px rgba(0,0,0,0.25);
    overflow: hidden;
    position: relative;
}

.album-card:hover {
    background: #1c1c1c;
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.album-cover {
    width: 100%;
    padding-top: 100%;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: #333;
    position: relative;
    overflow: hidden;
}

.album-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.55) 100%);
    opacity: 0;
    transition: opacity .15s;
}

.album-card:hover .album-cover::after {
    opacity: 1;
}

.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(0,0,0,0.6);
    color: #f2f2f2;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.08);
}

.search-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #161616;
    border: 1px solid #242424;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.search-item:hover {
    background: #1c1c1c;
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.search-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: #2a2a2a;
    box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}

.search-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.search-title {
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-sub {
    color: var(--accent-strong);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-type {
    font-size: 12px;
    color: #c8d1e0;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #2b2b2b;
    background: #111;
}

.album-title {
    font-family: var(--heading-font);
    font-size: 15px;
    color: #f5f7fb;
    margin-top: 5px;
    font-weight: 800;
}

.album-artist {
    font-size: 15px;
    color: var(--accent-strong);
}

.album-sub {
    font-size: 12px;
    color: var(--accent-strong);
    opacity: 0.78;
}


/* ===========================================================
   ALBUM DETAIL PAGE
   =========================================================== */

.album-view {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.album-shell {
    background: rgba(0,0,0,0.25);
    border: 1px solid #1f1f1f;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 16px 32px rgba(0,0,0,0.35);
}

.album-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 4px 8px;
    margin-bottom: 6px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.hero-cover-title {
    display: flex;
    align-items: center;
    gap: 18px;
}

.album-hero-cover {
    width: 108px;
    height: 108px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    background-color: #222;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

.album-header {
    display: flex;
    gap: 26px;
    background: #181818;
    border: 1px solid #242424;
    border-radius: 16px;
    padding: 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 18px 32px rgba(0,0,0,0.32);
}

.album-cover-large {
    min-width: 108px;
    height: 108px;
    border-radius: 16px;
    background-size: cover;
    background-color: #333;
    box-shadow: 0 18px 32px rgba(0,0,0,0.35);
}

.album-info h1 {
    margin: 0;
    font-size: 32px;
    font-family: var(--heading-font);
}

.album-info h2 {
    margin: 4px 0 6px;
    font-size: 16px;
    color: #c8d1e0;
}

.album-info span {
    font-size: 14px;
    color: var(--accent-strong);
}

.play-button {
    margin-top: 14px;
    padding: 10px 20px;
    background: var(--accent-strong);
    color: var(--accent-contrast);
    border: 1px solid var(--accent-color);
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--heading-font);
    box-shadow: 0 10px 22px var(--accent-shadow);
}



/* ===========================================================
   TRACK LIST
   =========================================================== */

.album-tracks {
    border-top: 1px solid #1f1f1f;
    background: #161616;
    border-radius: 10px;
    overflow: hidden;
}

.track-row {
    display: grid;
    grid-template-columns: 48px 1fr 60px;
    align-items: center;
    padding: 10px 6px;
    cursor: pointer;
    border-bottom: 1px solid #1f1f1f;
    transition: background .12s, border-color .12s;
    gap: 8px;
}

.track-row:hover {
    background: #1b1b1b;
}

.track-number {
    font-size: 13px;
    color: var(--accent-color);
    text-align: right;
    font-weight: 700;
}

.track-thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #2a2a2a;
    box-shadow: 0 6px 14px rgba(0,0,0,0.35);
    justify-self: center;
}

.track-title {
    font-size: 15px;
    font-weight: 600;
}

.track-duration {
    font-size: 13px;
    color: var(--accent-strong);
    text-align: right;
}

.library-track-list {
    border: 1px solid #1f1f1f;
    background: #161616;
    border-radius: 12px;
    overflow: hidden;
}

.library-track-row {
    display: grid;
    grid-template-columns: 44px 1fr 80px 32px;
    align-items: center;
    padding: 10px 10px;
    cursor: pointer;
    border-bottom: 1px solid #1f1f1f;
    transition: background .12s, border-color .12s;
    gap: 10px;
}

.library-track-row:last-child {
    border-bottom: none;
}

.library-track-row:hover {
    background: #1b1b1b;
    border-color: var(--accent-color);
}

.library-track-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.library-track-meta .track-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.library-track-artist {
    color: var(--accent-strong);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.library-track-row .track-duration {
    justify-self: end;
}



/* ===========================================================
   MOBILE
   =========================================================== */

@media (max-width: 900px) {
    html, body {
        height: 100%;
        -webkit-text-size-adjust: 100%;
        overscroll-behavior: none;
    }

    body {
        background-attachment: scroll;
    }

    .app-main {
        margin-left: 0;
    }

    #content {
        padding: 16px 16px 120px;
    }

    #player {
        margin-left: 0;
        padding: 0 14px;
        height: 68px;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        box-shadow: 0 -12px 24px rgba(0,0,0,0.35);
    }

    body {
        padding-bottom: 68px;
    }

    .mini-title {
        font-size: 14px;
    }

    .mini-artist {
        display: none;
    }

    .sidebar {
        width: 240px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 12px 0 24px rgba(0,0,0,0.4);
    }

    body.mobile-sidebar-open {
        overflow: hidden;
    }

    body.mobile-sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.mobile-sidebar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 90;
    }

    .sidebar-toggle {
        left: 16px;
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .ghost-link {
        padding: 12px 16px;
        font-size: 15px;
    }

    .sidebar-nav a {
        padding: 12px 14px;
        font-size: 15px;
    }

    .sidebar-search input {
        padding: 10px 12px;
        font-size: 15px;
    }

    .sidebar-search button {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .mini-controls button {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 768px) {
    .library-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .search-item {
        grid-template-columns: 40px 1fr;
        padding: 14px;
    }

    .search-type {
        display: none;
    }

    .track-row {
        grid-template-columns: 36px 1fr;
        padding: 12px 8px;
    }

    .track-duration {
        display: none;
    }

    .library-track-row {
        grid-template-columns: 36px 1fr 32px;
        padding: 12px 10px;
    }

    .library-track-row .track-duration {
        display: none;
    }

    .now-inner {
        padding: 24px 20px;
        gap: 32px;
        flex-direction: column;
    }

    .now-left {
        flex: none;
    }

    .now-right {
        flex: none;
        max-height: 40vh;
    }

    .now-fullscreen {
        height: 94vh;
    }

    #now-overlay {
        background: #0f0f12;
    }

    .now-fullscreen {
        height: 100vh;
    }

    .now-inner {
        height: auto;
        min-height: 100vh;
        padding: calc(20px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
        gap: 24px;
        align-items: stretch;
    }

    .now-close-btn {
        top: calc(16px + env(safe-area-inset-top));
        right: 16px;
        width: 42px;
        height: 42px;
        font-size: 20px;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(8px);
    }

    .now-left {
        flex: none;
        width: 100%;
        align-items: center;
        gap: 16px;
    }

    .now-cover {
        width: min(72vw, 320px);
        height: min(72vw, 320px);
        border-radius: 18px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
    }

    .now-track-block {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .now-track-block .np-title {
        font-size: 22px;
        line-height: 1.2;
    }

    .now-track-block .np-artist {
        font-size: 16px;
    }

    .now-track-block .np-album {
        font-size: 12px;
        opacity: 0.85;
    }

    .now-track-block .np-controls {
        justify-content: center;
        gap: 22px;
        margin-bottom: 10px;
    }

    .now-track-block .np-controls button {
        font-size: 24px;
        width: 46px;
        height: 46px;
        border-radius: 16px;
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,255,255,0.12);
    }

    .now-track-block .np-controls .icon {
        width: 22px;
        height: 22px;
    }

    .now-track-block .np-progress-row {
        gap: 12px;
        font-size: 12px;
        width: 100%;
    }

    .np-bar {
        height: 12px;
        background: rgba(255,255,255,0.16);
    }

    .np-bar-handle {
        width: 22px;
        height: 22px;
    }

    .now-right {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 70vh;
        background: rgba(16, 16, 18, 0.96);
        border: 1px solid rgba(255,255,255,0.08);
        border-bottom: none;
        border-radius: 20px 20px 0 0;
        padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
        box-shadow: 0 -20px 40px rgba(0,0,0,0.55);
        transform: translateY(calc(100% - 96px));
        transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1001;
    }

    .now-tabs {
        justify-content: center;
        gap: 20px;
        font-size: 12px;
        height: 52px;
        align-items: center;
        margin-bottom: 8px;
    }

    .now-lyrics-body {
        height: calc(70vh - 100px);
        max-height: calc(70vh - 100px);
        font-size: 22px;
    }

    .lyrics-line {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    #now-overlay.np-panel-open .now-right {
        transform: translateY(0);
    }
}

#now-overlay {
    position: fixed;
    inset: 0;
    background: #121212;
    display: none;
    z-index: 999;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#now-overlay.active {
    display: block;
}

#now-overlay.np-open {
    opacity: 1;
    pointer-events: auto;
}

.now-fullscreen {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: #fff;
}

.now-bg-solid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #121212;
    transition: background 0.6s ease, opacity 0.6s ease;
}

.now-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 40px 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    transform: translateY(16px) scale(0.985);
    opacity: 0.6;
    transition:
        transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.26s ease;
}

#now-overlay.np-open .now-inner {
    transform: translateY(0) scale(1);
    opacity: 1;
}

#lyrics-pip-panel {
    position: fixed;
    bottom: 92px;
    right: 20px;
    width: min(340px, calc(100% - 32px));
    max-height: 320px;
    background: rgba(12, 12, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 0;
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 2400;
    backdrop-filter: blur(6px);
}

#lyrics-pip-panel.active {
    display: flex;
}

.lyrics-pip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.lyrics-pip-title {
    font-weight: 600;
    color: #fff;
}

.lyrics-pip-close {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.lyrics-pip-body {
    padding: 10px 14px 14px;
    font-size: 13px;
    line-height: 1.4;
    color: #f2f2f2;
    overflow-y: auto;
    max-height: 260px;
}

@media (max-width: 900px) {
    #lyrics-pip-panel {
        bottom: 70px;
        right: 12px;
        width: calc(100% - 24px);
        max-height: 260px;
    }
}

.now-close-btn {
    position: absolute;
    top: 24px;
    right: 32px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.now-close-btn:hover {
    background: rgba(0, 0, 0, 0.55);
}

.now-left {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.now-cover {
    width: 320px;
    height: 320px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    background-color: #222;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.now-track-block {
    width: 100%;
    text-align: left;
}

.now-track-block .np-title {
    font-size: 20px;
    font-weight: 800;
}

.now-track-block .np-artist {
    font-size: 20px;
    color: #ddd;
    margin-bottom: 4px;
}

.now-track-block .np-album {
    font-size: 13px;
    color: #bbb;
    margin-bottom: 16px;
}

.now-track-block .np-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 12px;
}

.now-track-block .np-controls button {
    font-size: 20px;
}

.now-track-block .np-progress-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #aaa;
}

.np-bar {
    flex: 1;
    height: 6px;
    background: #2a2a2a;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
}

.np-bar-fill {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    border-radius: 999px;
}

.np-bar-handle {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 0%;
}

.np-bar-handle:hover {
    background: var(--accent-color);
}

.now-right {
    flex: 1;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.now-lyrics-header {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #d0d6ff;
    margin-bottom: 12px;
}

.now-lyrics-body {
    font-size: 26px;
    line-height: 1.6;
    color: rgba(255,255,255,0.92);
    max-height: 60vh;
    overflow-y: auto;
    padding: 18px 14px 28px 10px;
    scroll-behavior: smooth;
}

.lyrics-line {
    font-size: 28px;
    color: #8d8d8d;
    font-weight: 700;
    line-height: 1.55;
    padding: 12px 6px;
    overflow: visible;
    white-space: pre-wrap;
    opacity: 0.6;
    transform: translateY(0);
    transform-origin: left center;
    text-shadow: 0 0 0 rgba(255, 255, 255, 0);
    transition:
        color 0.22s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.22s ease,
        text-shadow 0.22s ease;
}

.lyrics-line-main {
    width: 100%;
    display: block;
}

.lyrics-bg-line {
    font-size: 0.65em;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: none;
    opacity: 0.8;
}

.lyrics-bg-before {
    margin-bottom: 6px;
}

.lyrics-bg-after {
    margin-top: 6px;
}

.lyrics-bg-text {
    display: inline-block;
}

.lyrics-bg-word {
    display: inline-block;
    color: rgba(255, 255, 255, 0.45);
    transition:
        color 0.22s ease,
        text-shadow 0.22s ease;
}

.lyrics-bg-word.lit-word {
    color: rgba(255, 255, 255, 0.7);
}

.lyrics-bg-word.active-word {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

.lyrics-line.active {
    color: #fff;
    transform: translateY(-2px);
    opacity: 1;
    margin-left: 0;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.16);
}

.lyrics-word {
    color: rgba(255, 255, 255, 0.18);
    opacity: 1;
    transition:
        color 0.14s ease,
        opacity 0.14s ease,
        text-shadow 0.18s ease,
        filter 0.18s ease;
}

.lyrics-line.active .lyrics-word {
    color: rgba(255, 255, 255, 0.16);
    opacity: 1;
}

.lyrics-line.active .lyrics-word.active-word {
    color: rgba(255, 255, 255, 0.62);
    opacity: 1;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.16);
    filter: brightness(1.08);
}

.lyrics-line.active .lyrics-word.lit-word {
    color: rgba(255, 255, 255, 0.72);
    opacity: 1;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.14);
}

.lyrics-syllable {
    color: inherit;
    transition:
        color 0.14s ease,
        text-shadow 0.18s ease,
        opacity 0.14s ease;
}

.lyrics-word.active-word .lyrics-syllable {
    color: rgba(255, 255, 255, 0.34);
}

.lyrics-word.active-word .lyrics-syllable.lit-syllable,
.lyrics-word.active-word .lyrics-syllable.active-syllable {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.34);
}




/* legacy duplicate import/definitions removed; footer styles defined above */

/* ===========================================================
   UPLOAD PAGE
   =========================================================== */

.upload-body {
    background: #121212;
    min-height: 100vh;
    color: #f5f7fb;
}

.upload-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 96px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.upload-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.upload-hero h1 {
    margin: 6px 0;
    font-size: 28px;
    letter-spacing: 0.01em;
}

.upload-hero .subhead {
    color: #b6c0d4;
    max-width: 620px;
    line-height: 1.5;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    color: var(--accent-color);
    margin: 0;
}

.upload-cta-links .ghost-link {
    color: #c8d1e0;
    border: 1px solid #262626;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    background: #181818;
}

.upload-cta-links .ghost-link:hover {
    border-color: #3a3a3a;
}

.upload-grid {
    display: grid;
    grid-template-columns: 2fr 1.3fr;
    gap: 20px;
}

.upload-card,
.status-card {
    background: #181818;
    border: 1px solid #262626;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}

.dropzone {
    position: relative;
    overflow: hidden;
    border: 1.5px dashed #2f2f2f;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    gap: 18px;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.1s, background 0.2s;
    background: #151515;
}

.dropzone:hover {
    border-color: #3d3d3d;
    background: #171717;
}

.dropzone.dragging {
    border-color: var(--accent-color);
    background: var(--accent-sheer);
    transform: translateY(-1px);
}

.dropzone-illustration {
    font-size: 32px;
    background: #1f1f1f;
    color: var(--accent-color);
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: grid;
    place-items: center;
}

.dropzone-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #e8eef9;
}

.dropzone-text span {
    color: #c8d1e0;
}

.dropzone-text small {
    color: #9fb4d6;
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.file-list {
    margin: 14px 0 6px;
    color: #d9e3f2;
    min-height: 24px;
}

.file-pills {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-pills li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a1a1a;
    border: 1px solid #262626;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    color: #f5f7fb;
}

.file-pills small {
    color: #8fa3c3;
}

.upload-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.submit-btn {
    background: var(--accent-strong);
    color: var(--accent-contrast);
    font-weight: 700;
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.15s ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px var(--accent-shadow);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.hint {
    color: #9fb4d6;
    font-size: 13px;
}

.status-card h3 {
    margin: 0 0 6px;
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-pill {
    background: #1f1f1f;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: #c8d1e0;
}

.status-pill.success {
    background: rgba(46, 204, 113, 0.15);
    color: #6edc9c;
}

.status-pill.error {
    background: rgba(255, 99, 132, 0.15);
    color: #ff8ba3;
}

.progress {
    margin-top: 8px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #1a1a1a;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-strong));
    border-radius: inherit;
    transition: width 0.15s linear;
}

.progress-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c8d1e0;
    font-size: 13px;
}

.results {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-success,
.result-error {
    padding: 10px 12px;
    border-radius: 10px;
    background: #181818;
    border: 1px solid #242424;
}

.result-success {
    border-color: rgba(46, 204, 113, 0.35);
}

.result-error {
    border-color: rgba(255, 99, 132, 0.35);
}

.result-title {
    font-weight: 600;
}

.file-info {
    color: #9fb4d6;
    font-size: 13px;
    margin-top: 4px;
}

.upload-tips {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.upload-tips h4 {
    margin: 0 0 6px;
}

.upload-tips ul {
    margin: 0;
    padding-left: 16px;
    color: #c8d1e0;
    line-height: 1.4;
}

@media (max-width: 960px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }

    .upload-hero {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .upload-page {
        padding: 32px 16px 72px;
    }

    .dropzone {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Tabs above lyrics / queue */
.now-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
}

.now-tab {
    background: none;
    border: none;
    padding: 0 0 4px;
    cursor: pointer;
    color: inherit;
    border-bottom: 2px solid transparent;
    font-family: var(--body-font);
}

.lyrics-pip-toggle {
    font-size: 11px;
    letter-spacing: 0.12em;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lyrics-pip-toggle.active {
    background: rgba(255, 189, 22, 0.12);
    border-color: rgba(255, 189, 22, 0.7);
}

.now-tab.active {
    color: #fff;
    border-bottom-color: #fff;
}

.now-tab.is-hidden,
.now-tab[hidden] {
    display: none;
}

/* Two animated panes in the same area (lyrics + queue) */
.now-lyrics-body {
    position: relative;
    height: 60vh;          /* give it an actual height */
    max-height: 60vh;
    overflow: hidden;      /* panes handle their own scroll */
}

/* shared pane base */
.now-pane {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: visible;
    padding-right: 8px;

    opacity: 0;
    transform: translateX(8px);
    pointer-events: none;

    transition:
        opacity 0.18s ease-out,
        transform 0.18s ease-out;
}

/* active pane (visible) */
.now-pane.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

#np-lyrics-view,
#np-lyrics {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#np-lyrics-view::-webkit-scrollbar,
#np-lyrics::-webkit-scrollbar {
    display: none;
}

#np-lyrics-view.plain-text-lyrics,
#np-lyrics.plain-text-lyrics {
    font-size: 12px;
    line-height: 1.6;
}

/* Queue entries: fixed-ish height, content at top */
.queue-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 40px;      /* ensures uniform row height */
    padding: 6px 0;
    font-size: 14px;
    color: #bbb;
    cursor: pointer;
}

.queue-item:hover {
    color: #fff;
}

.queue-title {
    font-weight: 500;
}

.queue-artist {
    font-size: 13px;
    color: #888;
}

/* current track in queue view */
.queue-item.active .queue-title {
    color: #1db954;
    font-weight: 600;
}

.track-row {
    display: grid;
    grid-template-columns: 32px 1fr 60px 32px; /* + menu column */
    align-items: center;
    padding: 10px 6px;
    cursor: pointer;
    border-bottom: 1px solid #1f1f1f;
    transition: background .12s, border-color .12s;
}

.track-menu-btn {
    border: none;
    background: transparent;
    color: #b3b3b3;
    font-size: 18px;
    cursor: pointer;
    justify-self: end;
    padding: 0;
}

.track-row:hover {
    background: #1b1b1b;
    border-color: var(--accent-color);
}

.track-menu-btn:hover {
    color: #ffffff;
}

/* Context menu popup */
.track-context-menu {
    position: fixed;
    min-width: 180px;
    background: #181818;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    padding: 6px 0;
    z-index: 9999;
    display: none;
}

.track-context-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.track-context-menu li {
    padding: 8px 12px;
    font-size: 14px;
    color: #e5e5e5;
    cursor: pointer;
    white-space: nowrap;
}

.track-context-menu li:hover {
    background: #282828;
}

.track-context-menu li.danger {
    color: #ff6b6b;
}

.track-context-menu li.danger:hover {
    background: #3a1f1f;
}

/* Playlist dialog overlay */
#playlist-dialog {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 12000;
}

#playlist-dialog .dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

#playlist-dialog .dialog-panel {
    position: relative;
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 18px 18px 16px;
    width: 320px;
    max-width: 90vw;
    color: #e8edf7;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#playlist-dialog h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0.01em;
}

#playlist-dialog label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #c7d2e8;
}

#playlist-dialog input[type="text"] {
    border: 1px solid #2f2f2f;
    background: #1a1a1a;
    color: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}

#playlist-dialog input[type="text"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-sheer);
}

#playlist-dialog .dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#playlist-dialog .dialog-actions button {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid #2c2c2c;
    background: #1f1f1f;
    color: #e8edf7;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}

#playlist-dialog .dialog-actions button:hover {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

#playlist-dialog .dialog-actions button:last-child {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent-color));
    border-color: var(--accent-color);
    color: var(--accent-contrast);
    box-shadow: 0 10px 22px var(--accent-shadow);
}

#playlist-dialog .playlist-section {
    border: 1px solid #1f1f1f;
    background: #141414;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#playlist-dialog .playlist-section-title {
    font-size: 13px;
    color: #9fb2d3;
}

#playlist-dialog .playlist-list {
    max-height: 220px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#playlist-dialog .playlist-option {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #222;
    background: #1a1a1a;
    cursor: pointer;
    transition: border-color .12s, background .12s;
}

#playlist-dialog .playlist-option:hover {
    border-color: #2f2f2f;
    background: #202020;
}

#playlist-dialog .playlist-option.active {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, var(--accent-sheer), var(--accent-shadow));
}

#playlist-dialog .playlist-option-name {
    font-size: 14px;
    color: #e8edf7;
}

#playlist-dialog .playlist-option-meta {
    font-size: 12px;
    color: #9fb2d3;
}

#playlist-dialog .playlist-divider {
    text-align: center;
    color: #6c7487;
    font-size: 12px;
}

#playlist-dialog .playlist-divider span {
    background: #111;
    padding: 0 8px;
}

#playlist-dialog .playlist-empty {
    font-size: 13px;
    color: #8a94a8;
    padding: 8px 4px;
}

/* Report dialog overlay */
#report-dialog {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 12000;
}

#report-dialog .dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

#report-dialog .dialog-panel {
    position: relative;
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 18px;
    width: 420px;
    max-width: 90vw;
    color: #e8edf7;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#report-dialog h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0.01em;
}

#report-dialog .dialog-subtext {
    margin: 0;
    font-size: 13px;
    color: #9fb2d4;
}

#report-dialog .report-track {
    background: #161616;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 10px 12px;
}

#report-dialog .report-track-title {
    font-weight: 600;
    margin: 0;
}

#report-dialog .report-track-meta {
    margin-top: 2px;
    font-size: 13px;
    color: #a4afc0;
}

#report-dialog label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #c7d2e8;
}

#report-dialog input[type="text"],
#report-dialog textarea {
    border: 1px solid #2f2f2f;
    background: #1a1a1a;
    color: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    min-height: 48px;
}

#report-dialog textarea {
    min-height: 120px;
}

#report-dialog input[type="text"]:focus,
#report-dialog textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-sheer);
}

#report-dialog .dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#report-dialog .dialog-actions button {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid #2c2c2c;
    background: #1f1f1f;
    color: #e8edf7;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}

#report-dialog .dialog-actions button:hover {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

#report-dialog .dialog-actions button:last-child {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent-color));
    border-color: var(--accent-color);
    color: var(--accent-contrast);
    box-shadow: 0 10px 22px var(--accent-shadow);
}

/* Simple “toast” message (optional) */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #282828;
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.toast.show {
    opacity: 1;
}

.album-metad {
    margin: 0;
}

.album-metad .title {
    font-weight: 800 !important;
}

.album-metad .artist {
    font-weight: 100 !important;
}

.m-title {
    font-weight: 800;
}

.m-artist {
    font-weight: 100;
}

/* ===========================================================
   MOBILE POLISH
   Keeps the phone layout compact and fixes later desktop rules
   overriding earlier mobile track-row styles.
   =========================================================== */

#now-bar,
.mini-now-playing {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    cursor: pointer;
}

#miniCover,
.mini-cover {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex: 0 0 44px;
    background-size: cover;
    background-position: center;
    background-color: #232323;
    box-shadow: 0 10px 20px rgba(0,0,0,0.32);
}

.mini-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-artist {
    font-size: 12px;
    color: #98a0ad;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    #content {
        padding: 20px 16px calc(170px + env(safe-area-inset-bottom));
    }

    .page {
        padding: 0 0 24px;
        gap: 16px;
    }

    .page-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .page-hero h1,
    .upload-hero h1 {
        font-size: 24px;
        line-height: 1.08;
    }

    .page-hero .subhead,
    .upload-hero .subhead {
        font-size: 14px;
        max-width: 100%;
    }

    .hero-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .hero-actions .action-btn,
    .hero-actions .ghost-link {
        min-height: 44px;
    }

    .page-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        margin-right: -4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .page-tabs::-webkit-scrollbar {
        display: none;
    }

    .page-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .album-grid {
        margin-top: 12px;
        gap: 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .album-card {
        padding: 10px;
        border-radius: 16px;
    }

    .album-title,
    .album-artist {
        font-size: 14px;
    }

    .album-sub {
        font-size: 11px;
    }

    .sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: calc(76px + env(safe-area-inset-bottom));
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        border-right: none;
        border-top: 1px solid #1c1c1c;
        background: rgba(15, 15, 18, 0.94);
        backdrop-filter: blur(14px);
        box-shadow: 0 -10px 24px rgba(0,0,0,0.3);
        transform: none;
        z-index: 89;
    }

    .sidebar-logo,
    .sidebar-search {
        display: none;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        height: 100%;
    }

    .sidebar-nav a {
        min-width: 0;
        min-height: 60px;
        padding: 8px 4px;
        border-radius: 14px;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        font-size: 11px;
        text-align: center;
        background: transparent;
        border: 1px solid transparent;
    }

    .sidebar-nav a i {
        font-size: 18px;
        width: 18px;
    }

    .sidebar-nav a .nav-text {
        display: block;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar-nav a.active {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }

    .sidebar-toggle {
        display: none;
    }

    body.mobile-sidebar-open {
        overflow: auto;
    }

    body.mobile-sidebar-open .sidebar {
        transform: none;
    }

    body.mobile-sidebar-open::before {
        display: none;
    }

    #player {
        bottom: calc(76px + env(safe-area-inset-bottom));
        height: auto;
        min-height: 72px;
        padding: 10px 14px;
        gap: 12px;
    }

    body {
        padding-bottom: calc(160px + env(safe-area-inset-bottom));
    }

    .mini-controls {
        gap: 8px;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .empty-state {
        padding: 20px 18px;
        border-radius: 20px;
    }

    .empty-state-copy h2 {
        font-size: 28px;
    }

    .empty-state-actions {
        flex-direction: column;
    }

    .empty-state-actions .action-btn,
    .empty-state-actions .ghost-link {
        width: 100%;
        justify-content: center;
    }

    .library-header {
        align-items: stretch;
    }

    .album-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .hero-left,
    .hero-cover-title {
        width: 100%;
    }

    .hero-cover-title {
        align-items: flex-start;
        gap: 14px;
    }

    .album-hero-cover {
        width: 88px;
        height: 88px;
        border-radius: 16px;
    }

    .album-metad.title {
        font-size: 28px;
        line-height: 0.98;
        margin-bottom: 4px;
    }

    .album-metad.artist {
        font-size: 18px;
        line-height: 1.1;
    }

    .album-hero .subhead {
        margin: 0;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .hero-actions .back-link-top {
        position: static;
        grid-column: 1 / -1;
        justify-content: flex-start;
        width: fit-content;
    }

    .track-row {
        grid-template-columns: 28px minmax(0, 1fr) 32px;
        gap: 10px;
        padding: 14px 10px;
    }

    .track-number {
        text-align: left;
    }

    .track-title {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .track-menu-btn {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .library-track-row {
        grid-template-columns: 40px minmax(0, 1fr) 32px;
        gap: 10px;
        padding: 12px 10px;
    }

    .track-thumb {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .library-track-meta .track-title {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        white-space: normal;
        line-height: 1.2;
    }

    .m-title,
    .m-artist {
        display: block;
    }

    .m-artist {
        font-size: 13px;
        color: #9aa4b6;
    }

    .search-item {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .search-thumb {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .search-title,
    .search-sub {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .now-inner {
        padding-left: 18px;
        padding-right: 18px;
    }

    .now-right {
        height: 74vh;
        transform: translateY(calc(100% - 88px));
    }

    .now-tabs {
        gap: 16px;
    }

    .now-lyrics-body {
        height: calc(74vh - 96px);
        max-height: calc(74vh - 96px);
        font-size: 30px;
    }

    .lyrics-line {
        font-size: 24px;
        line-height: 1.48;
    }

    #now-overlay.np-panel-open .now-inner {
        padding-top: calc(16px + env(safe-area-inset-top));
        padding-bottom: 0;
    }

    #now-overlay.np-panel-open .now-left {
        position: fixed;
        top: calc(16px + env(safe-area-inset-top));
        left: 18px;
        right: 72px;
        z-index: 1002;
        width: auto;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        min-height: 122px;
    }

    #now-overlay.np-panel-open .now-cover {
        width: 84px;
        height: 84px;
        border-radius: 18px;
        flex: 0 0 84px;
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
    }

    #now-overlay.np-panel-open .now-track-block {
        align-items: flex-start;
        text-align: left;
        gap: 6px;
        min-width: 0;
        padding-top: 6px;
    }

    #now-overlay.np-panel-open .now-track-block .np-title,
    #now-overlay.np-panel-open .now-track-block .np-artist {
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #now-overlay.np-panel-open .now-track-block .np-title {
        font-size: 20px;
        line-height: 1.1;
    }

    #now-overlay.np-panel-open .now-track-block .np-artist {
        font-size: 14px;
    }

    #now-overlay.np-panel-open .now-track-block .np-album,
    #now-overlay.np-panel-open .now-track-block .np-controls,
    #now-overlay.np-panel-open .now-track-block .np-progress-row {
        display: none;
    }

    #now-overlay.np-panel-open .now-right {
        top: calc(132px + env(safe-area-inset-top));
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: auto;
        max-height: none;
        border-radius: 24px 24px 0 0;
        transform: translateY(0);
    }

    #now-overlay.np-panel-open .now-lyrics-body {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none;
    }

    #np-lyrics-view.plain-text-lyrics,
    #np-lyrics.plain-text-lyrics {
        font-size: 16px;
    }

    .upload-page {
        padding: 36px 16px 84px;
        gap: 20px;
    }

    .upload-card,
    .status-card {
        padding: 16px;
        border-radius: 18px;
    }

    .upload-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .submit-btn {
        width: 100%;
        min-height: 46px;
    }

    .hint {
        line-height: 1.45;
    }
}

@media (max-width: 520px) {
    #content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-hero h1,
    .upload-hero h1 {
        font-size: 22px;
    }

    .album-grid {
        gap: 10px;
    }

    .hero-cover-title {
        gap: 12px;
    }

    .album-hero-cover {
        width: 76px;
        height: 76px;
    }

    .album-metad.title {
        font-size: 24px;
    }

    .album-metad.artist {
        font-size: 16px;
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .track-row,
    .library-track-row {
        padding-left: 8px;
        padding-right: 8px;
    }

    #player {
        padding-left: 10px;
        padding-right: 10px;
    }

    #miniCover,
    .mini-cover {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .mini-title {
        font-size: 13px;
    }

    .mini-controls button {
        width: 36px;
        height: 36px;
    }

    #now-overlay.np-panel-open .now-cover {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }

    #now-overlay.np-panel-open .now-left {
        left: 12px;
        right: 60px;
        top: calc(12px + env(safe-area-inset-top));
        min-height: 108px;
        gap: 12px;
    }

    #now-overlay.np-panel-open .now-right {
        top: calc(118px + env(safe-area-inset-top));
        left: 0;
        right: 0;
    }

    #now-overlay.np-panel-open .now-track-block .np-title {
        font-size: 18px;
    }

    #now-overlay.np-panel-open .now-track-block .np-artist {
        font-size: 13px;
    }

    .lyrics-line {
        font-size: 24px;
        padding-left: 2px;
        padding-right: 2px;
    }

    .dropzone {
        padding: 22px 18px;
    }

    .file-pills li {
        width: 100%;
        justify-content: space-between;
    }

    .progress-meta {
        flex-wrap: wrap;
        gap: 6px 10px;
    }
}
