body {
    font-family: "Poppins", sans-serif;
    background: radial-gradient(circle at top, #d8d8d8, #aaa);
    display: flex;
    flex-direction: column; /* Stack content vertically */
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Allow footer space */
    margin: 0;
}

/* Etch-A-Sketch frame */
#etch-a-sketch {
    background: linear-gradient(145deg, #c91c1c, #a10a0a);
    border: 8px solid #700808;
    border-radius: 30px;
    padding: 20px 30px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 5px 10px rgba(255,255,255,0.2);
    color: white;
    text-align: center;
    margin-bottom: 30px; /* Space for footer */
}

h1 {
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 0 3px 5px rgba(0,0,0,0.4);
}

#top {
    margin-bottom: 15px;
}

#gridSize {
    padding: 8px;
    width: 200px;
    border: none;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
}

#numOfSquares {
    background-color: #ffd700;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

#numOfSquares:hover {
    background-color: #ffe347;
}

#canvas {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#container {
    display: flex;
    flex-wrap: wrap;
    width: 560px;
    background: white;
    border: 4px inset #999;
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.3);
}

.square {
    width: 35px;
    height: 35px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

#bottom {
    margin-top: 10px;
}

#color-buttons {
    margin-bottom: 15px;
}

#colors {
    font-weight: bold;
    margin-right: 10px;
}

button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin: 3px;
    font-weight: bold;
    transition: all 0.2s ease;
}

#blackColor { background: #222; color: white; }
#redColor { background: #e74c3c; color: white; }
#greenColor { background: #27ae60; color: white; }
#blueColor { background: #2980b9; color: white; }
#randomColor { background: #9b59b6; color: white; }
#erase { background: #bdc3c7; color: #222; }
#reset button, #reset {
    background: #ff4757;
    color: white;
}

button:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* ===== Footer Styling ===== */
footer {
    background: #700808;
    color: #fff;
    text-align: center;
    padding: 15px 10px;
    border-top: 3px solid #a10a0a;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -3px 8px rgba(0,0,0,0.3);
    font-size: 0.95rem;
    width: 100%;
    max-width: 700px;
}

footer a {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}
