html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    
}

#jukebox-app-root {
    --heading-font: 'Dancing Script', sans-serif;
    --body-font: 'Poppins', sans-serif;
    --bg-animation-state: paused;

    --bg-color: #0f172a; 
    --text-primary: #FFFFFF;
    --text-secondary: #b3b3b3;

    --primary-accent: #f472b6; 
    --primary-accent-light: rgba(244, 114, 182, 0.1); 
    
    --danger-color: #e54848;

    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border-color: rgba(255, 255, 255, 0.1);
    --card-hover-bg: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);

    --bg-layer-1-grad: var(--bg-color);
    --bg-layer-2-grad: var(--bg-color);
    --bg-layer-1-opacity: 1;
    --bg-layer-2-opacity: 0;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes sync-aura-pulse {
    from {
        box-shadow: 0 0 12px 2px var(--sync-aura-color, var(--mini-accent-glow));
    }
    to {
        box-shadow: 0 0 20px 6px var(--sync-aura-color, var(--mini-accent-glow));
    }
}

@keyframes spin-angle {
    to {
        --angle: 360deg;
    }
}

@keyframes rotating-glow-border {
    0% { transform: rotate(0deg); opacity: 0.7; }
    50% { opacity: 1; }
    100% { transform: rotate(360deg); opacity: 0.7; }
}

@keyframes background-pan {
    0% {
        transform: scale(1.1) rotate(0deg) translate(0, 0);
    }
    50% {
        transform: scale(1.3) rotate(2deg) translate(-5%, 5%);
    }
    100% {
        transform: scale(1.1) rotate(0deg) translate(0, 0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#jukebox-app-root *,
#jukebox-app-root *::before,
#jukebox-app-root *::after {
    
    box-sizing: inherit;
    
    
    margin: unset;
    padding: unset;
}

#jukebox-app-root { 
    box-sizing: border-box;
    margin: 0; 
    padding: 0;
    font-family: var(--body-font);
    background-color: transparent; 
    color: var(--text-primary);
    position: relative; /* <-- ADD THIS BACK */
    user-select: none; 
    /* DO NOT add z-index here */
}

/* #jukebox-app-root.ds-theme::before,
#jukebox-app-root.ds-theme::after {
    content: '';
    position: absolute; 
    top: -10%; 
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: 0; 
    filter: brightness(50%);
    transform-origin: center center;
    animation: background-pan 60s ease-in-out infinite alternate;
    animation-play-state: var(--bg-animation-state); 
    transition: opacity 2.5s ease-in-out, background-image 1.5s ease-in-out;
    background: var(--bg-color);
}
#jukebox-app-root.ds-theme::before {
    background-image: var(--bg-layer-1-grad);
    opacity: var(--bg-layer-1-opacity);
}
#jukebox-app-root.ds-theme::after {
    background-image: var(--bg-layer-2-grad);
    opacity: var(--bg-layer-2-opacity);
    z-index: 0;
} */

#jukebox-app-root button {
    
    background-image: none; 
    background-color: transparent; 
    color: var(--text-secondary); 
    border: none; 
    padding: 0; 
    border-radius: initial; 
    cursor: pointer;
    font-size: inherit; 
    font-weight: 500; 
    font-family: var(--body-font); 
    transition: all 0.2s ease; 
    box-shadow: none; 
    text-shadow: none; 
    
}

#jukebox-app-root textarea {
    
    background: initial; 
    border: initial; 
    color: inherit; 
    width: auto; 
    padding: initial; 
    border-radius: initial; 
    font-family: inherit; 
    font-size: inherit; 
    margin-bottom: initial; 
    transition: none; 
    
}

#jukebox-app-root .app-container { 
    display: flex; 
    flex-direction: column; 
    height: 100%;
    width: 100%;
    position: fixed;   /* Makes it a full-screen overlay */
    top: 0;
    left: 0;
    z-index: 5000;     /* Gives it the highest z-index */
    background: var(--bg-color); /* Moves the background here */
    transition: background 1.5s ease;
    overflow: hidden;  /* Moves overflow here */
}

/* --- ADD THESE RULES BACK --- */
/* Now attached to the .app-container */
#jukebox-app-root .app-container::before,
#jukebox-app-root .app-container::after {
    content: '';
    position: absolute; 
    top: -10%; 
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: 0; 
    filter: brightness(50%);
    transform-origin: center center;
    animation: background-pan 60s ease-in-out infinite alternate;
    animation-play-state: var(--bg-animation-state); 
    transition: opacity 2.5s ease-in-out, background-image 1.5s ease-in-out;
    background: var(--bg-color);
}
#jukebox-app-root .app-container::before {
    background-image: var(--bg-layer-1-grad);
    opacity: var(--bg-layer-1-opacity);
}
#jukebox-app-root .app-container::after {
    background-image: var(--bg-layer-2-grad);
    opacity: var(--bg-layer-2-opacity);
    z-index: 0;
}

#jukebox-app-root .app-grid { 
    display: grid; 
    grid-template-columns: 350px 1fr; 
    gap: 8px; 
    flex-grow: 1; 
    padding: 8px; 
    overflow: hidden; 
    padding-bottom: 98px;
    box-sizing: border-box;
    position: relative; /* <-- Ensure this is present */
    z-index: 1;         /* <-- Ensure this is present (or higher than 0) */
}

#jukebox-app-root .panel { 
    background-color: transparent;
    border-radius: 12px;
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

#jukebox-app-root .main-view-wrapper {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
}
#jukebox-app-root .main-view-header {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
#jukebox-app-root .navigation-controls { display: flex; gap: 8px; }
#jukebox-app-root .navigation-controls .icon-btn { background-color: rgba(0,0,0,0.3); }
#jukebox-app-root .navigation-controls .icon-btn:disabled { opacity: 0.5; cursor: not-allowed; background-color: rgba(0,0,0,0.2); }

