/* ============================================================
   LIQUID GLASS / BUBBLE DESIGN SYSTEM — NV Studio
   A professional, organic 3D glassmorphism layer
   ============================================================ */

/* ── 0. DESIGN TOKENS ─────────────────────────────────── */
:root {
    /* Liquid glass palette */
    --lg-surface:        rgba(8, 14, 36, 0.42);
    --lg-surface-hover:  rgba(12, 20, 48, 0.55);
    --lg-blur:           22px;
    --lg-blur-heavy:     32px;

    /* Bubble border / highlight */
    --lg-border:         rgba(100, 160, 255, 0.18);
    --lg-border-hover:   rgba(100, 180, 255, 0.32);
    --lg-highlight-top:  rgba(180, 220, 255, 0.12);
    --lg-highlight-bot:  rgba(60, 100, 200, 0.06);
    --lg-inner-glow:     rgba(80, 160, 255, 0.06);

    /* 3D shadow stack */
    --lg-shadow:
        0 2px 4px rgba(0, 0, 0, 0.18),
        0 8px 24px rgba(0, 0, 0, 0.22),
        0 24px 48px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 var(--lg-highlight-top),
        inset 0 -1px 0 var(--lg-highlight-bot);
    --lg-shadow-elevated:
        0 4px 8px rgba(0, 0, 0, 0.22),
        0 12px 32px rgba(0, 0, 0, 0.28),
        0 32px 64px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 var(--lg-highlight-top),
        inset 0 -1px 0 var(--lg-highlight-bot);

    /* Floating bar geometry */
    --lg-bar-radius:     18px;
    --lg-component-radius: 14px;
    --lg-pill-radius:    26px;

    /* Layout overrides */
    --activity-bar-width: 64px;
    --header-height: 56px;
    --bar-inset: 12px;
}

/* ── 1. THREE.JS CANVAS BACKGROUND ───────────────────── */
#fluid-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

body {
    background-color: #020818 !important;
    background-image: none !important;
}

.app-container {
    position: relative;
    z-index: 1;
}

/* ── 2. FLOATING HEADER BAR ──────────────────────────── */
@media (min-width: 992px) {
    .app-header {
        position: fixed !important;
        top: var(--bar-inset);
        left: calc(var(--activity-bar-width) + var(--bar-inset) * 2);
        right: var(--bar-inset);
        height: var(--header-height);
        z-index: 1002;

        /* Liquid glass */
        background: var(--lg-surface) !important;
        -webkit-backdrop-filter: blur(var(--lg-blur-heavy));
        backdrop-filter: blur(var(--lg-blur-heavy));
        border: 1px solid var(--lg-border);
        border-radius: var(--lg-bar-radius);
        box-shadow: var(--lg-shadow);
        padding: 0 22px;

        /* Bubble highlight — crescent along top */
        background-image:
            linear-gradient(
                180deg,
                rgba(140, 200, 255, 0.08) 0%,
                transparent 40%
            ) !important;
    }

    .app-header::before {
        content: '';
        position: absolute;
        top: 0; left: 20px; right: 20px;
        height: 1px;
        background: linear-gradient(90deg,
            transparent,
            rgba(160, 210, 255, 0.25),
            transparent
        );
        border-radius: 1px;
    }
}

/* ── 3. ACTIVITY BAR (replaces old sidebar) ──────────── */
#studio-activity-bar {
    position: fixed;
    left: var(--bar-inset);
    top: var(--bar-inset);
    bottom: var(--bar-inset);
    width: var(--activity-bar-width);
    z-index: 1003;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 0;

    /* Liquid glass / bubble */
    background: var(--lg-surface);
    background-image:
        linear-gradient(
            160deg,
            rgba(100, 180, 255, 0.07) 0%,
            transparent 50%,
            rgba(60, 100, 200, 0.04) 100%
        );
    -webkit-backdrop-filter: blur(var(--lg-blur-heavy));
    backdrop-filter: blur(var(--lg-blur-heavy));
    border: 1px solid var(--lg-border);
    border-radius: var(--lg-bar-radius);
    box-shadow: var(--lg-shadow);
    overflow: hidden;
}

