/* ==================== Canvas Layout ==================== */
body.canvas-mode {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    background-color: #EAEFF5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==================== Canvas Area (Full Viewport) ==================== */
.canvas-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #EAEFF5;
    overflow: hidden;
    cursor: grab;
    background-image: radial-gradient(rgba(7, 50, 71, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 1;
}

.canvas-area:active {
    cursor: grabbing;
}

/* Content on canvas (placeholder) */
.canvas-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-tertiary);
    pointer-events: none;
    user-select: none;
}

/* ==================== Top Bar (Embedded in Canvas) ==================== */
.top-bar {
    position: fixed;
    top: 12px;
    left: 12px;
    height: auto;
    background: transparent;
    display: flex;
    align-items: center;
    padding: 0;
    gap: 8px;
    z-index: 100;
    max-width: 320px;
}

.left-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
    font-weight: 700;
    color: #073247;
}

.logo-menu-btn:hover {
    opacity: 0.8;
}

.logo-menu-btn .logo {
    width: 24px;
    height: 24px;
}

.dropdown-arrow {
    opacity: 0.5;
    transition: all 0.2s;
}

.logo-menu-btn:hover .dropdown-arrow {
    opacity: 0.8;
}

.project-name {
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #073247;
    padding: 4px 8px;
    min-width: 120px;
    transition: all 0.2s;
}

.project-name:hover {
    border-bottom-color: rgba(7, 50, 71, 0.2);
}

.project-name:focus {
    outline: none;
    border-bottom-color: #073247;
    background: rgba(255, 255, 255, 0.5);
}

/* Top Right Controls (Embedded in Canvas) */
.header-right {
    position: fixed;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    z-index: 100;
}

/* ==================== Left Sidebar (Continuous Container) ==================== */
.left-sidebar {
    /* Auto layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px;
    gap: 4px;

    /* Position */
    position: absolute;
    width: 48px;
    height: 212px;
    left: 12px;
    top: calc(50% - 212px/2 + 4px);

    /* Styling */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    border: 1px solid rgba(7, 50, 71, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 50;
}

.sidebar-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.sidebar-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(3%) sepia(6%) saturate(6387%) hue-rotate(196deg) brightness(97%) contrast(95%);
    transition: all 0.2s;
    object-fit: contain;
}

.sidebar-btn:hover {
    background: rgba(7, 50, 71, 0.06);
}

.sidebar-btn:hover img {
    opacity: 1;
}

.sidebar-btn.active {
    background: rgba(51, 102, 128, 0.08);
}

.sidebar-btn.active img {
    filter: brightness(0) saturate(100%) invert(3%) sepia(6%) saturate(6387%) hue-rotate(196deg) brightness(97%) contrast(95%);
}

/* Hover tooltip */
.sidebar-btn::after {
    content: attr(title);
    position: absolute;
    left: 60px;
    background: rgba(9, 12, 20, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}

.sidebar-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Separator line */
.sidebar-separator {
    width: 60%;
    height: 1px;
    background: rgba(7, 50, 71, 0.1);
    margin: 4px auto;
}

/* ==================== Bottom Toolbar (Continuous Container) ==================== */
.bottom-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 6px;
    border-radius: 24px;
    border: 1px solid rgba(7, 50, 71, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    z-index: 50;
    width: auto;
    height: 48px;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.tool-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    color: #073247;
    position: relative;
}

.tool-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(3%) sepia(6%) saturate(6387%) hue-rotate(196deg) brightness(97%) contrast(95%);
    transition: all 0.2s;
    object-fit: contain;
}

.tool-btn svg {
    width: 20px;
    height: 20px;
}

.tool-btn:hover {
    background: rgba(7, 50, 71, 0.06);
}

.tool-btn:hover img {
    opacity: 1;
}

.tool-btn.active {
    background: #090C14;
}