#jukebox-app-root .library-panel {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
}
#jukebox-app-root .library-panel .panel-section { padding: 8px; }
#jukebox-app-root .library-panel .panel-section.scrollable { position: relative; flex-grow: 1; overflow-y: auto; padding-top: 0; }

#jukebox-app-root .header-btn { 
    width: 100%; 
    background: none; 
    border: none; 
    color: var(--text-secondary); 
    font-weight: 500;
    font-size: 1rem; 
    font-family: var(--body-font);
    display: flex; 
    align-items: center; 
    gap: 16px; 
    cursor: pointer; 
    transition: all 0.2s;
    padding: 12px 16px;
    border-radius: 6px; 
}
#jukebox-app-root .header-btn svg { 
    width: 24px; 
    height: 24px; 
    stroke-width: 2; 
    stroke: currentColor; 
    fill: none; 
}

#jukebox-app-root .collapsible-header-btn {
    justify-content: flex-start;
    padding: 12px 16px; 
}
#jukebox-app-root .collapsible-header-btn:hover, #jukebox-app-root .collapsible-header-btn.active {
    border-left: none;
}
#jukebox-app-root .collapsible-header-btn.active .toggle-icon {
    color: var(--primary-accent);
}
#jukebox-app-root .collapsible-header-btn .toggle-icon {
    transition: transform 0.2s ease;
    stroke-width: 3;
    width: 16px;
    height: 16px;
}
#jukebox-app-root .collapsible-header-btn:not(.active) #playlists-toggle-icon {
    transform: rotate(-90deg);
}

#jukebox-app-root .header-btn:hover, #jukebox-app-root .header-btn.active { 
    color: var(--text-primary); 
    background-color: var(--primary-accent-light);
}
#jukebox-app-root .header-btn.active {
    border-left: 3px solid var(--primary-accent);
}

#jukebox-app-root .playlist-creator { 
    display: flex;
    padding: 4px 4px 12px 4px;
    gap: 8px; 
    max-height: 50px; 
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
    overflow: hidden;
}
#jukebox-app-root .playlist-creator.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    pointer-events: none;
}
#jukebox-app-root #new-playlist-name { 
    flex-grow: 1; 
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--card-border-color);
    border-radius: 4px; 
    color: var(--text-primary); 
    padding: 8px 12px; 
    font-size: 0.9rem; 
    font-family: var(--body-font);
}
#jukebox-app-root #new-playlist-name:focus { 
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 2px var(--primary-accent);
}

#jukebox-app-root .icon-btn { 
    background: none; 
    border: none; 
    color: var(--text-secondary); 
    cursor: pointer; 
    padding: 8px; 
    transition: all 0.2s;
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
#jukebox-app-root .icon-btn:hover { color: var(--text-primary); background-color: var(--card-hover-bg); }
#jukebox-app-root .icon-btn svg { width: 16px; height: 16px; stroke-width: 3; stroke: currentColor; fill: none; }

#jukebox-app-root .icon-btn:active {
    box-shadow: none;
    transform: scale(0.95);
}

#jukebox-app-root .playlists-list { 
    max-height: 500px;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
    overflow-y: auto;
    padding: 2px 4px; 
}
#jukebox-app-root .playlists-list.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden; 
    pointer-events: none; 
}
#jukebox-app-root .playlist-item { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 8px; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: all 0.2s;
    border: 2px solid transparent; 
    position: relative;
    z-index: 0;
}
#jukebox-app-root .playlist-item:hover { background-color: var(--primary-accent-light); }
#jukebox-app-root .playlist-item.active { 
    background-color: var(--primary-accent-light);
    border-left: 3px solid var(--primary-accent);
}
#jukebox-app-root .playlist-item.drag-over { 
    border-color: var(--primary-accent);
    background-color: var(--primary-accent-light);
}
#jukebox-app-root .playlist-item-thumbnail { width: 48px; height: 48px; flex-shrink: 0; border-radius: 4px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background-color: #333; }
#jukebox-app-root .playlist-item-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
#jukebox-app-root .playlist-item-thumbnail .default-icon { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; color: var(--text-secondary); }
#jukebox-app-root .playlist-item-thumbnail .default-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; }
#jukebox-app-root .playlist-item-info .name { font-weight: 500; }
#jukebox-app-root .playlist-item-info .details { font-size: 0.8rem; color: var(--text-secondary); }

#jukebox-app-root #song-upload-input { display: none; }

#jukebox-app-root .playlist-item.playing-context { 
    background-color: var(--primary-accent);
    color: var(--bg-color); 
    font-weight: 700;
    box-shadow: 0 0 10px 1px var(--primary-accent);
}
#jukebox-app-root .playlist-item.playing-context::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -2px;
    width: auto;
    height: auto;
    border-radius: 8px; 
    background: conic-gradient(
        from var(--angle) at 50% 50%,
        transparent 0%, var(--text-primary) 10%, var(--primary-accent) 30%,
        var(--text-primary) 50%, transparent 60%
    );
    animation: spin-angle 3s linear infinite;
    opacity: 0.8; 
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; 
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}
#jukebox-app-root .playlist-item.playing-context .details { color: var(--bg-color); }

#jukebox-app-root .song-row .add-to-playlist-btn { opacity: 0; margin-left: auto; }
#jukebox-app-root .song-row:hover .add-to-playlist-btn { opacity: 1; }

