/* PromptFlow Interface Styles */

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Inter', 'Arial', sans-serif;
}

/* Main Container */
.promptflow-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--bg-color);
    padding-top: 80px; /* Space for drawer button */
}

/* Top Toolbar */
.promptflow-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95) 0%, rgba(15, 15, 25, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 400px;
    margin: 0 20px;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.toolbar-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.toolbar-btn.primary {
    background: linear-gradient(135deg, #00ff95, #4db8ff);
    color: #000;
    font-weight: 600;
}

.toolbar-btn.primary:hover {
    background: linear-gradient(135deg, #4db8ff, #00ff95);
}

.toolbar-btn.success {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    font-weight: 600;
}

.toolbar-btn.success:hover {
    background: linear-gradient(135deg, #66BB6A, #4CAF50);
}

.flow-name-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.flow-name-input:focus {
    border-color: #00ff95;
    box-shadow: 0 0 0 3px rgba(0, 255, 149, 0.2);
}

.flow-name-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.credit-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 255, 149, 0.1);
    border: 1px solid rgba(0, 255, 149, 0.3);
    border-radius: 20px;
    color: #00ff95;
    font-weight: 600;
    font-size: 14px;
}

/* Main Workspace */
.promptflow-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Block Library Sidebar */
.block-library {
    width: 280px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95) 0%, rgba(15, 15, 25, 0.98) 100%);
    backdrop-filter: blur(10px);
    border-right: 2px solid rgba(102, 126, 234, 0.3);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.library-header {
    padding: 20px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.library-header h3 {
    margin: 0 0 15px 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.library-search {
    position: relative;
}

.library-search input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 14px;
    outline: none;
}

.library-search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
}

/* Block Categories */
.block-categories {
    flex: 1;
    padding: 10px;
}

.block-category {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(40, 40, 50, 0.5);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(102, 126, 234, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-header:hover {
    background: rgba(102, 126, 234, 0.2);
}

.category-header span {
    flex: 1;
    font-weight: 600;
    color: var(--text-color);
}

.toggle-category {
    transition: transform 0.3s ease;
}

.block-category.collapsed .toggle-category {
    transform: rotate(-90deg);
}

.category-blocks {
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.block-category.collapsed .category-blocks {
    max-height: 0;
}

/* Block Templates */
.block-template {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    margin: 5px 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 6px;
    color: var(--text-color);
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

.block-template:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.block-template:active {
    cursor: grabbing;
}

.block-template i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Canvas Container */
.canvas-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.canvas {
    flex: 1;
    position: relative;
    background: 
        linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    background-size: 40px 40px;
    overflow: auto;
    min-height: 2000px; /* Make canvas vertically scrollable */
    min-width: 2000px; /* Make canvas horizontally scrollable */
}

/* Canvas Welcome Message */
.canvas-welcome {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-color);
    z-index: 10;
}

.welcome-content {
    background: rgba(20, 20, 30, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.welcome-content i {
    font-size: 4rem;
    color: #00ff95;
    margin-bottom: 20px;
    display: block;
}

.welcome-content h2 {
    margin: 0 0 15px 0;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00ff95, #4db8ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-content p {
    margin: 0 0 30px 0;
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.6;
}

.welcome-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    justify-content: center;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #00ff95;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.7;
}

.get-started-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #00ff95, #4db8ff);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.get-started-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 255, 149, 0.3);
    background: linear-gradient(135deg, #4db8ff, #00ff95);
}

/* Properties Panel */
.properties-panel {
    width: 300px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95) 0%, rgba(15, 15, 25, 0.98) 100%);
    backdrop-filter: blur(10px);
    border-left: 2px solid rgba(102, 126, 234, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.properties-panel.open {
    transform: translateX(0);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    background: rgba(102, 126, 234, 0.1);
}

.panel-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-panel-btn {
    background: rgba(255, 107, 157, 0.1);
    border: 1px solid rgba(255, 107, 157, 0.3);
    color: #ff6b9d;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-panel-btn:hover {
    background: rgba(255, 107, 157, 0.2);
}

.panel-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.no-selection {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 50px;
}

.no-selection i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Bottom Panel */
.bottom-panel {
    height: 250px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95) 0%, rgba(15, 15, 25, 0.98) 100%);
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(102, 126, 234, 0.3);
    display: flex;
    flex-direction: column;
    transition: height 0.3s ease;
}

.bottom-panel.collapsed {
    height: 50px;
}

.panel-tabs {
    display: flex;
    align-items: center;
    background: rgba(102, 126, 234, 0.1);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tab-btn:hover {
    color: var(--text-color);
    background: rgba(102, 126, 234, 0.1);
}

.tab-btn.active {
    color: #00ff95;
    background: rgba(0, 255, 149, 0.1);
    border-bottom: 2px solid #00ff95;
}

.panel-toggle-btn {
    margin-left: auto;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.panel-toggle-btn:hover {
    color: var(--text-color);
}

.bottom-panel.collapsed .panel-toggle-btn i {
    transform: rotate(180deg);
}

.tab-content {
    flex: 1;
    padding: 20px;
    display: none;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

.results-placeholder,
.debug-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 50px;
}

.results-placeholder i,
.debug-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Logs */
.logs-container {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
}

.log-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.log-time {
    color: rgba(255, 255, 255, 0.5);
    min-width: 80px;
}

.log-level {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    font-size: 11px;
}

.log-level.info {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.log-level.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #FFC107;
}

.log-level.error {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.log-message {
    flex: 1;
    color: var(--text-color);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95) 0%, rgba(15, 15, 25, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    background: rgba(102, 126, 234, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
}

.close-modal-btn {
    background: rgba(255, 107, 157, 0.1);
    border: 1px solid rgba(255, 107, 157, 0.3);
    color: #ff6b9d;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-btn:hover {
    background: rgba(255, 107, 157, 0.2);
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Flow Grid */
.flows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.flow-card {
    background: rgba(40, 40, 50, 0.7);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.flow-card:hover {
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.flow-limits {
    padding: 15px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.limit-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.limit-info i {
    margin-top: 2px;
    color: #FFC107;
}

/* Credit Actions */
.credit-warning {
    text-align: center;
    margin-bottom: 25px;
}

.credit-warning i {
    font-size: 3rem;
    color: #FF9800;
    margin-bottom: 15px;
    display: block;
}

.credit-warning p {
    margin: 10px 0;
    line-height: 1.6;
}

.credit-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn.primary {
    background: linear-gradient(135deg, #00ff95, #4db8ff);
    color: #000;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 149, 0.3);
}

.btn.secondary {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: var(--text-color);
}

.btn.secondary:hover {
    background: rgba(102, 126, 234, 0.3);
}

/* Block Instances on Canvas */
.flow-block {
    position: absolute;
    min-width: 150px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 10px;
    padding: 15px;
    cursor: move;
    user-select: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.flow-block:hover {
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.flow-block.selected {
    border-color: #00ff95;
    box-shadow: 0 0 20px rgba(0, 255, 149, 0.5);
}

/* Block Instances on Canvas */
.flow-block {
    position: absolute;
    min-width: 150px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(20, 20, 30, 0.9) 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 10px;
    padding: 15px;
    cursor: move;
    user-select: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.flow-block:hover {
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.flow-block.selected {
    border-color: #00ff95;
    box-shadow: 0 0 20px rgba(0, 255, 149, 0.5);
}

/* Connection Points Styles */
.connection-point {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00ff95;
    border: 2px solid rgba(15, 15, 25, 0.8);
    cursor: crosshair;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 0 rgba(0, 255, 149, 0.3);
}

.connection-point:hover {
    background: #00ff95;
    box-shadow: 0 0 0 4px rgba(0, 255, 149, 0.3);
    transform: scale(1.2);
}

.connection-point.input {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.connection-point.output {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.connection-point.output:hover {
    transform: translateY(-50%) scale(1.2);
}

.connection-point.input:hover {
    transform: translateY(-50%) scale(1.2);
}

/* SVG Connection Layer */
#connection-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

#connection-layer path {
    pointer-events: stroke;
    stroke-width: 8px; /* Larger clickable area */
}

#connection-layer path:hover {
    stroke: #ff6b6b;
    filter: drop-shadow(0 0 5px rgba(255, 107, 107, 0.5));
}

/* Tooltip Styles */
.connection-tooltip {
    position: fixed;
    background: rgba(15, 15, 25, 0.95);
    color: #00ff95;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(0, 255, 149, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
}

.connection-tooltip::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid rgba(15, 15, 25, 0.95);
}

.block-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
}

.delete-block-btn {
    margin-left: auto;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* Property controls in blocks */
.property-group {
    margin-bottom: 12px;
}

.property-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #00ff95;
}

.property-input {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    background: rgba(15, 15, 25, 0.8);
    color: var(--text-color);
    font-size: 12px;
    resize: vertical;
    min-height: 32px;
}

.property-input:focus {
    outline: none;
    border-color: #00ff95;
    box-shadow: 0 0 0 2px rgba(0, 255, 149, 0.2);
}

.model-selector {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    background: rgba(15, 15, 25, 0.9);
    color: var(--text-color);
    font-size: 12px;
    cursor: pointer;
}

.model-selector:focus {
    outline: none;
    border-color: #00ff95;
    box-shadow: 0 0 0 2px rgba(0, 255, 149, 0.2);
}

.temperature-value {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    color: #00ff95;
    font-weight: 500;
}

input[type="range"].property-input {
    width: calc(100% - 50px);
    display: inline-block;
    vertical-align: middle;
}

/* Block content styles */
.block-content {
    padding: 8px;
    font-size: 12px;
}

.delete-block-btn:hover {
    background: rgba(255, 107, 107, 0.4);
    border-color: #ff6b6b;
}

/* Block content styles */
.block-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Connection Points */
.connection-point {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #00ff95;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: crosshair;
    transition: all 0.3s ease;
}

.connection-point.input {
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.connection-point.output {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.connection-point:hover {
    transform: scale(1.3) translateY(-50%);
    box-shadow: 0 0 10px rgba(0, 255, 149, 0.8);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .block-library {
        width: 250px;
    }
    
    .properties-panel {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .promptflow-container {
        padding-top: 70px;
    }
    
    .promptflow-toolbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .toolbar-left,
    .toolbar-right,
    .toolbar-center {
        width: 100%;
        margin: 0;
    }
    
    .block-library {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1500;
        transition: left 0.3s ease;
    }
    
    .block-library.open {
        left: 0;
    }
    
    .properties-panel {
        position: fixed;
        right: -300px;
        top: 0;
        height: 100vh;
        z-index: 1500;
    }
    
    .welcome-stats {
        flex-direction: column;
        gap: 15px;
    }
}

/* Bottom Panel Toggle Button - Always Visible */
#bottom-panel-toggle {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: 9999 !important;
    background: var(--primary-color) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease !important;
}

#bottom-panel-toggle:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6) !important;
}

#bottom-panel-toggle i {
    color: white !important;
    font-size: 18px !important;
    transition: transform 0.3s ease !important;
}

#bottom-panel.collapsed #bottom-panel-toggle i {
    transform: rotate(180deg) !important;
}

/* Ensure bottom panel doesn't interfere with the toggle button */
.bottom-panel.collapsed {
    transform: translateY(calc(100% - 60px)) !important;
}

/* Make sure the toggle button is accessible even when panel is collapsed */
.bottom-panel {
    position: relative;
}

.panel-tabs {
    position: relative;
}

/* Fix for inline editing in blocks */
.flow-block .inline-input,
.flow-block .inline-textarea,
.flow-block .inline-select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    border-radius: 4px !important;
    padding: 6px 8px !important;
    color: white !important;
    font-size: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    cursor: text !important;
}

.flow-block .inline-input:focus,
.flow-block .inline-textarea:focus,
.flow-block .inline-select:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--primary-color) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2) !important;
    cursor: text !important;
}

.flow-block .inline-textarea {
    resize: vertical !important;
    min-height: 60px !important;
    font-family: inherit !important;
}

.flow-block .inline-property {
    margin-bottom: 8px !important;
}

.flow-block .inline-property:last-child {
    margin-bottom: 0 !important;
}

/* Ensure text is selectable and editable */
.flow-block .inline-input,
.flow-block .inline-textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Improve visibility of placeholder text */
.flow-block .inline-input::placeholder,
.flow-block .inline-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
}

/* Property value display in right panel */
.property-value-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.property-value-item label {
    font-weight: 500;
    color: var(--text-color);
    min-width: 100px;
}

.property-value {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