.tool-btn.active img {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* Hover tooltip for bottom toolbar */
/* Custom Tooltip Popup */
.tool-btn {
    position: relative;
}

.tooltip-popup {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(9, 12, 20, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 20px;
    /* 20px gap between name and shortcut */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


/* Floating Action Bar */
.floating-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    background: white;
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    gap: 8px;
    transform: translate(-50%, -100%);
    /* Center horizontally, sit above target */
    margin-top: -10px;
    /* Spacing */
    pointer-events: auto;
}

.floating-toolbar.hidden {
    display: none;
    pointer-events: none;
}

.toolbar-group {
    display: flex;
    align-items: center;
    color: #333;
}

.toolbar-select {
    border: none;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    cursor: pointer;
    outline: none;
    padding: 4px;
    border-radius: 4px;
}

.toolbar-select:hover {
    background: rgba(0, 0, 0, 0.05);
}

.toolbar-separator {
    width: 1px;
    height: 16px;
    background: #E0E0E0;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    border: none;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.tooltip-shortcut-key {
    color: rgba(255, 255, 255, 0.6);
    /* Greyer color for shortcut */
    font-family: inherit;
}

.tool-separator {
    width: 0.5px;
    height: 60%;
    background: rgba(7, 50, 71, 0.15);
    margin: auto 2px;
}

/* Dropdown Menus - Clean Overlay Design */
.dropdown-menu {
    position: fixed;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 8px;
    min-width: 240px;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

#project-menu {
    top: 56px;
    left: 12px;
}

#zoom-menu {
    bottom: 70px;
    left: 12px;
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    color: #073247;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.menu-item:hover {
    background: rgba(7, 50, 71, 0.06);
}

.menu-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.menu-item:hover svg {
    opacity: 1;
}

.menu-item span:first-of-type {
    flex: 1;
    font-weight: 500;
}

.menu-item .shortcut {
    font-size: 12px;
    color: #999;
    margin-left: auto;
    font-weight: 400;
}

.menu-item.checkbox-item {
    cursor: pointer;
}

.menu-item.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.menu-item.danger {
    color: #E53935;
}

.menu-item.danger:hover {
    background: rgba(229, 57, 53, 0.08);
}

.menu-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 6px 8px;
}

/* ==================== Right Sidebar (Agent) ==================== */
.right-sidebar {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    z-index: 200;
    pointer-events: none;
}

/* The actual panel when expanded */
.agent-panel {
    width: 360px;
    height: 500px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    pointer-events: auto;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.agent-panel.open {
    display: flex;
}

.agent-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.agent-title {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-content {
    flex: 1;
    background: var(--bg-secondary);
    padding: 16px;
    overflow-y: auto;
}

.agent-input-area {
    padding: 16px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
}

.agent-trigger-btn {
    pointer-events: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s;
}

.agent-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.agent-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

/* ==================== View Controls (Floating) ==================== */
/* ==================== Zoom Controls (Bottom Left) ==================== */
.zoom-controls {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
}

.zoom-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #073247;
    transition: all 0.2s;
}

.zoom-dropdown-btn:hover {
    opacity: 0.8;
}

.dropdown-arrow-small {
    opacity: 0.5;
    transition: opacity 0.2s;
}

.zoom-dropdown-btn:hover .dropdown-arrow-small {
    opacity: 0.8;
}

.help-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #073247;
    transition: all 0.2s;
}

.help-btn:hover {
    opacity: 0.8;
}

/* Zoom Dropdown Menu */
.zoom-menu {
    position: fixed;
    bottom: 68px;
    left: 24px;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 8px;
    min-width: 180px;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.zoom-menu.hidden {
    display: none;
}

.zoom-menu .menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: #073247;
    transition: background 0.15s;
}

.zoom-menu .menu-item:hover {
    background: rgba(7, 50, 71, 0.06);
}

.zoom-menu .menu-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 4px 0;
}

.zoom-menu .shortcut {
    font-size: 11px;
    color: #7A92A5;
    margin-left: auto;
}

/* ==================== Shape Selector Menu ==================== */
.shape-menu {
    position: fixed;
    bottom: 80px;
    left: auto;
    right: auto;
    transform: none;
    /* Remove center transform */
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 8px;
    min-width: 160px;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.shape-menu.hidden {
    display: none;
}

.shape-menu .menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: #073247;
    transition: background 0.15s;
}

.shape-menu .menu-item:hover {
    background: rgba(7, 50, 71, 0.06);
}

/* ==================== Generation Input Panel ==================== */
.gen-panel {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(7, 50, 71, 0.08);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
    z-index: 999;
    transform: translate(-50%, 0);
    pointer-events: auto;
    overflow: visible;
    transition: width 0.2s ease;
}

.gen-panel.hidden {
    display: none;
    pointer-events: none;
}

/* Width adapts to state */
.gen-panel.expanded { width: 420px; }
.gen-panel.collapsed { width: auto; }
.gen-panel.thinking { width: auto; }

/* === Three-state visibility === */
.gen-panel.collapsed .gen-expanded,
.gen-panel.collapsed .gen-thinking { display: none; }

.gen-panel.expanded .gen-collapsed,
.gen-panel.expanded .gen-thinking { display: none; }

.gen-panel.thinking .gen-collapsed,
.gen-panel.thinking .gen-expanded { display: none; }

