/* FlowBeat - core theme & layout stylesheet */

:root {
    --bg-base: #0a0a0f;
    --bg-surface: #13131a;
    --bg-surface-2: #1c1c26;
    --border: #2a2a36;
    --text-primary: #f4f4f8;
    --text-secondary: #a9a9b8;
    --text-tertiary: #6f6f80;
    --accent: #8b5cf6;
    --fb-accent: #8b5cf6;
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 16px;
    --space-4: 24px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

/* App shell */
.flowbeat-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--bg-base);
}

.flowbeat-app.fullscreen {
    height: 100%;
}

.flowbeat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    flex-shrink: 0;
}

.flowbeat-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: 16px;
}

.flowbeat-logo-icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.flowbeat-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-icon:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

.flowbeat-main {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

/* Buttons */
.btn {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
}

.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--text-primary); }
.btn-secondary { background: transparent; }
.btn-sm { padding: var(--space-1) var(--space-2); font-size: 12px; }

/* Icon */
.icon svg { width: 16px; height: 16px; display: block; }

/* Radio layout */
.radio-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    isolation: isolate;
    /* Themed backgrounds (starfields, shooting stars, sheens, etc.) use
       absolutely-positioned/transformed layers that can extend past the
       container's box - clip them so they never introduce a page scrollbar. */
    overflow: hidden;
}

/* Aurora (default): a gentle, slow-drifting ambient glow behind the whole
   app so the UI never feels static, without being distracting. */
.radio-container.theme-aurora::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 15% 0%, rgba(139, 92, 246, 0.10), transparent 60%),
        radial-gradient(ellipse 55% 50% at 100% 100%, rgba(236, 72, 153, 0.08), transparent 60%);
    background-size: 180% 180%, 180% 180%;
    animation: aurora-drift 26s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
    0% { background-position: 0% 0%, 100% 100%; }
    100% { background-position: 20% 15%, 80% 85%; }
}

@media (prefers-reduced-motion: reduce) {
    .radio-container.theme-aurora::before,
    .radio-container.theme-nebula::before,
    .radio-container.theme-nebula::after {
        animation: none;
    }
}

.tab-bar {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3) 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab-bar-spacer {
    flex: 1;
}

.tab-btn-link {
    text-decoration: none;
    color: var(--text-secondary);
}

.tab-btn-link:hover {
    color: var(--text-primary);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.radio-content {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: var(--space-3);
}

/* Now playing */
.now-playing-fancy {
    position: relative;
    height: 100%;
    min-height: 360px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-surface);
}

.viz-hero {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.np-center-panel {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4);
    text-align: center;
}

.np-cover-art {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.np-cover-art img { width: 100%; height: 100%; object-fit: cover; }

.np-info h2 { margin: 0 0 4px; font-size: 20px; }
.np-meta { color: var(--text-secondary); font-size: 13px; }

.np-fav-corner-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
    color: #f44336;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.15s, transform 0.15s, border-color 0.15s;
}

.np-fav-corner-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.08);
}
.np-fav-corner-btn .icon { width: 18px; height: 18px; }

.station-image-fallback { display: none; }

.np-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.4;
}

.pill-tech {
    background: color-mix(in srgb,var(--accent) 18%,transparent);
    color: var(--text-primary);
}

.pill .icon { width: 12px; height: 12px; }

.np-info-hidden .np-info,
.np-info-hidden .np-cover-art {
    display: none;
}

.np-quick-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: var(--space-2);
}

.np-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.np-quick-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.np-quick-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-primary);
}

.np-quick-btn .icon { width: 13px; height: 13px; }

.np-error-banner {
    position: absolute;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    background: rgba(200, 40, 40, 0.9);
    color: var(--text-primary);
    font-size: 13px;
    max-width: 90%;
}

.np-error-banner .icon { width: 14px; height: 14px; flex: none; }

.np-error-retry {
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
    flex: none;
}

.np-error-retry:hover { background: rgba(255, 255, 255, 0.3); }

.np-status-pill {
    position: absolute;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: var(--text-primary);
    font-size: 12px;
}

.np-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffb300;
    animation: np-status-pulse 1s ease-in-out infinite;
}

.np-status-pill.buffering .np-status-dot { background: #4fc3f7; }

@keyframes np-status-pulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}


.viz-controls-panel {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    height: 34px;
    box-sizing: border-box;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    max-width: calc(100% - 32px);
}

.viz-select {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    max-width: 150px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.viz-select option { background:var(--bg-surface-2); color:var(--text-primary); }

.viz-nav-btn, .icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.viz-nav-btn .icon, .icon-btn .icon { width: 15px; height: 15px; }

.viz-nav-btn:hover, .icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--text-primary); }
.icon-btn.active { background: rgba(255, 255, 255, 0.18); color: var(--text-primary); }

.viz-controls-divider {
    width: 1px;
    height: 16px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.18);
    margin: 0 2px;
}

.viz-random-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.viz-random-btn:hover { background: rgba(255, 255, 255, 0.12); }

.now-playing-fancy.np-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    border-radius: 0;
    min-height: 100vh;
}

/* Stations */
.search-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px var(--space-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    margin-bottom: 6px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
}

.filter-mode-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 6px;
    padding: 2px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: max-content;
}

.stations-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: 6px;
}

.stations-toolbar-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-tab {
    padding: 4px 10px;
    border-radius: 5px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11px;
}

.toolbar-btn {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 11px;
    line-height: 1.4;
    transition: background var(--transition-fast, 0.15s), color var(--transition-fast, 0.15s);
}

.toolbar-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }

.filter-tab.active, .toolbar-btn.active {
    color: var(--text-primary);
    background: color-mix(in srgb, var(--accent) 55%, transparent);
    border-color: color-mix(in srgb, var(--accent) 70%, transparent);
}

/* Compact circular glass "+" button for adding a custom station */
.toolbar-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast, 0.15s), color var(--transition-fast, 0.15s), border-color var(--transition-fast, 0.15s), transform var(--transition-fast, 0.15s);
}

.toolbar-add-btn:hover {
    background: color-mix(in srgb, var(--accent) 35%, transparent);
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
    color: var(--text-primary);
    transform: scale(1.06);
}

.toolbar-add-icon {
    font-size: 16px;
    line-height: 1;
    font-weight: 600;
    margin-top: -1px;
}

.genre-chips {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.genre-chip {
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--chip-color, var(--border));
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 10.5px;
    line-height: 1.5;
    white-space: nowrap;
}

.genre-chip.active {
    background: var(--chip-color, var(--accent));
    border-color: var(--chip-color, var(--accent));
    color: var(--text-primary);
}

.station-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.station-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 12px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.station-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.station-card.playing { border-color: var(--accent); background: var(--bg-surface-2); box-shadow: 0 0 0 1px var(--accent) inset; }

.station-card-accent {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
}

.station-gallery-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
    overflow: hidden;
}

.station-gallery-logo img { width: 100%; height: 100%; object-fit: cover; }

.station-card-info { flex: 1; min-width: 0; }
.station-card-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.station-card-detail {
    font-size: 11.5px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-card-actions { display: flex; align-items: center; flex-shrink: 0; }
.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.55;
    padding: 4px;
    line-height: 1;
}
.fav-btn:hover, .fav-btn.active { opacity: 1; }

.playing-indicator {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-tertiary);
    padding: var(--space-4);
}

/* Equalizer */
.equalizer-panel { max-width: 980px; margin: 0 auto; }
.eq-header { margin-bottom: var(--space-3); }
.eq-title-row { display: flex; align-items: center; justify-content: space-between; }
.eq-presets-row { display: flex; align-items: center; gap: var(--space-2); }

.eq-preset-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.eq-preset-chip {
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-tertiary);
    font-size: 11.5px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.15s ease;
}

