body {
    margin: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

#webgl-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#info-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 280px;
    max-height: 95vh;
    background-color: rgba(40, 40, 40, 0.85);
    color: #eee;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

#info-panel h2, #info-panel h3 {
    margin-top: 0;
    margin-bottom: 5px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

#info-panel h3 {
    margin-top: 15px;
}


#controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
}

#controls button {
    background-color: #4a4a4a;
    border: none;
    color: #eee;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    flex-grow: 1;
}

#controls button:hover:not(:disabled) {
    background-color: #5f5f5f;
}

#controls button:disabled {
    background-color: #3a3a3a;
    color: #888;
    cursor: not-allowed;
}

#bone-list {
    overflow-y: auto;
    max-height: 60vh; /* Adjusted max-height */
}

/* --- Hierarchy Tree View Styles --- */
#bone-list ul {
    list-style-type: none;
    padding-left: 18px;
    margin: 0;
}

#bone-list li {
    position: relative;
}

.model-root > .model-label {
    font-weight: bold;
    background-color: #333;
    padding: 8px;
    margin-top: 5px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.model-actions {
    display: flex;
    gap: 4px;
}

.action-icon {
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
    font-family: 'Arial Unicode MS', sans-serif;
}

.action-icon:hover {
    background-color: #555;
}


.bone-label {
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.has-children > .bone-label::before,
.has-children > .model-label > .model-name::before {
    content: '▶'; /* Collapsed state */
    display: inline-block;
    width: 1em;
    margin-right: 5px;
    transition: transform 0.2s;
}

.has-children:not(.collapsed) > .bone-label::before,
.has-children:not(.collapsed) > .model-label > .model-name::before {
    content: '▼'; /* Expanded state */
}

.collapsed > ul {
    display: none;
}

.bone-label:hover {
    background-color: #4a4a4a;
}

.bone-label.active,
.model-label.active {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

/* --- Properties Panel Styles --- */
#properties-panel {
    margin-top: auto; /* Pushes to the bottom */
    padding-top: 10px;
    border-top: 1px solid #555;
}

#properties-content p {
    color: #999;
    font-style: italic;
    text-align: center;
}

.prop-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.prop-group label {
    flex-basis: 70px; /* Give label a fixed width */
    font-size: 14px;
}

.prop-inputs {
    display: flex;
    gap: 5px;
}

.prop-inputs input {
    width: 50px;
    background-color: #2a2a2a;
    border: 1px solid #555;
    color: #eee;
    border-radius: 4px;
    padding: 4px;
    text-align: right;
    font-family: monospace;
}
