/* Global styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    margin: 0;
    padding: 0;
}

.container {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    justify-content: space-between;
    max-width: 800px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    overflow: hidden; /* Hide any content that overflows */
}

.left, .right {
    flex-basis: 48%; /* Ensure items take up less space to prevent overflow */
    margin-bottom: 20px; /* Add spacing between items */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

.color-box {
    background-color: #f0f0f0;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    position: relative;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

.color-box span {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    display: block; /* Ensure span takes full width */
}

.control-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 4px;
    outline: none;
}

button:disabled {
    background-color: red;
    cursor: not-allowed; /* Optional: Change cursor style for disabled state */
}

button:disabled:hover {
    color: black;
}

button:hover {
    background-color: #45a049;
}

.button-container {
    text-align: center;
    margin-top: 20px;
}



/* Responsive adjustments */
@media (max-width: 768px) {
    .left, .right {
        flex-basis: 100%; /* Full width on smaller screens */
    }

    .color-box {
        width: calc(100% - 20px); /* Full width minus margins */
        margin-right: 0; /* Reset margin for full width */
    }

    .control-buttons {
        position: static; /* Revert position for small screens */
        margin-top: 10px; /* Add space between buttons */
        text-align: right; /* Align buttons to the right */
    }

    .color-box span {
        margin-bottom: 10px; /* Add space between text and buttons */
    }
}