.eq-preset-chip:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.eq-preset-chip:disabled {
    cursor: default;
    opacity: 0.45;
}

.eq-preset-chip-active {
    border-color: var(--accent);
    color: #0a0a0f;
    background: var(--accent);
    font-weight: 600;
    box-shadow: 0 0 8px 0 color-mix(in srgb, var(--accent) 55%, transparent);
}

.eq-preset-select, .settings-select, .template-select {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    font-size: 12px;
}

.settings-toggle { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; font-size: 12px; }
.settings-toggle input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.settings-value { font-size: 12px; color: var(--text-secondary); font-weight: 600; }

.eq-bands {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 14px var(--space-3);
    border: 1px solid color-mix(in srgb,var(--accent) 20%,transparent);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb,var(--accent) 7%,transparent), transparent 60%),
        var(--bg-surface);
}

.eq-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    flex: 1;
}

.eq-band input[type="range"] {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 20px;
    height: 140px;
    accent-color: var(--accent);
}

.eq-band-value { font-size: 11px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.eq-band-label { font-size: 10.5px; color: var(--text-tertiary); letter-spacing: 0.03em; }

/* Effects chain panel — compact, futuristic HUD style */
.fx-panel {
    margin-top: var(--space-4);
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb,var(--accent) 25%,transparent);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 0% 0%, color-mix(in srgb,var(--accent) 8%,transparent), transparent 55%),
        radial-gradient(circle at 100% 100%, color-mix(in srgb,var(--accent-2) 6%,transparent), transparent 55%),
        linear-gradient(180deg,var(--bg-surface-2),var(--bg-surface));
    backdrop-filter: blur(6px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.fx-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, var(--accent), transparent 40%, transparent 60%, var(--accent, #00f0ff));
    opacity: 0.5;
    height: 1px;
    top: 0;
}

.fx-panel-title {
    font-weight: 700;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fx-panel-title::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px 1px var(--accent);
}

.fx-chain {
    display: flex;
    align-items: center;
    gap: 4px 4px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    row-gap: 6px;
}

.fx-node {
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-tertiary);
    font-size: 10px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.fx-node-toggle {
    cursor: pointer;
    font-family: inherit;
}

.fx-node-toggle:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.fx-node-active {
    border-color: var(--accent);
    color: #0a0a0f;
    background: var(--accent);
    font-weight: 600;
    box-shadow: 0 0 10px 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 2px rgba(255, 255, 255, 0.4) inset;
}

.fx-node-active:hover {
    color: #0a0a0f;
    background: var(--accent);
}

.fx-wire {
    flex-shrink: 0;
    width: 10px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05));
}

.fx-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3);
}

.fx-control {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fx-control-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.fx-control input[type="range"],
.fx-card input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.fx-panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
    flex-wrap: wrap;
}

.fx-panel-title-row .fx-panel-title {
    margin-bottom: 0;
}

.fx-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.fx-card {
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fx-card:has(.fx-toggle input:checked) {
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent) inset, 0 0 14px -4px var(--accent);
}

.fx-card-head {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.fx-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fx-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    cursor: pointer;
}

.fx-card:has(.fx-toggle input:checked) .fx-toggle {
    color: var(--text-primary);
}

.fx-toggle input[type="checkbox"] {
    accent-color: var(--accent);
    width: 13px;
    height: 13px;
}

.fx-card .fx-control,
.fx-card-body .fx-control,
.fx-card-body > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fx-card-body label {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--text-tertiary);
}

.fx-card-body label span {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.fx-card input[type="range"] {
    height: 3px;
}

/* Visualizer gallery */
.viz-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-2);
}

.viz-gallery-item {
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    cursor: pointer;
    text-align: center;
}

.viz-gallery-item.active { border-color: var(--accent); background: var(--bg-surface-2); }
.viz-gallery-preview { font-size: 12px; color: var(--text-tertiary); margin-bottom: var(--space-2); text-transform: capitalize; }
.viz-gallery-name { font-size: 13px; font-weight: 600; }

/* ── Merged Visualizer / Studio tab (preset browser + live canvas + Monaco editor) ── */
.viz-studio-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-3);
    height: calc(100vh - 160px);
    min-height: 480px;
}

.viz-studio-layout.browser-collapsed { grid-template-columns: 40px 1fr; }

.viz-browser-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    overflow-y: auto;
}

.viz-browser-panel.collapsed { padding: var(--space-2) var(--space-1); align-items: center; }

.viz-browser-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.viz-browser-title { font-weight: 700; font-size: 14px; flex: 1; }
.viz-browser-count {
    font-size: 11px;
    color: var(--text-tertiary);
    background: var(--bg-surface-2);
    border-radius: 999px;
    padding: 1px 8px;
}

.viz-browser-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.viz-browser-search {
    width: 100%;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    font-size: 13px;
}

.viz-playmode-row { display: flex; gap: var(--space-2); }

.viz-playmode-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
}

.viz-playmode-pill:disabled { opacity: 0.5; cursor: not-allowed; }

.viz-tree { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }

.viz-tree-category { display: flex; flex-direction: column; }

.viz-tree-cat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 6px 4px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
    text-align: left;
}

.viz-tree-cat-label { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-tree-cat-count { font-size: 10px; color: var(--text-tertiary); }

.viz-favorites-header { color: var(--accent); }

.viz-tree-items { display: flex; flex-direction: column; padding-left: var(--space-3); }

.viz-tree-item-row { display: flex; align-items: center; gap: 2px; }

.viz-tree-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    text-align: left;
    min-width: 0;
}

.viz-tree-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-tree-item:hover { background: var(--bg-surface-2); }
.viz-tree-item.active { background: var(--bg-surface-2); color: var(--accent); font-weight: 600; }

.viz-tree-item-fav {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
}

.viz-tree-item-fav.favorited { color: var(--accent); }

.viz-main-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
}

.viz-container-large {
    position: relative;
    flex: 1 1 40%;
    min-height: 220px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
}

.viz-canvas-large {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.viz-editor-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 60%;
    min-height: 220px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    overflow: hidden;
    transition: flex-basis 0.15s ease;
}

.viz-editor-panel.collapsed {
    flex: 0 0 auto;
    min-height: 0;
}

.viz-editor-panel.collapsed .viz-editor-header { border-bottom: none; cursor: pointer; }

.viz-editor-panel.undocked {
    position: fixed;
    top: 60px;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 500;
    flex: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    resize: both;
    overflow: auto;
}

@media (min-width: 900px) {
    .viz-editor-panel.undocked {
        left: auto;
        width: 640px;
    }
}


.viz-editor-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border);
}

.viz-editor-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.viz-editor-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }

.ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.ctrl-btn .icon { width: 14px; height: 14px; }

.ctrl-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--accent); }
.ctrl-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ctrl-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-primary);
}

.ctrl-btn.primary:hover { background: color-mix(in srgb,var(--accent) 85%,var(--text-primary)); border-color: color-mix(in srgb,var(--accent) 85%,var(--text-primary)); }

.ctrl-btn.icon-only { padding: 6px !important; gap: 0; }
.ctrl-btn.ghost { background: rgba(0, 0, 0, 0.35); border-color: rgba(255, 255, 255, 0.12); backdrop-filter: blur(6px); }
.ctrl-btn.ghost:hover { background: rgba(0, 0, 0, 0.55); }

.viz-editor-name-inline {
    flex: 1;
    min-width: 0;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}

.viz-editor-title { cursor: text; }
.viz-editor-title:hover { text-decoration: underline dotted; text-underline-offset: 3px; }

.viz-editor-save-name {
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    font-size: 12px;
    width: 160px;
}

.viz-editor-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-1) var(--space-3);
    font-size: 12px;
    color: var(--success, #4caf50);
    background: rgba(76, 175, 80, 0.1);
}