#jukebox-app-root .panel-section.scrollable::-webkit-scrollbar,
#jukebox-app-root .main-view-panel::-webkit-scrollbar,
#jukebox-app-root .upload-container::-webkit-scrollbar {
    width: 12px;
}
#jukebox-app-root .panel-section.scrollable::-webkit-scrollbar-track,
#jukebox-app-root .main-view-panel::-webkit-scrollbar-track,
#jukebox-app-root .upload-container::-webkit-scrollbar-track {
    background: transparent;
}
#jukebox-app-root .panel-section.scrollable::-webkit-scrollbar-thumb,
#jukebox-app-root .main-view-panel::-webkit-scrollbar-thumb,
#jukebox-app-root .upload-container::-webkit-scrollbar-thumb {
    background-color: var(--card-border-color);
    border-radius: 6px;
    border: 3px solid transparent;
    background-clip: content-box;
}
#jukebox-app-root .panel-section.scrollable::-webkit-scrollbar-thumb:hover,
#jukebox-app-root .main-view-panel::-webkit-scrollbar-thumb:hover,
#jukebox-app-root .upload-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-accent-light);
}

#jukebox-app-root .main-view-panel {
    padding: 0;
    overflow-y: auto;
    background: none;
    flex-grow: 1;
}
#jukebox-app-root .empty-state-message { text-align: center; padding: 80px 24px; color: var(--text-secondary); }
#jukebox-app-root .empty-state-message h2 { 
    font-size: 2.5rem;
    font-family: var(--heading-font);
    color: var(--text-primary); 
    font-weight: 600;
}
#jukebox-app-root .empty-state-message p { max-width: 400px; margin: 16px auto 0; line-height: 1.5; }

#jukebox-app-root .action-btn { 
    background-color: var(--text-primary); 
    color: #000; 
    border: none; 
    border-radius: 500px; 
    padding: 12px 24px; 
    font-weight: 700; 
    font-family: var(--body-font);
    cursor: pointer; 
    
    transition: transform 0.2s, background-color 0.2s;
}
#jukebox-app-root .action-btn:hover { 
    transform: scale(1.05); 
    background-color: var(--primary-accent);
    color: var(--text-primary);
}
#jukebox-app-root .action-btn.secondary-btn {
    background-color: var(--card-hover-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border-color);
    margin-top: 0;
}
#jukebox-app-root .action-btn.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#jukebox-app-root .playlist-view-header { 
    display: flex; 
    align-items: flex-end; 
    gap: 24px; 
    margin-bottom: 32px; 
    padding: 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
}
#jukebox-app-root .playlist-view-cover { width: 232px; height: 232px; flex-shrink: 0; border-radius: 8px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
#jukebox-app-root .playlist-view-cover img { width: 100%; height: 100%; object-fit: cover; }
#jukebox-app-root .playlist-view-cover .default-icon { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; background: #333; color: var(--text-secondary); }
#jukebox-app-root .playlist-view-cover .default-icon svg { width: 80px; height: 80px; stroke: currentColor; fill: none; }
#jukebox-app-root .playlist-view-details { display: flex; flex-direction: column; }
#jukebox-app-root .playlist-view-details .type { font-size: 0.9rem; font-weight: 700; margin-bottom: 8px; text-transform: uppercase; }
#jukebox-app-root .playlist-view-details .title { 
    font-family: var(--heading-font);
    font-size: 4.5rem;
    font-weight: 600;
    line-height: 1; 
    margin: 0; 
}
#jukebox-app-root .playlist-view-details .meta { margin-top: 24px; color: var(--text-secondary); font-size: 0.9rem; }

#jukebox-app-root .song-table-header { 
    display: grid; 
    grid-template-columns: 32px 4fr 2fr 100px 32px; 
    gap: 16px; 
    padding: 8px 16px;
    color: var(--text-secondary); 
    font-size: 0.8rem; 
    border-radius: 8px;
    background: rgba(0,0,0,0.1);
    margin: 0 24px 16px 24px;
    height: 36px; 
    align-items: center; 
}
#jukebox-app-root .song-table-header .duration-header { text-align: right; }
#jukebox-app-root .song-table-header svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

#jukebox-app-root .song-row { 
    display: grid; 
    grid-template-columns: 32px 4fr 2fr 100px 32px; 
    gap: 16px; 
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem; 
    transition: all 0.2s ease;
    align-items: center; 
    cursor: pointer; 
    position: relative; 
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
    margin: 0 24px 8px 24px;
}
#jukebox-app-root .song-row:hover { 
    background-color: var(--primary-accent-light);
    border-color: var(--primary-accent);
    transform: scale(1.01);
}
#jukebox-app-root .song-row.selected { 
    background-color: var(--primary-accent-light);
    border-color: var(--primary-accent);
}
#jukebox-app-root .song-row.selected:hover { background-color: rgba(244, 114, 182, 0.2); }

#jukebox-app-root .song-row.drop-indicator-top::before, #jukebox-app-root .song-row.drop-indicator-bottom::before { 
    content: ''; 
    position: absolute; 
    left: 0;
    right: 0;
    height: 2px; 
    background-color: var(--primary-accent);
    z-index: 1; 
    margin: 0 24px;
}
#jukebox-app-root .song-row.drop-indicator-top::before { top: -5px; }
#jukebox-app-root .song-row.drop-indicator-bottom::before { bottom: -5px; }

#jukebox-app-root .song-row.is-playing .song-index-container, #jukebox-app-root .song-row.is-playing .song-title { 
    color: var(--primary-accent);
    font-weight: 700;
}
#jukebox-app-root .song-row.is-playing {
    border-color: var(--primary-accent);
    box-shadow: 0 0 8px 0px var(--primary-accent);
}
#jukebox-app-root .song-row.is-playing::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -2px;
    width: auto;
    height: auto;
    border-radius: 10px; 
    background: conic-gradient(
        from var(--angle) at 50% 50%,
        transparent 0%, var(--primary-accent) 20%, white 35%,
        var(--primary-accent) 50%, transparent 60%
    );
    animation: spin-angle 3s linear infinite;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

