/* --- GLOBAL VARIABLES & RESET --- */
:root {
    --bg-body: #050505; 
    --bg-surface: #0a0a0a; 
    --bg-card: #111111;
    --border: #27272a; 
    --border-hover: #3f3f46;
    --text-main: #ffffff; 
    --text-dim: #71717a; 
    --accent: #818cf8;
    --success: #4ade80;
    --favorite: #f59e0b; /* Gold for favorites */
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --glass: rgba(10, 10, 10, 0.85);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; outline: none; }

body, html {
    margin: 0; padding: 0;
    background: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    #overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #52525b; }

/* --- TOP NAVIGATION DOCK --- */
.top-nav {
    position: fixed; top: 0; left:0; right:0; height: 60px;
    background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; z-index: 100;
}
.nav-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.brand-icon { width: 28px; height: 28px; background: white; color: black; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* --- ENGINE SELECTOR DOCK --- */
.engine-selector {
    position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
    background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex; align-items: center;
    padding: 6px; z-index: 90;
    overflow-x: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.engine-selector::-webkit-scrollbar { height: 0; }
.engine-btn {
    background: transparent; border: none; color: var(--text-dim);
    padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: 0.2s; border-radius: 8px;
}
.engine-btn:hover { color: white; background: rgba(255,255,255,0.05); }
.engine-btn.active { color: white; background: var(--bg-surface); }

/* --- MAIN LAYOUT (Sidebar + Grid) --- */
.main-layout {
    display: flex;
    padding-top: 154px; /* Space for headers */
}

/* --- LEFT SIDEBAR DOCK (TAG FILTERS) --- */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    height: calc(100vh - 174px);
    position: sticky;
    position: -webkit-sticky; /* For Safari support */
    top: 154px;
    align-self: flex-start; /* THIS FIXES THE FLEXBOX STICKY ISSUE */
    margin-left: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-header h3 { margin: 0 0 12px 0; font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-dim);}
#tagSearchInput {
    width: 100%; background: var(--bg-body); border: 1px solid var(--border);
    color: white; padding: 10px 12px; border-radius: 8px; font-size: 13px;
}
.special-filters {
    padding: 12px 12px 8px 12px;
    border-bottom: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 4px;
}
.tag-list {
    flex-grow: 1; overflow-y: auto; padding: 8px 12px 12px 12px;
    display: flex; flex-direction: column; gap: 4px;
}
.tag-btn {
    background: transparent; border: none; color: var(--text-dim);
    font-size: 13px; font-weight: 500; text-align: left;
    padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: 0.2s;
    display: flex; justify-content: space-between; align-items: center;
}
.tag-btn:hover { color: white; background: var(--bg-surface); }
.tag-btn.active { color: white; font-weight: 700; background: var(--accent); }
.tag-btn.active .count { color: rgba(255,255,255,0.7); }
.tag-btn .count { color: #555; font-size: 11px; font-weight: 600; }
.special-filters .tag-btn.active { background: var(--bg-surface); } /* Different active for special */
.special-filters .tag-btn i { font-size: 14px; margin-right: 4px; }


/* --- CONTENT GRID --- */
/* --- CONTENT GRID --- */
.content-grid { flex-grow: 1; padding: 0 24px; }
.scene-count {
    font-size: 12px; color: var(--text-dim); font-weight: 600;
    margin-bottom: 20px; padding-left: 4px;
}
/* Replaced Column-Count with CSS Grid for perfect 1:1 squares */
.scene-grid { 
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px; 
	padding-bottom: 50px;
}
.scene-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    overflow: hidden; position: relative;
    cursor: pointer; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s;
}
.scene-card:hover { transform: translateY(-6px); border-color: #555; box-shadow: 0 20px 40px rgba(0,0,0,0.6); }

/* Force exact 1:1 aspect ratio */
.card-img-wrapper { width: 100%; aspect-ratio: 1 / 1; position: relative; background: #1a1a1a; display: block; }
.card-img-wrapper img { width: 100%; height: 100%; display: block; object-fit: cover; transition: 0.3s; }
.card-favorite-btn {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px; cursor: pointer;
    transition: 0.2s; opacity: 0; z-index: 5; border: none;
}
.scene-card:hover .card-favorite-btn { opacity: 1; }
.card-favorite-btn:hover { background: rgba(0,0,0,0.8); transform: scale(1.1); }
.card-favorite-btn.active { opacity: 1; color: var(--favorite); }
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    pointer-events: none;
    opacity: 1;
}

/* Heading and span - hidden by default */
.card-overlay h3,
.card-overlay span {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Show heading and span on hover */
.scene-card:hover .card-overlay h3,
.scene-card:hover .card-overlay span {
    opacity: 1;
    transform: translateY(0);
}

.card-overlay h3 { margin: 0 0 4px 0; font-size: 16px; font-weight: 800; color: white; line-height: 1.2; }
.card-overlay span { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; }

/* --- RESPONSIVE LAYOUT --- */
@media (max-width: 1600px) { .scene-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1200px) { .scene-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { 
    .main-layout {flex-direction: column; padding-top: 130px; }
    .content-grid { padding: 0 24px; padding-bottom: 90px; /* Space for the FAB */ }
    .scene-grid { grid-template-columns: repeat(2, 1fr); }
	
    /* Engine Selector Fixed Horizontal Scroll */
    .engine-selector {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
        gap: 8px;
        justify-content: center;
        overflow-x: auto;
        width: 98%;
        left: 4px;
        transform: none;
        border-radius: 6px; /* Flush with screen edges */
		top: 90px;
    }
	
	.engine-btn {
        padding: 4px 6px;
    }
    
    .generate-btn .copy-prompt-btn { width: 80% !important; }  

}
@media (max-width: 600px) { .scene-grid { grid-template-columns: repeat(2, 1fr); } }

/* --- MODAL WORKFLOW UI --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 1000; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal-content {
    width: 90vw; height: 85vh; max-width: 1200px; background: var(--bg-body); border: 1px solid var(--border);
    border-radius: 20px; display: flex; overflow: hidden; position: relative; box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    transform: scale(0.98); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal-content { transform: scale(1); }
.modal-close {
    position: absolute; top: 24px; right: 24px; background: var(--bg-card); border: 1px solid var(--border);
    color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; z-index: 100; transition: 0.2s;
}
.modal-close:hover { background: #ef4444; border-color: #ef4444; transform: scale(1.1); }
.modal-left { 
    flex: 5.5; background: #0a0a0a url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 256 256"><path fill="%23222" d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H216v98.75l-52.69-52.68a16,16,0,0,0-22.62,0L40,202.75ZM216,200H62.63l85.68-85.69L216,182.07ZM104,104A16,16,0,1,1,88,88,16,16,0,0,1,104,104Z"/></svg>') no-repeat center center;
    display: flex; align-items: center; justify-content: center; position: relative; border-right: 1px solid var(--border); overflow: hidden; 
}
.modal-left img { width: 100%; height: 100%; object-fit: contain; color: transparent; }
.modal-right { flex: 4.5; padding: 40px; display: flex; flex-direction: column; background: var(--bg-surface); overflow-y: auto; }
.modal-meta { display: flex; gap: 10px; margin-bottom: 12px; }
.badge { padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.id-badge { background: #222; color: #888; }
.cat-badge { background: rgba(129, 140, 248, 0.1); color: var(--accent); border: 1px solid rgba(129, 140, 248, 0.2); }
#modalSceneName, #modalModelSceneName { font-size: 26px; font-weight: 800; margin: 0 0 24px 0; line-height: 1.2; letter-spacing: -0.02em; }
.modal-config-area { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.input-row { display: flex; flex-direction: row; gap: 16px; width: 100%; }
.modal-config-area .input-group { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.modal-config-area .input-group label { font-size: 10px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.modal-config-area input, .modal-config-area select {
    background: #111; border: 1px solid var(--border); color: white; padding: 14px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 500; font-family: var(--font-main); transition: 0.2s; outline: none; width: 100%; appearance: none;
}
.modal-config-area select {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23888" viewBox="0 0 256 256"><path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"></path></svg>');
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.modal-config-area input:focus, .modal-config-area select:focus { border-color: var(--accent); background: #1a1a1a; }
.generate-btn {
    background: white; color: black; border: 1px solid #3f3f46; padding: 12px; border-radius: 10px; font-size: 13px; font-weight: 800;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; width: 40%;
}
.generate-btn:hover { background: #3f3f46; border-color: #52525b; transform: translateY(-2px); }
.prompt-container {
    flex-grow: 1; display: flex; flex-direction: column; min-height: 180px; background: #000;
    border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 24px;
}
.prompt-header {
    padding: 12px 16px; background: #111; border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 800;
    color: var(--text-dim); text-transform: uppercase; display: flex; align-items: center; gap: 6px;
}

/* --- FIX: Style for BOTH textareas --- */
#modalPromptText, #modalModelPromptText, #modalSpecialtyPromptText {
    flex-grow: 1; background: transparent; border: none; color: #e4e4e7; padding: 16px; font-family: monospace;
    font-size: 12px; line-height: 1.5; resize: none; outline: none; width: 100%;
}
#modalPromptText::placeholder, #modalModelPromptText::placeholder, #modalSpecialtyPromptText::placeholder { color: #333; font-style: italic; }

.copy-prompt-btn {
    width: 40%; background: white; color: black; border: none; padding: 14px; border-radius: 12px;
    font-size: 14px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: 0.2s; box-shadow: 0 10px 30px rgba(255,255,255,0.1); flex-shrink: 0;
}
.copy-prompt-btn:hover { transform: translateY(-2px); background: #e4e4e7; }
.copy-prompt-btn.success { background: var(--success); color: black; box-shadow: 0 10px 30px rgba(74, 222, 128, 0.3); }

/* --- NEW: Styles for Model Modal --- */
.modal-notice {
    background: rgba(245, 158, 11, 0.05); border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px; padding: 12px 16px; margin-bottom: 24px;
}
.modal-notice p { margin: 4px 0; font-size: 12px; color: #d4d4d8; line-height: 1.5; }
.modal-notice b { color: var(--favorite); font-weight: 700; }
#modelTypeGroup { display: flex; } /* Changed to flex for consistency */

@media (max-width: 1024px) {
     .modal-content { flex-direction: column; height: 85vh; width: 95vw; margin-top: 55px;}
    
    .modal-left { 
        flex: none; /* Remove the strict flex ratio */
        height: 40vh; /* Give the image a guaranteed 40% of the screen height */
        border-right: none; 
        border-bottom: 1px solid var(--border);
        overflow-y: auto;		
    }
    
    .modal-right { 
        flex: 1; /* Takes the remaining 60% of the modal */
        padding: 24px; 
    }
    
    .modal-close {
        top: 12px; right: 12px; /* Push the close button slightly tighter into the corner */
        width: 36px; height: 36px;
    }
    
    .modal-preview-notice {
        padding: 12px 50px 12px 12px; /* Adjust padding for mobile screens */
    }
    
    .input-row { flex-direction: column; gap: 16px; }
}

/* Reset Button */
.reset-btn {
    background: transparent; color: var(--text-dim); border: 1px solid var(--border);
    padding: 14px 20px; border-radius: 10px; font-size: 13px; font-weight: 800;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: 0.2s;
}
.reset-btn:hover { background: var(--border); color: white; transform: translateY(-2px); }


@media (max-width: 900px) { 
.generate-btn {width: auto !important;}
.copy-prompt-btn {width: auto !important; padding: 8px 10px; font-size:12px;}
}

/* --- HELP ACCORDION UI --- */
.help-accordion {
    width: 100%;
    display: block;
    flex-shrink: 0; /* Prevents flexbox from crushing it into a tiny box */
    background: #111;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.help-accordion summary {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    list-style: none; /* Hide default arrow */
    background: #161616;
    border-bottom: 1px solid transparent;
}

.help-accordion[open] summary {
    border-bottom: 1px solid var(--border);
}

/* Custom animated arrow */
.help-accordion summary::after {
    content: '\25BC'; /* Down arrow */
    font-family: monospace;
    font-size: 10px;
    margin-left: auto;
    color: var(--text-dim);
    transition: transform 0.2s ease;
}
.help-accordion[open] summary::after {
    transform: rotate(-180deg);
}

.help-accordion summary::-webkit-details-marker {
    display: none; /* Hide default arrow in WebKit */
}

.help-accordion summary i {
    color: var(--accent);
    font-size: 16px;
}

.accordion-content {
    padding: 16px;
    font-size: 13px;
    color: #d4d4d8;
    line-height: 1.6;
    background: transparent;
    box-sizing: border-box;
    width: 100%;
}

.accordion-content ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}
.accordion-content li {
    margin-bottom: 6px;
}
.accordion-content li b { color: white; }
.accordion-content p { margin: 0 0 12px 0; }
.accordion-content p:last-child { margin-bottom: 0; }

/* Model specific guide styles */
.model-notice-box {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display: inline-block;
}
.rec-badge {
    color: #a1a1aa;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    margin-right: 6px;
}
.model-notice-box b { color: var(--favorite); }

.image-upload-guide {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    background: #0a0a0a;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #222;
}
.guide-img {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #a1a1aa;
}
.img-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000;
}
.img-badge.product { background: var(--success); }
.img-badge.model { background: var(--accent); }

/* --- MODAL PREVIEW NOTICE BANNER --- */
.modal-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Stack from top to bottom */
}
.modal-preview-notice {
    width: 100%;
    background: #0a0a0a; /* Solid background to prevent transparency overlap */
    padding: 16px 20px; /* Extra right padding so text doesn't hit the X button */
    z-index: 10;
    text-align: center;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0; /* Prevents the banner from getting crushed */
}
.modal-preview-notice p { margin: 0 0 4px 0; font-size: 13px; color: var(--accent); line-height: 1.4;font-weight: 500; }
.modal-preview-notice p:last-child { margin-bottom: 0; }
.modal-preview-notice b { color: white; font-weight: 700; }

.modal-left img { 
    width: 100%; 
    height: 100%; 
    flex-grow: 1; /* Takes up remaining space below banner */
    min-height: 0; /* Critical flexbox fix to allow shrinking */
    object-fit: contain; 
    padding: 20px; /* Gives the image breathing room */
}

@media (max-width: 900px) {
	
	
.modal-preview-notice p {
	font-size: 11px;}
}
.ai-variation-note{
    font-size:11px;
    opacity:0.65;
    margin-top:4px;
    line-height:1.3;
}

/*Refine AI Help*/

.ai-refine-help{
margin:14px;
font-size:12px;
line-height:1.5;
margin-left:0px;
}

.ai-refine-tip{
padding:6px 12px;
padding-left:0px;
color:#dcdcdc;
}

.ai-refine-tip span{
color:#ffffff;
font-weight:500;
}


@media (max-width: 900px) {
	.ai-refine-help{ font-size: 10px; }
}


/* --- MOBILE FILTER UI --- */
.mobile-filter-fab {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(129, 140, 248, 0.4);
    z-index: 99;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}
.mobile-filter-fab:active { transform: translateX(-50%) scale(0.95); }

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-overlay.open {
    display: block;
    opacity: 1;
}

.sidebar-close-btn {
    display: none; /* Hidden on desktop */
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

/* --- CRITICAL MOBILE OVERRIDES (MUST BE AT BOTTOM OF FILE) --- */
@media (max-width: 900px) { 
    /* 1. Reveal Mobile Buttons */
    .mobile-filter-fab { display: flex !important; }
    .sidebar-close-btn { display: block !important; }
    
    /* 2. Transform Sidebar into an Off-Canvas Drawer */
    .sidebar {
        position: fixed !important;
        top: 0; left: 0; bottom: 0;
        width: 300px !important;
        height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border-right: 1px solid var(--border) !important;
        z-index: 999 !important;
        transform: translateX(-100%) !important; /* Hidden off-screen */
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    
    /* 3. Slide in when opened */
    .sidebar.open {
        transform: translateX(0) !important;
    }
	
	.card-prompt-btn { width: 80% !important; padding: 6px 1px !important;font-size: 10px !important;}
}

.card-prompt-btn {
    background: #111111c9;
    color: white;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    width: 30%;
    transition: 0.2s;
    font-family: var(--font-main);
    display: inline-block;
	pointer-events: auto; /* Make button clickable */
    opacity: 1;
    transform: none;
}

.card-prompt-btn:hover {
    background: #6366f1;
}

/* --- PROMPT EXPANSION LAB UI (APPLE / AGENCY GRADE) --- */
.lab-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 0 50px 0; 
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
}
.lab-header { margin-bottom: 32px; text-align: center; }
.lab-header h2 { margin: 0 0 10px 0; font-size: 28px; font-weight: 800; color: white; display: flex; align-items: center; justify-content: center; gap: 10px; letter-spacing: -0.02em; }
.lab-header p { margin: 0; color: var(--text-dim); font-size: 15px; font-weight: 500; }

.lab-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 32px; 
    align-items: stretch; 
}

.lab-panel { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: 20px; 
    padding: 32px; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.lab-panel.output-panel { 
    background: #000; 
    border: 1px solid #333;
}

.lab-input-group { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    width: 100%; 
}
.lab-input-group label { 
    font-size: 11px; 
    font-weight: 800; 
    color: var(--text-dim); 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
}

/* Lab Textareas */
#labBasePrompt, #labOutputPrompt { 
    width: 100%; 
    box-sizing: border-box; 
    border-radius: 12px; 
    padding: 16px; 
    font-family: monospace; 
    font-size: 13px; 
    line-height: 1.6; 
    outline: none; 
    transition: all 0.2s ease;
    resize: none;
}

#labBasePrompt { 
    height: 140px; 
    background: #111; 
    color: #e4e4e7; 
    border: 1px solid var(--border); 
}
#labBasePrompt:focus { 
    border-color: var(--accent); 
    background: #16161a; 
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1); 
}

