* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

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

label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #555;
}

button {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background-color: #0056b3;
}

#canvas {
    display: grid;
    gap: 1px;
    background-color: #ccc;
    border: 1px solid #999;
    margin: 0 auto;
}

.pixel {
    width: 20px;
    height: 20px;
    background-color: white;
    cursor: pointer;
}

.pixel.drawn {
    filter: brightness(0.8);
}

#toolToggle {
    background-color: #28a745;
}

#toolToggle.eraser {
    background-color: #dc3545;
}
#canvas.with-background {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
}