#jukebox-app-root .song-row .song-index-container { position: relative; width: 16px; height: 16px; text-align: right; color: var(--text-secondary); display: flex; justify-content: flex-end; align-items: center; }
#jukebox-app-root .song-row:hover .song-index { opacity: 0; }
#jukebox-app-root .song-row .play-icon { position: absolute; top: 0; right: 0; opacity: 0; color: white; fill: white; width: 16px; height: 16px; }
#jukebox-app-root .song-row:hover .play-icon { opacity: 1; }

#jukebox-app-root .song-row.is-playing .song-index { opacity: 0; }
#jukebox-app-root .song-row.is-playing .play-icon { display: none; }
#jukebox-app-root .song-row.is-playing:hover .play-icon { display: none; } 

#jukebox-app-root .song-row.is-playing .volume-icon { opacity: 1; }
#jukebox-app-root .song-row .volume-icon { position: absolute; top: 0; right: 0; opacity: 0; color: var(--primary-accent); width: 16px; height: 16px; }
#jukebox-app-root .song-row .song-details { display: flex; align-items: center; gap: 12px; }
#jukebox-app-root .song-row img { width: 40px; height: 40px; border-radius: 4px; }
#jukebox-app-root .song-row .song-title { font-weight: 500; }
#jukebox-app-root .song-row .song-artist, #jukebox-app-root .song-row .song-album { color: var(--text-secondary); font-size: 0.85rem; }
#jukebox-app-root .song-row .song-artist:hover, #jukebox-app-root .song-row .song-album:hover { text-decoration: underline; color: var(--text-primary); }
#jukebox-app-root .song-row .song-duration { color: var(--text-secondary); text-align: right; }

#jukebox-app-root .library-view-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 24px 24px 0 24px;
}
#jukebox-app-root .library-view-header h1 { 
    font-family: var(--heading-font);
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0; 
}
#jukebox-app-root .view-controls { display: flex; gap: 8px; }
#jukebox-app-root .view-controls .icon-btn.active { color: var(--text-primary); background-color: var(--card-hover-bg); }
#jukebox-app-root .view-controls .icon-btn svg { stroke: none; fill: currentColor; }
#jukebox-app-root #song-library-view-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 24px; 
    padding: 0 24px 24px 24px;
}

#jukebox-app-root .song-card { 
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
    border-radius: 8px; 
    padding: 16px; 
    cursor: pointer; 
    transition: all 0.2s ease;
    position: relative; 
}
#jukebox-app-root .song-card:hover { 
    background-color: var(--card-hover-bg); 
    border-color: var(--primary-accent);
}
#jukebox-app-root .song-card.selected { 
    outline: none;
    border-color: var(--primary-accent);
    background-color: var(--primary-accent-light);
}
#jukebox-app-root .song-card .album-art { width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; margin-bottom: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
#jukebox-app-root .song-card .play-icon-overlay { 
    position: absolute; 
    bottom: 88px; 
    right: 24px; 
    width: 48px; 
    height: 48px; 
    background-color: var(--primary-accent);
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.3); 
    opacity: 0; 
    transform: translateY(8px); 
    transition: all 0.2s ease; 
}
#jukebox-app-root .song-card:hover .play-icon-overlay { opacity: 1; transform: translateY(0); }
#jukebox-app-root .play-icon-overlay svg { width: 24px; height: 24px; color: white; }
#jukebox-app-root .song-card .song-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#jukebox-app-root .song-card .song-artist { font-size: 0.9rem; color: var(--text-secondary); }

#pro-status-bar {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-align: center;
    padding-bottom: 4px;
    height: 1.2em; /* Prevents layout shift */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* This is the new text element for the fullscreen player */
#pro-status-fullscreen {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 8px;
    height: 1.2em;
}

/* This is the "Synced" text state for both */
.player-status-text.is-synced {
    color: var(--primary-accent);
    font-weight: 600;
}

/* This is the "Sync Aura" for the Pro UI window */
#jukebox-app-root .app-container.is-synced {
    /* Use the same animation as the Mini UI */
    animation: sync-aura-pulse 2.5s infinite alternate ease-in-out;
}

#jukebox-app-root .player-bar { 
    position: fixed;
    bottom: 8px;
    left: 8px;
    right: 8px;
    width: auto;
    border-radius: 12px;
    border: 1px solid var(--card-border-color);
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    box-shadow: 0 5px 20px var(--shadow-color);
    display: grid; 
    grid-template-columns: 3fr 4fr 3fr; 
    align-items: center; 
    padding: 0 16px; 
    z-index: 10; 
    height: 90px; 
    box-sizing: border-box;
}
#jukebox-app-root .now-playing { 
    display: flex; 
    align-items: center; 
    gap: 14px; 
    min-width: 0;
    transition: opacity 0.3s ease-in-out;
}
#jukebox-app-root #player-album-art { width: 56px; height: 56px; border-radius: 4px; background-color: #333; flex-shrink: 0; }

#jukebox-app-root .track-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
#jukebox-app-root #player-title,
#jukebox-app-root #player-artist {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#jukebox-app-root #player-title { font-weight: 500; }
#jukebox-app-root #player-artist { font-size: 0.8rem; color: var(--text-secondary); }

#jukebox-app-root .player-controls { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#jukebox-app-root .control-buttons { display: flex; align-items: center; gap: 16px; }
#jukebox-app-root .control-buttons .icon-btn { color: var(--text-secondary); }
#jukebox-app-root .control-buttons .icon-btn:hover { 
    color: var(--text-primary); 
    box-shadow: 0 0 8px 1px var(--primary-accent);
}

