
/* General Body Styles */
body {
    background-color: #ffffff; /* White background */
    color: #333333; /* Dark grey text */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 24px 16px; /* Add padding to the top */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to the top */
    align-items: center;
    min-height: 100svh;
    box-sizing: border-box;
}

/* Main Container */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Title */
h1 {
    color: #333333; /* Dark grey text */
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    margin: 0;
}

/* Grid Container */
#grid-container {
    display: grid;
    grid-template-columns: repeat(100, 1fr);
    grid-template-rows: repeat(100, 1fr);
    width: min(1000px, 100%);
    max-width: calc(100vw - 32px);
    aspect-ratio: 1 / 1;
    border: 3px solid #cccccc; /* Light grey border */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    touch-action: none;
}

/* Grid Cell */
.grid-cell {
    background-color: #f0f0f0; /* Very light grey */
    border: 1px solid #e0e0e0; /* Lighter grey border */
}

/* Color Palette */
#color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding: 10px 12px;
    background-color: #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.color-swatch {
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

@media (max-width: 600px) {
    body {
        padding: 18px 12px;
    }

    #grid-container {
        border-width: 2px;
    }
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.selected {
    border-color: #333333;
    transform: scale(1.1);
}
