/* ---------------------------------------------------------
   FONT + GLOBAL
--------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;800&display=swap');

:root {
    --bg: #0d0f12;
    --bg-panel: #14171c;
    --bg-panel-alt: #1b1f25;
    --border: #2a2f38;
    --accent: #4df3ff;
    --accent-soft: #4df3ff33;
    --text: #e6e6e6;
    --text-dim: #9aa0a8;
    --danger: #ff4d6d;
    --success: #4dff9a;
    --radius: 6px;
    --transition: 0.15s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Orbitron', sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
}

/* ---------------------------------------------------------
   LAYOUT
--------------------------------------------------------- */
.editor-container {
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    grid-template-rows: 50px 1fr;
    height: 100vh;
    grid-template-areas:
        "toolbar toolbar toolbar"
        "sidebar canvas properties";
}

/* ---------------------------------------------------------
   TOP TOOLBAR
--------------------------------------------------------- */
.toolbar {
    grid-area: toolbar;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 12px;
}

.toolbar button {
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    padding: 6px 12px;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
}

.toolbar button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------------------------------------------------------
   SIDEBAR (TOOLS)
--------------------------------------------------------- */
.sidebar {
    grid-area: sidebar;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 12px;
    overflow-y: auto;
}

.tool-button {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.tool-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------------------------------------------------------
   CANVAS AREA
--------------------------------------------------------- */
.canvas {
    grid-area: canvas;
    background: #0b0d10;
    position: relative;
}

/* Subtle grid */
.canvas::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, #ffffff05 1px, transparent 1px),
        linear-gradient(to bottom, #ffffff05 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* ---------------------------------------------------------
   PROPERTIES PANEL
--------------------------------------------------------- */
.properties {
    grid-area: properties;
    background: var(--bg-panel);
    border-left: 1px solid var(--border);
    padding: 16px;
    overflow-y: auto;

    /* ✅ Make it stick to the right edge of the window */
    position: fixed;
    top: 50px;                 /* same as toolbar height */
    right: 0;
    width: 300px;              /* matches your grid third column */
    height: calc(100vh - 50px);
}

.properties h2 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--accent);
}

.widget {
    margin-bottom: 16px;
}

.widget label {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.widget input,
.widget select {
    width: 100%;
    padding: 8px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: var(--transition);
}

.widget input:focus,
.widget select:focus {
    border-color: var(--accent);
    outline: none;
}

/* ---------------------------------------------------------
   BUTTONS (GLOBAL)
--------------------------------------------------------- */
.btn {
    padding: 8px 14px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-success:hover {
    border-color: var(--success);
    color: var(--success);
}

/* ---------------------------------------------------------
   SCROLLBARS
--------------------------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