#jukebox-app-root .control-buttons .icon-btn:active {
    box-shadow: none;
    transform: scale(0.95);
}
#jukebox-app-root .control-buttons .icon-btn.active { 
    color: var(--primary-accent);
    text-shadow: 0 0 8px var(--primary-accent);
    /* ADD THIS to make the active state obvious */
    background-color: var(--primary-accent-light);
}

/* ADD THIS NEW RULE to fix the hover override */
#jukebox-app-root .control-buttons .icon-btn.active:hover {
    color: var(--primary-accent); /* Keep the active color */
    background-color: var(--primary-accent-light); /* Keep the active background */
    /* Keep the hover glow for a nice combined effect */
    box-shadow: 0 0 8px 1px var(--primary-accent); 
}
#jukebox-app-root .play-pause-btn { background-color: var(--text-primary); color: #000; border-radius: 50%; width: 32px; height: 32px; }
#jukebox-app-root .play-pause-btn:hover { 
    transform: scale(1.05); 
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.7);
}

#jukebox-app-root .play-pause-btn:active {
    box-shadow: none;
    transform: scale(0.98);
}
#jukebox-app-root .play-pause-btn .pause-icon { display: none; }
#jukebox-app-root .player-bar.is-playing .play-pause-btn .pause-icon { display: block; }
#jukebox-app-root .player-bar.is-playing .play-pause-btn .play-icon { display: none; }
#jukebox-app-root #repeat-btn .repeat-one { display: none; }
#jukebox-app-root #repeat-btn.repeat-mode-one .repeat-off { display: none; }
#jukebox-app-root #repeat-btn.repeat-mode-one .repeat-one { display: block; }

#jukebox-app-root #shuffle-btn:active,
#jukebox-app-root #repeat-btn:active {
    box-shadow: none; 
    text-shadow: none; 
    transform: scale(0.95); 
}

#jukebox-app-root #shuffle-btn.active:active,
#jukebox-app-root #repeat-btn.active:active {
    color: var(--primary-accent); 
    box-shadow: none;
    text-shadow: none;
    transform: scale(0.95);
}
#jukebox-app-root .progress-bar-container { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--text-secondary); font-size: 0.75rem; }
#jukebox-app-root .player-volume { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
#jukebox-app-root .player-volume svg { color: var(--text-secondary); }
#jukebox-app-root .player-volume > svg { width: 24px; height: 24px; flex-shrink: 0; stroke: currentColor; fill: none; }
#jukebox-app-root .player-volume .volume-bar { max-width: 100px; }

#jukebox-app-root input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; width: 100%; }
#jukebox-app-root input[type="range"]:focus { outline: none; }
#jukebox-app-root input[type="range"]::-webkit-slider-runnable-track { 
    background: linear-gradient(to right, var(--primary-accent), var(--primary-accent)) no-repeat, var(--card-hover-bg);
    background-size: var(--track-fill, 0%) 100%; 
    border-radius: 4px; 
    height: 4px; 
    transition: height 0.2s ease;
}
#jukebox-app-root .progress-bar-container:hover input[type="range"]::-webkit-slider-runnable-track,
#jukebox-app-root .player-volume:hover input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
}
#jukebox-app-root input[type="range"]::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    appearance: none; 
    margin-top: -4px; 
    background-color: var(--text-primary); 
    border-radius: 50%; 
    height: 12px; 
    width: 12px; 
    opacity: 0; 
    transition: all 0.2s;
}
#jukebox-app-root .progress-bar-container:hover input[type="range"]::-webkit-slider-thumb, 
#jukebox-app-root input[type="range"]:focus::-webkit-slider-thumb,
#jukebox-app-root .player-volume:hover input[type="range"]::-webkit-slider-thumb { 
    opacity: 1; 
}
#jukebox-app-root .progress-bar-container:hover input[type="range"]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    margin-top: -5px;
}
#jukebox-app-root .player-volume:hover input[type="range"]::-webkit-slider-thumb {
    height: 14px;
    width: 14px;
    margin-top: -4px;
}

#jukebox-app-root #context-menu { 
    position: fixed; 
    background-color: #282828;
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
    border-radius: 6px; 
    padding: 5px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.5); 
    z-index: 5000; 
}
#jukebox-app-root .context-menu-item, #jukebox-app-root .context-menu-submenu-label { padding: 10px 12px; font-size: 0.9rem; cursor: pointer; border-radius: 4px; display: block; white-space: nowrap; }
#jukebox-app-root .context-menu-item:hover, #jukebox-app-root .context-menu-submenu-label:hover { background-color: #3e3e3e; }
#jukebox-app-root .context-menu-separator { height: 1px; background-color: #3e3e3e; margin: 5px 0; }
#jukebox-app-root .context-menu-submenu { position: relative; }
#jukebox-app-root .context-menu-submenu-list { 
    position: absolute; 
    left: 100%; 
    top: -6px; 
    background-color: #282828;
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
    border-radius: 6px; 
    padding: 5px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.5); 
    display: none; 
    min-width: 150px; 
}
#jukebox-app-root .context-menu-submenu:hover .context-menu-submenu-list { display: block; }
#jukebox-app-root #toast-container { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); z-index: 5001; }
#jukebox-app-root .toast { 
    background-color: var(--primary-accent);
    color: var(--text-primary);
    padding: 12px 20px; 
    border-radius: 6px; 
    font-size: 0.9rem; 
    font-weight: 500; 
    animation: toast-fade-in-out 3s forwards; 
}
@keyframes toast-fade-in-out { 0%, 100% { opacity: 0; transform: translateY(10px); } 10%, 90% { opacity: 1; transform: translateY(0); } }

