/* ═══════════════════════════════════════════════════════════
   🎵 Cyle Music — Design System
   Futuristic dark mode, cyan/violet neon, glassmorphism
   ═══════════════════════════════════════════════════════════ */

/* ─── Variables ─────────────────────────────────────────── */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #0f0f2a;
    --bg-card: rgba(15, 15, 42, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.07);
    --bg-input: rgba(255, 255, 255, 0.05);

    --text-primary: #e8eaf0;
    --text-secondary: #8b8da8;
    --text-muted: #555570;

    --accent: #00E5FF;
    --accent-hover: #33EBFF;
    --accent-glow: rgba(0, 229, 255, 0.25);
    --accent-soft: rgba(0, 229, 255, 0.1);

    --accent2: #7B2FFF;
    --accent2-glow: rgba(123, 47, 255, 0.25);

    --gradient: linear-gradient(135deg, var(--accent), var(--accent2));

    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(0, 229, 255, 0.2);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(0, 229, 255, 0.15);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

/* ─── Reset & Base ──────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    min-height: calc(100% + env(safe-area-inset-top));
    padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body {
    height: 100vh;
    height: 100dvh;
    height: -webkit-fill-available;
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    margin: 0;
}

/* ─── Edge Swipe Back Halo ─── */
.edge-swipe-halo {
    position: fixed;
    left: 0;
    top: 0;
    width: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 229, 255, 0.6) 0%,
        rgba(100, 80, 255, 0.3) 40%,
        transparent 100%
    );
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.4), 0 0 80px rgba(100, 80, 255, 0.2);
}

/* Allow text selection in inputs on iOS */
input, textarea {
    user-select: text;
    -webkit-user-select: text;
}

::selection {
    background: var(--accent-soft);
    color: var(--accent);
}

::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 4px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ─── Screen System ─────────────────────────────────────── */
.screen {
    display: none;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════════════════════════ */
#loading-screen {
    background: var(--bg-primary);
    align-items: center;
    justify-content: center;
}

.loading-container {
    text-align: center;
}

.loading-icon {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    margin-bottom: 1.5rem;
}

.loading-text {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.loading-bar {
    width: 200px;
    height: 3px;
    background: var(--bg-glass);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: 40%;
    background: var(--gradient);
    border-radius: 2px;
    animation: loadingSlide 1.2s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════ */
#login-screen {
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 229, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(123, 47, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(0, 229, 255, 0.04) 0%, transparent 40%);
}

.login-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-container {
    width: 100%;
    max-width: 380px;
    padding: 2.5rem 2rem;
    background: rgba(15, 15, 42, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow), var(--shadow-glow);
    animation: fadeInUp 0.6s ease-out;
}

.login-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.input-group input[type="text"],
.input-group input[type="password"] {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-family: var(--font);
    transition: var(--transition);
    outline: none;
}

.input-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.checkbox-group {
    flex-direction: row;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

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

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-ghost:hover {
    color: var(--accent);
    background: var(--bg-glass);
}

.btn-full {
    width: 100%;
}

.error-message {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--error);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   INSTALL PROMPT SCREEN
   ═══════════════════════════════════════════════════════════ */
#install-screen {
    background: var(--bg-primary);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.install-container {
    max-width: 420px;
    text-align: center;
}

.install-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.install-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.install-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.install-instructions {
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.install-instructions h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.install-instructions ol {
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.install-instructions p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   APP — HEADER (compact)
   ═══════════════════════════════════════════════════════════ */
.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.15rem 0.8rem;
    padding-top: calc(env(safe-area-inset-top, 0px) - 15px);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.player-header.hidden {
    transform: translateY(-100%);
}

.header-title {
    font-size: 0.95rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.3rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}

.header-icon-btn svg {
    width: 26px;
    height: 26px;
}

.header-icon-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

/* Header right group */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Desktop inline search input */
.header-search-desktop {
    display: none;
    align-items: center;
    width: 260px;
    background: var(--bg-input);
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.75rem;
    transition: var(--transition);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.1);
}
.header-search-desktop:focus-within {
    border-color: var(--accent-hover);
    box-shadow: 0 0 16px var(--accent-glow);
}
.header-search-icon {
    flex-shrink: 0;
    opacity: 0.5;
    margin-right: 0.5rem;
    color: var(--accent);
}
#header-search-input {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font);
}
#header-search-input::placeholder {
    color: var(--text-muted);
}

/* Mobile-only elements */
.header-mobile-only {
    font-size: 1.2rem;
}

@media (min-width: 1024px) {
    .header-mobile-only { display: none !important; }
    .header-search-desktop {
        display: flex;
        order: -1;
        flex: 1;
        max-width: 360px;
    }
    .header-title { order: -2; }
    .header-right { margin-left: auto; }
}

/* ═══════════════════════════════════════════════════════════
   SIDE MENU (hamburger)
   ═══════════════════════════════════════════════════════════ */
.side-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.side-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.side-menu {
    position: fixed;
    top: 80px;
    left: 16px;
    width: 200px;
    background: rgba(30, 30, 60, 0.3);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    z-index: 301;
    transform: scale(0.8) translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.8rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.side-menu.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.side-menu-header {
    display: none;
}

.side-menu-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.side-menu-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem;
}

.side-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 10px;
    transition: var(--transition);
    text-align: left;
}

.side-menu-item:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════
   APP — CONTENT AREA
   ═══════════════════════════════════════════════════════════ */
.player-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    padding-top: calc(3rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(2rem + var(--safe-bottom));
}

/* ─── Back Button ─────────────────────────────────────── */
.back-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.9rem;
    color: var(--accent);
    font-size: 0.85rem;
    font-family: var(--font);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-hover);
}

/* Mobile: hide in-page back button (header arrow + swipe gesture already handle navigation) */
@media (max-width: 1023px) {
    .back-bar {
        display: none !important;
    }
}

/* ─── Section Titles ───────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-more {
    font-size: 0.8rem;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
}

/* ─── Home Section — Spacing ────────────────────────────── */
.home-section {
    position: relative;
}

/* Full-width inverse gradient band behind the section title */
.home-section > .section-header {
    background: linear-gradient(
        135deg,
        rgba(0, 229, 255, 0.08) 0%,
        rgba(59, 130, 246, 0.06) 30%,
        rgba(99, 102, 241, 0.06) 60%,
        rgba(123, 47, 255, 0.08) 100%
    );
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 229, 255, 0.06);
}