#labOutputPrompt { 
    flex-grow: 1; 
    min-height: 300px; 
    background: transparent; 
    color: var(--success); 
    border: 1px solid #333; 
}

/* Lab Select Dropdown */
.lab-select {
    width: 100%;
    background-color: #111; 
    border: 1px solid var(--border); 
    color: white; 
    padding: 14px 16px; 
    border-radius: 12px;
    font-size: 14px; 
    font-weight: 600; 
    font-family: var(--font-main); 
    appearance: none;
    outline: none;
    cursor: pointer;
    transition: 0.2s;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23888" viewBox="0 0 256 256"><path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"></path></svg>');
    background-repeat: no-repeat; 
    background-position: right 16px center; 
}
.lab-select:focus { border-color: var(--accent); background-color: #16161a; }

/* Interactive Chips */
.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-checkbox input { display: none; }
.chip-checkbox span { 
    display: inline-block; 
    padding: 10px 18px; 
    background: #111; 
    border: 1px solid var(--border); 
    border-radius: 30px; 
    font-size: 13px; 
    font-weight: 600; 
    color: var(--text-dim); 
    cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); 
    user-select: none;
}
.chip-checkbox input:checked + span { 
    background: rgba(129, 140, 248, 0.15); 
    border-color: var(--accent); 
    color: var(--accent); 
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.2);
}
.chip-checkbox span:hover { border-color: var(--border-hover); color: white; transform: translateY(-1px); }
.chip-checkbox input:checked + span:hover { transform: translateY(-1px); }

