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

body {
    font-family: 'Exo 2', sans-serif;
    background-color: #800080;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    transform: scale(0.9); /* Shrink the entire page to 90% */
}

header {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 10px;
    padding: 10px;
    color: black;
    margin-bottom: 20px;
    justify-content: center;
    align-items: center;
    border: 3px solid #000;
}

header h1 {
    font-size: 1.5rem;
    font-weight: bolder;
    margin-bottom: 0;
    padding-bottom: 10px;
}

header p {
    border-top: 2px solid #000;
    padding-top: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin-top: 0;
    width: 80%;
}

.square {
    background-color: #fff;
    margin: 0;
    padding: 0;
    flex-grow: 1;
    transition: background-color 0.3s, transform 0.3s;
}

.color-control {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

button, input[type="color"] {
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
    border: 2px solid #ff7e5f;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    padding: 10px 30px;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    position: relative; /* For pseudo-elements */
    overflow: hidden; /* Hide pseudo-elements overflow */
}

button::before, button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s;
}

button::before {
    border-radius: 50%;
}

button:hover::before, button:hover::after {
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: rgba(255, 255, 255, 0.2);
}

button:hover {
    background: linear-gradient(135deg, #feb47b, #ff7e5f); /* Reverse gradient */
    transform: scale(1.1); /* Slightly larger on hover */
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3); /* Larger shadow on hover */
}

input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ff7e5f; /* Match button border */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

input[type="color"]:hover {
    transform: scale(1.1); /* Slightly larger on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Larger shadow on hover */
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.board-and-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#board {
    display: flex;
    flex-wrap: wrap;
    border: 3px solid #000;
    height: 768px;
    width: 768px;
    border-radius: 10px;
    overflow: hidden;
    align-content: start;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-right: 20px;
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    align-content: center;
    margin-top: 10px;
    border-radius: 10px;
    background-color: #fff;
    color: #000;
    padding: 10px;
    gap: 10px;
    border: 2px solid #000;
    font-size: 1rem;
    font-weight: bold;
}