/* ─── Section Title — Neon Gradient Text ────────────────── */
.home-section .section-title {
    background: linear-gradient(
        135deg,
        #a855f7 0%,
        #7c3aed 25%,
        #6366f1 50%,
        #3b82f6 75%,
        #00E5FF 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-shadow: none;
    position: relative;
}

/* Neon glow behind the title (pseudo-element since text-shadow doesn't work with background-clip) */
.home-section .section-title::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background: linear-gradient(
        135deg,
        #a855f7,
        #6366f1,
        #00E5FF
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(10px);
    opacity: 0.4;
}

/* ─── Clickable Section Title Link ──────────────────────── */
.section-title-link {
    cursor: pointer;
    transition: filter 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    -webkit-tap-highlight-color: transparent;
}

.section-title-link:hover {
    filter: brightness(1.3) drop-shadow(0 0 8px rgba(0, 229, 255, 0.3));
}

.section-title-link .section-title-arrow {
    font-size: 0.85em;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    -webkit-text-fill-color: var(--accent);
}

.section-title-link:hover .section-title-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Touch devices: always show arrow */
@media (pointer: coarse) {
    .section-title-link .section-title-arrow {
        opacity: 0.5;
        transform: translateX(0);
    }
}

/* ─── Collapsible Section Chevron ──────────────────────── */
.section-chevron {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
    -webkit-tap-highlight-color: transparent;
}

.section-chevron:hover {
    opacity: 1;
    background: var(--bg-glass-hover);
    color: var(--accent);
}

.section-chevron svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-section.collapsed .section-chevron svg {
    transform: rotate(-90deg);
}

/* Section body (content area) — animated collapse */
.section-body {
    overflow: hidden;
    max-height: 2000px; /* generous max for open state */
    opacity: 1;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                margin 0.3s ease;
}

.home-section.collapsed .section-body {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
}

/* ─── Section Detail Page ───────────────────────────────── */
.section-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-detail-title {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-detail-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.section-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.section-detail-grid .card {
    width: 100%;
}

.section-detail-grid .card-cover {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
}

.section-detail-grid .card-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.section-detail-artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
}

/* ─── Horizontal Scroll Cards ──────────────────────────── */
.h-scroll {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.h-scroll::-webkit-scrollbar {
    display: none;
}

/* ─── Album / Playlist Card ───────────────────────────── */
.card {
    flex-shrink: 0;
    width: 140px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-3px);
}

.card-cover {
    width: 140px;
    height: 140px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    position: relative;
    box-shadow: var(--shadow);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
}

.card-title {
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Song Row ─────────────────────────────────────────── */
.song-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    margin-bottom: 0.25rem;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.song-row:hover {
    background: var(--bg-glass-hover);
}

.song-row.active {
    background: var(--accent-soft);
}

.song-cover {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-card);
}

.song-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-info {
    flex: 1;
    min-width: 0;
    max-width: 70%;
}

.song-title {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 0.1rem;
}

.song-actions-btns {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.song-duration {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .song-actions {
        flex-direction: row-reverse;
        align-items: center;
        gap: 0.3rem;
    }
}

/* ─── Song Row Buttons ─────────────────────────────────── */
.song-fav-btn, .song-add-pl-btn, .song-queue-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.3rem;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    transition: var(--transition);
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Force clicks on SVG children to target the parent button (Safari fix) */
.song-fav-btn svg, .song-add-pl-btn svg, .song-queue-btn svg,
.song-fav-btn svg *, .song-add-pl-btn svg *, .song-queue-btn svg * {
    pointer-events: none;
}

.song-fav-btn.active { color: #7b5cff; }
.song-fav-btn:hover { color: #7b5cff; }

.song-add-pl-btn:hover { color: var(--text-light); }

.song-queue-btn:hover { color: var(--accent); }

/* ─── Mobile: hide inline action buttons (replaced by swipe) ─── */
@media (pointer: coarse) {
    .song-fav-btn, .song-queue-btn {
        display: none !important;
    }
}

/* ─── Swipe Container (mobile song rows) ─── */
.swipe-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
}

.swipe-container .song-row {
    position: relative;
    z-index: 2;
    margin-bottom: 0;
    will-change: transform;
    background: var(--bg-primary);
}

.swipe-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 1;
}

.swipe-bg svg {
    flex-shrink: 0;
}

/* Swiping Right (reveals Left background) -> Favorite */
.swipe-bg-fav {
    left: 0;
    justify-content: flex-start;
    background: linear-gradient(135deg, #7b5cff, #d946ef);
    color: #fff;
    fill: #fff;
    gap: 0.8rem;
    width: 100%;
}

/* Swiping Left (reveals Right background) -> Queue */
.swipe-bg-queue {
    right: 0;
    justify-content: flex-end;
    background: linear-gradient(135deg, #00b4d8, #00e5ff);
    color: #fff;
    fill: none;
    stroke: #fff;
    gap: 0.8rem;
    width: 100%;
}

/* Threshold reached — pulse */
.swipe-container.swipe-threshold .swipe-bg-fav,
.swipe-container.swipe-threshold .swipe-bg-queue {
    opacity: 1 !important;
}

.swipe-container.swipe-threshold .swipe-bg svg {
    animation: swipe-pulse 0.3s ease;
}

@keyframes swipe-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ─── Swipe Popup Menu ─── */
.swipe-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s;
}

.swipe-menu-overlay.visible {
    background: rgba(0, 0, 0, 0.4);
}

.swipe-menu-popup {
    position: fixed;
    z-index: 901;
    min-width: 220px;
    background: rgba(25, 25, 55, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    padding: 0.4rem 0;
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
    transition: opacity 0.2s, transform 0.2s;
}

.swipe-menu-popup.visible {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.swipe-menu-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
}

.swipe-menu-item:hover,
.swipe-menu-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.swipe-menu-item svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.swipe-menu-danger {
    color: #ef4444;
}

.swipe-menu-danger svg {
    color: #ef4444;
    stroke: #ef4444;
}

.swipe-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.2rem 0;
}

/* ─── Playlist Picker Popup ────────────────────────────── */
.playlist-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
}

.playlist-picker {
    position: fixed;
    z-index: 501;
    min-width: 200px;
    max-height: 250px;
    overflow-y: auto;
    background: rgba(30, 30, 60, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}

.playlist-picker-title {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.25rem;
}

.playlist-picker-loading {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.playlist-picker-item {
    background: none;
    border: none;
    color: var(--text-light);
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.playlist-picker-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ─── Context Menu Popup ───────────────────────────────── */
.context-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.3);
}

.context-menu {
    position: fixed;
    z-index: 501;
    min-width: 200px;
    background: rgba(30, 30, 60, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.4rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: ctxFadeIn 0.15s ease;
}

@keyframes ctxFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.context-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ─── Heart (favorites) on now-playing ─────────────────── */
.np-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 0.5rem;
}

.np-heart-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    transition: transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.np-heart-btn svg {
    width: 28px;
    height: 28px;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.np-heart-btn.starred svg {
    fill: #ff4d6a;
    stroke: #ff4d6a;
}

.np-heart-btn:not(.starred) svg {
    fill: none;
    stroke: var(--text-secondary);
}

.np-heart-btn:active {
    transform: scale(1.3);
}

/* ═══════════════════════════════════════════════════════════
   DYNAMIC ISLANDS (Bottom Navigation & Mini Player)
   ═══════════════════════════════════════════════════════════ */
.bottom-islands {
    position: fixed;
    bottom: calc(16px + var(--safe-bottom));
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 200;
    pointer-events: none; /* Let clicks pass through empty space */
}

/* Base Pill Style shared by both islands */
.island-pill {
    background: rgba(30, 30, 50, 0.35); /* More transparent base for the liquid effect */
    backdrop-filter: blur(35px) saturate(250%);
    -webkit-backdrop-filter: blur(35px) saturate(250%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.35rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto; /* Re-enable clicks inside pills */
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 54px; /* Fixed height for uniformity */
}

/* Scroll state: smaller and more transparent */
.bottom-islands.scrolled .island-pill {
    background: rgba(20, 20, 35, 0.15);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(6px) scale(0.92);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

/* --- Left Island: Mini Player (Dynamic width) --- */
.mini-player-island {
    position: relative;
    cursor: pointer;
    justify-content: space-between;
    /* Collapsed width (play button only basically) */
    width: 54px; 
    padding: 0;
    gap: 0;
    flex-shrink: 1;
}

.mini-player-island.expanded {
    /* Auto width based on content but max constrained by screen */
    width: auto;
    max-width: calc(100% - 70px - 1rem); /* Space for right island + gap */
    padding: 0.2rem 0.6rem;
    padding-top: 0.5rem; /* Extra space for seekbar */
    gap: 0.5rem;
    flex-grow: 1;
}

/* Seekbar at top of mini player bubble */
.island-seekbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    opacity: 0;
    cursor: default;
    z-index: 5;
    transition: opacity 0.3s, height 0.2s;
}
.mini-player-island.expanded .island-seekbar {
    opacity: 1;
    cursor: pointer;
    /* Larger touch target */
    height: 4px;
    padding-top: 6px;
    padding-bottom: 6px;
    margin-top: -6px;
    background: transparent;
}
.island-seekbar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: var(--accent);
    border-radius: 2px;
    transition: none;
    box-shadow: 0 0 6px var(--accent);
}
/* Thin background track visible only when expanded */
.mini-player-island.expanded .island-seekbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px 20px 0 0;
}

/* The cover has been removed from the mini-player in v2 */

.island-info {
    flex: 1;
    min-width: 0;
    display: none;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
}

.mini-player-island.expanded .island-info {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.4s ease forwards;
}

.island-title {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.island-artist {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.island-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    height: 100%;
    width: 100%;
}

.mini-player-island.expanded .island-controls {
    width: auto;
}

.island-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.island-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.island-play {
    width: 46px; 
    height: 46px;
    border-radius: 50%;
    color: white;
}

/* Histogram (playing indicator) when collapsed */
.island-histogram {
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 18px;
    width: 24px;
    margin: 0 auto;
}

.hist-bar {
    width: 4px;
    background-color: var(--accent);
    border-radius: 2px;
    animation: hist-bounce 0.8s infinite alternate ease-in-out;
}

.hist-bar:nth-child(1) { animation-delay: 0.1s; height: 30%; }
.hist-bar:nth-child(2) { animation-delay: 0.4s; height: 80%; }
.hist-bar:nth-child(3) { animation-delay: 0.2s; height: 50%; }

@keyframes hist-bounce {
    0% { height: 20%; }
    100% { height: 100%; }
}

/* Pause state for histogram */
.mini-player-island.paused .hist-bar {
    animation-play-state: paused;
    height: 20%;
}

/* Toggle visibility between Play Btn and Histogram based on expansion */
.mini-player-island:not(.expanded) .island-play {
    display: none !important;
}
.mini-player-island:not(.expanded) .island-histogram {
    display: flex;
}
/* When expanded, show play btn, hide histogram */
.mini-player-island.expanded .island-histogram {
    display: none !important;
}
.mini-player-island.expanded .island-play {
    display: flex;
}

.island-heart,
.island-next,
.island-menu,
.island-lyrics {
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.mini-player-island.expanded .island-heart,
.mini-player-island.expanded .island-next,
.mini-player-island.expanded .island-menu,
.mini-player-island.expanded .island-lyrics {
    width: 32px;
    opacity: 1;
    margin: 0 0.1rem;
}

.island-heart {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.island-heart.starred {
    fill: var(--accent);
    stroke: var(--accent);
}

.island-btn:hover {
    transform: scale(1.1);
}

.island-play:active {
    transform: scale(0.9);
}


/* --- Right Island: Navigation — Single Contextual Button --- */
.bottom-nav-single {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    flex-shrink: 0;
    padding: 0;
    border-radius: 50%;
}

.nav-btn-single {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease, transform 0.15s ease;
    padding: 0;
}

.nav-btn-single:active {
    transform: scale(0.9);
}

.nav-btn-single svg {
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   NOW PLAYING — FULL SCREEN
   ═══════════════════════════════════════════════════════════ */
.now-playing {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    height: 100%;
}

.np-cover {
    width: min(80vw, 320px);
    height: min(80vw, 320px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    margin-bottom: 2rem;
    background: var(--bg-card);
}

.np-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.np-info {
    text-align: center;
    margin-bottom: 1.5rem;
    width: 100%;
}

.np-title {
    font-size: 1.3rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-artist {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.np-album {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Progress Bar */
.np-progress {
    width: 100%;
    margin-bottom: 0.3rem;
}

.np-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-glass);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.np-progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s linear;
    position: relative;
}

.np-progress-fill.seeking {
    transition: none !important;
}

.np-progress-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-glow);
    opacity: 0;
    transition: opacity var(--transition);
}

.np-progress-bar:hover .np-progress-fill::after {
    opacity: 1;
}

.np-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Controls */
.np-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.np-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    border-radius: 50%;
}

.np-btn:hover {
    color: var(--text-primary);
}

.np-btn.active {
    color: var(--accent);
}

.np-play-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: var(--transition);
}

.np-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px var(--accent-glow);
}

.np-quality {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ─── 🔗 Mobile Device Section (Now Playing) ─── */
.np-devices {
    margin-top: 0.8rem;
    padding: 0 0.5rem;
}

.np-devices-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem;
    margin-top: 0.8rem;
}

.np-devices-header-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.np-devices-icon {
    font-size: 0.8rem;
}

.np-devices-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.np-devices-count {
    margin-left: auto;
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ─── Remote Device Card ─── */
.np-remote-device {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin-top: 0.4rem;
    transition: all var(--transition);
}

.np-remote-device.active {
    background: rgba(0, 229, 255, 0.04);
    border-color: rgba(0, 229, 255, 0.15);
}

.np-remote-device-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.np-remote-device-icon {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.np-remote-device-name {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-remote-transfer-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    line-height: 1;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.np-remote-transfer-btn:active {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--accent);
    transform: scale(1.1);
}

/* ─── Remote Now Playing Info ─── */
.np-remote-now-playing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.3rem 0;
}

.np-remote-cover {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.np-remote-track-info {
    flex: 1;
    min-width: 0;
}

.np-remote-track-title {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-remote-track-artist {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Remote Playback Controls ─── */
.np-remote-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.4rem 0 0.2rem;
}

.np-remote-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.np-remote-btn:active {
    color: var(--accent);
    transform: scale(1.15);
}

.np-remote-play-btn {
    width: 40px;
    height: 40px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 50%;
}

.np-remote-play-btn:active {
    background: var(--accent);
    color: var(--bg-primary);
    transform: scale(1.08);
}

/* ═══════════════════════════════════════════════════════════
   NOW PLAYING — MOBILE SWIPE UI
   ═══════════════════════════════════════════════════════════ */

/* Scroll container — natural continuous scroll, vertical only */
.np-swipe-container {
    height: calc(100vh - 3rem);
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.np-swipe-container::-webkit-scrollbar { display: none; }

/* Sections flow naturally */
.np-section {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}

.np-section-current {
    min-height: calc(100vh - 3rem);
    justify-content: center;
    align-items: center;
    padding: 0;
}

.np-section-current .now-playing {
    height: auto;
}

.np-section-previous {
    justify-content: flex-end;
    padding: 0.5rem 0.5rem 0;
}

.np-section-queue {
    justify-content: flex-start;
    padding-top: 0.5rem;
    padding-bottom: 6rem;
}

.np-section-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0.8rem 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ─── Swipe Hints (subtle) ─── */
.np-swipe-hint {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.4rem;
    opacity: 0.5;
}

.np-swipe-hint span {
    display: inline-block;
    animation: hintBounce 1.5s infinite;
}

.np-swipe-hint-up span {
    animation-name: hintBounceUp;
}

@keyframes hintBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

@keyframes hintBounceUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ─── Track List ─── */
.np-track-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0 0.3rem;
}

/* ─── Track Card (swipable) ─── */
.np-track-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.np-card-content {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem;
    background: var(--bg-card);
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-tap-highlight-color: transparent;
}

.np-card-cover {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-glass);
}

.np-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.np-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.np-card-info {
    flex: 1;
    min-width: 0;
}

.np-card-title {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-card-artist {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-card-dur {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* ─── Hidden Actions (revealed by swipe) ─── */
.np-card-actions {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0 0.8rem;
    z-index: 1;
}

.np-card-actions-left {
    left: 0;
    background: linear-gradient(90deg, var(--accent) 80%, transparent);
}

.np-card-actions-right {
    right: 0;
    background: linear-gradient(270deg, rgba(100, 120, 255, 0.9) 80%, transparent);
}

.np-card-action {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.np-card-action svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.np-card-star.active svg {
    fill: white;
}

.np-card-remove svg {
    stroke-width: 2.5;
}

/* Show actions when swiping */
.np-track-card.swiping-right .np-card-actions-left .np-card-action {
    opacity: 1;
}

.np-track-card.swiping-left .np-card-actions-right .np-card-action {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   SEARCH
   ═══════════════════════════════════════════════════════════ */
.search-container {
    padding: 0 0.5rem;
}

.search-quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.search-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.search-quick-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0 1rem;
    transition: var(--transition);
    margin-bottom: 1rem;
}
.search-bar-mobile-only {
    display: flex;
}
@media (min-width: 1024px) {
    .search-bar-mobile-only { display: none !important; }
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-family: var(--font);
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    font-size: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-results-section {
    margin-bottom: 1.5rem;
}

.search-results-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════/* ═══ FOSSE CHAT BADGE ═══ */
.fosse-chat-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--primary, #6b4cff);
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
}
  ═══════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════════════════════════ */
.settings-tabs-container {
    padding: 0.5rem 0 1.5rem;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
}

.settings-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: var(--bg-card);
    border-radius: 999px;
    width: fit-content;
    border: 1px solid var(--border);
}

.settings-tab-btn {
    padding: 0.5rem 1.2rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 999px;
    transition: all var(--transition);
    white-space: nowrap;
}

.settings-tab-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.settings-tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.settings-content-wrapper {
    flex: 1;
    min-height: 50vh;
    padding-bottom: 2rem;
}

.settings-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.settings-tab-content.active {
    display: block;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
}

.settings-footer-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    text-align: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.settings-footer-brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}

.settings-footer-version {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.settings-option:hover {
    border-color: var(--border-hover);
}

.settings-option.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.settings-option-label {
    font-size: 0.9rem;
}

.settings-option-value {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.settings-option .check {
    color: var(--accent);
    font-size: 1.1rem;
    display: none;
}

.settings-option.active .check {
    display: inline;
}

/* Crossfade slider */
.crossfade-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--surface-elevated, #333);
    outline: none;
    cursor: pointer;
}

.crossfade-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
}

.crossfade-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.crossfade-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.crossfade-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: var(--surface-elevated, #333);
}

.settings-logout {
    margin-top: 2rem;
    width: 100%;
    padding: 0.85rem;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
}

.settings-logout:hover {
    background: rgba(248, 113, 113, 0.2);
}

/* ─── Queue ─────────────────────────────────────────────── */
.queue-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.queue-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.queue-empty-text {
    font-size: 0.95rem;
}

/* ─── Album Detail ──────────────────────────────────────── */
.album-detail-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}

.album-detail-cover {
    width: 120px;
    height: 120px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    flex-shrink: 0;
    background: var(--bg-card);
}

.album-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-detail-info {
    min-width: 0;
}

.album-detail-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.album-detail-artist {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.album-detail-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.album-play-all {
    margin-bottom: 1rem;
}

/* ─── Responsive ────────────────────────────────────────── */
/* Responsive breakpoints moved to player-web.css */

/* ─── Clickable Links (artist/album) ───────────────────── */
.clickable-link {
    color: inherit;
    cursor: pointer;
    transition: color var(--transition);
    position: relative;
}

.clickable-link:hover {
    color: var(--accent);
}

.clickable-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.2s ease;
}

.clickable-link:hover::after {
    width: 100%;
}

/* ─── Artist Detail ────────────────────────────────────── */
.artist-detail-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.artist-detail-cover {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow);
    flex-shrink: 0;
    background: var(--bg-card);
}

.artist-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-detail-name {
    font-size: 1.3rem;
    font-weight: 700;
}

.artist-detail-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.artist-bio {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.artist-bio-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all var(--transition);
}

.artist-bio.expanded .artist-bio-text {
    -webkit-line-clamp: unset;
    display: block;
}

.artist-bio-expand {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}

.artist-top-hits {
    margin: 1.5rem 0;
    padding: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.artist-top-hits-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.05rem;
}

.artist-top-hits-header svg {
    color: #f59e0b; /* Fire orange/yellow */
}

/* ─── Playlist Detail ──────────────────────────────────── */
.playlist-detail-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.playlist-detail-cover {
    width: 120px;
    height: 120px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    flex-shrink: 0;
    background: var(--bg-card);
}

.playlist-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-detail-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.playlist-detail-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.playlist-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.15);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-icon-sm {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1;
    transition: all var(--transition);
}

.btn-icon-sm:hover {
    background: var(--bg-glass-hover);
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── Playlists Grid ───────────────────────────────────── */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}

/* Grid large: cover-only tiles, bigger */
.playlists-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
}

.playlists-grid-large .card {
    width: 100%;
}

.playlists-grid-large .card-cover {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 1:1 square */
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.playlists-grid-large .card-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Playlist Header Bar ──────────────────────────────── */
.playlist-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* ─── Playlist Tabs ────────────────────────────────────── */
.playlist-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: var(--bg-card);
    border-radius: 999px;
    width: fit-content;
}

.playlist-tab {
    padding: 0.45rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 999px;
    transition: all var(--transition);
    white-space: nowrap;
}

.playlist-tab.active {
    background: var(--accent);
    color: #fff;
}

.playlist-tab:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Pétunia badge */
.petunia-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 1rem;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.card-cover {
    position: relative;
}

/* ═══════════════════════════════════════════════════════════
   MODAL SYSTEM
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: auto;
    /* Explicitly allow interaction on iOS */
    -webkit-tap-highlight-color: transparent;
}
.modal-overlay.active { opacity: 1; }

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    min-width: 320px;
    max-width: 420px;
    width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.2s ease;
    pointer-events: auto;
}
.modal-overlay.active .modal-box { transform: scale(1); }

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.modal-message {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.modal-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
    margin-bottom: 1rem;
    box-sizing: border-box;
    /* Explicitly allow interaction on iOS */
    user-select: text;
    -webkit-user-select: text;
    pointer-events: auto;
}
.modal-input:focus { border-color: var(--accent); }

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition);
}

