:root {
    --bg-light: #f8fafc;
    --panel-bg: rgba(255, 255, 255, 0.85);
    --border-color: #e2e8f0;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --text-main: #0f172a;
    --text-dim: #64748b;
    --gold: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg-light);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.05), transparent 25%);
}

/* Navbar */
.ai-nav {
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.ai-nav .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.model-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
    font-weight: 500;
}
.model-switcher:hover {
    background: #e2e8f0;
    border-color: var(--primary);
}
.model-switcher i { color: var(--primary); }

.nav-actions {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-outline {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: var(--text-main);
}
.btn-outline:hover { background: #f8fafc; border-color: #94a3b8; }
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Workspace Layout */
.workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 16px;
    gap: 16px;
}

/* Left Panel - Controls */
.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.panel-left {
    width: 320px;
    padding: 20px;
    overflow-y: auto;
}

.control-group { margin-bottom: 24px; }
.control-label {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}
.control-label span { font-weight: 600; color: #334155; }

.prompt-box {
    width: 100%;
    height: 120px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px;
    color: var(--text-main);
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border-color 0.3s;
}
.prompt-box:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1); }
.prompt-box::placeholder { color: #94a3b8; }

.upload-area {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.3s;
}
.upload-area:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}
.upload-area i { font-size: 24px; color: #94a3b8; margin-bottom: 8px; display: block; }
.upload-area p { font-size: 12px; color: var(--text-dim); }

.style-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.style-item {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #475569;
    font-weight: 500;
}
.style-item:hover {
    background: #e2e8f0;
}
.style-item.active {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.generate-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), #d946ef);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: auto;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.4);
}

/* Center Canvas */
.panel-center {
    flex: 1;
    padding: 24px;
    position: relative;
    overflow-y: auto;
}
.canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.canvas-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
}
.ctab {
    padding-bottom: 12px;
    font-size: 14px;
    color: var(--text-dim);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
    font-weight: 500;
}
.ctab.active {
    color: var(--text-main);
    font-weight: 700;
}
.ctab.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; width: 100%; height: 2px;
    background: var(--primary);
}

.canvas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.asset-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.asset-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.asset-card:hover img { transform: scale(1.05); }

.asset-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    color: #fff;
}
.asset-title { font-size: 13px; font-weight: 600; }
.asset-actions { display: flex; gap: 8px; }
.action-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; transition: background 0.2s;
}
.action-icon:hover { background: var(--primary); }

/* Right Panel - Delivery */
.panel-right {
    width: 300px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.delivery-header {
    font-size: 16px; font-weight: 700; margin-bottom: 20px;
    display: flex; align-items: center; gap: 8px;
    color: var(--text-main);
}
.delivery-header i { color: var(--gold); }

.doc-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex; gap: 12px; align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.doc-icon {
    width: 48px; height: 48px;
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    font-size: 24px;
}
.doc-info h4 { font-size: 14px; margin-bottom: 4px; color: var(--text-main); }
.doc-info p { font-size: 12px; color: var(--text-dim); }

.insight-card {
    background: #fff;
    border-radius: 12px; padding: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.insight-card h4 { font-size: 13px; color: #334155; margin-bottom: 12px; font-weight: 700;}
.insight-list { font-size: 12px; display: flex; flex-direction: column; gap: 8px; color: #475569;}
.insight-list li { display: flex; align-items: center; gap: 6px; }
.insight-list i { color: var(--success, #10b981); }

.btn-ppt {
    margin-top: auto;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2);
    transition: all 0.3s;
    display: flex; justify-content: center; align-items: center; gap: 8px;
}
.btn-ppt:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(239, 68, 68, 0.4); }
