.item-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background: linear-gradient(to bottom, #1abc9c);
}


.creative-table {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Adjust the number of columns as needed */
    gap: 16px;
    background: linear-gradient(to bottom, #1abc9c, #16a085);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
	position: relative;  /* Added this line to set a reference for absolute positioning */
}

.creative-table::before {
    content: attr(data-count);  /* Will display the count dynamically */
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
	animation: shimmer 2s infinite;
}

.item-box {
    width: 150px;
    height: 150px;
    position: relative;
    margin: 15px;
    border: 3px double #2980b9;  /* Double border for a unique touch */
    border-radius: 50%;  /* Circular shape */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);  /* Darker shadow for a 3D look */
    cursor: pointer;
    text-align: center;
    background: radial-gradient(circle at top left, #2ecc71, #3498db);  /* Radial gradient */
    transition: all .5s cubic-bezier(.68,-.55,.27,1.55);  /* Cubic Bezier transition for a bounce effect */
	animation: popIn 0.7s ease-out;

}

.item-box:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-color: #27ae60;  /* Change border color on hover */
}

.item-name {
    background: linear-gradient(45deg, rgba(0, 128, 128, 0.7), rgba(0, 255, 255, 0.7));
    padding: 10px;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform .2s;
    animation: bounceIn 1s ease;
    white-space: nowrap;  /* Keep content on a single line */
    overflow: hidden;     /* Hide text that goes beyond the element */
    text-overflow: ellipsis;  /* Show ellipsis when text overflows */
    max-width: 150px;  /* Set maximum width */
}

/* Optional: Add a hover effect */
.item-name:hover {
    transform: scale(1.1);
}

.item-image {
    max-width: 80%;
    max-height: 80%;
    margin: auto;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
}

.info-panel {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: rgba(46, 204, 113, 0.9);
}

.points-indicator {
    float: left;
    padding: 5px;
    font-size: 18px;
    font-weight: bold;
    color: #ecf0f1;
    background-color: rgba(0,0,0,0.7);
    border: 2px dashed #00ff00; /* Dashed border */
    border-radius: 12px;
    box-shadow: 0 0 10px #00ff00; /* Text Glow */
    transition: all .3s ease-in-out;
	animation: popIn 0.7s ease-out;
}

.points-indicator:hover {
    background-color: rgba(0,0,0,0.9);
    box-shadow: 0 0 20px #ff00ff;
    transform: rotate(360deg); /* Full rotation */
}

.question-mark {
    float: right;
    padding: 5px;
    font-size: 16px;
    font-weight: bold;
    position: relative;
    color: #fff;
    background-color: rgba(0, 128, 128, 0.7);
    border-radius: 50%; /* Circular shape */
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7); /* Glow effect */
    cursor: pointer;
    animation: bounce 1.5s infinite; /* Bounce animation */
}

.question-mark[data-tooltip]:hover:after {
    content: attr(data-tooltip);
	z-index: 1000;  /* a higher value to ensure it appears above all other boxes */
    position: fixed; /* or absolute depending on your layout */
    right: 0;
    top: -30px;
	bottom: 12px;
    background: linear-gradient(to bottom right, #ff00ff, #00ffff);
    color: #fff;
    padding: 6px 12px;
    white-space: nowrap; /* Wraps text and respects new lines */
	// max-width: none;  /* No max width */
    border-radius: 12px;
    opacity: 0.95;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transform: scale(0);
    animation: popIn 0.3s forwards ease-out; 
	    animation: typing 2s steps(40, end), popIn 0.3s forwards ease-out;
    text-shadow: 0 0 20px #ff00ff; /* Glow */
    transform: perspective(600px) rotateX(20deg); /* 3D */
    letter-spacing: 2px; /* Spacing */
}

@keyframes shimmer {
    0% { color: #fff; }
    50% { color: #ccc; }
    100% { color: #fff; }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateBox {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes moveRightLeft {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Optional: Add an entrance animation */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
