body {
    margin: 0;
}

canvas {
    display: block;
}

#panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    height: 100%;
    background-color: rgba(50, 50, 50, 0.8);
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-sizing: border-box;
    z-index: 100;
    font-family: sans-serif;
    color: #ffffff;
}

.panel-section {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 10px;
}

.panel-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.panel-section h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

#tool-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

#tool-buttons button {
    flex-grow: 1;
    background-color: #555;
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#tool-buttons button:hover {
    background-color: #777;
}

#tool-buttons button.active {
    background-color: #2196F3;
    box-shadow: 0 0 5px #2196F3;
}

#icon-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.tool-icon {
    width: 30px;
    height: 30px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.tool-icon.active {
    border-color: #ffffff;
    box-shadow: 0 0 5px #ffffff;
}

#legend {
    background-color: rgba(0, 0, 0, 0.5);
    font-size: 12px;
    padding: 5px;
    text-align: center;
}

#properties-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#properties-content p {
    font-size: 12px;
    margin: 0;
}

#rotation-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#axis-buttons {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

#axis-buttons button {
    flex-grow: 1;
    background-color: #555;
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#axis-buttons button:hover {
    background-color: #777;
}

#axis-buttons button.active-button {
    background-color: #2196F3;
    box-shadow: 0 0 5px #2196F3;
}

#speed-slider-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#speed-slider-container input[type="range"] {
    width: 100%;
}

#controls-section {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

#controls-section button {
    flex-grow: 1;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#controls-section button:hover {
    background-color: #45a049;
}

#stop-button {
    background-color: #f44336;
}

#stop-button:hover {
    background-color: #da190b;
}

#pause-button {
    background-color: #ff9800;
}

#pause-button:hover {
    background-color: #e68a00;
}

#selection-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#selection-controls button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
}