#jukebox-app-root .upload-container { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; flex-direction: column-reverse; gap: 5px; max-height: 200px; overflow-y: auto; }
#jukebox-app-root .upload-item { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    background: var(--card-hover-bg); 
    backdrop-filter: blur(10px);
    padding: 8px 12px; 
    border-radius: 4px; 
    font-size: 0.8rem; 
    animation: fade-in 0.3s forwards; 
    opacity:0; 
    border: 1px solid var(--card-border-color);
}
@keyframes fade-in { to { opacity: 1; transform: translateY(0); } }
#jukebox-app-root .upload-item .filename { flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#jukebox-app-root .upload-item .progress-bar { width: 100px; height: 8px; background-color: #555; border-radius: 4px; overflow: hidden; }
#jukebox-app-root .upload-item .progress-bar-inner { width: 100%; height: 100%; background-color: var(--primary-accent); opacity: 0.7; animation: indeterminate-progress 1.5s infinite; transition: all 0.3s; }
@keyframes indeterminate-progress { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
#jukebox-app-root .upload-item.processing .progress-bar-inner { background-image: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); background-size: 200% 100%; }
#jukebox-app-root .upload-item.complete .progress-bar-inner, #jukebox-app-root .upload-item.error .progress-bar-inner { animation: none; background-image: none; opacity: 1; }
#jukebox-app-root .upload-item.error .progress-bar-inner { background-color: var(--danger-color); }
#jukebox-app-root .removing { transition: all 0.3s ease; transform: scale(0.9); opacity: 0 !important; }

#jukebox-app-root #custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 5010;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#jukebox-app-root #custom-modal-backdrop.visible {
    opacity: 1;
    pointer-events: all;
}
#jukebox-app-root .modal-card {
    background-color: var(--card-bg); 
    backdrop-filter: blur(15px);
    border: 1px solid var(--card-border-color); 
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow-color);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
#jukebox-app-root #custom-modal-backdrop.visible .modal-card {
    transform: translateY(0);
}
#jukebox-app-root #modal-title {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--primary-accent);
    margin: 0 0 10px 0;
}
#jukebox-app-root #modal-message {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 25px;
}
#jukebox-app-root #modal-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--card-border-color);
    border-radius: 4px;
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 1rem;
    font-family: var(--body-font);
    margin-bottom: 20px;
}
#jukebox-app-root #modal-input:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 2px var(--primary-accent);
}
#jukebox-app-root .modal-actions {
    display: flex;
    justify-content: center; 
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border-color);
    
    
    align-items: center; 
}

#jukebox-app-root .modal-actions button {
    
    min-width: 100px; 
    align-items: center; 
    vertical-align: middle;
    
     
    
    
    padding: 12px 24px; 
    
    
    text-align: center;
}

#jukebox-app-root .hidden { display: none !important; }

#jukebox-app-root .search-view-container {
    padding: 16px 24px;
}
#jukebox-app-root .search-view-input-wrapper {
    position: relative;
    max-width: 400px;
    margin-bottom: 32px;
}
#jukebox-app-root .search-view-input-wrapper .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}
#jukebox-app-root #main-search-input {
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
    border-radius: 500px;
    color: var(--text-primary);
    padding: 14px 20px 14px 48px;
    font-size: 1rem;
    font-family: var(--body-font);
    box-sizing: border-box;
    transition: all 0.2s;
}
#jukebox-app-root #main-search-input:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 2px var(--primary-accent);
}
#jukebox-app-root #search-results-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
#jukebox-app-root .results-header {
    padding-bottom: 8px;
    font-size: 2.5rem;
    font-weight: 600;
    font-family: var(--heading-font);
    color: var(--text-primary);
    border-bottom: 1px solid var(--card-border-color);
    margin: 0 0 16px 0;
}

#jukebox-app-root .loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid var(--card-border-color);
    border-top-color: var(--primary-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 32px auto;
}

#jukebox-app-root .youtube-result-item {
    display: grid;
    grid-template-columns: 40px 1fr 50px 80px;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border-color);
}
#jukebox-app-root .youtube-result-item:hover {
    background-color: var(--primary-accent-light);
    border-color: var(--primary-accent);
    transform: scale(1.01);
}
#jukebox-app-root .youtube-result-item img {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    object-fit: cover;
}
#jukebox-app-root .result-info { overflow: hidden; }
#jukebox-app-root .result-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.9rem; }
#jukebox-app-root .result-artist, #jukebox-app-root .result-duration { font-size: 0.8rem; color: var(--text-secondary); }
#jukebox-app-root .result-duration { text-align: right; }
#jukebox-app-root .download-btn-container { width: 100%; display: flex; justify-content: center; align-items: center; height: 32px; }

#jukebox-app-root .download-success-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-accent);
}
#jukebox-app-root .download-progress-container { width: 100%; height: 32px; display: flex; align-items: center; justify-content: center; position: relative; flex-direction: column; gap: 4px; }
#jukebox-app-root .download-progress-container .progress-bar { height: 4px; width: 100%; background-color: #555; border-radius: 2px; }
#jukebox-app-root .download-progress-container .progress-bar-inner { height: 100%; width: 0%; background-color: var(--primary-accent); border-radius: 2px; transition: width 0.1s linear; }
#jukebox-app-root .download-progress-container .progress-text { font-size: 0.7rem; color: var(--text-secondary); line-height: 1; }
#jukebox-app-root .youtube-result-item.downloaded { opacity: 0.5; pointer-events: none; }
#jukebox-app-root .youtube-result-item.download-error .progress-bar-inner { background-color: var(--danger-color); }