/* Top crescent highlight */
#studio-activity-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 14px; right: 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 210, 255, 0.22), transparent);
}

/* Side sheen */
#studio-activity-bar::after {
    content: '';
    position: absolute;
    top: 30px; bottom: 30px;
    left: 0;
    width: 1px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(140, 200, 255, 0.12) 30%,
        rgba(140, 200, 255, 0.12) 70%,
        transparent 100%
    );
}

.activity-bar-top,
.activity-bar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Tool buttons */
#studio-activity-bar .tool-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    display: flex;
    align-items: center;
    justify-content: center;
}

#studio-activity-bar .tool-btn:hover {
    color: var(--accent-blue);
    background: rgba(0, 195, 255, 0.08);
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(0, 195, 255, 0.12);
}

#studio-activity-bar .tool-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 160, 255, 0.22), rgba(100, 80, 255, 0.18));
    box-shadow:
        0 0 20px rgba(0, 170, 255, 0.18),
        inset 0 1px 0 rgba(180, 220, 255, 0.12);
    transform: scale(1.1);
}

/* Active indicator — glow only, no bar */

/* ── 3b. LIQUID GLASS TOOLTIPS ───────────────────────── */
/* Custom tooltip positioned to the right of activity bar buttons */
.lg-tooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-6px) scale(0.92);
    transition: opacity 0.22s cubic-bezier(.4,0,.2,1),
                transform 0.22s cubic-bezier(.4,0,.2,1);

    /* Liquid glass surface */
    background: rgba(8, 14, 36, 0.72);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(100, 170, 255, 0.18);
    border-radius: 10px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.28),
        0 1px 3px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(180, 220, 255, 0.1),
        inset 0 -1px 0 rgba(60, 100, 200, 0.05);
    padding: 7px 13px;
    white-space: nowrap;

    /* Text */
    font-family: var(--font-main, system-ui, sans-serif);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(220, 235, 255, 0.92);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Top crescent highlight on tooltip */
.lg-tooltip::before {
    content: '';
    position: absolute;
    top: 0; left: 8px; right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(150, 210, 255, 0.2), transparent);
    border-radius: 1px;
}

/* Left-pointing arrow/caret */
.lg-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -5px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid rgba(100, 170, 255, 0.18);
    filter: drop-shadow(-2px 0 3px rgba(0, 0, 0, 0.2));
}

.lg-tooltip.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Keyboard shortcut badge inside tooltip */
.lg-tooltip .tt-shortcut {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 6px;
    font-size: 0.68rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: rgba(180, 210, 255, 0.7);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(100, 160, 255, 0.12);
    border-radius: 4px;
    letter-spacing: 0.04em;
}

/* ── 3c. HELP PANEL — LIQUID GLASS ───────────────────── */
#studio-help-panel {
    position: fixed;
    left: calc(var(--activity-bar-width) + var(--bar-inset) * 2 + 4px);
    bottom: var(--bar-inset);
    width: 380px;
    max-height: calc(100vh - var(--header-height) - var(--bar-inset) * 3 - 8px);
    z-index: 1050;

    display: flex;
    flex-direction: column;

    /* Liquid glass */
    background: rgba(6, 12, 32, 0.68);
    -webkit-backdrop-filter: blur(var(--lg-blur-heavy)) saturate(1.3);
    backdrop-filter: blur(var(--lg-blur-heavy)) saturate(1.3);
    border: 1px solid var(--lg-border);
    border-radius: var(--lg-bar-radius);
    box-shadow: var(--lg-shadow-elevated);
    overflow: hidden;

    /* Entry animation */
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(.4,0,.2,1),
                transform 0.3s cubic-bezier(.4,0,.2,1);
}

#studio-help-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Top crescent */
#studio-help-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 18px; right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 210, 255, 0.22), transparent);
    z-index: 1;
}

/* Header */
.help-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(100, 160, 255, 0.1);
    flex-shrink: 0;
}

