/* General styles */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F2F4F5; /* Updated body background */
    text-align: center;
}

/* Header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    background-color: #DEE1E3; /* Updated header background */
    height: 40px;
}

.logo {
    height: 17px;
}

.header-right {
    display: flex;
    align-items: center;
}

.username {
    font-size: 14px;
    margin-right: 10px;
}

.counter-box {
    display: flex;
    align-items: center;
    background-color: transparent;
    border-radius: 15px;
    padding: 0 8px;
    height: 28px;
}

.robux-image {
    height: 28px;
    margin-right: 8px;
}

.counter {
    font-size: 16px;
    font-weight: 600;
}

.claim-button {
    background-color: #28a745; /* Green color, always */
    color: white;
    border: none;
    border-radius: 15px;
    height: 28px;
    padding: 0 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 28px;
    cursor: pointer;
    margin-left: 10px;
}

.claim-button:hover {
    background-color: #218838;
}

/* Banner styles */
.banner {
    position: relative;
    width: 100%;
    height: 100px;
    margin-top: 20px;
    background-image: url('banner.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 1; /* Ensure banner is behind the modal */
}

.banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(39, 39, 46, 0.5);
    z-index: 1;
}

.banner h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    z-index: 2;
}

.banner p {
    margin: 5px 0 0;
    font-size: 12px;
    font-weight: 400;
    z-index: 2;
}

/* Input container styles */
.input-container {
    margin: 20px;
    margin-bottom: 0px;
}

.input-container h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.input-sync {
    display: flex;
    align-items: center;
}

input {
    width: 300px;
    height: 38px;
    padding: 0 10px;
    font-size: 16px;
    border: none; /* Remove border */
    background-color: #DEE1E3; /* Match background with header */
    border-radius: 15px;
    margin-right: 10px;
}

input:focus {
    outline: none;
}

.sync-button {
    background-color: #FED95F;
    color: #000;
    border: none;
    border-radius: 15px;
    height: 38px;
    padding: 0 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.sync-button:hover {
    background-color: #f8c531;
}

/* Error message styles */
.error-message {
    color: red;
    font-size: 14px;
    margin-top: 10px;
}

/* Synced message styles */
.synced-message {
    display: none;
    background-color: #FED95F;
    color: #000;
    padding: 10px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2; /* Ensure modal is above everything else */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 15px;
    text-align: center;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.modal p {
    font-size: 14px;
    color: #333;
}

/* Grid Container */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Three equal columns */
    gap: 0px; /* Remove gaps between grid items */
    padding: 20px;
    padding-top: 0px;
}

/* Title Cells */
.grid-item.title {
    font-size: 14px;
    font-weight: 500; /* Less bold */
    text-align: left; /* Align title text to the left */
    padding-bottom: 12px; /* Less padding to bring titles closer to the line */
}

/* Divider Line */
.grid-item.divider {
    grid-column: 1 / -1; /* Span across all columns */
    border-bottom: 1px solid #b0b0b0; /* Slightly darker gray line */
    margin-bottom: 10px;
}

/* Survey, Reward, and Action Cells */
.grid-item {
    font-size: 16px; /* Increase text size to 16px */
    font-weight: 600; /* Bold text for cells */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align all text to the left */
    padding: 12px 5px; /* Increase padding to make cells taller */
    border-bottom: 1px solid #b0b0b0; /* Divider for each row */
    height: 56px; /* Set a fixed height for the cells */
}

/* Reward Item Specifics */
.grid-item.reward-item {
    justify-content: flex-start; /* Align content to the left */
}

.reward-image {
    width: 22px;
    height: 24px;
    margin-right: 8px;
}

/* Action Button */
.survey-button {
    background-color: #393B3D;
    color: white;
    border: none;
    border-radius: 5px;
    height: 80%; /* Make the button take the full height of the cell */
    width: 100%; /* Full width within its cell */
    font-size: 16px; /* Increase text size to 16px */
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.survey-button:hover {
    background-color: #2e2f30; /* Slightly darker on hover */
}

.grid-item.survey-item .survey-content {
    display: flex;
    flex-direction: column; /* Stack the title and duration vertically */
    justify-content: center; /* Vertically center the content within the cell */
    height: 100%; /* Ensure the content takes the full height of the cell */
}

.grid-item.survey-item .task-title {
    font-size: 16px; /* Main task title */
    font-weight: 600;
    text-align: left; /* Align text to the left for consistency */
    margin: 0; /* Remove margins */
}

.grid-item.survey-item .task-duration {
    font-size: 10px; /* Smaller font size for duration */
    color: #666; /* Slightly gray color */
    text-align: left; /* Align text to the left for consistency */
    margin-top: 1px; /* Small margin above the duration */
    margin-bottom: 0; /* Remove any bottom margin */
    font-weight: 500;
}

.disabled {
    opacity: 0.5; /* Reduce opacity to indicate it's disabled */
    cursor: not-allowed; /* Change cursor to indicate it's not clickable */
}


/* Loader styles */
.loader {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 24px;
    height: 24px;
    animation: spin 2s linear infinite;
    display: none;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}