.modal-cancel {
    background: transparent;
    color: var(--text-secondary);
}
.modal-cancel:hover { color: var(--text-primary); }

.modal-confirm {
    background: var(--accent);
    color: #fff;
}
.modal-confirm:hover { filter: brightness(1.15); }

.modal-confirm.danger {
    background: #e74c3c;
}
.modal-confirm.danger:hover { background: #c0392b; }

/* ═══════════════════════════════════════════════════════════
   PLAYLIST CREATE BUTTON
   ═══════════════════════════════════════════════════════════ */
.playlist-create-btn {
    padding: 0.4rem 0.9rem;
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.playlist-create-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   PLAYLIST CARD MENU (⋮ button)
   ═══════════════════════════════════════════════════════════ */
.playlist-card-menu {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
    z-index: 2;
}
.card:hover .playlist-card-menu,
.grid-card:hover .playlist-card-menu,
.song-row:hover .playlist-card-menu { opacity: 1; }
.playlist-card-menu:hover { background: rgba(0, 0, 0, 0.8); }

/* In list view, position statically */
.song-duration .playlist-card-menu {
    position: static;
    opacity: 0.5;
    background: transparent;
    color: var(--text-secondary);
}
.song-row:hover .song-duration .playlist-card-menu { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   PLAYLIST CONTEXT MENU
   ═══════════════════════════════════════════════════════════ */
.playlist-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 8999;
}

.playlist-context-menu {
    z-index: 9000;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem;
    min-width: 180px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.playlist-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-align: left;
}
.playlist-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.playlist-menu-item.danger { color: #e74c3c; }
.playlist-menu-item.danger:hover { background: rgba(231, 76, 60, 0.1); }

/* ─── Song Sections (2-col desktop) ────────────────────── */
.song-cover {
    transition: transform 0.15s ease;
}

.song-cover:hover {
    transform: scale(1.05);
}

/* ─── View Toggle (per-section header) ─────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.view-toggle {
    display: flex;
    gap: 0.2rem;
    flex-shrink: 0;
}

.view-toggle-btn {
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem;
    cursor: pointer;
    opacity: 0.4;
    transition: all var(--transition);
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.view-toggle-btn.active {
    opacity: 1;
    border-color: var(--accent);
    background: rgba(0, 210, 255, 0.1);
}

.view-toggle-btn:hover {
    opacity: 0.85;
}

/* ─── Cards View (multiline wrapper) ───────────────────── */
.section-cards-multiline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    padding: 0.25rem 0;
}

.section-cards-multiline .card {
    width: 100%;
    max-width: none;
}

.section-cards-multiline .card-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
}

/* ─── Grid View (compact tiles) ────────────────────────── */
.section-grid-multiline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    padding: 0.25rem 0;
}

