* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0a0a14;
    color: #e0e0ff;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 14px;
}

.sidebar {
    width: 320px;
    background-color: #151522;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.title-section {
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a3a;
}

h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #ffffff;
}

.description {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.8;
}

.game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-box {
    background-color: #1e1e2e;
    border-radius: 8px;
    padding: 12px;
}

.info-box h3 {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 16px;
}

.state-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.state-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.state-label {
    font-size: 14px;
    opacity: 0.8;
}

.state-value {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
}

#timer {
    color: #2ecc71;
}

#status {
    color: #3498db;
}

#collisionCount {
    color: #e74c3c;
}

.control-group {
    background-color: #1e1e2e;
    border-radius: 8px;
    padding: 12px;
}

.control-group h3 {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 16px;
}

.instructions {
    margin-bottom: 12px;
}

.instructions p {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.9;
}

.instructions strong {
    color: #ffffff;
}

.btn-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    background-color: #2a2a3a;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background-color: #3a3a4a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.btn:active {
    transform: translateY(0);
}

.top-reset {
    position: fixed;
    top: 12px;
    width: auto;
    padding: 10px 18px;
    display: none;
    z-index: 20;
    flex: 0 0 auto;
}

.setting {
    margin-bottom: 15px;
}

.setting label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    opacity: 0.9;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #2a2a3a;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4a4a6a;
    cursor: pointer;
}

.value-display {
    min-width: 50px;
    text-align: right;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 14px;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.simulation-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#canvas-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 0 2px #2a2a3a;
    background-color: #0f0f1a;
}