.viz-editor-status.error { color: var(--danger, #f44336); background: rgba(244, 67, 54, 0.1); }

.viz-editor-container { flex: 1; min-height: 0; position: relative; }
.viz-monaco-editor { width: 100%; height: 100%; min-height: 160px; }

.viz-editor-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: color-mix(in srgb,var(--bg-surface) 95%,transparent);
    backdrop-filter: blur(4px);
    color: var(--text-secondary);
    font-size: 13px;
    z-index: 10;
}

.viz-loading-bar-track {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.viz-loading-bar-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 45%;
    background: linear-gradient(90deg,var(--accent),var(--accent-2));
    border-radius: 4px;
    animation: viz-loading-slide 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes viz-loading-slide {
    0% { transform: translateX(-100%); width: 30%; }
    50% { transform: translateX(120%); width: 60%; }
    100% { transform: translateX(350%); width: 30%; }
}

.viz-loading-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.viz-spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent);
    animation: viz-spin 0.8s linear infinite;
}

@keyframes viz-spin { to { transform: rotate(360deg); } }

/* ── Studio preview toolbar (undock / fullscreen / analyser sim) ───────── */
.viz-container-large { position: relative; }

.viz-preview-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    display: flex;
    gap: 6px;
}

.viz-container-large.undocked {
    position: fixed;
    top: 60px;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 500;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    resize: both;
    overflow: auto;
    border-radius: var(--radius-md);
}

@media (min-width: 900px) {
    .viz-container-large.undocked { left: auto; width: 720px; }
}

.viz-analyser-sim-popover {
    position: absolute;
    top: 52px;
    right: 10px;
    z-index: 7;
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.settings-row-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.settings-row-inline .settings-select,
.settings-row-inline input[type="range"] { flex: 1; max-width: 130px; }

.viz-preset-fav-btn {
    color: var(--text-tertiary);
    transition: color 0.15s, transform 0.15s;
}
.viz-preset-fav-btn:hover {
    color: #f44336;
    transform: scale(1.1);
}
.viz-preset-fav-btn.favorited {
    color: #f44336;
}

.viz-tutorial-dialog {
    max-width: 760px;
    width: 90vw;
}

.viz-tutorial-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.viz-tutorial-header-title h3 {
    margin: 0;
    font-size: 16px;
}

.viz-tutorial-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-height: 70vh;
    overflow-y: auto;
}

.viz-tutorial-intro p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.viz-tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-3);
}

.viz-tutorial-card {
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
}

.viz-tutorial-card h4 {
    margin: 0 0 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.viz-tutorial-list {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.viz-tutorial-list code {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 4px;
    border-radius: 3px;
    color: var(--accent);
    font-size: 11px;
}

.viz-tutorial-examples-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.viz-tutorial-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.viz-tutorial-section-title h4 {
    margin: 0;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.viz-tutorial-section-title span {
    font-size: 11px;
    color: var(--text-tertiary);
}

.viz-tutorial-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-3);
}

.viz-tutorial-example-card {
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.viz-example-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.viz-example-code {
    margin: 0;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px;
    font-size: 11px;
    max-height: 150px;
    overflow-y: auto;
    color: var(--text-primary);
}

.player-record-btn.active { color: var(--danger, #f44336); }

.player-record-group { position: relative; display: flex; align-items: center; }
.player-record-more { padding: 4px !important; transform: rotate(-90deg); }

.record-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    width: 280px;
    max-height: 360px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    padding: var(--space-3);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.record-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 13px;
}

.record-popover-hint { font-size: 11px; color: var(--text-tertiary); margin: 0; }
.record-popover-list { display: flex; flex-direction: column; gap: var(--space-1); max-height: 160px; overflow-y: auto; }

.np-preset-picker-group { position: relative; display: flex; align-items: center; height: 24px; }
.np-preset-picker-btn { width: 190px !important; height: 24px !important; padding: 0 10px !important; gap: 5px; font-size: 12px; justify-content: flex-start; border-radius: 6px !important; }
.np-preset-picker-btn:hover { background: rgba(255, 255, 255, 0.06) !important; }
.np-preset-picker-btn .icon { width: 14px; height: 14px; flex-shrink: 0; }
.np-preset-picker-btn > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-preset-picker-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; text-align: left; }
.np-simple-viz-section .viz-tree-items { max-height: 160px; overflow-y: auto; }

.np-preset-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 320px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    padding: var(--space-3);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.np-preset-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 13px;
}

.np-autochange-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 12px;
    flex-wrap: wrap;
}

.np-autochange-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.np-autochange-toggle input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; }

.np-autochange-countdown {
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    font-weight: 600;
    min-width: 34px;
}

.np-autochange-interval { font-size: 11px; padding: 2px 4px; flex: 1; min-width: 70px; }

.np-autochange-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    flex-shrink: 0;
}

.np-autochange-mode-btn .icon { width: 14px; height: 14px; }
.np-autochange-mode-btn.active { color: #f44336; }
.np-autochange-mode-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.np-preset-tree { max-height: 260px; overflow-y: auto; }

@media (max-width: 900px) {
    .viz-studio-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
    .viz-browser-panel { max-height: 240px; }
}


/* Settings */
.settings-panel { max-width: 640px; margin: 0 auto; }
.settings-section {
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}
.settings-section-title { font-weight: 600; margin-bottom: var(--space-2); color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) 0;
    border-top: 1px solid var(--border);
}
.settings-row:first-of-type { border-top: none; }
.settings-label { font-size: 13px; }
.settings-description { font-size: 11px; color: var(--text-tertiary); }
.settings-control input[type="number"] {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-primary);
}

.about-version {
    font-size: 11px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

.about-block {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.about-credit {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12.5px;
}

.about-credit-label {
    color: var(--text-tertiary);
    min-width: 70px;
}

.about-credit-value {
    color: var(--text-secondary);
}

.about-credit-value code {
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1px 5px;
    font-size: 11px;
}

.about-thanks {
    margin-top: var(--space-2);
}

.about-thanks-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.about-thanks-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface-2);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.about-thanks-item:hover {
    border-color: color-mix(in srgb, var(--accent) 50%, transparent);
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-surface-2));
}

.about-thanks-item .icon:first-child {
    color: var(--accent);
    flex-shrink: 0;
}

.about-thanks-item .icon:last-child {
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-left: auto;
}

.about-thanks-name {
    font-size: 12.5px;
    font-weight: 600;
}

.about-thanks-desc {
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* Theme swatches */
.theme-swatches {
    display: flex;
    gap: 8px;
}

.theme-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--bg-surface-2);
}

.theme-swatch.active { border-color: var(--text-primary); box-shadow: 0 0 0 2px var(--accent); }