.help-panel-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(220, 235, 255, 0.92);
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-panel-header h3 i {
    font-size: 0.85rem;
    color: var(--accent-blue, #00c3ff);
}

.help-close-btn {
    background: transparent;
    border: 1px solid rgba(100, 160, 255, 0.1);
    color: var(--text-secondary, #8a9bbd);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.help-close-btn:hover {
    color: #fff;
    background: rgba(0, 195, 255, 0.1);
    border-color: rgba(0, 195, 255, 0.25);
}

/* Search bar */
.help-search-wrap {
    padding: 10px 16px;
    flex-shrink: 0;
}

.help-search {
    width: 100%;
    padding: 9px 14px 9px 36px;
    background: rgba(4, 8, 22, 0.5);
    border: 1px solid rgba(80, 140, 220, 0.14);
    border-radius: 10px;
    color: rgba(220, 235, 255, 0.9);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: var(--font-main, system-ui, sans-serif);
}

.help-search::placeholder {
    color: rgba(160, 190, 230, 0.4);
}

.help-search:focus {
    border-color: rgba(0, 195, 255, 0.3);
    box-shadow: 0 0 12px rgba(0, 195, 255, 0.08);
}

.help-search-wrap {
    position: relative;
}

.help-search-wrap i {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: rgba(160, 190, 230, 0.35);
    pointer-events: none;
}

/* Scrollable content */
.help-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 6px 16px 16px;
}

/* Category sections */
.help-category {
    margin-bottom: 4px;
}

.help-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
}

.help-category-header:hover {
    background: rgba(0, 195, 255, 0.05);
}

.help-category-header i.cat-icon {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    color: var(--accent-blue, #00c3ff);
    opacity: 0.75;
}

.help-category-header span {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(210, 225, 255, 0.85);
    letter-spacing: 0.02em;
}

.help-category-header i.cat-chevron {
    font-size: 0.6rem;
    color: rgba(160, 190, 230, 0.3);
    transition: transform 0.25s ease;
}

.help-category.expanded .help-category-header i.cat-chevron {
    transform: rotate(180deg);
}

.help-category-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(.4,0,.2,1);
}

.help-category.expanded .help-category-body {
    max-height: 2000px;
}