@media (max-width: 1024px) {
    .lab-grid { grid-template-columns: 1fr; }
    .lab-panel { padding: 24px; }
}
@media (max-width: 768px) {
	.chip-checkbox span { padding: 10px; font-size: 11px;}
	
}	

/* ============================================ */
/* 2026 APPLE STYLE — STICKY DEMO BANNER        */
/* ============================================ */

.demo-banner {
    position: sticky;
    top: 0;
    z-index: 10000;
    width: 100%;
    background: #818cf8a1;
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-bottom: 0.5px solid rgba(129, 140, 248, 0.4);
    font-family: -apple-system, 'SF Pro Text', 'SF Pro Display', system-ui, 'Helvetica Neue', sans-serif;
}

.demo-banner-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* LEFT SECTION */
.demo-banner-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

/* ICON */
.demo-banner-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(129, 140, 248, 0.3);
    flex-shrink: 0;
}

/* TEXT GROUP */
.demo-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.demo-banner-badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: #c7d2fe;
    background: rgba(129, 140, 248, 0.2);
    padding: 2px 10px;
    border-radius: 30px;
    display: inline-block;
    width: fit-content;
}

.demo-banner-message {
    font-size: 0.9rem;
    font-weight: 590;
    letter-spacing: -0.3px;
    color: white;
    white-space: nowrap;
}

