* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    background-color: #000;
    display: grid;
    grid-template-rows: 1fr 30px; /* Editor takes all space, footer takes fixed 30px */
    grid-template-columns: 100%;
    overflow: hidden;
}

#node-palette {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0; 
    width: 220px;
    background-color: #1a1a1a;
    border-right: 1px solid #333;
    z-index: 1000;
    padding: 15px;
    overflow-y: auto;
    color: #eee;
    font-family: 'PT Mono', monospace;
}

.palette-header {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #444;
    color: #00ff99;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#editor-content {
    grid-row: 1;
    grid-column: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    min-height: 0;
}

#rpd-canvas-container {
    position: relative;
    flex: 1;
    margin-left: 220px;
    overflow: auto;
    background-color: #111;
    z-index: 50;
    height: 100%;
}

#app-footer {
    grid-row: 2;
    grid-column: 1;
    background-color: #0a0a0a;
    border-top: 1px solid #333;
    color: #666;
    font-family: 'PT Mono', monospace;
    font-size: 10px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    z-index: 2000;
    white-space: nowrap;
    overflow: hidden;
}

.footer-title { color: #00ff99; font-weight: bold; margin-right: 5px; }
.footer-buttons { display: inline-block; margin: 0 10px; }
.footer-btn {
    background: #1a1a1a;
    color: #aaa;
    border: 1px solid #444;
    padding: 2px 8px;
    margin: 0 4px;
    font-family: 'PT Mono', monospace;
    font-size: 9px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}
.footer-btn:hover {
    background: #00ff99;
    color: #000;
    border-color: #00ff99;
}
.footer-credits { color: #555; font-style: italic; }

.rpd-mozziflow-nodelist .rpd-nodelist-selected {
    background-color: rgba(0, 255, 153, 0.2) !important;
}

.rpd-mozziflow-nodelist li {
    cursor: pointer;
    padding: 3px 6px;
    margin: 2px 0;
    background-color: #252525;
    border-left: 3px solid #555;
    transition: all 0.2s ease;
    color: #bbb !important;
    font-size: 0.72em; /* Smaller font as requested */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    list-style: none;
}

.rpd-palette-category {
    font-size: 0.65em;
    color: #666;
    font-weight: bold;
    margin: 12px 0 4px 0;
    letter-spacing: 1.5px;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
}

/* Category Colors */
.rpd-category-wave { border-left-color: #00d4ff !important; }
.rpd-category-filter { border-left-color: #ff0055 !important; }
.rpd-category-signal { border-left-color: #ffcc00 !important; }
.rpd-category-output { border-left-color: #00ff66 !important; }
.rpd-category-input { border-left-color: #aa00ff !important; }

.rpd-mozziflow-nodelist li:hover {
    background-color: #333;
    transform: translateX(3px);
}

.rpd-category-wave:hover { border-left-color: #55e4ff !important; }
.rpd-category-filter:hover { border-left-color: #ff4d88 !important; }
.rpd-category-signal:hover { border-left-color: #ffdd44 !important; }
.rpd-category-output:hover { border-left-color: #44ff88 !important; }
.rpd-category-input:hover { border-left-color: #cc66ff !important; }

/* Canvas Node Colors */
.rpd-node.rpd-toolkit-wave .rpd-title { background-color: #00d4ff !important; color: #000 !important; }
.rpd-node.rpd-toolkit-filter .rpd-title { background-color: #ff0055 !important; color: #fff !important; }
.rpd-node.rpd-toolkit-signal .rpd-title { background-color: #ffcc00 !important; color: #000 !important; }
.rpd-node.rpd-toolkit-output .rpd-title { background-color: #00ff66 !important; color: #000 !important; }
.rpd-node.rpd-toolkit-input .rpd-title { background-color: #aa00ff !important; color: #fff !important; }

/* Node body consistency */
.rpd-node {
    border: 1px solid #333 !important;
    background-color: rgba(20, 20, 20, 0.9) !important;
}

.rpd-node .rpd-title {
    font-size: 0.8em !important;
    padding: 2px 5px !important;
    font-weight: bold !important;
    text-shadow: none !important;
}

.rpd-mozziflow-nodelist dl {
    width: 100%;
    margin: 10px 0;
    padding: 0;
}

.rpd-mozziflow-nodelist input {
    width: 100%;
    background: #000;
    border: 1px solid #444;
    color: #00ff99;
    padding: 6px;
    box-sizing: border-box;
    font-family: inherit;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.rpd-mozziflow-nodelist ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rpd-mozziflow-nodelist dt {
    margin: 3px 0;
}

.rpd-mozziflow-nodelist dt .rpd-nodelist-toolkit-name {
    border: 1px solid black;
    padding: 2px;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.15);
}

.rpd-mozziflow-nodelist .rpd-process-target a {
    text-decoration: none;
    /* font-size: 1.2em; */
    color: darkred;
    background-color: slategray;
    border-radius: 4px;
    padding: 1px 3px 1px 3px;
    margin: 0 3px;
    /* position: relative; */
    /* top: -1px; */
    transition: background-color 0.2s ease-in, color 0.2s ease-in;
}

.rpd-mozziflow-nodelist .rpd-process-target a:hover {
    color: red;
    background-color: aliceblue;
}

.rpd-mozziflow-nodelist input {
    width: 85%;
}

.rpd-mozziflow-nodelist ul {
    margin: 0;
    padding: 0;
    display: block;
    list-style-type: none;
}

.rpd-mozziflow-nodelist dl {
    /* Styles moved to top level for better control */
    margin: 6px 0px 0 0;
    padding: 0;
}

.rpd-mozziflow-nodelist dl > dd {
    margin: 10px 0;
    padding: 0;
}

.rpd-mozziflow-nodelist li .rpd-nodelist-description {
    display: block;
    font-size: 0.7em;
    opacity: 0.8;
}

.rpd-mozziflow-nodelist li .rpd-nodelist-icon {
    display: inline-block;
    width: 1em;
    /* height: 1em; */
    padding: 0px 3px 0px 2px;
    text-align: center;
    color: darkseagreen;
    vertical-align: middle;
    position: relative;
    top: -1px;
    /* left: 0px; */
    /* border-radius: 3px 0 0 3px; */
    /* background-color: ghostwhite; */
    /* text-anchor: initial; */
}

.rpd-mozziflow-nodelist li .rpd-nodelist-fulltypename {
    margin: 3px 3px;
    display: inline-block;
}

.rpd-mozziflow-nodelist li.rpd-nodelist-selected .rpd-nodelist-fulltypename {
    color: #cecece;
}

.rpd-mozziflow-nodelist li.rpd-nodelist-add-effect {
    /* background-color: #CCC; */
    /* color: #000; */
}

_::-moz-range-track, body:last-child .rpd-inlet {
        margin-top: -0.5em !important;
}

_::-moz-range-track, body:last-child .rpd-connector {
        margin-top: -0.7em !important;
}

    .vex.vex-theme-wireframe .vex-content {
      padding: 1em !important;
    }


    .vex.vex-theme-wireframe .vex-content, .egolab {
        font-family: 'PT Mono', 'Andale Mono', 'Fira mono', 'Menlo', sans-serif !important;
    }    


    .vex-content-splash {
        width: 640px !important;
        -webkit-box-shadow: 0px 0px 17px 3px rgba(119, 119, 119, 0.5);
        -moz-box-shadow: 0px 0px 17px 3px rgba(119, 119, 119, 0.5);
        box-shadow: 0px 0px 17px 3px rgba(119, 119, 119, 0.5);
        /* height: 730px !important; */
    }

    .vex.vex-theme-wireframe .vex-content {
        background: #000 !important;
        color: #fff !important;
    }

    .rpd-canvas{
        /* overflow: scroll; */
    }

    #main {
        position: relative;
    }


    .btn_wave {
        border: 1px solid;
    }

    .btn {
        margin: 4px;
        margin-right: 4px;
        padding: 8px;
    }

    .val-input {
        margin: 4px !important;        
        padding: 8px;
        margin-right: 4px;
        border: 1px solid rgba(0, 0, 0, 1) !important;        
    }

/* CUSTOM BODY INPUTS (for Constant node) */
.mozzi-constant-input {
    background-color: #000;
    color: #00ff99;
    border: 1px solid #444;
    font-family: 'PT Mono', monospace;
    font-size: 0.7em;
    width: 60px;
    padding: 2px 4px;
    outline: none;
    margin: 5px;
    display: block;
}

.mozzi-constant-input:focus {
    border-color: #00ff99;
}

/* Hide the 'value' inlet connector for Constant nodes since we use the text box */
[data-type="input/constant"] .rpd-inlets {
    display: none !important;
}

/* Inlet Value Displays */
.mozzi-inlet-values {
    padding: 4px 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    margin-top: 5px;
}
.mozzi-inlet-row {
    font-size: 10px;
    font-family: 'PT Mono', monospace;
    line-height: 1.6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mozzi-inlet-label {
    color: #777;
    margin-right: 8px;
    text-transform: capitalize;
}
.mozzi-inlet-val-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #eee;
    font-family: inherit;
    font-size: 10px;
    width: 50px;
    text-align: right;
    outline: none;
    padding: 0;
    margin: 0;
}
.mozzi-inlet-val-input:focus {
    border-bottom-color: #00ff99;
}
.mozzi-inlet-val-input[readonly] {
    border-bottom: none;
    cursor: default;
}
