/* Editor - Layout & Topbar */
* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: #1a1a2e;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.editor-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Top Bar */
.editor-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #0a0a0f;
    border-bottom: 1px solid #333;
}

.editor-topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-back {
    color: #888;
    text-decoration: none;
    font-size: 14px;
}
.btn-back:hover { color: #fff; }

.template-name {
    font-size: 18px;
    font-weight: 600;
}

.badge-preset {
    background: #ffd700;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.editor-topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Buttons */
.editor-btn {
    padding: 8px 16px;
    border: 1px solid #444;
    background: #2a2a3e;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.editor-btn:hover { background: #3a3a4e; }
.editor-btn.btn-primary {
    background: #c41e1e;
    border-color: #c41e1e;
}
.editor-btn.btn-primary:hover { background: #a01818; }
.editor-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.editor-btn.btn-icon {
    padding: 8px 10px;
    font-size: 16px;
    min-width: 36px;
    text-align: center;
}
.editor-btn.btn-danger {
    border-color: #ff6b35;
    color: #ff6b35;
}
.editor-btn.btn-danger:hover {
    background: rgba(255, 107, 53, 0.2);
}

/* Editor Actions Group */
.editor-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    border-right: 1px solid #333;
}

/* Main Editor */
.editor-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.editor-panel {
    width: 250px;
    background: #16161a;
    border-right: 1px solid #333;
    overflow-y: auto;
}
.panel-right {
    border-right: none;
    border-left: 1px solid #333;
}

.panel-header {
    padding: 15px;
    font-weight: 600;
    border-bottom: 1px solid #333;
    background: #0a0a0f;
}

.editor-canvas {
    flex: 1;
    background: #2d2d3a;
}

#gjs {
    height: 100%;
}