:root {
    --primary-bg: #0e0e0e;
    --primary-bg-2: #1a1a1a;
    --primary-body-bg: #0a0a0a;
    --color-premium: 262 83% 58%;
    --color-success: 160 84% 40%;
    --color-warning: 45 93% 47%;
    --color-surface: 0 0% 6%;
    --color-on-surface: 0 0% 98%;
    --primary-text: #eee;
}

.image-container {
    position: relative;
    overflow: hidden;
}

.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

body.theme-dark .image-container::before {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

body.theme-blue .image-container::before {
    background: linear-gradient(90deg, #1e3a8a 25%, #1d4ed8 50%, #1e3a8a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.image-container img {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.image-container img.loaded {
    opacity: 100;
}

.image-container[image="async-loaded"]::before {
    display: none;
}

.image-container[image="async-loaded"]{
    position:  static;
    overflow: auto;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

html,
body {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.glass {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0);
    backdrop-filter: blur(10px);
    border-radius: 16px;
}

.badge {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

.nav-btn {
    border-radius: 12px;
}

.nav-btn.bg-white\/10 {
    position: relative;
}

#content {
    width: 100%;
}


.needs-scrolling {
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 210 20% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --radius: 0.75rem;
    overflow-y: auto !important;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.needs-scrolling::-webkit-scrollbar {
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 210 20% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --radius: 0.75rem;
    width: 6px;
}

.needs-scrolling::-webkit-scrollbar-track {
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 210 20% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --radius: 0.75rem;
    background: transparent;
    border-radius: 3px;
}

.needs-scrolling::-webkit-scrollbar-thumb {
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 210 20% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --radius: 0.75rem;
    background: hsl(var(--muted-foreground) / 0.2);
    border-radius: 3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    background-clip: content-box;
}

.needs-scrolling:hover::-webkit-scrollbar-thumb {
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 210 20% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --radius: 0.75rem;
    background: hsl(var(--muted-foreground) / 0.4);
    border-radius: 3px;
}

.needs-scrolling::-webkit-scrollbar-thumb:hover {
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 210 20% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --radius: 0.75rem;
    background: hsl(var(--muted-foreground) / 0.6);
    border-radius: 3px;
}

.needs-scrolling::-webkit-scrollbar-thumb:active {
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 210 20% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --radius: 0.75rem;
    background: hsl(var(--muted-foreground) / 0.8);
    border-radius: 3px;
}

.needs-scrolling {
    --primary: 262.1 83.3% 57.8%;
    --primary-foreground: 210 20% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --radius: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
}

.needs-shadow {
    box-shadow: 0 -25px 50px -12px rgb(104 104 104 / 40%), 0 -8px 25px -8px rgb(105 105 105 / 30%), 0 -4px 15px -4px rgb(0 0 0), 0 -2px 8px -2px rgb(172 172 172 / 36%), 0 0 18px 2px rgb(31 21 119 / 35%), inset 0 1px 0 rgb(255 255 255 / 34%), inset 0 -1px 0 rgb(201 201 201 / 39%) !important;
}

.needs-shadow-2 {
    box-shadow: 0 -25px 50px -12px rgb(17 17 17 / 34%), 0 -8px 25px -8px rgb(71 71 71 / 30%), 0 -4px 15px -4px rgb(0 0 0), 0 -2px 8px -2px rgb(34 34 34 / 36%), 0 0 18px 2px rgb(10 6 45 / 35%), inset 0 1px 0 rgb(19 19 19 / 34%), inset 0 -1px 0 rgb(47 47 47 / 39%) !important;
}

/* Card hover/elevation for launcher items */
[data-app-id] {
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    border-radius: 16px;
}

[data-app-id]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    background: rgba(255, 255, 255, 0.06);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Status accents */
.is-success {
    color: hsl(var(--color-success));
}

.is-warning {
    color: hsl(var(--color-warning));
}

.is-premium {
    background: linear-gradient(135deg, hsl(262 83% 58%), hsl(270 70% 58%));
    color: white;
    border: none;
}

/* Iframe overlay polish */
.overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, .6);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.overlay-panel {
    width: 100%;
    max-width: 1000px;
    border-radius: 16px;
    overflow: hidden;
}

/* Container spacing */
.page-container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .page-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.border-border-300 {
    border-color: hsl(48deg 2.7% 35.9% / 25%) !important;
}

.border-none-1 {
    border-color: transparent;
}

.jw-text-base {
    color: hsl(48 33.3% 97.1% / 1) !important;
}

html:has([data-sidebar-open="true"]) header[data-sticky-header] {
    width: calc(100% - 20rem) !important;
    left: 20rem !important;
}

html:has([data-sidebar-open="false"]) header[data-sticky-header] {
    width: calc(100%) !important;
    left: 0rem !important;
}

header[data-sticky-header]{
    transition: all 0.3s cubic-bezier(0.165,0.85,0.45,1);
}
@media (max-width: 768px) {
    html:has([data-sidebar-open="true"]){
        [data-segment-switcher]{
            opacity: 0;
        }

        header[data-sticky-header] {
            transform: translateX(100dvh);
        }
    }
    

    html:has([data-bc-player]:not(.hidden)) [data-header-right]{
        display: none !important;
    }

    html:has([data-bc-library]:not(.hidden)) [data-header-right]{
        display: none !important;
    }
    
    html:has([data-bc-artist]:not(.hidden)) [data-header-right]{
        display: none !important;
    }
}