/* Collapsed state — capsule */
.gen-collapsed {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
    color: rgba(21, 41, 60, 0.5);
    font-size: 14px;
    white-space: nowrap;
    user-select: none;
    transition: color 0.15s;
}

.gen-collapsed:hover {
    color: rgba(21, 41, 60, 0.8);
}

/* Thinking state — compact bar */
.gen-thinking {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    white-space: nowrap;
}

.gen-thinking-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(17, 26, 44, 0.7);
    animation: gen-pulse 1.5s ease-in-out infinite;
}

@keyframes gen-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.gen-stop-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #090C14;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    transition: transform 0.15s, background 0.15s;
    flex-shrink: 0;
}

.gen-stop-btn:hover {
    background: #1a1f2e;
    transform: scale(1.1);
}

.gen-sparkle {
    flex-shrink: 0;
}

/* Uploaded reference images */
.gen-uploaded-images {
    display: flex;
    gap: 6px;
    padding: 12px 12px 0;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.gen-uploaded-images:empty {
    display: none;
    padding: 0;
}

.gen-uploaded-image {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: visible;
    flex-shrink: 0;
}

.gen-uploaded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.gen-uploaded-image .gen-remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    background: #FF4757;
    border: 2px solid white;
    border-radius: 9999px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 0;
    font-size: 0;
    line-height: 0;
}

.gen-uploaded-image:hover .gen-remove-btn {
    opacity: 1;
}

/* Prompt input area */
.gen-input-area {
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
}

.gen-input-editor {
    font-size: 14px;
    color: #090C14;
    line-height: 1.6;
    outline: none;
    width: 100%;
    min-height: 20px;
    max-height: 80px;
    overflow-y: auto;
    word-break: break-word;
}

.gen-input-editor:empty:before {
    content: attr(data-placeholder);
    color: rgba(21, 41, 60, 0.5);
    pointer-events: none;
}

/* Footer */
.gen-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px 12px;
    width: 100%;
    box-sizing: border-box;
}

.gen-footer-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gen-footer-right {
    display: flex;
    align-items: center;
}

.gen-add-btn {
    background: transparent;
    border: none;
    color: rgba(17, 26, 44, 0.7);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.gen-add-btn:hover {
    background: rgba(7, 50, 71, 0.06);
    color: #090C14;
}

/* Model selector */
.gen-model-selector {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.gen-model-selector:hover {
    background: rgba(7, 50, 71, 0.06);
}

.gen-model-selector .model-icon-img {
    width: 16px;
    height: 16px;
}

.gen-model-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(17, 26, 44, 0.7);
    white-space: nowrap;
}

.gen-model-selector:hover .gen-model-label {
    color: #090C14;
}

/* Image count selector */
.gen-count-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    color: rgba(17, 26, 44, 0.7);
}

.gen-count-selector:hover {
    background: rgba(7, 50, 71, 0.06);
    color: #090C14;
}

.gen-count-label {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    color: inherit;
}

/* Send button */
.gen-send-btn {
    background: #090C14;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.gen-send-btn svg {
    width: 14px;
    height: 14px;
}

.gen-send-btn:hover {
    transform: scale(1.05);
}

.gen-send-btn:disabled {
    background: rgba(7, 50, 71, 0.12);
    cursor: not-allowed;
    opacity: 0.5;
}

.gen-send-btn:disabled:hover {
    transform: none;
}

/* Image count dropdown menu */
.gen-count-menu {
    position: fixed;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 4px;
    min-width: 120px;
    z-index: 1001;
    backdrop-filter: blur(20px);
}

.gen-count-menu.hidden {
    display: none;
}

.gen-count-menu .menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: #073247;
    transition: background 0.15s;
}

.gen-count-menu .menu-item:hover {
    background: rgba(7, 50, 71, 0.06);
}

.gen-count-menu .menu-item.active {
    background: rgba(0, 200, 200, 0.04);
    font-weight: 600;
}

/* Reference image from selection marker */
.gen-uploaded-image.from-selection {
    border: 2px solid rgba(0, 200, 200, 0.4);
    border-radius: 8px;
}

/* Expanded state inner wrapper */
.gen-expanded {
    position: relative;
}

/* Model picker inside gen-panel */
.gen-panel .floating-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    display: none;
}

.gen-panel .floating-picker.active {
    display: block;
}

/* ==================== Inspiration Panel ==================== */
.inspiration-panel {
    position: fixed;
    left: 68px;
    top: 56px;
    bottom: 68px;
    width: 340px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(7, 50, 71, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 55;
    overflow: hidden;
    animation: inspSlideIn 0.2s ease-out;
}

.inspiration-panel.hidden {
    display: none;
}

@keyframes inspSlideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Top bar: Title + collapse */
.insp-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px 0;
    flex-shrink: 0;
}

