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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.toolbar h1 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.toolbar-buttons {
    display: flex;
    gap: 8px;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
}


.btn-primary {
    background-color: #3399ff;
    color: white;
}

.btn-secondary {
    background-color: #666;
    color: white;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

/* Canvas Container */
.canvas-container {
    flex: 1;
    position: relative;
    background-color: #fafafa;
    overflow: hidden;
}

#diagramCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

#diagramCanvas.grabbing {
    cursor: grabbing;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
}

.path {
    font-weight: 500;
    color: #374151;
}

.instructions {
    opacity: 0.8;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    min-width: 300px;
}

.overlay-content h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #1f2937;
}

.overlay-content input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.overlay-content input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.overlay-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

#textOverlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

#nodeDescInput {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.edit-overlay-content label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.kalaspace-editor,
.kalaspace-editor * {
    user-select: none;
    -webkit-user-select: none;
}