.theme-swatch-dot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.theme-swatch.theme-aurora .theme-swatch-dot { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.theme-swatch.theme-nebula .theme-swatch-dot { background: linear-gradient(135deg, #22d3ee, #a855f7, #f472b6); background-size: 200% 200%; animation: theme-swatch-flow 4s ease infinite; }
.theme-swatch.theme-zen .theme-swatch-dot { background: linear-gradient(135deg, #d1d5db, #f5f5f4); }
.theme-swatch.theme-ember .theme-swatch-dot { background: radial-gradient(circle at 30% 30%, #ffb347, #ff6a00 55%, #1a0800 100%); }
.theme-swatch.theme-metal .theme-swatch-dot { background: linear-gradient(135deg, #c4cbd4, #6b7280 50%, #1c1f24 100%); animation: theme-swatch-flow 4s ease-in-out infinite alternate; background-size: 200% 200%; }
.theme-swatch.theme-hexgrid .theme-swatch-dot { background: linear-gradient(135deg, #00e5ff, #7b2ff7 50%, #0a0e1a 100%); animation: theme-swatch-flow 4s ease-in-out infinite alternate; background-size: 200% 200%; }
.theme-swatch.theme-matrix .theme-swatch-dot { background: radial-gradient(circle at 30% 30%, #6bff8a, #00b33c 55%, #000f03 100%); }
.theme-swatch.theme-retro .theme-swatch-dot { background: linear-gradient(135deg, #ff2e97, #ffb347 45%, #35176e 100%); animation: theme-swatch-flow 4s ease-in-out infinite alternate; background-size: 200% 200%; }

@keyframes theme-swatch-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Alternate themes: each changes more than accent color — background,
   motion, and density all shift to give a genuinely different feel. ── */

/* Nebula Flow: deep-space gradient that slowly drifts, plus soft floating
   orbs behind the content for an ambient, "flowy" atmosphere. */


.radio-container.theme-nebula::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(168, 85, 247, 0.20), transparent 60%),
        radial-gradient(ellipse 70% 60% at 85% 30%, rgba(34, 211, 238, 0.16), transparent 60%),
        radial-gradient(ellipse 70% 70% at 50% 100%, rgba(244, 114, 182, 0.14), transparent 60%),
        var(--bg-base);
    background-size: 200% 200%, 220% 220%, 200% 200%, 100% 100%;
    animation: nebula-drift 22s ease-in-out infinite alternate;
}

.radio-container.theme-nebula::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.5) 1px, transparent 1.5px),
        radial-gradient(circle, rgba(255, 255, 255, 0.3) 1px, transparent 1.5px);
    background-size: 180px 180px, 260px 260px;
    background-position: 0 0, 90px 130px;
    opacity: 0.35;
    animation: nebula-twinkle 6s ease-in-out infinite alternate;
}

@keyframes nebula-drift {
    0% { background-position: 0% 0%, 100% 0%, 50% 100%, 0 0; }
    100% { background-position: 15% 20%, 80% 25%, 60% 80%, 0 0; }
}

@keyframes nebula-twinkle {
    0% { opacity: 0.22; }
    100% { opacity: 0.42; }
}

.radio-container.theme-nebula .now-playing-fancy {
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.10) inset;
}

.radio-container.theme-nebula .btn-primary,
.radio-container.theme-nebula .fx-node-active,
.radio-container.theme-nebula .eq-preset-chip-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
}

/* Zen Minimal: flat, hushed, near-monochrome. Motion is slowed/removed,
   glows are dropped, borders soften — a calm, distraction-free surface. */


.radio-container.theme-zen * {
    text-shadow: none !important;
}

.radio-container.theme-zen .btn-primary {
    background: var(--accent);
    color: #101012;
}

.radio-container.theme-zen .fx-node-active,
.radio-container.theme-zen .eq-preset-chip-active,
.radio-container.theme-zen .theme-swatch.active {
    background: var(--accent);
    color: #101012;
    box-shadow: none;
}

.radio-container.theme-zen .now-playing-fancy,
.radio-container.theme-zen .fx-panel,
.radio-container.theme-zen .fx-card,
.radio-container.theme-zen .station-card,
.radio-container.theme-zen .viz-preset-item {
    box-shadow: none !important;
    animation: none !important;
}

.radio-container.theme-zen .fx-panel::before,
.radio-container.theme-zen .eq-bands::before {
    display: none;
}

.radio-container.theme-zen ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
}

/* Ember Stars: near-black sky with a warm orange glow horizon and drifting
   starfield, plus the occasional shooting star streaking across. */


.radio-container.theme-ember::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(ellipse 90% 50% at 50% 120%, rgba(255, 106, 0, 0.22), transparent 60%),
        radial-gradient(ellipse 60% 40% at 15% 0%, rgba(255, 179, 71, 0.10), transparent 60%),
        var(--bg-base);
    background-size: 100% 100%, 200% 200%, 100% 100%;
    animation: ember-glow-drift 18s ease-in-out infinite alternate;
}

@keyframes ember-glow-drift {
    0% { background-position: 50% 100%, 0% 0%, 0 0; }
    100% { background-position: 50% 100%, 25% 20%, 0 0; }
}

/* Two layered starfields (different sizes/speeds) drifting slowly upward,
   so the sky feels alive without being busy. */
.radio-container.theme-ember::after {
    content: "";
    position: absolute;
    inset: -10% 0 0 0;
    z-index: -2;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1.4px),
        radial-gradient(circle, rgba(255, 200, 140, 0.7) 1px, transparent 1.4px),
        radial-gradient(circle, rgba(255, 255, 255, 0.5) 1px, transparent 1.2px);
    background-size: 220px 220px, 160px 160px, 300px 300px;
    background-position: 20px 40px, 120px 190px, 60px 260px;
    animation: ember-starfield-drift 90s linear infinite, ember-starfield-twinkle 5s ease-in-out infinite alternate;
}

@keyframes ember-starfield-drift {
    0% { background-position: 20px 40px, 120px 190px, 60px 260px; }
    100% { background-position: 20px -2160px, 120px -1770px, 60px -3040px; }
}

@keyframes ember-starfield-twinkle {
    0% { opacity: 0.65; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* Playback speeds up the drift and deepens the twinkle so the sky feels
   alive with the music instead of a static backdrop. */
.radio-container.theme-ember.is-playing::after {
    animation-duration: 55s, 2.6s;
}

/* Shooting stars: thin bright streaks that fly across the sky on a loop,
   each with its own delay/angle/duration for a natural, non-repeating feel. */
.radio-container.theme-ember .ember-shooting-star {
    position: absolute;
    z-index: -1;
    top: -10px;
    left: -10%;
    width: 140px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 210, 150, 0.95), rgba(255, 210, 150, 0));
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transform: rotate(18deg);
    animation: ember-shoot 7s linear infinite;
}

.radio-container.theme-ember .ember-shooting-star:nth-child(2) {
    top: 8%;
    left: -10%;
    animation-delay: 2.4s;
    animation-duration: 9s;
    width: 100px;
}

.radio-container.theme-ember .ember-shooting-star:nth-child(3) {
    top: -4%;
    left: 20%;
    animation-delay: 5.1s;
    animation-duration: 8s;
    width: 120px;
}

@keyframes ember-shoot {
    0% { transform: translate(0, 0) rotate(18deg); opacity: 0; }
    4% { opacity: 1; }
    18% { transform: translate(60vw, 34vh) rotate(18deg); opacity: 0; }
    100% { transform: translate(60vw, 34vh) rotate(18deg); opacity: 0; }
}

/* While playing, shooting stars fly noticeably faster/more often. */
.radio-container.theme-ember.is-playing .ember-shooting-star {
    animation-duration: 3.6s;
}

.radio-container.theme-ember.is-playing .ember-shooting-star:nth-child(2) {
    animation-duration: 4.4s;
}

.radio-container.theme-ember.is-playing .ember-shooting-star:nth-child(3) {
    animation-duration: 4s;
}

/* Gentle flowing lines: soft ember streams that ripple across the sky only
   while a station is actually playing, echoing the beat of the visualizer. */
.radio-container.theme-ember .ember-flow-line {
    position: absolute;
    z-index: -1;
    left: -20%;
    width: 140%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 138, 40, 0.55), rgba(255, 187, 90, 0.85), rgba(255, 138, 40, 0.55), transparent);
    opacity: 0;
    pointer-events: none;
    filter: blur(0.5px);
}

.radio-container.theme-ember .ember-flow-line:nth-child(4) { top: 32%; }
.radio-container.theme-ember .ember-flow-line:nth-child(5) { top: 68%; }

.radio-container.theme-ember.is-playing .ember-flow-line:nth-child(4) {
    animation: ember-flow 9s ease-in-out infinite;
}

.radio-container.theme-ember.is-playing .ember-flow-line:nth-child(5) {
    animation: ember-flow 11s ease-in-out infinite reverse;
    animation-delay: 1.5s;
}

@keyframes ember-flow {
    0% { transform: translateX(-6%) scaleX(0.9); opacity: 0; }
    15% { opacity: 0.55; }
    50% { transform: translateX(6%) scaleX(1.05); opacity: 0.85; }
    85% { opacity: 0.4; }
    100% { transform: translateX(-6%) scaleX(0.9); opacity: 0; }
}

.radio-container.theme-ember .btn-primary,
.radio-container.theme-ember .fx-node-active,
.radio-container.theme-ember .eq-preset-chip-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: #1a0800;
}

.radio-container.theme-ember .now-playing-fancy {
    box-shadow: 0 0 50px rgba(255, 122, 26, 0.10) inset;
}

@media (prefers-reduced-motion: reduce) {
    .radio-container.theme-ember::before,
    .radio-container.theme-ember::after,
    .radio-container.theme-ember .ember-shooting-star,
    .radio-container.theme-ember .ember-flow-line {
        animation: none;
        opacity: 0;
    }
}

/* Dark Metal: brushed steel/graphite palette with a subtle animated sheen
   sweeping across surfaces, like light gliding over polished metal. */


.radio-container.theme-metal::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0px, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 5px),
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255, 255, 255, 0.06), transparent 60%),
        linear-gradient(160deg, #1a1c20, #101114 70%);
}