#jukebox-app-root.in-mini-mode #pro-ui-wrapper { display: none; }
#jukebox-app-root.in-pro-mode #mini-ui-wrapper { display: none; }

#jukebox-app-root #player-lock-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px);
    z-index: 100; display: flex; justify-content: center; align-items: center;
    border-radius: 12px; color: var(--text-primary); text-align: center; cursor: pointer;
}
#jukebox-app-root #player-lock-overlay.hidden { display: none; }
#jukebox-app-root .lock-content svg { width: 32px; height: 32px; color: var(--text-secondary); margin-bottom: 8px; }
#jukebox-app-root .lock-content h3 { font-family: var(--heading-font); font-size: 1.75rem; color: var(--primary-accent); margin: 0 0 4px 0; }
#jukebox-app-root .lock-content p { font-size: 0.9rem; color: var(--text-secondary); margin: 0 0 16px 0; max-width: 250px; }
#jukebox-app-root #player-unlock-btn { margin-top: 0; padding: 10px 20px; font-size: 0.9rem; }

#jukebox-app-root #hamburger-menu-btn { display: none; }
#jukebox-app-root #hamburger-menu-btn svg { width: 20px; height: 20px; }
#jukebox-app-root #go-mini-btn { margin-left: auto; }

@media (max-width: 1100px) {
    #jukebox-app-root .song-row { grid-template-columns: 32px 1fr 100px 32px; gap: 12px; }
    #jukebox-app-root .song-row > :nth-child(3) { display: none; }
    #jukebox-app-root .song-table-header { grid-template-columns: 32px 1fr 100px 32px; gap: 12px; }
    #jukebox-app-root .song-table-header > :nth-child(3) { display: none; }
}
@media (max-width: 900px) {
    #jukebox-app-root .song-row { grid-template-columns: 32px 1fr 100px; padding-right: 8px; }
    #jukebox-app-root .song-row > :nth-child(5) { display: none; }
    #jukebox-app-root .song-table-header { grid-template-columns: 32px 1fr 100px; }
    #jukebox-app-root .song-table-header > :nth-child(5) { display: none; }
    #jukebox-app-root .app-grid { grid-template-columns: 280px 1fr; }
    #jukebox-app-root .playlist-view-details .title { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    #jukebox-app-root .app-grid { grid-template-columns: 1fr; padding: 8px; padding-bottom: 110px; }
    #jukebox-app-root .library-panel {
        display: flex; position: fixed; top: 0; left: 0; bottom: 0;
        width: 300px; max-width: 80vw; z-index: 2000;
        background-color: rgba(15, 23, 42, 0.85); backdrop-filter: blur(15px);
        transform: translateX(-100%); transition: transform 0.3s ease-out;
        border: none; border-right: 1px solid var(--card-border-color);
    }
    #jukebox-app-root .library-panel.is-visible-mobile { transform: translateX(0); box-shadow: 0 0 40px var(--shadow-color); }
    #jukebox-app-root #hamburger-menu-btn { display: flex; }
    #jukebox-app-root .main-view-header { padding: 8px 12px; gap: 12px; }
    #jukebox-app-root .navigation-controls { display: none; }
    #jukebox-app-root .song-table-header { grid-template-columns: 32px 1fr 70px; gap: 8px; margin: 0 12px 16px 12px; padding: 8px; }
    #jukebox-app-root .song-table-header > :nth-child(4) { text-align: right; }
    
    #jukebox-app-root .song-table-header > :nth-child(3) { display: none; } 
    #jukebox-app-root .song-row { grid-template-columns: 32px 1fr 70px; gap: 8px; margin: 0 12px 8px 12px; padding: 10px 8px; }
    #jukebox-app-root .song-row .song-duration { font-size: 0.8rem; }
    
    #jukebox-app-root .song-row > :nth-child(3) { display: none; } 
    #jukebox-app-root .playlist-view-header { flex-direction: column; align-items: center; text-align: center; padding: 16px; gap: 16px; }
    #jukebox-app-root .playlist-view-cover { width: 180px; height: 180px; }
    #jukebox-app-root .playlist-view-details .title { font-size: 2.5rem; margin-top: 0; }
    #jukebox-app-root .playlist-view-details .meta { margin-top: 12px; }
    #jukebox-app-root #song-library-view-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; padding: 0 12px 16px 12px; }
    #jukebox-app-root .library-view-header h1 { font-size: 2rem; }
    #jukebox-app-root .song-card { padding: 12px; }
    #jukebox-app-root .song-card .play-icon-overlay { bottom: 72px; right: 16px; width: 44px; height: 44px; }
    #jukebox-app-root .player-bar {
        grid-template-columns: 1fr auto; padding: 0 12px; height: 80px;
        bottom: 8px; left: 8px; right: 8px;
    }
    #jukebox-app-root .player-volume { display: none; }
    #jukebox-app-root .player-controls { gap: 4px; flex-direction: row; }
    #jukebox-app-root .control-buttons { gap: 8px; }
    #jukebox-app-root .progress-bar-container { display: none; }
    #jukebox-app-root .track-info { min-width: 0; }
    #jukebox-app-root #mini-player-open-trigger { cursor: pointer; }
}

#jukebox-app-root #mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px);
    z-index: 1999; opacity: 0; transition: opacity 0.3s ease-out;
    pointer-events: none;
}
#jukebox-app-root #mobile-menu-overlay:not(.hidden) { opacity: 1; pointer-events: all; }
#jukebox-app-root .library-panel.is-visible-mobile { overscroll-behavior: contain; } 

