body {
    margin: 0;
    overflow: hidden; /* Prevent scrollbars from appearing due to canvas */
    background-color: #f0f0f0; /* A light grey background */
    font-family: Arial, sans-serif;
}

canvas {
    display: block; /* Remove extra space below canvas */
}

#controls {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.control-group {
    margin-bottom: 15px;
}

.control-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

input[type="range"] {
    width: 100%;
    margin: 5px 0;
}

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

button:hover {
    background: #45a049;
}

#labels {
    position: absolute;
    color: #333;
    font-size: 14px;
    pointer-events: none;
}

#scaleY {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left top;
}

#scaleX {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
}