/* Help item cards */
.help-item {
    padding: 10px 14px;
    margin: 3px 0 3px 12px;
    border-left: 2px solid rgba(100, 160, 255, 0.1);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.help-item:hover {
    border-left-color: rgba(0, 195, 255, 0.35);
    background: rgba(0, 195, 255, 0.03);
}

.help-item-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(210, 225, 255, 0.8);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.help-item-title .go-btn {
    background: transparent;
    border: none;
    color: rgba(0, 195, 255, 0.5);
    cursor: pointer;
    font-size: 0.65rem;
    padding: 2px;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.help-item:hover .go-btn {
    opacity: 1;
}

.help-item-title .go-btn:hover {
    color: #00c3ff;
}

.help-item-desc {
    font-size: 0.74rem;
    line-height: 1.5;
    color: rgba(160, 190, 230, 0.6);
}

.help-item-tip {
    margin-top: 5px;
    padding: 5px 9px;
    background: rgba(0, 195, 255, 0.04);
    border-radius: 6px;
    border: 1px solid rgba(0, 195, 255, 0.08);
    font-size: 0.72rem;
    color: rgba(160, 210, 255, 0.55);
    line-height: 1.45;
}

.help-item-tip::before {
    content: '💡 ';
}

/* Keyboard shortcut table */
.help-shortcuts-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    padding: 8px 12px;
    margin-left: 12px;
}

.help-shortcuts-grid kbd {
    display: inline-block;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: rgba(180, 210, 255, 0.7);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(100, 160, 255, 0.12);
    border-radius: 4px;
    white-space: nowrap;
}

.help-shortcuts-grid .shortcut-desc {
    font-size: 0.74rem;
    color: rgba(160, 190, 230, 0.55);
    align-self: center;
}

/* Footer */
.help-panel-footer {
    padding: 10px 16px;
    border-top: 1px solid rgba(100, 160, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.help-panel-footer span {
    font-size: 0.7rem;
    color: rgba(160, 190, 230, 0.35);
    letter-spacing: 0.02em;
}

/* Help panel scrollbar */
.help-panel-body::-webkit-scrollbar {
    width: 4px;
}

.help-panel-body::-webkit-scrollbar-thumb {
    background: rgba(80, 140, 220, 0.2) !important;
    border-radius: 4px !important;
}

.help-panel-body::-webkit-scrollbar-track {
    background: transparent !important;
}

/* Help button */
#studio-activity-bar .help-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    display: flex;
    align-items: center;
    justify-content: center;
}

#studio-activity-bar .help-btn:hover {
    color: var(--accent-blue);
    background: rgba(0, 195, 255, 0.08);
}

/* ── 4. LAYOUT GRID OVERRIDE (desktop) ───────────────── */
@media (min-width: 992px) {
    .app-container {
        display: block !important;
    }

    /* Hide old sidebar */
    .sidebar {
        display: none !important;
    }

    .main-content {
        position: fixed;
        top: calc(var(--header-height) + var(--bar-inset) * 2 + 4px);
        left: calc(var(--activity-bar-width) + var(--bar-inset) * 2);
        right: var(--bar-inset);
        bottom: var(--bar-inset);
    }

    .content-area {
        height: 100%;
        padding: 24px 28px;
        padding-bottom: 28px;
        overflow-y: auto;
    }
}

/* ── 5. LIQUID GLASS — UNIVERSAL COMPONENT TREATMENT ── */

/* Studio controls panel */
.tool-section > .studio-controls-panel {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur)) !important;
    backdrop-filter: blur(var(--lg-blur)) !important;
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: var(--lg-shadow) !important;
    position: relative;
    overflow: hidden;
}

.tool-section > .studio-controls-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 16px; right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 210, 255, 0.18), transparent);
    pointer-events: none;
}

/* Studio output panel */
.tool-section > .studio-output-panel {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur)) !important;
    backdrop-filter: blur(var(--lg-blur)) !important;
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: var(--lg-shadow) !important;
    position: relative;
    overflow: hidden;
}

.tool-section > .studio-output-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 16px; right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 210, 255, 0.15), transparent);
    pointer-events: none;
    z-index: 1;
}

/* Textareas */
.main-input-area textarea {
    background: rgba(6, 10, 28, 0.55) !important;
    border: 1px solid var(--lg-border) !important;
    border-radius: 12px !important;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(140, 200, 255, 0.04) !important;
    transition: all 0.25s ease !important;
}

.main-input-area textarea:focus {
    border-color: rgba(0, 195, 255, 0.35) !important;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(0, 195, 255, 0.08) !important;
}

/* Buttons — Generate */
.generate-btn {
    background: linear-gradient(135deg, rgba(0, 160, 255, 0.8), rgba(0, 100, 200, 0.85)) !important;
    border: 1px solid rgba(0, 180, 255, 0.3) !important;
    border-radius: 12px !important;
    box-shadow:
        0 4px 16px rgba(0, 140, 255, 0.2),
        inset 0 1px 0 rgba(180, 230, 255, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
    pointer-events: none;
    border-radius: 12px 12px 0 0;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow:
        0 6px 24px rgba(0, 140, 255, 0.3),
        inset 0 1px 0 rgba(180, 230, 255, 0.25) !important;
}

/* Buttons — Enhance */
.enhance-prompt-btn {
    border: 1px solid var(--lg-border) !important;
    border-radius: 12px !important;
    background: rgba(8, 12, 30, 0.4) !important;
    box-shadow: inset 0 1px 0 rgba(160, 200, 255, 0.06) !important;
}

.enhance-prompt-btn:hover:not(:disabled) {
    background: rgba(100, 60, 200, 0.1) !important;
    border-color: rgba(157, 93, 255, 0.35) !important;
    box-shadow:
        0 4px 16px rgba(157, 93, 255, 0.12),
        inset 0 1px 0 rgba(180, 160, 255, 0.1) !important;
}

/* Quick start pills */
.quick-start-btn {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-pill-radius) !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(160, 210, 255, 0.08) !important;
    transition: all 0.25s cubic-bezier(.4,0,.2,1) !important;
}

