/* Custom styles for post boxes */
.post-boxes-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    width: 80%; /* Set to 80% of the screen width */
    margin: 0 auto; /* Center the grid on the page */
}

.post-box {
    width: 100%; /* Each box takes up the full space of its grid column */
    padding-top: 100%; /* Maintain square aspect ratio */
    position: relative;
    display: flex; /* Use flex to center content */
    align-items: center; /* Center items vertically */
    justify-content: center; /* Center items horizontally */
    color: #fff; /* Text color */
    font-weight: bold; /* Make the text bold */
}

.post-box.green {
    background-color: green; /* Color for matched results */
}

.post-box.gray {
    background-color: gray; /* Color for non-matched results */
}

.post-box input[type="checkbox"] {
    position: absolute;
    top: 5px;
    right: 5px;
}

/* Pagination styling */
.pagination {
    text-align: center; /* Center the pagination links */
    margin: 20px 0; /* Margin for spacing */
}

.pagination a,
.pagination span {
    display: inline-block; /* Inline-block for links */
    padding: 5px 10px; /* Padding for clickable area */
    margin: 0 2px; /* Small margin between links */
    border: 1px solid #ccc; /* Border style */
    text-decoration: none; /* Remove underline */
    color: #333; /* Text color */
}

.pagination a:hover {
    background-color: #eee; /* Change background on hover */
}

/* Button styles */
.post-box-controls {
    margin-bottom: 20px;
    text-align: center;
}

.post-box-controls button {
    margin: 0 5px;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.post-box-controls button:hover {
    background-color: #005177;
}
.spinner {
    display: inline-block;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.success {
    color: green;
    font-weight: bold;
}

.error {
    color: red;
    font-weight: bold;
}
