#body {
    margin: 0;
    background: linear-gradient(135deg, #f0e7d8, #d9cbb8);
}

#canvas {
    display: block;
    margin-left: 220px;
}

#html, #body{
    margin: 0;
    padding: 0;
}

#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 220px;
    height: 100vh;
    padding: 15px;
    padding-top: 25px;
    overflow-y: auto;
    font-family: Times;
    color: #d9cbb8;
    gap: 20px;
    border-right: 2px solid #ccc;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    background: #A07856;
    box-sizing: border-box;
    overflow-y: auto;
}

.control {
    background: #612e15;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.control:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.control label {
    font-weight: bold;
    font-family: times;
}

.control input[type="range"] {
    width: 90%;
}

.control span {
    font-size: 14px;
    color: #f5e6d3;
    font-family: sans-serif;
}

input[type="range"] {
    accent-color: #ff7b00;
}

#colorPreview {
    transition: background 0.15s
}

#title {
    text-align: center;
    font-family: times;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px 0;
    letter-spacing: 0.5px;
}

#canvas {
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.15));
}

#toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#toolbar button, .control button {
    background: #2b140a;
    color: #f5e6d3;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: .2s;
}

#toolbar button:hover, .control button:hover {
    background: #3d1d10;
    transform: scale(1.05);
}

#toolbar button.active {
    background: #ff7b00;
    color: white;
    box-shadow: 0 0 10px rgba(255, 125, 0, .5);
}

#gridToggle {
    width: 100%;
    background: #2b140a;
    color: #f5e6d3;
    border: 1px solid #5a3020;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: .2s;
    font-size: 14px;
}

#gridToggle:hover {
    background: #3d1d10;
}

#gridToggle.grid-active {
    background: #1a4a2e;
    color: #88ffbb;
    border-color: #44cc77;
    box-shadow: 0 0 8px rgba(68, 204, 119, .4);
}