.quick-start-btn:hover {
    background: rgba(0, 170, 255, 0.08) !important;
    border-color: rgba(0, 195, 255, 0.3) !important;
    transform: translateY(-2px) !important;
    box-shadow:
        0 4px 16px rgba(0, 170, 255, 0.15),
        inset 0 1px 0 rgba(180, 230, 255, 0.12) !important;
}

/* Example tags */
.example-tag {
    background: var(--lg-surface) !important;
    border: 1px solid var(--lg-border) !important;
    border-radius: 10px !important;
    box-shadow: inset 0 1px 0 rgba(160, 210, 255, 0.06) !important;
}

.example-tag:hover {
    border-color: rgba(0, 195, 255, 0.3) !important;
    box-shadow:
        0 2px 10px rgba(0, 170, 255, 0.12),
        inset 0 1px 0 rgba(180, 230, 255, 0.1) !important;
}

/* Tool options bar */
.tool-options {
    background: rgba(6, 10, 28, 0.45) !important;
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(160, 210, 255, 0.05) !important;
}

.tool-options select,
.tool-options input[type="text"] {
    background: rgba(4, 8, 22, 0.5) !important;
    border: 1px solid rgba(80, 140, 220, 0.15) !important;
    border-radius: 10px !important;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.15) !important;
}

/* Output wrapper cards */
.output-wrapper {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur));
    backdrop-filter: blur(var(--lg-blur));
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: var(--lg-shadow) !important;
    position: relative;
}

.output-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 14px; right: 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 210, 255, 0.15), transparent);
    pointer-events: none;
}

/* Action icon buttons */
.action-icon {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--lg-border) !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(160, 210, 255, 0.08) !important;
}

.action-icon:hover {
    background: rgba(0, 195, 255, 0.12) !important;
    border-color: rgba(0, 195, 255, 0.3) !important;
    box-shadow:
        0 4px 16px rgba(0, 170, 255, 0.15),
        inset 0 1px 0 rgba(180, 230, 255, 0.12) !important;
}

/* ── 6. DASHBOARD QUERY BAR — LIQUID GLASS ────────────── */
.query-card {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur-heavy)) !important;
    backdrop-filter: blur(var(--lg-blur-heavy)) !important;
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-bar-radius) !important;
    box-shadow: var(--lg-shadow) !important;
    position: relative;
    overflow: hidden;
}

.query-card::before {
    content: '';
    position: absolute;
    top: 0; left: 18px; right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 210, 255, 0.2), transparent);
}

.studio-query-btn {
    background: linear-gradient(135deg, rgba(0, 160, 255, 0.85), rgba(80, 60, 200, 0.8)) !important;
    border: 1px solid rgba(0, 180, 255, 0.25) !important;
    border-radius: 12px !important;
    box-shadow:
        0 2px 10px rgba(0, 140, 255, 0.2),
        inset 0 1px 0 rgba(180, 230, 255, 0.18) !important;
    position: relative;
    overflow: hidden;
}

.studio-query-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

/* ── 7. MODALS — LIQUID GLASS ─────────────────────────── */
.modal-content {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur-heavy)) !important;
    backdrop-filter: blur(var(--lg-blur-heavy)) !important;
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-bar-radius) !important;
    box-shadow: var(--lg-shadow-elevated) !important;
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 24px; right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 210, 255, 0.2), transparent);
    pointer-events: none;
}

/* ── 8. PROJECT CARDS — LIQUID GLASS ──────────────────── */
.project-card {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: var(--lg-shadow) !important;
    overflow: hidden;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 14px; right: 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 210, 255, 0.12), transparent);
    pointer-events: none;
    z-index: 1;
}

