:root {
    --bg-dark: #0b1120;
    --panel-bg: #1e293b;
    --border-color: #334155;
    --primary: #0284c7;
    --primary-hover: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-ui: 'Cairo', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ui);
    overflow: hidden;
}

.studio-app { display: flex; flex-direction: column; height: 100vh; }

.studio-header {
    height: 60px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-link { text-decoration: none; color: inherit; display: flex; align-items: center; }
.brand-link:hover h1 { color: var(--primary-hover); }
.brand h1 { font-size: 1.15rem; font-weight: 700; transition: color 0.2s; }
.brand-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.header-actions { display: flex; gap: 0.75rem; }

.btn {
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #334155; color: #fff; }
.btn-secondary:hover { background: #475569; }

.studio-workspace { flex: 1; display: flex; overflow: hidden; }

.sidebar-tools {
    width: 320px;
    background: var(--panel-bg);
    border-left: 1px solid var(--border-color);
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tool-section h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.35rem;
}

.tool-section label { display: block; font-size: 0.8rem; margin: 0.6rem 0 0.25rem; color: var(--text-muted); }

.tool-section textarea,
.tool-section select {
    width: 100%;
    background: #0f172a;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.5rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}

.tool-section input[type="range"] { width: 100%; }
.tool-section input[type="color"] {
    width: 100%;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #0f172a;
    cursor: pointer;
}

.canvas-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #060913;
    overflow: auto;
    padding: 2rem;
}

.canvas-container {
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    border: 1px solid var(--border-color);
}

#studio-canvas { display: block; cursor: move; }

.saved-list { list-style: none; max-height: 150px; overflow-y: auto; }
.saved-list li {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    background: #0f172a;
    margin-bottom: 0.35rem;
    border-radius: 4px;
    cursor: pointer;
}
.saved-list li:hover { background: var(--primary); }