.section-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    padding: 0.25rem 0;
}

@media (min-width: 768px) {
    .section-grid-multiline,
    .section-grid-view {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

.grid-card {
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s ease;
}

.grid-card:hover {
    transform: scale(1.04);
}

.grid-card-cover {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.grid-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-card-title {
    font-size: 0.7rem;
    margin-top: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

/* ─── Settings: Home Sections ──────────────────────────── */
.home-section-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 0.4rem;
    transition: opacity var(--transition);
}

.home-section-row.disabled {
    opacity: 0.45;
}

/* Drag handle */
.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: var(--text-muted);
    padding: 0.3rem;
    border-radius: 4px;
    transition: color var(--transition), background var(--transition);
    touch-action: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.drag-handle:hover {
    color: var(--accent);
    background: rgba(0, 210, 255, 0.08);
}

.drag-handle:active {
    cursor: grabbing;
}

/* Dragging state */
.home-section-row.dragging {
    position: fixed;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: scale(1.02);
    opacity: 0.95;
    pointer-events: none;
}

/* Placeholder */
.drag-placeholder {
    background: rgba(0, 210, 255, 0.06);
    border: 2px dashed rgba(0, 210, 255, 0.25);
    border-radius: var(--radius);
    margin-bottom: 0.4rem;
    transition: height 0.15s ease;
}

.home-section-row-info {
    flex: 1;
    min-width: 0;
}

.home-section-row-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.home-section-row-mode {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 20px;
    transition: background var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════════════════════ */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 30, 60, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-family: var(--font);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════
   PÉTUNIA SCREEN
   ═══════════════════════════════════════════════════════════ */
.petunia-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
    padding-top: 0.5rem;
}

@media (min-width: 1024px) {
    .petunia-tabs {
        display: none;
    }
}

.petunia-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 0.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.petunia-tab svg {
    fill: currentColor;
    flex-shrink: 0;
}

.petunia-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.petunia-tab:hover {
    color: var(--text-light);
}

/* Hero */
.petunia-hero {
    text-align: center;
    padding: 1.5rem 1rem;
}

.petunia-hero-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.petunia-hero h2 {
    font-size: 1.3rem;
    margin: 0 0 0.3rem;
}

.petunia-hero-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Status card */
.petunia-status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 0 0 1.5rem;
}

.petunia-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.petunia-status-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
}

/* Section */
.petunia-section h3 {
    font-size: 0.9rem;
    margin: 0 0 0.7rem;
}

/* Search */
.petunia-search-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
}

