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

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
    background-color: #f5f5f5;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
}

.container {
    display: flex;
    flex: 1;
    gap: 20px;
}

.controls {
    width: 250px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.control-section h3 {
    margin-bottom: 5px;
    color: #444;
    font-size: 16px;
}

button {
    padding: 8px 12px;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #3a5a8c;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.canvas-container {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.mode-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 4px;
    font-size: 14px;
}

.results {
    margin-top: 20px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.results h2 {
    margin-bottom: 10px;
    color: #444;
}

.results-content {
    display: flex;
    gap: 20px;
}

.results-stats {
    flex: 1;
}

.results-steps {
    flex: 2;
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

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

.slider-container label {
    min-width: 80px;
}

input[type="range"] {
    flex: 1;
}

.color-palette {
    display: flex;
    gap: 5px;
    margin-top: 5px;
}

.color-sample {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ddd;
}

.step-item {
    margin-bottom: 5px;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.backtrack {
    color: #d9534f;
}

.assign {
    color: #5cb85c;
}

.try {
    color: #f0ad4e;
}