/* CTA BUTTON */
.demo-banner-cta {
    background: linear-gradient(105deg, #ffffff, #f1f2ff);
    color: #1e1b2f;
    font-weight: 620;
    font-size: 0.85rem;
    padding: 8px 24px;
    border-radius: 48px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    white-space: nowrap;
    flex-shrink: 0;
}

.demo-banner-cta:hover {
    transform: scale(0.97);
    gap: 12px;
    background: linear-gradient(105deg, #ffffff, #e9eaff);
    box-shadow: 0 6px 14px rgba(129, 140, 248, 0.3);
}

.demo-banner-cta span {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.demo-banner-cta:hover span {
    transform: translateX(3px);
}

.demo-banner-cta:active {
    transform: scale(0.96);
}

/* MOBILE RESPONSIVE */
@media (max-width: 550px) {
    .demo-banner-inner {
        padding: 10px 16px;
        gap: 12px;
    }

    .demo-banner-icon {
        width: 30px;
        height: 30px;
    }

    .demo-banner-message {
        white-space: normal;
        font-size: 0.8rem;
        line-height: 1.25;
    }

    .demo-banner-badge {
        font-size: 0.65rem;
    }

    .demo-banner-cta {
        padding: 6px 16px;
        font-size: 0.75rem;
    }
}

/* DESKTOP REFINEMENT */
@media (min-width: 768px) {
    .demo-banner-message {
        font-size: 0.95rem;
    }
}

/* ============================================ */
/* RESET BUTTON / LAB EXPAND BUTTON             */
/* ============================================ */

.reset-btn,
.lab-expand-btn {
    flex: 1;
    margin: 0;
    background: rgba(129, 140, 248, 0.1);
    color: var(--accent, #818cf8);
    border: 1px solid rgba(129, 140, 248, 0.3);
    padding: 10px 16px;
    #border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.reset-btn:hover,
.lab-expand-btn:hover {
    background: rgba(129, 140, 248, 0.2);
    border-color: rgba(129, 140, 248, 0.6);
    transform: scale(0.98);
}

/* MOBILE RESPONSIVE */
@media (max-width: 550px) {
    .reset-btn,
    .lab-expand-btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 0.75rem;
        white-space: normal;
        gap: 6px;
    }
    
    .reset-btn i,
    .lab-expand-btn i {
        font-size: 0.9rem;
    }
}

/* For very small screens (under 400px) */
@media (max-width: 400px) {
    .reset-btn,
    .lab-expand-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
}

/* --- 1. CLEANUP OLD UI --- */
.mobile-filter-fab { display: none !important; }

/* --- 2. MOBILE DOCK SYSTEM --- */

/* Hidden by default on Desktop (min-width: 901px) */
.sv-mobile-dock { display: none; }

@media (max-width: 900px) {
    .sv-mobile-dock {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 99999;
        width: 280px; /* Compact width for 2 items */
    }

    .sv-dock-container {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-around;
        background: rgba(10, 10, 10, 0.8);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50px;
        padding: 4px 2px;
        box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    }

    .sv-dock-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-decoration: none;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
    }

    .sv-dock-item span {
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #a1a1aa;
        font-family: inherit;
    }

    .sv-dock-item svg {
        width: 15px;
        height: 15px;
        stroke: #818cf8; /* Matches demo accent */
        stroke-width: 2;
    }

    /* Highlighted Unlock Button */
    .sv-dock-highlight span { color: #fff; }

    .sv-dock-icon-wrap {
        width: 22px;
        height: 22px;
        #background: #818cf8;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(129, 140, 248, 0.4);
        margin-bottom: 2px;
    }

    #.sv-dock-icon-wrap svg {
        width: 18px;
        height: 18px;
        stroke: #fff;
    }

    /* Ensure content doesn't get cut off by the bar */
    .content-grid {
        padding-bottom: 100px !important;
    }
}