.petunia-search-bar svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.petunia-search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
}

.petunia-search-bar input::placeholder {
    color: var(--text-muted);
}

/* Results */
.petunia-result-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.3rem;
    transition: var(--transition);
}

.petunia-result-row:hover {
    background: var(--bg-glass-hover);
}

.petunia-result-info {
    flex: 1;
    min-width: 0;
}

.petunia-result-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.petunia-result-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.petunia-dl-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0.3rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.petunia-dl-btn:hover {
    color: var(--text-light);
}

/* Requests */
.petunia-requests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
}

.petunia-requests-header h3 {
    margin: 0;
    font-size: 0.95rem;
}

.petunia-refresh-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    transition: var(--transition);
}

.petunia-refresh-btn:hover {
    color: var(--accent);
}

.petunia-request-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.3rem;
}

.petunia-request-status {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.petunia-request-info {
    flex: 1;
    min-width: 0;
}

.petunia-request-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.petunia-request-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* States */
.petunia-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.petunia-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.petunia-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
    background: white;
}

/* ═══════════════════════════════════════════════════════════
   🌸 MusicBrainz Search — Album Grid, Tracklist, DL
   ═══════════════════════════════════════════════════════════ */

.mb-section {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 1rem;
}

/* Collapsible local results */
.search-local-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.2rem;
}
.search-local-toggle {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    transition: var(--transition);
    opacity: 0.7;
}
.search-local-toggle:hover {
    opacity: 1;
    background: var(--bg-glass-hover);
}

.mb-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mb-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
}

.mb-back-btn {
    background: var(--bg-glass);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    padding: 0.4rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.mb-back-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.mb-loading, .mb-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-results-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.3rem 0;
    margin-top: 0.5rem;
}

/* ─── Artist List ─── */

.mb-artist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}
.mb-artist-row:hover {
    background: var(--bg-glass-hover);
}

.mb-results-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    padding: 0.8rem 0.8rem 0.3rem;
}

.mb-release-row {
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}
.mb-release-row:hover {
    background: var(--bg-glass-hover);
}
.mb-release-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.mb-release-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mb-artist-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.mb-artist-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
}

.mb-artist-disambig {
    color: var(--text-secondary);
    font-style: italic;
}

.mb-artist-score {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 2rem;
    text-align: right;
}

/* ─── Albums Grid ─── */

.mb-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding: 0.25rem 0;
}

@media (max-width: 480px) {
    .mb-albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
}

.mb-album-card {
    background: var(--bg-glass);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
}
.mb-album-card:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(255,255,255,0.08);
    transform: translateY(-2px);
}
.mb-album-card.owned {
    border-color: rgba(74, 222, 128, 0.3);
}

/* Availability borders — neon glow */
.mb-album-card.avail-searching {
    border: 2px solid rgba(250, 204, 21, 0.6);
    animation: avail-pulse 1.5s ease-in-out infinite;
}
.mb-album-card.avail-downloadable {
    border: 2px solid rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4),
                0 0 14px rgba(59, 130, 246, 0.2),
                inset 0 0 6px rgba(59, 130, 246, 0.1);
}
.mb-album-card.avail-waitlist {
    border: 2px solid rgba(251, 146, 60, 0.6);
    box-shadow: 0 0 6px rgba(251, 146, 60, 0.2);
}
@keyframes avail-pulse {
    0%, 100% {
        border-color: rgba(250, 204, 21, 0.3);
        box-shadow: 0 0 4px rgba(250, 204, 21, 0.1);
    }
    50% {
        border-color: rgba(250, 204, 21, 0.8);
        box-shadow: 0 0 10px rgba(250, 204, 21, 0.3),
                    0 0 20px rgba(250, 204, 21, 0.15);
    }
}

