body {
    margin: 0;
    overflow: hidden;
    background-color: #87CEEB; /* Sky blue background */
}

canvas {
    display: block;
}

#ui-container {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 220px;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px;
    border-radius: 10px;
    font-family: sans-serif;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

h3 {
    margin-top: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

.visibility-toggle {
    background: #555;
    color: white;
    border: 1px solid #777;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 5px;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20px, 1fr));
    gap: 4px;
    margin-bottom: 10px;
}

.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.color-swatch:hover {
    border-color: #fff;
}

.color-swatch.selected {
    border-color: #00ff00;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 5px;
}

.thumbnail-button {
    width: 50px;
    height: 50px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid white;
    border-radius: 5px;
    margin: 0;
    cursor: pointer;
    transition: border-color 0.3s;
}

.thumbnail-button:hover, .thumbnail-button.selected {
    border-color: #00ff00;
}