body {
    margin: 0;
    padding: 0;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: auto;
    font-family: Arial, sans-serif;
}

#main-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    flex-wrap: wrap;
    justify-content: center;
}

#simulation-container {
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

canvas {
    background-color: #4CAF50;
    display: block;
}

#control-panel {
    background-color: #222;
    border: 2px solid #555;
    border-radius: 8px;
    padding: 20px;
    color: #fff;
    min-width: 280px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#control-panel h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.control-group input[type="range"] {
    width: 100%;
    cursor: pointer;
    accent-color: #4CAF50;
}

.control-group span {
    font-size: 12px;
    color: #4CAF50;
    font-weight: bold;
}

.stats {
    background-color: #111;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.stats p {
    margin: 5px 0;
    font-size: 13px;
    color: #aaa;
}

.stats span {
    color: #4CAF50;
    font-weight: bold;
}

button {
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #45a049;
}

button:active {
    background-color: #3d8b40;
}

#pause-btn.paused {
    background-color: #2196F3;
}

button.paused {
    background-color: #f44336;
}

button.paused:hover {
    background-color: #d32f2f;
}

.emergency-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emergency-buttons button {
    font-size: 12px;
    padding: 8px 5px;
}

.emergency-buttons button:hover {
    filter: brightness(1.1);
}

@media (max-width: 1200px) {
    #main-container {
        flex-direction: column;
        align-items: center;
    }
}