/* Small status dots row at card bottom */
.mb-avail-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 0.65rem;
    color: var(--text-tertiary);
}
.mb-avail-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mb-avail-dots .dot.searching {
    background: rgba(234, 179, 8, 0.6);
    animation: dot-pulse 1s ease-in-out infinite;
}
.mb-avail-dots .dot.exact { background: #22c55e; }
.mb-avail-dots .dot.partial { background: #fb923c; }
.mb-avail-dots .dot.none { background: #ef4444; opacity: 0.5; }
@keyframes dot-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.mb-album-cover {
    aspect-ratio: 1;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}
.mb-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mb-cover-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.mb-owned-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.85rem;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.mb-album-info {
    padding: 0.5rem 0.6rem 0.3rem;
}

.mb-album-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mb-album-year {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.mb-avail-badge {
    font-size: 0.65rem;
    margin-top: 0.2rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.mb-avail-badge.available {
    color: var(--success);
}
.mb-avail-badge.unavailable {
    color: var(--text-muted);
    opacity: 0.6;
}

.mb-avail-slsk {
    font-size: 0.65rem;
    margin-top: 0.1rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.mb-avail-slsk.available {
    color: var(--accent2, #7B2FFF);
}
.mb-avail-slsk.unavailable {
    color: var(--text-muted);
    opacity: 0.5;
}

.mb-album-actions {
    padding: 0.3rem 0.6rem 0.5rem;
}

.mb-dl-btn {
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}
.mb-dl-btn:hover:not(:disabled) {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.mb-dl-btn.owned {
    color: var(--success);
    border-color: rgba(74, 222, 128, 0.2);
    background: rgba(74, 222, 128, 0.05);
    cursor: default;
}

/* ─── Tracklist View ─── */

.mb-track-header {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0 1rem;
    align-items: flex-start;
}

.mb-track-cover {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    position: relative;
}
.mb-track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 480px) {
    .mb-track-cover {
        width: 80px;
        height: 80px;
    }
}

.mb-track-info {
    flex: 1;
    min-width: 0;
}

.mb-track-album-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mb-track-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.mb-track-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.mb-track-owned {
    color: var(--success);
    font-size: 0.82rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.mb-dl-album-btn {
    background: var(--gradient);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: var(--transition);
}
.mb-dl-album-btn:hover:not(:disabled) {
    opacity: 0.85;
    transform: scale(1.02);
}
.mb-dl-album-btn:disabled {
    opacity: 0.6;
    cursor: default;
}
.mb-dl-album-btn.owned {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

.mb-tracklist {
    border-top: 1px solid rgba(255,255,255,0.06);
}

.mb-track-row {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.3rem;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: var(--transition);
}
.mb-track-row:hover {
    background: var(--bg-glass);
}

.mb-track-num {
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 1.8rem;
    text-align: right;
    flex-shrink: 0;
}

.mb-track-name {
    flex: 1;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mb-track-dur {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.mb-track-dl-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}
.mb-track-dl-btn:hover:not(:disabled) {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}
.mb-track-dl-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ═══════════════════════════════════════════════════════════
   🌸 Pétunia — Chat & Download Status
   ═══════════════════════════════════════════════════════════ */

/* Chat container */
.petunia-chat {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    min-height: 300px;
}

.petunia-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.petunia-chat-welcome {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
}
.petunia-chat-welcome-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}
.petunia-chat-welcome h3 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.petunia-chat-welcome p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Messages */
.petunia-chat-msg {
    display: flex;
    gap: 0.5rem;
    max-width: 90%;
    animation: fadeInUp 0.2s ease;
}
.petunia-chat-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.petunia-chat-bot {
    align-self: flex-start;
}

.petunia-chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: var(--bg-glass);
}

.petunia-chat-bubble {
    padding: 0.6rem 0.9rem;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-word;
}
.petunia-chat-user .petunia-chat-bubble {
    background: var(--accent);
    color: #000;
    border-bottom-right-radius: 4px;
}
.petunia-chat-bot .petunia-chat-bubble {
    background: var(--bg-glass);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}
.petunia-chat-bot .petunia-chat-bubble code {
    background: rgba(0,0,0,0.3);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-size: 0.82rem;
}

/* Typing indicator */
.petunia-chat-typing {
    padding: 0.5rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.petunia-typing-dots {
    display: flex;
    gap: 4px;
}
.petunia-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: petuniaTyping 1.4s infinite ease-in-out;
}
.petunia-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.petunia-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes petuniaTyping {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Chat form */
.petunia-chat-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255,255,255,0.05);
}
.petunia-chat-form input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    color: var(--text-primary);
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    outline: none;
}
.petunia-chat-form input:focus {
    border-color: var(--accent);
}
.petunia-chat-send {
    background: var(--gradient);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.petunia-chat-send:hover:not(:disabled) {
    transform: scale(1.05);
}
.petunia-chat-send:disabled {
    opacity: 0.5;
}

/* Download Status */
.petunia-requests {
    padding: 0.5rem 0;
}
.petunia-requests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem 0.5rem;
}
.petunia-requests-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.petunia-refresh-btn {
    background: var(--bg-glass);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    padding: 0.35rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition);
}
.petunia-refresh-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.petunia-history-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem 0.5rem 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 0.5rem;
}

.petunia-dl-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.petunia-dl-loading, .petunia-dl-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.petunia-dl-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.7rem;
    border-radius: 10px;
    transition: var(--transition);
}
.petunia-dl-row:hover {
    background: var(--bg-glass);
}

.petunia-dl-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.petunia-dl-title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
}
.petunia-dl-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.petunia-dl-complete .petunia-dl-title { color: var(--success); }
.petunia-dl-failed .petunia-dl-title { color: var(--error, #f87171); }

/* ═══════════════════════════════════════════════════════════
   ARTIST GRID (Home page)
   ═══════════════════════════════════════════════════════════ */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}

@media (min-width: 768px) {
    .artists-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.artist-card {
    cursor: pointer;
    text-align: center;
    transition: transform 0.18s ease;
}

.artist-card:hover {
    transform: scale(1.06);
}

.artist-card:active {
    transform: scale(0.96);
}

.artist-card-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 0.4rem;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 210, 255, 0.08) 100%);
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

@media (min-width: 768px) {
    .artist-card-photo {
        width: 110px;
        height: 110px;
    }
}

.artist-card:hover .artist-card-photo {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.15);
}

.artist-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-card-photo .artist-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 210, 255, 0.06) 100%);
}

.artist-card-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.artist-card-count {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* ─── Artist Detail: Chrono Year Divider ──────────────── */
.year-divider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.2rem 0 0.5rem;
    padding: 0 0.2rem;
}

.year-divider-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.year-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--accent), transparent);
    opacity: 0.3;
}

/* ─── Artist Detail: Track extras subtitle ────────────── */
.track-extras {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-live {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    margin-left: 0.3rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ─── Artist Detail: Album toggle icon ────────────────── */
.artist-albums-toggle {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.artist-albums-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 210, 255, 0.08);
}

/* ─── Artist search filter ────────────────────────────── */
.artist-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.45rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
}

.artist-filter-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
}

.artist-filter-bar input::placeholder {
    color: var(--text-muted);
}

.artist-filter-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATIONS — Bell, Badge, Sliding Panel, Accordion, Modal
   ═══════════════════════════════════════════════════════════ */

/* ─── Bell Button ─────────────────────────────────────── */
.header-notif-btn {
    position: relative;
}

.header-notif-btn.has-notif svg {
    color: var(--accent);
    filter: drop-shadow(0 0 4px var(--accent-glow));
}

/* Critical: red pulse on bell */
.header-notif-btn.has-critical svg {
    color: var(--error, #f87171);
    filter: drop-shadow(0 0 6px rgba(248, 113, 113, 0.6));
    animation: bell-critical-glow 1.5s ease-in-out infinite;
}

@keyframes bell-critical-glow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(248, 113, 113, 0.4)); }
    50% { filter: drop-shadow(0 0 10px rgba(248, 113, 113, 0.8)); }
}

/* Badge */
.notif-badge {
    position: absolute;
    top: 2px;
    right: 0px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #f43f5e;
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    font-family: var(--font);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.5);
    animation: notif-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes notif-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(244, 63, 94, 0.5); }
    50% { transform: scale(1.1); box-shadow: 0 0 14px rgba(244, 63, 94, 0.7); }
}

/* Bell shake animation */
@keyframes bell-shake {
    0% { transform: rotate(0); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-12deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-8deg); }
    50% { transform: rotate(6deg); }
    60% { transform: rotate(-4deg); }
    70% { transform: rotate(2deg); }
    80% { transform: rotate(-1deg); }
    90% { transform: rotate(0.5deg); }
    100% { transform: rotate(0); }
}

.header-notif-btn.bell-shake svg {
    animation: bell-shake 0.8s ease-in-out;
}

/* ─── Sliding Panel Overlay ──────────────────────────── */
.notif-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.notif-panel-overlay.open {
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

/* ─── Sliding Panel ──────────────────────────────────── */
.notif-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 100vw;
    z-index: 950;
    background: rgba(15, 15, 42, 0.97);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-panel.open {
    transform: translateX(0);
}

/* ─── Panel Header ───────────────────────────────────── */
.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.notif-panel-header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.notif-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.notif-panel-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-panel-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notif-panel-readall {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.75rem;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.notif-panel-readall:hover {
    background: var(--accent-soft);
}

.notif-panel-readall:disabled {
    opacity: 0.5;
    cursor: default;
}

.notif-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.notif-panel-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* ─── Panel List ─────────────────────────────────────── */
.notif-panel-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.notif-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    text-align: center;
}

.notif-panel-empty-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }
.notif-panel-empty-text { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); }
.notif-panel-empty-sub { font-size: 0.8rem; margin-top: 0.3rem; }