.insp-title {
    font-size: 15px;
    font-weight: 600;
    color: #090C14;
    letter-spacing: -0.01em;
}

.insp-collapse-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: rgba(7, 50, 71, 0.4);
    transition: all 0.15s;
}

.insp-collapse-btn:hover {
    background: rgba(7, 50, 71, 0.06);
    color: #090C14;
}

/* Search */
.insp-search-wrap {
    display: flex;
    align-items: center;
    margin: 12px 12px 0;
    background: rgba(7, 50, 71, 0.05);
    border-radius: 10px;
    padding: 0 10px;
    height: 36px;
    transition: all 0.2s;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.insp-search-wrap:focus-within {
    background: white;
    border-color: rgba(7, 50, 71, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 200, 200, 0.08);
}

.insp-search-icon {
    flex-shrink: 0;
    color: rgba(7, 50, 71, 0.35);
    width: 16px;
    height: 16px;
}

.insp-search {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    color: #090C14;
    padding: 0 8px;
    outline: none;
    font-family: inherit;
}

.insp-search::placeholder {
    color: rgba(21, 41, 60, 0.35);
}

.insp-search-clear {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 50, 71, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: rgba(7, 50, 71, 0.5);
    padding: 0;
    transition: all 0.15s;
}

.insp-search-clear:hover {
    background: rgba(7, 50, 71, 0.15);
    color: #090C14;
}

.insp-search-clear.hidden {
    display: none;
}

/* Category Tabs (horizontal scroll) */
.insp-category-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px 6px;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.insp-category-tabs::-webkit-scrollbar {
    display: none;
}

.insp-cat {
    flex-shrink: 0;
    padding: 5px 14px;
    border: 1px solid rgba(7, 50, 71, 0.1);
    background: transparent;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(17, 26, 44, 0.55);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.insp-cat:hover {
    background: rgba(7, 50, 71, 0.04);
    border-color: rgba(7, 50, 71, 0.15);
    color: rgba(17, 26, 44, 0.7);
}

.insp-cat.active {
    background: #090C14;
    border-color: #090C14;
    color: #fff;
}

/* Intent Banner */
.insp-intent-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 4px 12px 4px;
    background: rgba(0, 200, 200, 0.06);
    border: 1px solid rgba(0, 200, 200, 0.15);
    border-radius: 8px;
    font-size: 12px;
    color: #073247;
    flex-shrink: 0;
}

.insp-intent-banner.hidden {
    display: none;
}

.insp-intent-banner svg {
    flex-shrink: 0;
    color: #00C8C8;
}

/* Results Area */
.insp-results {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px 8px;
    min-height: 0;
}

.insp-results::-webkit-scrollbar {
    width: 4px;
}

.insp-results::-webkit-scrollbar-track {
    background: transparent;
}

.insp-results::-webkit-scrollbar-thumb {
    background: rgba(7, 50, 71, 0.10);
    border-radius: 2px;
}

/* Masonry Grid */
.insp-grid {
    column-count: 2;
    column-gap: 8px;
}

.insp-grid-item {
    break-inside: avoid;
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: rgba(7, 50, 71, 0.04);
    transition: transform 0.15s, box-shadow 0.15s;
}

.insp-grid-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.insp-grid-item img {
    width: 100%;
    display: block;
}

.insp-grid-item .insp-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 8px 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.45));
    border-radius: 0 0 8px 8px;
    opacity: 0;
    transition: opacity 0.15s;
}

.insp-grid-item:hover .insp-img-overlay {
    opacity: 1;
}

.insp-img-overlay span {
    font-size: 11px;
    color: white;
    font-weight: 500;
}

/* Loading */
.insp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.insp-loading.hidden {
    display: none;
}

.insp-spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid rgba(7, 50, 71, 0.1);
    border-top-color: #00C8C8;
    border-radius: 50%;
    animation: gen-spin 0.8s linear infinite;
}

/* Empty State */
.insp-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(21, 41, 60, 0.4);
    font-size: 13px;
}

.insp-empty.hidden {
    display: none;
}

/* Load More */
.insp-load-more {
    padding: 12px;
    text-align: center;
}

.insp-load-more.hidden {
    display: none;
}

.insp-load-more-btn {
    background: rgba(7, 50, 71, 0.06);
    border: none;
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #073247;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.insp-load-more-btn:hover {
    background: rgba(7, 50, 71, 0.1);
}