/* ===== STUDIO LAYOUT ===== */
.studio-body {
    overflow: hidden !important;
    height: 100vh;
}
.studio-nav {
    height: 52px !important;
}
.studio-nav .nav-container {
    height: 52px;
}
.studio-title {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-heading); font-size: 14px;
    font-weight: 600; color: var(--text-secondary);
}
.studio-layout {
    display: flex;
    height: calc(100vh - 52px);
    margin-top: 52px;
}

/* ===== LEFT SIDEBAR ===== */
.studio-sidebar {
    width: 240px; flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    display: flex; flex-direction: column;
}
.studio-sidebar::-webkit-scrollbar { width: 4px; }
.studio-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar-section {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}
.sidebar-label {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-muted); margin-bottom: 12px;
}

/* ===== SHAPES GRID ===== */
.shapes-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}
.shape-btn {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; padding: 10px 6px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-secondary);
    font-size: 10px; font-weight: 500;
    transition: all 0.2s ease; cursor: pointer;
}
.shape-btn:hover {
    border-color: var(--accent); color: var(--accent);
    background: var(--accent-glow);
}
.shape-btn svg { opacity: 0.7; transition: opacity 0.2s; }
.shape-btn:hover svg { opacity: 1; }

/* ===== TOOLS ===== */
.tools-row {
    display: flex; gap: 6px;
}
.tool-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 10px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    color: var(--text-secondary); transition: all 0.2s ease;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-btn.active {
    background: var(--accent); color: #000;
    border-color: var(--accent);
}

/* ===== COLOR PALETTE ===== */
.color-palette {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}
.color-swatch {
    width: 100%; aspect-ratio: 1; border-radius: 50%;
    border: 2px solid transparent; cursor: pointer;
    transition: all 0.2s ease;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active { border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.3); }
.custom-color-row {
    display: flex; align-items: center; gap: 10px;
    margin-top: 10px;
}
.custom-color-row input[type="color"] {
    width: 32px; height: 32px; border: none;
    border-radius: 50%; cursor: pointer; background: none;
    padding: 0;
}
.custom-color-row span { font-size: 12px; color: var(--text-muted); }

/* ===== OPERATIONS ===== */
.ops-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.op-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    color: var(--text-secondary); font-size: 11px; font-weight: 500;
    transition: all 0.2s ease; cursor: pointer;
}
.op-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== VIEWPORT ===== */
.studio-viewport {
    flex: 1; position: relative; background: #0a0a0f;
    overflow: hidden;
}
.viewport-canvas {
    width: 100%; height: 100%;
}
.viewport-canvas canvas {
    width: 100% !important; height: 100% !important;
    display: block;
}
.viewport-info {
    position: absolute; bottom: 12px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 12px; align-items: center;
    padding: 6px 16px; background: rgba(15,15,18,0.9);
    border: 1px solid var(--border); border-radius: 999px;
    font-size: 11px; color: var(--text-muted);
    backdrop-filter: blur(10px);
}

/* ===== RIGHT PROPERTIES ===== */
.studio-properties {
    width: 240px; flex-shrink: 0;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    overflow-y: auto;
}
.studio-properties::-webkit-scrollbar { width: 4px; }
.studio-properties::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.props-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 300px; text-align: center;
    padding: 24px;
}
.props-empty p {
    font-size: 12px; color: var(--text-muted);
    margin-top: 12px; line-height: 1.5;
}
.props-row {
    display: flex; gap: 8px;
}
.prop-field {
    flex: 1; display: flex; flex-direction: column; gap: 4px;
}
.prop-field label {
    font-size: 10px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase;
}
.prop-field input {
    width: 100%; padding: 6px 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 12px; outline: none; font-family: 'SF Mono', monospace;
}
.prop-field input:focus { border-color: var(--accent); }

/* ===== OBJECT LIST ===== */
.object-list {
    display: flex; flex-direction: column; gap: 4px;
}
.object-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 12px; color: var(--text-secondary);
    cursor: pointer; transition: all 0.15s ease;
}
.object-item:hover { border-color: var(--accent); }
.object-item.active {
    border-color: var(--accent); background: var(--accent-glow);
    color: var(--accent);
}
.object-item-color {
    width: 12px; height: 12px; border-radius: 50%;
    flex-shrink: 0;
}
.object-item-name {
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.object-item-visibility {
    font-size: 14px; opacity: 0.5; transition: opacity 0.15s;
    cursor: pointer; border: none; background: none; color: inherit;
}
.object-item-visibility:hover { opacity: 1; }

/* ===== GRID HELPER OVERRIDE ===== */
.viewport-canvas .grid-helper { opacity: 0.15; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .studio-properties { display: none; }
}
@media (max-width: 700px) {
    .studio-sidebar { width: 60px; }
    .sidebar-label { display: none; }
    .shape-btn span { display: none; }
    .shape-btn { padding: 8px; }
    .ops-grid { grid-template-columns: 1fr; }
    .op-btn span { display: none; }
    .color-palette { grid-template-columns: repeat(4, 1fr); }
    .custom-color-row { display: none; }
    .viewport-info { font-size: 9px; padding: 4px 10px; }
}
