body {
    font-family: 'Arial', sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
}

h1 {
    text-align: center;
    color: #333;
}

#app {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.panel {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.input-panel {
    text-align: center;
}

button {
    margin: 5px;
    padding: 10px 15px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
}

.visualization-panel {
    min-height: 400px;
    border: 1px dashed #ccc;
}

#tree-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.node {
    position: absolute;
    width: 80px;
    height: 40px;
    background-color: lightblue;
    border: 2px solid #333;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
}

.node.selected {
    background-color: orange;
    color: white;
}

.edge {
    position: absolute;
    background-color: black;
    transform-origin: 0 0;
}

.math-panel {
    font-family: monospace;
}

#math-display {
    font-size: 1.2em;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #eee;
    border-radius: 4px;
}

#vector-display {
    white-space: pre-wrap;
    font-size: 0.9em;
}