.radio-container.theme-metal::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.10) 47%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.10) 53%, transparent 70%);
    background-size: 260% 260%;
    animation: metal-sheen 9s ease-in-out infinite;
    mix-blend-mode: overlay;
}

@keyframes metal-sheen {
    0% { background-position: -40% -40%; }
    50% { background-position: 140% 140%; }
    100% { background-position: -40% -40%; }
}

.radio-container.theme-metal.is-playing::after {
    animation-duration: 5s;
}

.radio-container.theme-metal .btn-primary,
.radio-container.theme-metal .fx-node-active,
.radio-container.theme-metal .eq-preset-chip-active {
    background: linear-gradient(135deg, #c4cbd4, #6b7280);
    border-color: transparent;
    color: #14161a;
}

.radio-container.theme-metal .now-playing-fancy {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.05) inset;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .radio-container.theme-metal::after {
        animation: none;
        opacity: 0.3;
    }
}

/* Crystal Hex: deep-space cyan/violet palette with a drifting hexagonal
   crystal-lattice grid and slowly pulsing "cell" nodes, like a facet of
   glass catching shifting light. */


.radio-container.theme-hexgrid::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(123, 47, 247, 0.16), transparent 60%),
        radial-gradient(ellipse 70% 50% at 85% 100%, rgba(0, 229, 255, 0.14), transparent 60%),
        linear-gradient(160deg, #0a0e1c, #070a14 70%);
    background-size: 100% 100%, 100% 100%, 100% 100%;
    animation: hex-glow-drift 24s ease-in-out infinite alternate;
}

@keyframes hex-glow-drift {
    0% { background-position: 20% 0%, 85% 100%, 0 0; }
    100% { background-position: 30% 15%, 70% 85%, 0 0; }
}

/* A hexagonal lattice built from two offset dot-grids (mimics hex-cell
   vertices) plus thin repeating diagonal lines standing in for cell edges. */
.radio-container.theme-hexgrid::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.5;
    background-image:
        repeating-linear-gradient(60deg, rgba(0, 229, 255, 0.07) 0px, rgba(0, 229, 255, 0.07) 1px, transparent 1px, transparent 46px),
        repeating-linear-gradient(-60deg, rgba(123, 47, 247, 0.07) 0px, rgba(123, 47, 247, 0.07) 1px, transparent 1px, transparent 46px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 46px);
    background-size: 80px 80px, 80px 80px, 80px 80px;
    animation: hex-grid-drift 40s linear infinite, hex-grid-pulse 4.5s ease-in-out infinite alternate;
}

@keyframes hex-grid-drift {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 160px 0, -160px 0, 0 160px; }
}

@keyframes hex-grid-pulse {
    0% { opacity: 0.35; }
    100% { opacity: 0.6; }
}

.radio-container.theme-hexgrid.is-playing::after {
    animation-duration: 22s, 1.8s;
}

.radio-container.theme-hexgrid .btn-primary,
.radio-container.theme-hexgrid .fx-node-active,
.radio-container.theme-hexgrid .eq-preset-chip-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: #04121a;
}

.radio-container.theme-hexgrid .now-playing-fancy {
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.12) inset;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .radio-container.theme-hexgrid::before,
    .radio-container.theme-hexgrid::after {
        animation: none;
        opacity: 0.3;
    }
}

/* Matrix: classic green-on-black digital rain, streaming code columns
   falling continuously behind the UI. */


.radio-container.theme-matrix::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    background: var(--bg-base);
}

.radio-container.theme-matrix::after { display: none; }

.radio-container.theme-matrix .btn-primary,
.radio-container.theme-matrix .fx-node-active,
.radio-container.theme-matrix .eq-preset-chip-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: #001a08;
    text-shadow: none;
}

.radio-container.theme-matrix .now-playing-fancy {
    box-shadow: 0 0 40px rgba(0, 255, 102, 0.12) inset;
    border: 1px solid rgba(0, 255, 102, 0.18);
}

@media (prefers-reduced-motion: reduce) {
    .radio-container.theme-matrix::after {
        animation: none;
        opacity: 0.2;
    }
}

/* Retro Wave: 80s synthwave sunset - magenta/orange grid horizon over a
   deep purple sky with a slowly scrolling perspective floor grid and a
   soft glowing sun. */


.radio-container.theme-retro::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(circle 220px at 50% 28%, rgba(255, 179, 71, 0.55), rgba(255, 46, 151, 0.28) 55%, transparent 75%),
        linear-gradient(180deg, #1c0a30 0%, #170826 45%, #0d0416 100%);
    animation: retro-sun-glow 7s ease-in-out infinite alternate;
}

@keyframes retro-sun-glow {
    0% { background-position: 50% 26%, 0 0; }
    100% { background-position: 50% 30%, 0 0; }
}

/* Perspective floor grid: a vertical set of horizontal scanlines that get
   denser toward the "horizon", scrolling upward for an endless-highway feel. */
.radio-container.theme-retro::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55%;
    z-index: -2;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 46, 151, 0.5) 0px, rgba(255, 46, 151, 0.5) 2px, transparent 2px, transparent 28px),
        repeating-linear-gradient(90deg, rgba(255, 179, 71, 0.35) 0px, rgba(255, 179, 71, 0.35) 2px, transparent 2px, transparent 60px);
    background-size: 100% 28px, 60px 100%;
    -webkit-mask-image: linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent 95%);
    mask-image: linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent 95%);
    animation: retro-grid-scroll 3.2s linear infinite;
}

@keyframes retro-grid-scroll {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 0 -28px, 0 0; }
}

.radio-container.theme-retro.is-playing::after {
    animation-duration: 1.1s;
}

.radio-container.theme-retro .btn-primary,
.radio-container.theme-retro .fx-node-active,
.radio-container.theme-retro .eq-preset-chip-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: #22072a;
}

.radio-container.theme-retro .now-playing-fancy {
    box-shadow: 0 0 50px rgba(255, 46, 151, 0.15) inset;
    border: 1px solid rgba(255, 179, 71, 0.2);
}

@media (prefers-reduced-motion: reduce) {
    .radio-container.theme-retro::before,
    .radio-container.theme-retro::after {
        animation: none;
    }
}


/* Recorder */
.recorder-panel { max-width: 720px; margin: 0 auto; }
.recorder-controls {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    margin-bottom: var(--space-3);
}

.record-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--error);
    background: transparent;
    color: var(--error);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.record-btn.recording {
    background: var(--error);
    color: var(--text-primary);
    animation: rec-pulse 1.4s infinite;
}

@keyframes rec-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.record-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.recorder-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.recorder-option {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 12px;
    color: var(--text-secondary);
}

