:root {
    --bg-dark: #09090b;
    --bg-panel: rgba(24, 24, 27, 0.95);
    --border: #27272a;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --text-main: #e4e4e7;
    --text-sub: #a1a1aa;
    --radius: 12px;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    outline: none; 
}

body { 
    background: var(--bg-dark); 
    color: var(--text-main); 
    font-family: var(--font-ui); 
    height: 100vh; 
    overflow: hidden; 
    font-size: 14px; 
    letter-spacing: -0.01em;
}

/* --- Ana Layout --- */
.os-layout { 
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    width: 100%; 
    position: relative; 
    background-image: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
}

.os-header {
    height: 56px; 
    background: var(--bg-panel); 
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0 24px; 
    z-index: 50; 
    flex-shrink: 0;
}

/* --- Workspace (Split View) --- */
.workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.stage { 
    flex: 1; 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    min-width: 0;
}

.stream-flow { 
    flex: 1; 
    overflow-y: auto; 
    padding: 24px; 
    padding-bottom: 140px; 
    display: flex; 
    flex-direction: column; 
    gap: 24px; 
    scroll-behavior: smooth; 
}

/* --- Artifact Panel --- */
.artifact-panel {
    width: 0;
    background: var(--bg-dark);
    border-left: 1px solid var(--border);
    display: flex; 
    flex-direction: column;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
}

.artifact-panel.open {
    width: 500px;
}

.artifact-header {
    height: 50px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--bg-panel);
    font-weight: 600;
}

.artifact-header h3 { 
    font-size: 0.9rem; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    color: var(--text-main);
}

.artifact-content {
    flex: 1;
    padding: 0;
    position: relative;
    background: #1e1e1e;
}

#artifact-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

#artifact-code {
    margin: 0;
    height: 100%;
    border-radius: 0;
    border: none;
    font-size: 13px;
    padding: 20px;
}

#artifact-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-sub);
    gap: 16px;
}
#artifact-placeholder i { font-size: 2.5rem; opacity: 0.2; }

.hidden { display: none !important; }

/* Scrollbar Customization */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #52525b; }