@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=DM+Sans:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #faf8f5;
    color: #3a3a3a;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #e86a47 0%, #d4553a 100%);
    color: #fff;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.header label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.header input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    outline: none;
}

.header input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.header input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btn-gen {
    padding: 6px 18px;
    border: 2px solid #fff;
    border-radius: 5px;
    background: transparent;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-gen:hover {
    background: #fff;
    color: #e86a47;
}

.main {
    display: flex;
    flex: 1;
    min-height: 0;
}

#blocklyArea {
    flex: 1;
    position: relative;
    min-width: 0;
}

#blocklyDiv {
    position: absolute;
    inset: 0;
}

.output-panel {
    width: 25vw;
    /* flex-shrink: 0; */
    display: flex;
    flex-direction: column;
    border-left: 2px solid #e0dcd6;
    background: #2b2b2b;
}

.tab-bar {
    display: flex;
    background: #353535;
    border-bottom: 1px solid #444;
    overflow-x: auto;
    flex-shrink: 0;
}

.tab-bar::-webkit-scrollbar {
    height: 3px;
}

.tab-bar::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 2px;
}

.tab-btn {
    padding: 7px 12px;
    border: none;
    background: transparent;
    color: #888;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.tab-btn:hover {
    color: #ccc;
}

.tab-btn.active {
    color: #e86a47;
    border-bottom-color: #e86a47;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 14px;
    background: #2f2f2f;
    border-bottom: 1px solid #3a3a3a;
}

.output-header span {
    font-size: 0.68rem;
    font-weight: 500;
    color: #999;
    font-family: 'JetBrains Mono', monospace;
}

.output-copy-btn {
    padding: 3px 10px;
    border: 1px solid #666;
    border-radius: 3px;
    background: transparent;
    color: #aaa;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
}

.output-copy-btn:hover {
    border-color: #e86a47;
    color: #e86a47;
}

#output {
    flex: 1;
    overflow: auto;
    padding: 12px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    line-height: 1.5;
    color: #d4d4d4;
    white-space: pre;
    margin: 0;
}

.blocklyToolboxDiv {
    background: #f5f0ea !important;
}

.blocklyTreeRow:not(.blocklyTreeSelected):hover {
    background-color: #efe8df !important;
}

#resizeHandle {
    width: 5px;
    cursor: col-resize;
    background: #e0dcd6;
    flex-shrink: 0;
    transition: background 0.15s;
    position: relative;
    z-index: 10;
}

#resizeHandle:hover,
#resizeHandle.dragging {
    background: #e86a47;
}