.gmg-trending-widget {
    --gmg-accent: var(--gmg-main-primary, #7b5cff);
    --gmg-accent-2: var(--gmg-main-secondary, #00e5ff);
    --gmg-price: var(--gmg-main-success, #2ee6a8);
    --gmg-badge: var(--gmg-main-danger, #ff4d6d);
    --gmg-card-bg: var(--gmg-main-bg, #0a0e1a);;
}

.gmg-trending-widget * {
    box-sizing: border-box;
}

.gmg-trending-section {
    padding: 60px 0;
}

.gmg-trending-header {
    margin-bottom: 32px;
}

.gmg-trending-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--gmg-main-text, #ffffff);
}

.gmg-trending-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 0 12px color-mix(in srgb, var(--gmg-accent) 60%, transparent));
}

.gmg-trend-games-grid {
    --gmg-grid-columns: 5;
    display: grid;
    grid-template-columns: repeat(var(--gmg-grid-columns), 1fr);
    gap: 24px;
}

.gmg-trend-game-card {
    position: relative;
    background: var(--gmg-card-bg);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border:1px solid  var(--gmg-main-border , rgba(255, 255, 255, 0.04) );
    transition: all 350ms cubic-bezier(0.2, 0.7, 0.3, 1);
    animation: gmg-card-in 500ms ease both;
}

.gmg-trend-games-grid .gmg-trend-game-card:nth-child(1) {
    animation-delay: 0ms;
}

.gmg-trend-games-grid .gmg-trend-game-card:nth-child(2) {
    animation-delay: 60ms;
}

.gmg-trend-games-grid .gmg-trend-game-card:nth-child(3) {
    animation-delay: 120ms;
}

.gmg-trend-games-grid .gmg-trend-game-card:nth-child(4) {
    animation-delay: 180ms;
}

.gmg-trend-games-grid .gmg-trend-game-card:nth-child(5) {
    animation-delay: 240ms;
}

.gmg-trend-games-grid .gmg-trend-game-card:nth-child(n+6) {
    animation-delay: 280ms;
}

@keyframes gmg-card-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gmg-trend-game-card:hover {
    transform: translateY(-8px);
    border-color: var(--gmg-accent);
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px color-mix(in srgb, var(--gmg-accent) 40%, transparent);
}

.gmg-trend-game-card.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.gmg-trending-widget.gmg-no-featured-span .gmg-trend-game-card.featured {
    grid-column: auto;
    grid-row: auto;
}

.gmg-trend-game-image {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: color-mix(in srgb, var(--gmg-card-bg) 60%, #fff 6%);
}

.gmg-trend-game-card.featured .gmg-trend-game-image {
    aspect-ratio: 2 / 3;
}

.gmg-trend-game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.gmg-trend-game-card:hover .gmg-trend-game-image img {
    transform: scale(1.06);
}

.gmg-trend-game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 16, 0.68);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 300ms ease;
}

.gmg-trend-game-card:hover .gmg-trend-game-overlay {
    opacity: 1;
}

.gmg-btn-icon {
    all: unset;
    width: 60px;
    height: 60px;
    background: var(--gmg-accent);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 280ms cubic-bezier(0.2, 0.7, 0.3, 1);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--gmg-accent) 55%, transparent);
    transform: scale(0.8);
}

.gmg-trend-game-card:hover .gmg-btn-icon {
    transform: scale(1);
    font-size: 12px;
}

.gmg-btn-icon:hover {
    transform: scale(1.1);
    background: var(--gmg-accent-2);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--gmg-accent-2) 60%, transparent);
}

.gmg-btn-icon svg {
    margin-inline-start: 2px;
}

.gmg-trend-game-badge {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    padding: 6px 14px;
    background: var(--gmg-badge);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 12px;
    z-index: 1;
    box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--gmg-badge) 70%, transparent);
}

.gmg-trend-game-info {
    padding: 16px;
}

.gmg-trend-game-card.featured .gmg-trend-game-info {
    padding: 24px;
}

.gmg-trend-game-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gmg-main-text, #ffffff);
    margin: 0 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gmg-trend-game-card.featured .gmg-trend-game-title {
    font-size: 1.5rem;
    white-space: normal;
}

.gmg-trend-game-subtitle {
    font-size: 0.875rem;
    color: #9aa3b2;
    line-height: 1.6;
    margin: 0 0 16px;
}

.gmg-trend-game-price {
      display: flex;
    align-items: center;
    max-width: 100%;
    gap: 8px;
    font-weight: 700;
    color: var(--gmg-main-text, #ffffff);
    flex-direction: row;
    flex-wrap: wrap;
}

.gmg-trend-game-price del {
    text-decoration: line-through;
    opacity: 0.5;
    font-size: 0.85rem;
    font-weight: 400;
    margin-inline-end: 4px;
}

.gmg-trend-game-price ins {
    text-decoration: none;
    font-size: 1.1rem;
    color: var(--gmg-price);
}

.gmg-btn-download {
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, var(--gmg-accent), var(--gmg-accent-2));
    background-size: 160% 160%;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.2, 0.7, 0.3, 1);
    animation: gmg-btn-gradient-shift 5s ease infinite;
}

@keyframes gmg-btn-gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.gmg-btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px -6px color-mix(in srgb, var(--gmg-accent) 60%, transparent);
}

.gmg-trending-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transform: scale(0);
    pointer-events: none;
    animation: gmg-trending-ripple-anim 600ms ease-out;
}

@keyframes gmg-trending-ripple-anim {
    to {
        transform: scale(2.6);
        opacity: 0;
    }
}


@media (prefers-reduced-motion: reduce) {

    .gmg-trending-widget .gmg-trend-game-card.gmg-trend-game-card.gmg-trend-game-card,
    .gmg-trending-widget .gmg-btn-download.gmg-btn-download.gmg-btn-download {
        animation: none;
    }
}

@media (max-width: 992px) {
    .gmg-trend-games-grid {
        --gmg-grid-columns: 3;
    }

    .gmg-trend-game-card.featured {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gmg-trend-game-card.featured .gmg-trend-game-image {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 600px) {
    .gmg-trending-section {
        padding: 40px 0;
    }

    .gmg-trending-title {
        font-size: 1.5rem;
    }

    .gmg-trend-games-grid {
        --gmg-grid-columns: 2;
        gap: 14px;
    }

    .gmg-trend-game-card.featured {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gmg-trend-game-card.featured .gmg-trend-game-image {
        aspect-ratio: 16 / 9;
    }

    .gmg-trend-game-card.featured .gmg-trend-game-info {
        padding: 16px;
    }

    .gmg-trend-game-card.featured .gmg-trend-game-title {
        font-size: 1.15rem;
    }

    .gmg-btn-icon {
        width: 46px;
        height: 46px;
    }

    .gmg-btn-icon svg {
        width: 18px;
        height: 18px;
    }
}