/* ─── Notification Item (Accordion) ──────────────────── */
.notif-item {
    display: flex;
    align-items: stretch;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255, 255, 255, 0.04); }

.notif-item.read { opacity: 0.7; }
.notif-item.expanded {
    opacity: 1;
    background: rgba(255, 255, 255, 0.06);
}
.notif-item.expanded .notif-item-title,
.notif-item.expanded .notif-item-full-message {
    color: rgba(255, 255, 255, 0.95);
}

.notif-item.unread {
    background: rgba(0, 229, 255, 0.03);
}

.notif-item.unread.notif-type-warning {
    background: rgba(251, 191, 36, 0.04);
}

.notif-item.unread.notif-type-critical {
    background: rgba(248, 113, 113, 0.04);
}

/* Indicator strip */
.notif-item-indicator {
    width: 3px;
    min-height: 100%;
    border-radius: 3px;
    margin-right: 0.8rem;
    flex-shrink: 0;
    transition: width 0.2s ease;
}

.notif-item.expanded .notif-item-indicator { width: 4px; }

.notif-type-info .notif-item-indicator { background: var(--accent); }
.notif-type-success .notif-item-indicator { background: var(--success); }
.notif-type-warning .notif-item-indicator { background: var(--warning, #fbbf24); }
.notif-type-critical .notif-item-indicator { background: var(--error, #f87171); }

/* Content */
.notif-item-content { flex: 1; min-width: 0; }

.notif-item-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.notif-item-icon { font-size: 0.8rem; flex-shrink: 0; }

.notif-item-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Preview (collapsed) */
.notif-item-preview {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item.expanded .notif-item-preview { display: none; }

/* Level badge (warning = validation required) */
.notif-level-badge {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: var(--radius-pill);
}

.notif-level-warning {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

.notif-item.expanded .notif-level-badge { display: none; }

/* Expanded content (accordion) */
.notif-item-expanded {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease;
    margin-top: 0;
}

.notif-item.expanded .notif-item-expanded {
    max-height: 300px;
    opacity: 1;
    margin-top: 0.5rem;
}

.notif-item-full-message {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.notif-item-author {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    font-style: italic;
}

/* Action buttons */
.notif-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.notif-action-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-family: var(--font);
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.notif-action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.notif-action-btn:disabled { opacity: 0.5; cursor: default; }

.notif-btn-context {
    background: var(--bg-hover) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
}

.notif-btn-validate {
    border-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.notif-btn-validate:hover:not(:disabled) {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.notif-btn-read {
    border-color: rgba(0, 229, 255, 0.2);
    color: var(--accent);
}

.notif-btn-read:hover:not(:disabled) {
    background: var(--accent-soft);
    color: var(--accent);
}

.notif-btn-delete {
    border-color: rgba(248, 113, 113, 0.2);
    color: var(--error, #f87171);
}

.notif-btn-delete:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.1);
    color: var(--error, #f87171);
}

/* ─── Critical Modal ──────────────────────────────────── */
.notif-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.notif-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.notif-modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: rgba(20, 20, 50, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 40px rgba(248, 113, 113, 0.1);
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-modal-overlay.open .notif-modal {
    transform: scale(1) translateY(0);
}

.notif-modal-icon { font-size: 3rem; margin-bottom: 0.8rem; }

.notif-modal-badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: rgba(248, 113, 113, 0.15);
    color: var(--error);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}

.notif-modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    flex-shrink: 0;
}

.notif-modal-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.5rem;
    text-align: left;
}

.notif-modal-message::-webkit-scrollbar {
    width: 4px;
}
.notif-modal-message::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}
.notif-modal-message::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.notif-modal-message::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notif-modal-author {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.notif-modal-dismiss { margin-top: auto; flex-shrink: 0; }

/* ─── Responsive: mobile full-width panel ─────────────── */
@media (max-width: 480px) {
    .notif-panel {
        width: 100vw;
    }
}

/* ═══════════════════════════════════════════════════════════
   LYRICS PANEL & OVERLAY
   ═══════════════════════════════════════════════════════════ */

/* ─── Lyrics Buttons (sidebar + mini player + now playing) ─ */
.spb-lyrics,
.island-lyrics,
.np-lyrics-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.spb-lyrics:hover,
.island-lyrics:hover,
.np-lyrics-btn:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.spb-lyrics.active,
.island-lyrics.active,
.np-lyrics-btn.active {
    color: var(--accent);
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

.spb-lyrics svg,
.np-lyrics-btn svg {
    width: 16px;
    height: 16px;
}

.island-lyrics svg {
    width: 18px;
    height: 18px;
}

/* ─── Desktop Lyrics Panel (bottom-right) ─────────────── */
.lyrics-panel {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 420px;
    height: 50vh;
    z-index: 800;
    background: rgba(12, 12, 35, 0.92);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-top-left-radius: var(--radius-lg);
    box-shadow: -8px -8px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.lyrics-panel.visible {
    transform: translateY(0);
    pointer-events: auto;
}

.lyrics-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.lyrics-panel-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lyrics-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.lyrics-panel-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.lyrics-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.2rem 2rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.lyrics-line {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.35);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.lyrics-line.active {
    color: var(--text-primary);
    font-weight: 600;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
    transform: scale(1.03);
}

.lyrics-no-lyrics {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── Mobile Lyrics Overlay (fullscreen) ──────────────── */
.lyrics-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(8, 8, 25, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.lyrics-overlay.visible {
    transform: translateY(0);
    pointer-events: auto;
}

.lyrics-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(0.8rem + env(safe-area-inset-top, 0px)) 1rem 0.8rem;
    flex-shrink: 0;
}

.lyrics-overlay-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.lyrics-overlay-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.lyrics-overlay-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lyrics-overlay-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    text-align: center;
}

.lyrics-overlay-body .lyrics-line {
    font-size: 1.15rem;
    line-height: 2;
    padding: 0.3rem 0.6rem;
}

.lyrics-overlay-body .lyrics-line.active {
    font-size: 1.25rem;
    text-shadow: 0 0 25px rgba(0, 210, 255, 0.5);
}

/* ─── Responsive: wider panels on wide screens ────────── */
@media (min-width: 1600px) {
    .lyrics-panel {
        width: 480px;
    }
}

@media (min-width: 1024px) {
    .lyrics-overlay {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .lyrics-panel {
        display: none !important;
    }
}

/* ─── Right Panel Lyrics Section ──────────────────────── */
.rp-hidden { display: none !important; }

.rp-lyrics-btn svg {
    fill: none;
    stroke: currentColor;
}

.rp-lyrics-btn.active {
    color: var(--accent);
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

.rp-lyrics-section {
    display: flex;
    flex-direction: column;
    max-height: 25vh;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rp-lyrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.rp-lyrics-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.rp-lyrics-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.rp-lyrics-sync-controls {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: auto;
    margin-right: 0.5rem;
}

.rp-sync-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
}

.rp-sync-btn:hover {
    background: rgba(0, 210, 255, 0.12);
    border-color: var(--accent);
    color: var(--accent);
}

.rp-sync-value {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 32px;
    text-align: center;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.rp-lyrics-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.3rem 0.8rem 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.rp-lyrics-body .lyrics-line {
    font-size: 0.82rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.35);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    cursor: default;
}

.rp-lyrics-body .lyrics-line.active {
    color: var(--text-primary);
    font-weight: 600;
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

.rp-lyrics-body .lyrics-line-break {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.7rem;
}

/* Hide standalone floating panel on desktop when using right panel */
@media (min-width: 1280px) {
    .lyrics-panel {
        display: none !important;
    }
}

/* ─── Lyrics Panel Scrollbar ──────────────────────────── */
.lyrics-panel-body::-webkit-scrollbar,
.lyrics-overlay-body::-webkit-scrollbar {
    width: 4px;
}

.lyrics-panel-body::-webkit-scrollbar-track,
.lyrics-overlay-body::-webkit-scrollbar-track {
    background: transparent;
}

.lyrics-panel-body::-webkit-scrollbar-thumb,
.lyrics-overlay-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.lyrics-panel-body::-webkit-scrollbar-thumb:hover,
.lyrics-overlay-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════
   SKELETON LOADING (progressive home screen)
   ═══════════════════════════════════════════════════════════ */

.skeleton-row {
    display: flex;
    gap: 0.8rem;
    overflow: hidden;
    padding: 0 0.2rem;
}

.skeleton-card {
    flex-shrink: 0;
    width: 140px;
    height: 170px;
    border-radius: var(--radius-md, 12px);
    background: rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
}

.skeleton-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 40%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 60%,
        transparent 100%
    );
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ═══════════════════════════════════════════════════════════
   🔥 LA FOSSE — Shared Listening Room
   ═══════════════════════════════════════════════════════════ */

/* ─── Lobby ────────────────────────────────────────────── */
.fosse-lobby {
    max-width: 600px;
    margin: 0 auto;
}

.fosse-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.fosse-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #ef4444, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fosse-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.fosse-create-btn {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25) !important;
}

.fosse-create-btn:hover {
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4) !important;
}

/* Session cards */
.fosse-session-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.fosse-session-card:hover {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.fosse-session-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.fosse-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.fosse-session-playing {
    font-size: 0.8rem;
    color: var(--accent);
    margin-top: 0.25rem;
}

.fosse-theme {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
}

.fosse-join-btn {
    flex-shrink: 0;
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    background: linear-gradient(135deg, #ef4444, #f59e0b) !important;
}

/* History */
.fosse-history-section {
    margin-top: 2rem;
}

.fosse-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.fosse-history-card {
    padding: 0.75rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.fosse-history-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.fosse-history-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.fosse-history-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* ─── Active Session ──────────────────────────────────── */
.fosse-active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    max-width: 700px;
    margin: 0 auto;
    overflow: hidden;
}

.fosse-active-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fosse-back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.3rem;
    line-height: 1;
}

.fosse-active-title h2 {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fosse-code {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 0.1em;
}

.fosse-active-theme {
    font-size: 0.8rem;
    color: #f59e0b;
    margin-left: 0.5rem;
}

.fosse-invite-btn {
    margin-left: auto;
}

/* ─── Now Playing ─────────────────────────────────────── */
.fosse-now-playing {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(245, 158, 11, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    min-height: 80px;
}

.fosse-no-playing {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    width: 100%;
}

.fosse-np-cover {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.fosse-np-info {
    flex: 1;
    min-width: 0;
}

.fosse-np-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fosse-np-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fosse-np-added {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.fosse-np-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 0.4rem;
    cursor: pointer;
    transition: height 0.15s;
    position: relative;
}

.fosse-np-progress:hover {
    height: 6px;
}

.fosse-np-progress-fill {
    height: 100%;
    background: #e74c3c;
    border-radius: 2px;
    width: 0%;
    transition: none;
}

/* Crossfade override for Fosse progress too */
body.crossfading .fosse-np-progress-fill {
    background: #22c55e !important;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.fosse-np-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    font-variant-numeric: tabular-nums;
    width: 100%;
}

.fosse-np-controls {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.fosse-ctrl-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.fosse-ctrl-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

/* ─── Tabs ────────────────────────────────────────────── */
.fosse-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.fosse-tab {
    flex: 1;
    padding: 0.6rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.fosse-tab.active {
    color: #ef4444;
    border-bottom-color: #ef4444;
}

.fosse-tab:hover:not(.active) {
    color: var(--text-primary);
}

.fosse-tab-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* ─── Queue ───────────────────────────────────────────── */
.fosse-queue {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fosse-lock-banner {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.2rem;
    animation: pulseLock 2s infinite;
}

@keyframes pulseLock {
    0% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
    50% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.2); }
    100% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
}

.fosse-queue-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.fosse-queue-item:hover {
    background: var(--bg-glass-hover);
}

.fosse-qi-pos {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.fosse-qi-cover {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.fosse-qi-info {
    flex: 1;
    min-width: 0;
}

.fosse-qi-title {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fosse-qi-artist {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fosse-qi-added {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.fosse-qi-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.fosse-vote-btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: var(--transition);
    color: var(--text-muted);
}

.fosse-vote-btn:hover:not([disabled]) {
    background: var(--bg-glass-hover);
}

.fosse-vote-btn[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.fosse-vote-btn.active[data-dir="up"] {
    color: var(--success);
}

.fosse-vote-btn.active[data-dir="down"] {
    color: var(--error);
}

.fosse-vote-score {
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 1.5rem;
    text-align: center;
}

.fosse-vote-score.positive {
    color: var(--success);
}

.fosse-vote-score.negative {
    color: var(--error);
}

/* ─── Chat ────────────────────────────────────────────── */
.fosse-chat {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-height: 0;
}

.fosse-chat-msg {
    padding: 0.3rem 0;
}

.fosse-chat-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: #f59e0b;
    margin-right: 0.4rem;
}

.fosse-chat-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-word;
}

.fosse-chat-system {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 0.2rem 0;
}

.fosse-chat-reaction {
    font-size: 0.85rem;
    padding: 0.15rem 0;
}

.fosse-chat-input-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
    margin-top: auto;
    flex-shrink: 0;
}

.fosse-chat-input-bar input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: var(--font);
    outline: none;
}

.fosse-chat-input-bar input:focus {
    border-color: var(--accent);
}

.fosse-chat-send {
    padding: 0.5rem 0.8rem !important;
    font-size: 1rem !important;
    border-radius: 50% !important;
    min-width: 36px;
    min-height: 36px;
}

/* ─── Participants ───────────────────────────────────── */
.fosse-participants {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fosse-participant {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.fosse-participant-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.fosse-participant-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.fosse-participant-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── Reactions Bar ──────────────────────────────────── */
.fosse-reactions-bar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

.fosse-np-reactions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.fosse-np-react-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-pill, 100px);
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-primary);
    animation: reactPop 0.3s ease-out;
}

@keyframes reactPop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.fosse-reaction-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fosse-reaction-btn:hover {
    transform: scale(1.2);
    background: var(--bg-glass-hover);
}

.fosse-reaction-btn:active {
    transform: scale(0.9);
}

/* ─── Add Bar ─────────────────────────────────────────── */
.fosse-add-bar {
    padding: 0.5rem 0;
}

/* ─── Crossfade Visual Indicator ─────────────────────── */
body.crossfading .island-seekbar-fill,
body.crossfading #spb-progress-fill,
body.crossfading #rp-seekbar-fill,
body.crossfading .np-seek-fill {
    background: #22c55e !important;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    transition: background 0.3s ease;
}

/* ─── Overlay / Dialog ────────────────────────────────── */
.fosse-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.fosse-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow), 0 0 40px rgba(239, 68, 68, 0.1);
    animation: fadeInUp 0.3s ease-out;
}

.fosse-dialog h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.fosse-dialog .input-group {
    margin-bottom: 0.75rem;
}

.fosse-dialog select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: var(--font);
    outline: none;
    appearance: auto;
}

.fosse-dialog-options {
    margin: 0.75rem 0;
}

.fosse-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.fosse-search-dialog {
    max-width: 500px;
}

.fosse-search-results {
    max-height: 50vh;
    overflow-y: auto;
    margin-top: 0.75rem;
}

.fosse-search-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.fosse-search-item .fosse-add-btn {
    padding: 0.3rem 0.6rem !important;
    font-size: 1rem !important;
    border-radius: 6px !important;
    min-width: auto;
}

/* Invite dialog */
.fosse-invite-list {
    max-height: 40vh;
    overflow-y: auto;
}

.fosse-invite-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.fosse-invite-check {
    accent-color: #ef4444;
}

/* ─── Empty / Loading States ─────────────────────────── */
.fosse-empty, .fosse-loading, .fosse-error, .fosse-empty-tab {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.fosse-error {
    color: var(--error);
}