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

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
}

body {
    font-family: Arial, sans-serif;
    padding: 20px; /* Add some padding around the body */
    background-color: #f4f4f4;
    line-height: 1; /* Reset default line-height */

}

.grid {
    display: grid;
    grid-template-columns: repeat(8, 20px); /* Adjusted to match button width */
    gap: 2px; /* Adjust if needed */
    margin-bottom: 20px;
}

.grid button {
    width: 20px;
    height: 20px;
    padding: 0; /* Ensure no padding */
    border: none; /* Ensure no border */
    margin: 0; /* Ensure no margin */
}

button {
    display: inline-block; /* Add this line */
    width: 20px;
    height: 20px;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

label {
    margin-right: 10px;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin-bottom: 20px;
    width: 168px; /* 4 columns * 40px + 3 gaps * 2px */
}

.color-choice {
    width: 20px; /* Adjusted width */
    height: 20px; /* Set a fixed height */
    border: 2px solid transparent;
    cursor: pointer;
}

.color-choice.selected {
    border-color: #333;  /* This ensures the selected color remains highlighted */
}

.color-choice:hover {
    border-color: #333;  /* Change this color if you want a different highlight color */
}

/* Specific styles for Save, Load, and Undo buttons */
.action-button {
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    outline: none;
    margin: 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    width: 100px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ddd;
    text-align: center; /* Ensure text is centered */
}

/* Button hover effect for Save, Load, and Undo buttons */
.action-button:hover {
    background-color: #ddd;
    transform: translateY(-3px);  /* Slightly larger hover effect */
}

/* Button active effect for Save, Load, and Undo buttons */
.action-button:active {
    transform: translateY(0);
}

#saveButton {
    background-color: #4CAF50; /* Green */
    color: white;
}

#loadButton {
    background-color: #2196F3; /* Blue */
    color: white;
}

#undoButton {
    background-color: #FFC107; /* Amber/Yellow */
    color: white;
}

#downloadButton {
    background-color: #e91e63; /* Example: Pink color */
    color: white;
}