.project-card:hover {
    border-color: var(--lg-border-hover) !important;
    box-shadow: var(--lg-shadow-elevated) !important;
}

.project-gallery-container {
    background: rgba(6, 10, 28, 0.3) !important;
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Project card buttons */
.project-card-btn {
    border: 1px solid var(--lg-border) !important;
    border-radius: 10px !important;
    background: rgba(6, 10, 28, 0.35) !important;
    box-shadow: inset 0 1px 0 rgba(160, 210, 255, 0.05) !important;
}

.project-card-btn.primary {
    background: linear-gradient(135deg, rgba(0, 160, 255, 0.7), rgba(0, 100, 200, 0.75)) !important;
    border-color: rgba(0, 180, 255, 0.25) !important;
    box-shadow:
        0 2px 10px rgba(0, 140, 255, 0.15),
        inset 0 1px 0 rgba(180, 230, 255, 0.15) !important;
}

/* ── 9. CREDITS WIDGET — LIQUID GLASS ─────────────────── */
.nv-credits-widget {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-pill-radius) !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(160, 210, 255, 0.06) !important;
}

/* ── 10. SCROLLBAR LIQUID GLASS ───────────────────────── */
::-webkit-scrollbar-thumb {
    background: rgba(80, 140, 220, 0.25) !important;
    border-radius: 10px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 195, 255, 0.35) !important;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1) !important;
}

/* ── 11. HEADER ACTION BUTTONS — LIQUID GLASS ─────────── */
.app-header .action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 16, 38, 0.35);
    border: 1px solid rgba(80, 140, 220, 0.12);
    box-shadow: inset 0 1px 0 rgba(160, 210, 255, 0.05);
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
}

.app-header .action-btn:hover {
    background: rgba(0, 195, 255, 0.08);
    border-color: rgba(0, 195, 255, 0.25);
    box-shadow:
        0 2px 12px rgba(0, 170, 255, 0.12),
        inset 0 1px 0 rgba(180, 230, 255, 0.08);
}

/* ── 12. LOADING OVERLAY — LIQUID GLASS ───────────────── */
.loading-overlay {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur-heavy)) !important;
    backdrop-filter: blur(var(--lg-blur-heavy)) !important;
    border-radius: var(--lg-component-radius) !important;
}

/* ── 13. MOBILE — No liquid glass (original style.css handles mobile) ── */
/* Liquid glass is desktop-only via media="(min-width: 992px)" on the <link> tag.
   #studio-activity-bar and #fluid-bg-canvas are hidden on mobile via inline <style>. */

/* ── 14. MANIFESTATION SECTION — LIQUID GLASS ─────────── */
.manifestation-container {
    position: relative;
}

.manifestation-left-panel,
.manifestation-canvas {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur));
    backdrop-filter: blur(var(--lg-blur));
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: var(--lg-shadow) !important;
}

.manifestation-input {
    background: rgba(6, 10, 28, 0.55) !important;
    border: 1px solid var(--lg-border) !important;
    border-radius: 12px !important;
}

.manifestation-submit-btn,
.manifestation-begin-btn,
.manifestation-manifest-btn {
    background: linear-gradient(135deg, rgba(0, 160, 255, 0.8), rgba(100, 60, 200, 0.75)) !important;
    border: 1px solid rgba(0, 180, 255, 0.25) !important;
    border-radius: 12px !important;
    box-shadow:
        0 4px 16px rgba(0, 140, 255, 0.2),
        inset 0 1px 0 rgba(180, 230, 255, 0.15) !important;
    position: relative;
    overflow: hidden;
}

.manifestation-submit-btn::before,
.manifestation-begin-btn::before,
.manifestation-manifest-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
    pointer-events: none;
}

.interpretation-cards-container .interpretation-card {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: var(--lg-shadow) !important;
}

/* Tree slot nodes — bubble style */
.tree-slot {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: var(--lg-shadow) !important;
}

