/* ================================
   GLOBAL VARIABLES
================================ */
:root {
    --object-tile-size: 64px;
    --object-gap: 8px;
}

/* ================================
   BASE
================================ */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #1e1e1e;
    color: #fff;
}

/* ================================
   EDITOR TOOLBAR (TOP)
================================ */
#editorToolbar {
    background: #222;
    padding: 8px;
    display: flex;
    gap: 6px;
    align-items: center;
    border-bottom: 1px solid #333;
}

#editorToolbar button {
    background: #444;
    color: #fff;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
}

#editorToolbar button:hover {
    background: #666;
}

#editorToolbar .sep {
    width: 1px;
    height: 24px;
    background: #555;
    margin: 0 6px;
}

/* ================================
   MAIN LAYOUT
================================ */
#app {
    display: flex;
    height: calc(100vh - 44px);
}

/* ================================
   LEFT PANEL (OBJECT EXPLORER)
================================ */
#explorer {
    width: 60%;
    border-right: 1px solid #333;
    overflow-y: auto;
}

/* OBJECT GRID */
.object-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(var(--object-tile-size), var(--object-tile-size))
    );
    gap: var(--object-gap);
    padding: 10px;
    justify-content: start;
    align-content: start;
}

/* OBJECT TILE */
.object-item {
    width: var(--object-tile-size);
    height: var(--object-tile-size);
    background: #2a2a2a;
    border: 2px solid transparent;
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    font-weight: bold;
    color: #fff;

    cursor: grab;
    user-select: none;
}

.object-item.active {
    border-color: #4caf50;
    background: #355f3a;
    outline: 2px solid #4caf50;
}

.object-item:active {
    cursor: grabbing;
}

/* ================================
   RIGHT PANEL (INSPECTOR SHELL)
================================ */
#inspector {
    width: 40%;
    padding: 12px;
    background: #121212;
    overflow-y: auto;
}

/* INSPECTOR TOOLBAR */
#inspectorToolbar {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: #1f1f1f;
    border-bottom: 1px solid #333;
}

#inspectorToolbar button {
    background: #444;
    border: none;
    color: #fff;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
}

#inspectorToolbar button:hover {
    background: #666;
}

#inspectorToolbar select {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 4px 6px;
    border-radius: 4px;
}