#jukebox-app-root .now-playing-fullscreen {
    position: fixed; 
    inset: 0; 
    z-index: 3000;
    background: var(--bg-color); 
    display: flex; 
    flex-direction: column;
    padding: 16px; 
    box-sizing: border-box;
    
    
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    
    
    visibility: hidden; 
    pointer-events: none;
    
    overflow: hidden;  
    overscroll-behavior: contain; 
}

#jukebox-app-root .now-playing-fullscreen::before,
#jukebox-app-root .now-playing-fullscreen::after {
    content: '';
    position: absolute; 
    top: -10%; left: -10%; width: 120%; height: 120%;
    z-index: -1; 
    filter: brightness(60%); 
    transform-origin: center center;
    animation: background-pan 60s ease-in-out infinite alternate;
    animation-play-state: var(--bg-animation-state); 
    transition: opacity 2.5s ease-in-out, background-image 1.5s ease-in-out;
    background: var(--bg-color);
}
#jukebox-app-root .now-playing-fullscreen::before {
    background-image: var(--bg-layer-1-grad);
    opacity: var(--bg-layer-1-opacity);
}
#jukebox-app-root .now-playing-fullscreen::after {
    background-image: var(--bg-layer-2-grad);
    opacity: var(--bg-layer-2-opacity);
    z-index: -2; 
}

#jukebox-app-root .now-playing-fullscreen.is-visible {
    /* display: flex; */
    visibility: visible;
    pointer-events: all;
    z-index: 5001;
    
    transform: translateY(0); 
}

@media (max-width: 768px) {
    
    #jukebox-app-root .now-playing-fullscreen {
        
        
         display: flex; 
    }
     #jukebox-app-root #mini-player-open-trigger { cursor: pointer; }
}

@media (min-width: 769px) {
    
    #jukebox-app-root .now-playing-fullscreen {
        display: none; 
    }
}

#jukebox-app-root .np-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-shrink: 0; }
#jukebox-app-root .np-header-title { font-weight: 600; color: var(--text-secondary); }
#jukebox-app-root #np-dismiss-btn svg { width: 24px; height: 24px; }

#jukebox-app-root .np-art-container { flex-grow: 1; display: flex; justify-content: center; align-items: center; padding: 16px 0; min-height: 0; }
#jukebox-app-root #np-album-art-large { width: 80%; max-width: 400px; aspect-ratio: 1 / 1; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); object-fit: cover; }

#jukebox-app-root .np-info-container { text-align: center; padding: 16px 0; flex-shrink: 0; }
#jukebox-app-root #np-title-large { font-size: 1.5rem; font-weight: 700; margin: 0 0 4px 0; color: var(--text-primary); }
#jukebox-app-root #np-artist-large { font-size: 1rem; color: var(--text-secondary); margin: 0; }

#jukebox-app-root .np-progress-container { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--text-secondary); font-size: 0.75rem; padding: 16px 0; flex-shrink: 0; }
#jukebox-app-root #np-progress-bar::-webkit-slider-runnable-track { height: 6px; }
#jukebox-app-root #np-progress-bar::-webkit-slider-thumb { height: 16px; width: 16px; margin-top: -5px; opacity: 1; }

#jukebox-app-root .np-controls-container { display: flex; justify-content: space-around; align-items: center; padding: 24px 0; flex-shrink: 0; }
#jukebox-app-root .np-controls-container .icon-btn { color: var(--text-secondary); }
#jukebox-app-root .np-controls-container .icon-btn:hover { color: var(--text-primary); background: none; }
#jukebox-app-root .np-controls-container .icon-btn:active { transform: scale(0.95); box-shadow: none; } 
#jukebox-app-root .np-controls-container .icon-btn.active { 
    color: var(--primary-accent);
    /* ADD THIS to make the active state obvious */
    background-color: var(--primary-accent-light);
    border-radius: 50%; /* Give the background a shape */
}

/* ADD THIS NEW RULE to fix the hover override */
#jukebox-app-root .np-controls-container .icon-btn.active:hover {
    color: var(--primary-accent); /* Keep the active color */
    background-color: var(--primary-accent-light); /* Keep the active background */
}
#jukebox-app-root .np-controls-container .icon-btn svg { width: 24px; height: 24px; }
#jukebox-app-root .np-controls-container .large-btn svg { width: 36px; height: 36px; }
#jukebox-app-root .np-controls-container .x-large-btn { width: 64px; height: 64px; background-color: var(--text-primary); color: #000; }
#jukebox-app-root .np-controls-container .x-large-btn:active { transform: scale(0.98); box-shadow: none; } 
#jukebox-app-root .np-controls-container .x-large-btn svg { width: 32px; height: 32px; }

#jukebox-app-root .now-playing-fullscreen .play-pause-btn .pause-icon { display: none; }
#jukebox-app-root .now-playing-fullscreen.is-playing .play-pause-btn .pause-icon { display: block; }
#jukebox-app-root .now-playing-fullscreen.is-playing .play-pause-btn .play-icon { display: none; }

#jukebox-app-root #np-repeat-btn .repeat-one { display: none; }
#jukebox-app-root #np-repeat-btn.repeat-mode-one .repeat-off { display: none; }
#jukebox-app-root #np-repeat-btn.repeat-mode-one .repeat-one { display: block; }

#jukebox-app-root .np-volume-container { display: flex; align-items: center; gap: 8px; padding: 16px 0; flex-shrink: 0; }
#jukebox-app-root .np-volume-container > svg { width: 24px; height: 24px; color: var(--text-secondary); }
#jukebox-app-root #np-volume-bar::-webkit-slider-runnable-track { height: 6px; }
#jukebox-app-root #np-volume-bar::-webkit-slider-thumb { height: 16px; width: 16px; margin-top: -5px; opacity: 1; }

#jukebox-app-root.fullscreen-player-open {
    
    overflow: hidden;
}