:root {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --accent-color: #4CAF50;
    --secondary-color: #333;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
}

header {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--secondary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.back-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.back-link:hover {
    color: #81c784;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

button {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.1s;
}

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

button:active {
    transform: scale(0.98);
}

button.active {
    background-color: var(--accent-color);
    color: white;
}

.instructions {
    margin-left: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

canvas {
    background-color: #000;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    cursor: crosshair;
}

@media (max-width: 600px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    .instructions {
        margin-left: 0;
        text-align: center;
    }
}
