body {
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 20px;
    width: 100%;
}

h1 {
    margin: 10px 0;
    font-size: 2.5em;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.back-link {
    text-decoration: none;
    color: #999;
    font-size: 0.9em;
    position: absolute;
    top: 20px;
    left: 20px;
}

.back-link:hover {
    color: #fff;
}

.canvas-container {
    position: relative;
    margin-bottom: 20px;
    border: 2px solid #333;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

canvas {
    background-color: #222;
    display: block;
    cursor: crosshair;
}

.instructions {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.8em;
    pointer-events: none;
}

.instructions p {
    margin: 2px 0;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    width: 200px;
}

.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    background-color: #444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #555;
}

button:active {
    background-color: #333;
}

#train-btn {
    background-color: #4CAF50;
}
#train-btn:hover {
    background-color: #45a049;
}

#auto-btn.active {
    background-color: #2196F3;
}

#clear-btn {
    background-color: #f44336;
}
#clear-btn:hover {
    background-color: #d32f2f;
}

.stats {
    display: flex;
    gap: 20px;
    font-size: 1.1em;
    font-weight: bold;
}
