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

body {
    font-family: Arial, sans-serif;
    background-color: #e3f3e4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 items per row */
    gap: 20px;
    width: 100%;
    max-width: 800px;
}

.item {
    color: white;
    text-align: center;
    padding: 40px;
    border-radius: 20px;
    transition: transform 0.2s;
    cursor: pointer;
    font-size: 18px;
    width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; /* For positioning the inner border */
    overflow: hidden; /* Hide overflow */
}

/* Inner gradient border using ::before */
.item::before {
    content: '';
    position: absolute;
    top: 10px;   /* Adjust to create space from the top */
    left: 10px;  /* Adjust to create space from the left */
    right: 10px; /* Adjust to create space from the right */
    bottom: 10px;/* Adjust to create space from the bottom */
    border-radius: 15px; /* Match the border radius */
    border: 4px solid white; /* Transparent border to create space */
   
    z-index: 0; /* Send it to the back */
}

.item:hover {
    transform: scale(1.05);
}

/* Ensure text and icons appear above the border */
.item a, .item i {
    position: relative; /* Bring text and icons above the border */
    z-index: 1;
}

/* Icon styling */
.item i {
    font-size: 36px;
    margin-bottom: 10px;
}

/* Button inside each category */
.custom-button {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: transparent;
    color: white;
    font-size: 14px;
    border: 2px solid;
    border-image: linear-gradient(to right, #FFD700, #FFAA00) 1; /* Gold gradient for button */
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.custom-button:hover {
    background-color: #FFD700;
    color: black;
}

/* Link styling */
.item a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.item a:hover {
    text-decoration: underline;
    color: #f0f0f0;
}

/* Background colors for each category */
.item1 { background-color: #4CAF50; } /* Green */
.item2 { background-color: #2196F3; } /* Blue */
.item3 { background-color: #FF9800; } /* Orange */
.item4 { background-color: #da81b2; } /* Light Purple */
.item5 { background-color: #bc021b; } /* Dark Red */
.item6 { background-color: #ad68bb; } /* Dark Purple */
.item7 { background-color: #4CAF50; } /* Green */
.item8 { background-color: #5f889f; } /* Light Blue */
.item9 { background-color: #0b88a3; } /* Dark Blue */

/* Add Button */
#addButton {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
   
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#addButton:hover {
    background-color: #0056b3;
}

/* Media query for mobile */
@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr); /* 2 items per row on mobile */
    }

    .item {
        font-size: 16px;
        padding: 30px;
    }

    .item i {
        font-size: 30px;
    }

    .custom-button {
        font-size: 12px;
        padding: 6px 12px;
    }
}
