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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.center-container {
    display: flex;
    width: 560px;
    height: 560px;
    margin: 20px auto;
    flex-wrap: wrap;
    flex-shrink: 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.black {
    display: flex;
    box-sizing: border-box;
}

.square {
    transition: background-color 0.05s ease;
    cursor: crosshair;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

button, .color-picker-container {
    padding: 10px 16px;
    margin-bottom: 24px;
    border: none;
    border-radius: 6px;
    background-color: #4a4a4a;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover, .color-picker-container:hover {
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.color-picker-container {
    display: flex;
    align-items: center;
}

label {
    cursor: pointer;
}

#color-picker {
    width: 44px;
    height: 24px;
    padding: 2px;
    border: none;
    margin: 0 6px;
    cursor: pointer;
    background: none;
    transition: all 0.2s ease;
}

#toggle-darken-button.active {
    background-color: #6b6b6b;
    color: #ccc;
}

button.active {
    background-color: #6b6b6b;
    color: #ccc;
}

#toggle-darken-button.active:hover {
    background-color: #666;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive design */
@media (max-width: 600px) {
    .center-container {
        width: calc(100% - 20px);
        height: calc(100% - 20px);
        aspect-ratio: 1;
    }
    
    .button-container {
        gap: 8px;
    }
    
    button {
        padding: 8px 12px;
        font-size: 12px;
        margin-bottom: 16px;
    }

    .color-picker-container {
        padding: 8px 12px;
        font-size: 12px;
        margin-bottom: 16px;
}
    
    #color-picker {
        width: 44px;
        height: 22px;
    }
}