/* ── 15. FUTURE PREDICTOR — LIQUID GLASS ──────────────── */
.fp-prompt-bar {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur-heavy));
    backdrop-filter: blur(var(--lg-blur-heavy));
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-bar-radius) !important;
    box-shadow: var(--lg-shadow) !important;
    position: relative;
    overflow: hidden;
}

.fp-prompt-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 18px; right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(160, 210, 255, 0.18), transparent);
    pointer-events: none;
}

.fp-predict-btn {
    background: linear-gradient(135deg, rgba(0, 160, 255, 0.85), rgba(80, 60, 200, 0.8)) !important;
    border: 1px solid rgba(0, 180, 255, 0.25) !important;
    border-radius: 12px !important;
    box-shadow:
        0 2px 10px rgba(0, 140, 255, 0.2),
        inset 0 1px 0 rgba(180, 230, 255, 0.18) !important;
}

.fp-output-panel {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur));
    backdrop-filter: blur(var(--lg-blur));
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: var(--lg-shadow) !important;
}

.fp-refinement-panel {
    background: rgba(6, 10, 28, 0.45) !important;
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: inset 0 1px 0 rgba(160, 210, 255, 0.05) !important;
}

.fp-refinement-tab,
.fp-context-toggle {
    border: 1px solid var(--lg-border) !important;
    border-radius: 10px !important;
    background: rgba(8, 12, 30, 0.35) !important;
    box-shadow: inset 0 1px 0 rgba(160, 210, 255, 0.04) !important;
}

.fp-refinement-tab.active {
    background: rgba(0, 160, 255, 0.12) !important;
    border-color: rgba(0, 195, 255, 0.3) !important;
}

.fp-download-btn,
.fp-back-btn,
.fp-refine-btn {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--lg-border) !important;
    border-radius: 10px !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(160, 210, 255, 0.05) !important;
}

.fp-download-dropdown {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur-heavy));
    backdrop-filter: blur(var(--lg-blur-heavy));
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: var(--lg-shadow-elevated) !important;
}

/* ── 16. PODCAST / IDEA LAB SECTION — LIQUID GLASS ────── */
#idea-lab .studio-controls-panel,
#idea-lab .studio-output-panel {
    background: var(--lg-surface) !important;
    -webkit-backdrop-filter: blur(var(--lg-blur));
    backdrop-filter: blur(var(--lg-blur));
    border: 1px solid var(--lg-border) !important;
    border-radius: var(--lg-component-radius) !important;
    box-shadow: var(--lg-shadow) !important;
}