.recording-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.recording-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

.recording-item-info { flex: 1; min-width: 0; }
.recording-item-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recording-item-meta { font-size: 11px; color: var(--text-tertiary); }
.recording-item-actions { display: flex; gap: var(--space-1); }

/* Player bar */
.player-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    flex-shrink: 0;
}

.player-left { display: flex; align-items: center; min-width: 0; }
.player-mini-info { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }

.player-mini-cover {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.player-mini-cover-btn {
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background var(--transition-fast, 0.15s), transform var(--transition-fast, 0.15s);
}

.player-mini-cover-btn:hover {
    background: var(--bg-surface-2);
    transform: scale(1.05);
}

.player-mini-emoji { font-size: 18px; line-height: 1; }

.player-mini-cover img { width: 100%; height: 100%; object-fit: cover; }

.player-mini-canvas {
    width: 36px;
    height: 36px;
    display: block;
    border-radius: var(--radius-sm);
}

/* "Waveform" player-icon mode: a tiny animated equalizer-style bar group
   that bounces while playing and sits flat/idle otherwise. */
.player-mini-wave {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    width: 20px;
    height: 18px;
}

.player-mini-wave span {
    width: 3px;
    height: 4px;
    border-radius: 2px;
    background: var(--accent);
    transition: height 0.15s ease;
}

.player-mini-wave.active span { animation: player-wave-bounce 1.1s ease-in-out infinite; }
.player-mini-wave.active span:nth-child(1) { animation-delay: 0s; }
.player-mini-wave.active span:nth-child(2) { animation-delay: 0.12s; }
.player-mini-wave.active span:nth-child(3) { animation-delay: 0.24s; }
.player-mini-wave.active span:nth-child(4) { animation-delay: 0.12s; }
.player-mini-wave.active span:nth-child(5) { animation-delay: 0s; }

@keyframes player-wave-bounce {
    0%, 100% { height: 4px; }
    50% { height: 18px; }
}

/* "Decibel" player-icon mode: a small vertical meter fed by a live level
   sampled from the analyser (see FlowBeatPlayerInterop.getLevel). */
.player-mini-db {
    width: 10px;
    height: 22px;
    border-radius: 3px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.player-mini-db-fill {
    width: 100%;
    background: linear-gradient(0deg, var(--success), var(--accent) 70%, #ff4d4d);
    transition: height 0.09s linear;
}

.player-mini-text { min-width: 0; }
.player-mini-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-mini-subtitle { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.player-mini-radiotext { color: var(--accent); font-weight: 500; }

/* Player-bar icon mode picker (Settings > Appearance) */
.icon-mode-picker { display: flex; gap: var(--space-2); }
.icon-mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s);
}
.icon-mode-btn:hover { color: var(--text-primary); border-color: var(--accent); }
.icon-mode-btn.active { background: var(--accent); border-color: var(--accent); color: var(--text-primary); }

/* Radio text ("now playing" ICY metadata) shown on the big Now Playing view */
.np-radiotext {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    margin: 2px 0 8px;
    max-width: 480px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.np-radiotext-waiting { opacity: 0.7; font-style: italic; }

/* Dedicated URL for Lively Wallpaper (Windows), xwinwrap (Linux), and
   browser-based wallpaper hosts on macOS. Playback and rendering remain in
   the same page so the Web Audio analyser continues to drive Butterchurn. */
.radio-container.wallpaper-mode {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
}

.radio-container.wallpaper-mode .tab-bar,
.radio-container.wallpaper-mode > .player-bar {
    display: none;
}

.radio-container.wallpaper-mode .radio-content {
    padding: 0;
    overflow: hidden;
}

.radio-container.wallpaper-mode .now-playing-fancy {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border-radius: 0;
}

.wallpaper-media-panel {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 20;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(560px, calc(100vw - 32px));
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: color-mix(in srgb,var(--bg-surface) 92%,transparent);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0.18;
    transition: opacity 0.2s ease;
}

.wallpaper-media-panel:hover,
.wallpaper-media-panel:focus-within { opacity: 1; }

.wallpaper-media-icon {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 20px;
}

.wallpaper-media-icon img { width: 100%; height: 100%; object-fit: cover; }
.wallpaper-media-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wallpaper-media-copy strong,
.wallpaper-media-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallpaper-media-copy strong { font-size: 13px; }
.wallpaper-media-copy span { color: var(--text-secondary); font-size: 11px; }

/* "RT" badge marking stations verified to expose ICY radio text */
.station-radiotext-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 0 3px;
    margin-left: 5px;
    vertical-align: middle;
    line-height: 1.4;
}

.player-center {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    justify-self: center;
}

.player-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-surface-2);
    color: var(--text-primary);
    cursor: pointer;
}

.player-btn.play-btn {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--text-primary);
}

.player-btn:hover { filter: brightness(1.15); }

.player-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    justify-self: end;
}

.icon-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; }

.volume-slider {
    width: 90px;
    accent-color: var(--accent);
}

/* Add station modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-dialog {
    width: 100%;
    max-width: 420px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
}

.modal-dialog.modal-wide {
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-group { margin-bottom: var(--space-2); }
.form-group label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.form-input {
    width: 100%;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.text-danger { color: var(--error); }

/* Add-station: source picker + directory browser */
.add-station-source-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.source-tab {
    flex: 1;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
}

.source-tab.active {
    border-color: var(--accent);
    color: var(--text-primary);
    background: color-mix(in srgb,var(--accent) 12%,transparent);
}

.directory-search-row {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.directory-search-row .form-input { flex: 1; }

.directory-results {
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
    max-height: 45vh;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.directory-result-card {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface-2);
}

.directory-result-logo {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.directory-result-logo img { width: 100%; height: 100%; object-fit: cover; }

.directory-result-info { flex: 1; min-width: 0; }
.directory-result-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.directory-result-detail { font-size: 11px; color: var(--text-tertiary); }

.directory-empty-state {
    text-align: center;
    padding: var(--space-4);
    color: var(--text-tertiary);
    font-size: 13px;
}

.directory-loading {
    text-align: center;
    padding: var(--space-3);
    color: var(--text-secondary);
    font-size: 13px;
}

/* Reconnect modal (blazor built-in) */
#components-reconnect-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-primary);
    z-index: 100;
}

.components-reconnect-show, .components-reconnect-failed, .components-reconnect-rejected {
    display: flex;
}

/* ── Glassy / translucent scrollbars (webkit + Firefox) ─────────────────── */
* {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb,var(--accent) 35%,transparent) transparent;
}

*::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

*::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: color-mix(in srgb,var(--accent) 28%,transparent);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.15s;
}

*::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb,var(--accent) 50%,transparent);
    background-clip: padding-box;
}

*::-webkit-scrollbar-corner { background: transparent; }

/* Draggable floating panels (editor + visualizer preview) */
.viz-editor-panel.undocked .viz-editor-header.draggable-header { cursor: move; }
.viz-container-large.undocked.draggable-header { cursor: move; }

