/* ========================================
   QuizMaster - Content Item Styles
   ======================================== */

/* Quiz Card Grid */
.detail-list {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

/* Content Item Card */
.content-item {
    position: relative;
    display: block;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    aspect-ratio: 16 / 10;
}

.content-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl), 0 20px 40px -12px rgba(99, 102, 241, 0.25);
}

/* Overlay Effect */
.content-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 30%,
        rgba(15, 23, 42, 0.6) 70%,
        rgba(15, 23, 42, 0.85) 100%
    );
    z-index: 1;
    transition: all var(--transition);
}

.content-item:hover .overlay {
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 20%,
        rgba(99, 102, 241, 0.7) 70%,
        rgba(99, 102, 241, 0.9) 100%
    );
}

/* Image Container */
.content-item .img-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.content-item .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.content-item:hover .img-wrap img {
    transform: scale(1.1);
}

/* Item Badge */
.content-item .item-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    box-shadow: var(--shadow-md);
}

.content-item .item-badge svg {
    width: 14px;
    height: 14px;
}

.content-item .item-badge.trending {
    background: var(--gradient-secondary);
    color: var(--white);
}

.content-item .item-badge.trending svg {
    fill: currentColor;
    stroke: none;
}

/* Title Section */
.content-item .title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.content-item .item-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-light);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition);
}

.content-item:hover .item-category {
    opacity: 1;
    transform: translateY(0);
}

.content-item .item-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Arrow Icon */
.content-item .svg-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--white);
    border-radius: var(--radius-full);
    margin-top: 0.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition);
}

.content-item:hover .svg-wrap {
    opacity: 1;
    transform: translateX(0);
}

.content-item .svg-wrap svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Responsive Grid */
@media (min-width: 640px) {
    .detail-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-item .item-name {
        font-size: 1.25rem;
    }

    .content-item .title {
        padding: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .detail-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .content-item {
        aspect-ratio: 4 / 3;
    }

    .content-item .item-name {
        font-size: 1.375rem;
    }
}

@media (min-width: 1280px) {
    .detail-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Loading State */
.content-item.loading .img-wrap {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Empty State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    color: var(--gray-300);
}

.no-results h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 0.9375rem;
}