/* ── 17. HIGHLIGHT GRADIENT TEXT OVERRIDE ──────────────── */
.highlight-gradient {
    background: linear-gradient(135deg, #60b0ff 0%, #a078ff 50%, #60d0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── 18. SMOOTH TRANSITIONS FOR ALL ───────────────────── */
* {
    transition-property: background-color, border-color, box-shadow, transform, opacity;
    transition-duration: 0.2s;
    transition-timing-function: cubic-bezier(.4,0,.2,1);
}

/* Exclude elements that need custom transitions */
.tool-section,
.tool-section * {
    transition-property: none;
}

.tool-section.active {
    animation: fadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Re-enable transitions for interactive elements within sections */
.tool-section .generate-btn,
.tool-section .enhance-prompt-btn,
.tool-section .quick-start-btn,
.tool-section .example-tag,
.tool-section .action-icon,
.tool-section .action-btn,
.tool-section textarea,
.tool-section select,
.tool-section input,
.tool-section button {
    transition-property: background-color, border-color, box-shadow, transform, opacity, color;
    transition-duration: 0.25s;
    transition-timing-function: cubic-bezier(.4,0,.2,1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   GENESIS SCALER — Professional Minimal Panel
   ═══════════════════════════════════════════════════════════════════════════ */

.genesis-scaler-panel {
    position: relative;
    margin-top: 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Header — thin rule line ────────────────────────────────────────────── */

.gs-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.gs-header-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary, #a0a0cc);
    opacity: 0.55;
    white-space: nowrap;
    flex-shrink: 0;
}

.gs-header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(65, 78, 143, 0.4),
        rgba(65, 78, 143, 0.08)
    );
}

/* ── Shared control base ────────────────────────────────────────────────── */

.gs-control {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.gs-control label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary, #a0a0cc);
    opacity: 0.6;
    white-space: nowrap;
}

/* ── Dropdowns Row (Ratio + Format) ─────────────────────────────────────── */

.gs-dropdowns-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.gs-select-control {
    flex: 0 0 auto;
}

.gs-select-control select {
    -webkit-appearance: none;
    appearance: none;
    padding: 6px 26px 6px 9px;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-primary, #e6e6ff);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%236674a8'/%3E%3C/svg%3E")
        no-repeat right 8px center / 7px 4px,
        rgba(10, 12, 28, 0.6);
    border: 1px solid rgba(65, 78, 143, 0.28);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gs-select-control select:hover {
    border-color: rgba(65, 78, 143, 0.5);
}

.gs-select-control select:focus {
    outline: none;
    border-color: var(--accent-blue, #00c3ff);
    box-shadow: 0 0 0 1.5px rgba(0, 195, 255, 0.1);
}

/* ── Sliders Stack ──────────────────────────────────────────────────────── */

.gs-sliders-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gs-slider-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.gs-slider-header label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary, #a0a0cc);
    opacity: 0.6;
}

.gs-slider-value {
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    color: var(--accent-blue, #00c3ff);
    opacity: 0.75;
    min-width: 28px;
    text-align: right;
}

.gs-slider-track-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gs-icon-end {
    font-size: 8px;
    color: var(--text-secondary, #a0a0cc);
    opacity: 0.35;
    flex-shrink: 0;
    width: 12px;
    text-align: center;
}

/* ── Range Input — Precision Track & Thumb ──────────────────────────────── */

.gs-slider-track-wrap input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(65, 78, 143, 0.25);
    outline: none;
    cursor: pointer;
    position: relative;
    margin: 0;
}

/* WebKit track (filled portion via gradient trick) */
.gs-slider-track-wrap input[type="range"]::-webkit-slider-runnable-track {
    height: 3px;
    border-radius: 2px;
    background: rgba(65, 78, 143, 0.25);
}

/* WebKit thumb */
.gs-slider-track-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    margin-top: -4.5px;
    border-radius: 50%;
    background: var(--accent-blue, #00c3ff);
    border: 2px solid var(--bg-primary, #020412);
    box-shadow:
        0 0 0 1px rgba(0, 195, 255, 0.25),
        0 1px 4px rgba(0, 0, 0, 0.5);
    cursor: grab;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.gs-slider-track-wrap input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow:
        0 0 0 3px rgba(0, 195, 255, 0.12),
        0 0 0 1px rgba(0, 195, 255, 0.3),
        0 1px 6px rgba(0, 0, 0, 0.6);
}

.gs-slider-track-wrap input[type="range"]:active::-webkit-slider-thumb {
    cursor: grabbing;
    transform: scale(0.92);
    box-shadow:
        0 0 0 4px rgba(0, 195, 255, 0.08),
        0 0 0 1px rgba(0, 195, 255, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Firefox track */
.gs-slider-track-wrap input[type="range"]::-moz-range-track {
    height: 3px;
    border-radius: 2px;
    background: rgba(65, 78, 143, 0.25);
    border: none;
}

/* Firefox progress (filled portion) */
.gs-slider-track-wrap input[type="range"]::-moz-range-progress {
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(0, 195, 255, 0.5), var(--accent-blue, #00c3ff));
}

/* Firefox thumb */
.gs-slider-track-wrap input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-blue, #00c3ff);
    border: 2px solid var(--bg-primary, #020412);
    box-shadow:
        0 0 0 1px rgba(0, 195, 255, 0.25),
        0 1px 4px rgba(0, 0, 0, 0.5);
    cursor: grab;
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .genesis-scaler-panel {
        margin-top: 12px;
    }
    .gs-dropdowns-row {
        gap: 8px;
    }
}