/* Radio workspace: aligned controls, quiet cards, persistent search. */
.radio-content-player { padding: 0; display: flex; overflow: hidden; }
.radio-content-player .now-playing-fancy { flex: 1; height: auto; min-height: 0; border-radius: 0; }
.viz-controls-panel { top: 20px; left: 20px; height: 46px; gap: 6px; padding: 6px 10px; max-width: calc(100% - 90px); font-size: 13px; }
.viz-controls-panel .viz-nav-btn, .viz-controls-panel .icon-btn { width: 32px; height: 32px; }
.viz-controls-panel .np-preset-picker-btn { width: auto; max-width: 240px; }
.viz-controls-panel .np-preset-picker-label { max-width: 210px; font-size: 12px; }
.np-fav-corner-btn { top: 20px; right: 20px; width: 46px; height: 46px; }
.viz-cycle-control { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.viz-cycle-control select { background:var(--bg-surface-2);color:var(--text-primary);border:1px solid var(--border); border-radius: 6px; padding: 5px; }
.viz-nav-btn.active { color: var(--accent); background: #ffffff12; }
.profile-menu { position: relative; margin-right: 16px; }
.profile-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 6px 10px; border-radius: 12px; font-size: 13px; }
.profile-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-weight: 700; }
.profile-dropdown { position: absolute; right: 0; top: 48px; min-width: 200px; background: var(--bg-surface-2); border: 1px solid var(--border); box-shadow: 0 12px 40px #0008; padding: 10px; border-radius: 12px; z-index: 100; display: grid; gap: 4px; }
.profile-dropdown strong { padding: 10px; color: var(--text-secondary); font-size: 12px; }
.profile-dropdown a, .profile-dropdown button { display: block; width: 100%; padding: 10px; text-align: left; border: 0; background: transparent; color: var(--text-primary); border-radius: 6px; cursor: pointer; }
.profile-dropdown a:hover, .profile-dropdown button:hover { background: #ffffff0a; }
.stations-panel { height: 100%; display: flex; flex-direction: column; min-height: 0; gap: 12px; }
.station-filter-row { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.station-filter-row label { display: grid; gap: 6px; font-size: 11px; color: var(--text-secondary); }
.station-filter-row select { padding: 9px 28px 9px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-primary); max-width: 210px; }
.station-result-count { margin-left: auto; align-self: center; font-size: 12px; color: var(--text-secondary); }
.station-gallery { flex: 1; min-height: 0; overflow-y: auto; align-content: start; grid-template-columns: repeat(auto-fill,minmax(270px,1fr)); gap: 12px; padding: 3px; }
.station-card { display: grid; grid-template-columns: 54px minmax(0,1fr) 32px; gap: 10px; padding: 16px; min-height: 112px; border-radius: 14px; background: var(--bg-surface); }
.station-card-accent { display: none; }
.station-gallery-logo { width: 54px; height: 54px; border-radius: 12px; background: color-mix(in srgb,var(--station-color) 12%,var(--bg-surface)); grid-row: 1 / 3; overflow: hidden; }
.station-gallery-logo img { width: 100%; height: 100%; object-fit: contain; }
.station-card-info { align-self: center; }
.station-card-name { font-size: 14px; font-weight: 600; }
.station-card-detail { margin-top: 5px; font-size: 11px; }
.station-card-actions { grid-column: 3; grid-row: 1 / 3; flex-direction: column; gap: 8px; }
.station-card .station-rating { grid-column: 2; font-size: 11px; }
.fav-btn { color: var(--text-secondary); display: grid; place-items: center; }
.fav-btn.active { color: #fb7185; }
.stations-panel > .search-bar { margin: 0; flex-shrink: 0; background: var(--bg-surface); border: 1px solid var(--border); padding: 12px; border-radius: 12px; }
.eq-monitor { border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin: 20px 0; background: var(--bg-surface); }
.eq-monitor > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.eq-monitor span { color: var(--text-secondary); font-size: 11px; }
#eq-spectrum { width: 100%; height: 150px; display: block; margin-top: 12px; }
.eq-bands { border: 1px solid var(--border); border-radius: 16px; padding: 24px 16px; background: var(--bg-surface); }
.fx-cards { grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 16px; }
.fx-card { border-radius: 14px; background: var(--bg-surface); }
.fx-card:has(input[type=checkbox]:not(:checked)) .fx-card-body { opacity: .5; }
.matrix-rain-canvas { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .45; }
.theme-matrix .matrix-rain-canvas { display: block; }
.theme-matrix > .tab-bar, .theme-matrix > .radio-content, .theme-matrix > .player-bar { position: relative; z-index: 1; }
.theme-matrix { font-family: 'Consolas',monospace; }
.theme-matrix .now-playing-fancy { background: #0009; }
@media(max-width:700px) {
 .viz-controls-panel { top: 12px; left: 12px; height: 42px; gap: 2px; max-width: calc(100% - 70px); }
 .viz-controls-panel .np-preset-picker-btn { max-width: 115px; }
 .viz-controls-panel .np-preset-picker-label { max-width: 85px; }
 .np-fav-corner-btn { top: 12px; right: 12px; width: 42px; height: 42px; }
 .viz-cycle-control select { display: none; }
 .profile-menu summary > span:nth-child(2) { display: none; }
 .station-filter-row { gap: 8px; }
 .station-filter-row label { flex: 1; min-width: 90px; }
 .station-filter-row select { width: 100%; padding-right: 4px; }
 .station-gallery { grid-template-columns: 1fr; }
 .eq-monitor > div { flex-direction: column; }
}

.lyrics-panel { position: absolute; right: 16px; top: 66px; bottom: 82px; width: min(430px,calc(100% - 32px)); border: 1px solid var(--border); border-radius: 18px; background: var(--bg-surface); box-shadow: 0 20px 80px #0008; z-index: 30; display: flex; flex-direction: column; overflow: hidden; }
.lyrics-panel header { padding: 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.lyrics-panel header div { display: grid; gap: 5px; min-width: 0; }
.lyrics-panel small { color: var(--text-secondary); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lyrics-search { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 16px 8px; }
.lyrics-search label { display: grid; gap: 5px; color: var(--text-secondary); font-size: 11px; min-width: 0; }
.lyrics-search input, .lyrics-sync input, .lyrics-version select { width: 100%; border: 1px solid var(--border); background: var(--bg-surface-2); color: var(--text-primary); padding: 10px; border-radius: 8px; }
.lyrics-search button { grid-column: 1 / -1; }
.lyrics-follow { padding: 8px 16px; color: var(--text-secondary); font-size: 12px; }
.lyrics-body { overflow-y: auto; padding: 16px; flex: 1; min-height: 0; }
.lyrics-version { display: grid; gap: 6px; color: var(--text-secondary); font-size: 12px; }
.lyrics-sync { margin: 14px 0; font-size: 12px; color: var(--text-secondary); }
.lyrics-sync summary { cursor: pointer; }
.lyrics-sync input { width: 80px; }
.lyrics-lines { display: grid; gap: 5px; margin: 20px 0; }
.lyric-line { border: 0; background: transparent; color: var(--text-secondary); font-size: 17px; line-height: 1.6; text-align: left; padding: 8px; border-radius: 8px; cursor: pointer; }
.lyric-line.current { color: var(--text-primary); background: color-mix(in srgb,var(--accent) 20%,transparent); font-weight: 600; }
.lyrics-plain { white-space: pre-wrap; line-height: 1.9; font-size: 16px; margin: 20px 0; }
.lyrics-empty { color: var(--text-secondary); line-height: 1.7; }
.lyrics-panel footer { display: grid; gap: 5px; font-size: 11px; color: var(--text-secondary); border-top: 1px solid var(--border); padding: 15px 0; }
.lyrics-external { display: block; font-size: 12px; color: var(--accent); margin: 16px 0; }

.profile-menu .profile-avatar { width: 30px; height: 30px; margin: 0; font-size: 13px; }

.eq-section-tabs { display: flex; gap: 6px; margin-bottom: 20px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; padding: 5px; width: fit-content; }
.eq-section-tabs button { border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); padding: 10px 20px; cursor: pointer; }
.eq-section-tabs button.active { background: var(--accent); color: white; }
.eq-section-filters .fx-card:not(.fx-card-filter), .eq-section-effects .fx-card-filter { display: none; }
.eq-section-effects .fx-chain { margin-bottom: 20px; }
.eq-band-number { width: 52px; padding: 6px 2px; font-size: 11px; text-align: center; border: 1px solid var(--border); color: var(--text-primary); background: var(--bg-surface-2); border-radius: 6px; }
.eq-band-number::-webkit-inner-spin-button { -webkit-appearance: none; }
.eq-section-effects .eq-preset-chips, .eq-section-filters .eq-preset-chips { display: none; }

.station-card { overflow: visible; grid-template-rows: auto auto; }
.station-card .station-rating { white-space: nowrap; flex-wrap: nowrap; gap: 10px; padding-top: 0; }
.station-rating-picker { position: relative; }
.station-rating-picker summary { cursor: pointer; list-style: none; color: var(--text-secondary); font-size: 11px; }
.station-rating-picker .station-stars { position: absolute; right: 0; top: 22px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-surface-2); box-shadow: 0 10px 30px #0008; z-index: 10; }
.station-rating-picker .station-stars button { padding: 5px; font-size: 19px; }
.station-card:has(.station-rating-picker[open]) { z-index: 11; }
.fx-card:has(input[type=checkbox]:not(:checked)) .fx-card-body { opacity: .75; }
.profile-menu .profile-avatar { background: var(--accent); color: var(--bg-base); }

/* Larger, borderless favorite target; its centre aligns with the toolbar. */
.np-fav-corner-btn { top:15px; width:56px; height:56px; border:0; background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:none; }
.np-fav-corner-btn .icon { width:30px; height:30px; }
.np-fav-corner-btn:hover { background:transparent; border:0; }
.station-gallery-logo,.np-cover-art { display:flex; align-items:center; justify-content:center; }
.station-gallery-logo img,.np-cover-art img { display:block; object-fit:contain; width:100%; height:100%; }
@media(max-width:600px) { .np-fav-corner-btn { top:9px; width:48px; height:48px; } }
.np-fav-corner-btn .icon svg { width:30px; height:30px; }

/* Creative tools inherit every FlowBeat theme instead of fixed purple surfaces. */
.np-picker-toolbar { display:flex; align-items:center; gap:8px; padding-bottom:12px; border-bottom:1px solid var(--border); }
.np-picker-close { margin-left:auto; }.np-autochange-toggle input {accent-color:var(--accent);}
.np-favorite-panel { border:1px solid var(--border); border-radius:10px; margin:12px 0; padding:10px; background:color-mix(in srgb,var(--accent) 7%,var(--bg-surface)); max-height:170px; overflow:auto; }
.np-favorite-panel h4 { display:flex; align-items:center; gap:8px; margin:0 0 8px; font-size:12px; }.np-favorite-panel h4 span { margin-left:auto; }.np-favorite-panel p {font-size:11px;color:var(--text-tertiary);}
.viz-controls-panel,.np-preset-popover {background:var(--bg-surface);border-color:var(--border);}
.viz-nav-btn,.viz-random-btn,.icon-btn,.viz-tree-cat-btn,.viz-tree-item,.viz-tree-item-fav,.viz-playmode-pill { color:var(--text-secondary); }
.viz-nav-btn:hover,.viz-random-btn:hover,.viz-tree-item:hover,.viz-tree-cat-btn:hover,.icon-btn:hover { color:var(--accent); background:color-mix(in srgb,var(--accent) 12%,var(--bg-surface)); }
.viz-nav-btn.active,.viz-tree-item.active,.viz-playmode-pill.active {color:var(--accent);background:color-mix(in srgb,var(--accent) 16%,var(--bg-surface));border-color:var(--accent);}
.np-preset-popover {resize:both;overflow:auto;min-width:300px;min-height:240px;max-width:min(650px,85vw);max-height:70dvh;}
.eq-monitor { margin:0 0 18px; }.eq-section-tabs {margin-top:12px;}
.eq-bands,.fx-panel,.fx-chain,.fx-card {border-color:var(--border);background:var(--bg-surface);}
.fx-panel {background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 7%,var(--bg-surface)),var(--bg-surface));}
.fx-card {border-radius:18px;overflow:hidden;box-shadow:0 8px 24px #00000012;}
.fx-card-head {background:color-mix(in srgb,var(--accent) 8%,var(--bg-surface));border-color:var(--border);padding:16px;}
.fx-card:nth-child(2n) .fx-card-head {background:color-mix(in srgb,var(--accent) 15%,var(--bg-surface));}
.fx-card-body {padding:18px;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:18px;}
.fx-control {margin:0;display:grid;gap:8px;}.fx-control label {color:var(--text-secondary);font-size:12px;display:flex;justify-content:space-between;gap:8px;}.fx-control label span {color:var(--text-primary);font:11px monospace;background:var(--bg-surface-2);padding:3px 6px;border-radius:6px;}
.fx-control input[type=range],.fx-toggle input {accent-color:var(--accent);}.fx-toggle {color:var(--text-primary);font-weight:600;}
.fx-node {color:var(--text-secondary);border-color:var(--border);background:var(--bg-surface-2);border-radius:12px;}.fx-node-active {color:var(--accent);background:color-mix(in srgb,var(--accent) 15%,var(--bg-surface));border-color:var(--accent);}.fx-wire {background:var(--border);}
.fx-presets {display:flex;gap:6px;flex-wrap:wrap;}.fx-presets button {border:1px solid var(--border);background:var(--bg-surface-2);color:var(--text-secondary);border-radius:20px;padding:7px 12px;font:inherit;font-size:11px;cursor:pointer;}.fx-presets button.active {color:var(--accent);border-color:var(--accent);}
.fx-panel-title-row {flex-wrap:wrap;gap:12px;}.eq-section-filters .fx-chain {display:none;}
.np-info h2 {font-size:clamp(20px,3vw,34px);font-weight:650;letter-spacing:-.025em;line-height:1.15;}
.np-pills {gap:6px;margin-top:14px;}
.np-pills .pill {
    gap:5px;
    padding:4px 8px;
    border:1px solid color-mix(in srgb,var(--text-primary) 14%,transparent);
    border-radius:6px;
    background:color-mix(in srgb,var(--bg-surface) 42%,transparent);
    box-shadow:inset 0 1px 0 color-mix(in srgb,var(--text-primary) 8%,transparent);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    color:var(--text-primary);
    font-size:12px;
    line-height:1.2;
    white-space:nowrap;
}
.np-pills .pill .icon {display:inline-flex;align-items:center;justify-content:center;flex:none;width:12px;height:12px;}
.np-pills .pill .icon svg {width:12px;height:12px;}

.fx-label {display:flex;align-items:center;justify-content:space-between;gap:8px;}.fx-label label {color:var(--text-secondary);font-size:12px;}.fx-label>span {font:11px monospace;background:var(--bg-surface-2);padding:3px 6px;border-radius:6px;white-space:nowrap;}
.fx-parameter-inputs {display:grid;grid-template-columns:minmax(60px,1fr) 60px;gap:10px;align-items:center;}.fx-parameter-inputs input[type=range] {width:100%;margin:0;}.fx-parameter-inputs input[type=number] {width:100%;box-sizing:border-box;background:var(--bg-surface-2);color:var(--text-primary);border:1px solid var(--border);border-radius:7px;padding:6px;font:11px monospace;}
.recorder-hint {font-size:11px;color:var(--text-tertiary);line-height:1.6;}

.fx-card-head {display:flex;align-items:center;justify-content:space-between;gap:12px;}.fx-card-head::after {content:"";width:28px;height:28px;border-radius:50%;background:conic-gradient(from 200deg,var(--accent) 0deg 230deg,transparent 230deg);mask:radial-gradient(circle,transparent 9px,#000 10px);opacity:.7;flex-shrink:0;}
.eq-section-tabs button.active {color:var(--accent-contrast,white);}

.np-station-label {display:flex;justify-content:center;gap:8px;align-items:center;text-transform:uppercase;letter-spacing:.12em;font-size:11px;color:var(--text-tertiary);margin-bottom:12px;}.np-track-artist {font-size:16px;color:var(--text-secondary);margin-top:8px;}
