/* ==========================================================================
   GameNexa Dynamic 3D Carousel (Original Source Preserved + Full Responsive Support)
   ========================================================================== */

.gamenexa-stats,
.gamenexa-stats * {
    box-sizing: border-box;
}

.gamenexa-stats {
    --gamenexa-fg: #f7f9ff;
    --gamenexa-hover-scale: 1.055;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    padding: 42px 0 36px;
    background: radial-gradient(ellipse 65% 45% at 50% 78%, rgba(24, 54, 108, .16), transparent 75%), #060a13;
    color: var(--gamenexa-fg);
    font-family: var(--font-primary);
}

.gamenexa-stats::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 80%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 80%, transparent);
}

.gamenexa-stats .gamenexa-container {
    position: relative;
    z-index: 2;
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}

.gamenexa-stats .gamenexa-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.gamenexa-stats .gamenexa-instruction {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8593a9;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .18em;
}

.gamenexa-stats .gamenexa-pulse {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #78a7ff;
    box-shadow: 0 0 0 5px rgba(91, 144, 250, .12);
}

.gamenexa-stats .gamenexa-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.gamenexa-stats .gamenexa-arrow {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(180, 201, 241, .18);
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    color: #e6edfa;
    font: 20px/1 inherit;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s;
}

.gamenexa-stats .gamenexa-arrow:hover {
    background: rgba(111, 156, 255, .17);
    border-color: rgba(145, 180, 255, .55);
    transform: translateY(-2px);
}

.gamenexa-stats .gamenexa-arrow:focus-visible,
.gamenexa-stats .gamenexa-viewport:focus-visible,
.gamenexa-stats .gamenexa-card-link:focus-visible,
.gamenexa-stats .gamenexa-dot:focus-visible {
    outline: 2px solid #88b6ff;
    outline-offset: 3px;
}

.gamenexa-stats .gamenexa-viewport {
    position: relative;
    width: 100%;
    height: 480px;
    perspective: 1900px;
    perspective-origin: 50% 50%;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}

.gamenexa-stats .gamenexa-viewport.gamenexa-is-dragging {
    cursor: grabbing;
}

.gamenexa-stats .gamenexa-cylinder {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    will-change: transform;
}

.gamenexa-stats .gamenexa-card {
    position: absolute;
    overflow: hidden;
    border: 1px solid rgba(190, 210, 255, .17);
    border-radius: 22px;
    background: linear-gradient(145deg, #171d2b, #090c15);
    box-shadow: 0 28px 65px rgba(0, 0, 0, .46), 0 0 22px rgba(26, 61, 120, .07);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    transition: opacity .35s ease, filter .35s ease, border-color .3s ease;
}

.gamenexa-stats .gamenexa-card.gamenexa-card-front {
    border-color: rgba(164, 193, 255, .52);
    box-shadow: 0 30px 72px rgba(0, 0, 0, .56), 0 0 32px rgba(79, 132, 255, .14);
}

.gamenexa-stats .gamenexa-card-link {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
    border-radius: inherit;
    color: #fff;
    text-decoration: none !important;
    -webkit-user-drag: none;
}

.gamenexa-stats .gamenexa-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .65s cubic-bezier(.2, .75, .2, 1), filter .5s ease;
    pointer-events: none;
}

.gamenexa-stats .gamenexa-card-link:hover .gamenexa-card-image,
.gamenexa-stats .gamenexa-card-link:focus-visible .gamenexa-card-image {
    transform: scale(var(--gamenexa-hover-scale, 1.055));
    filter: brightness(1.08);
}

.gamenexa-stats .gamenexa-card-overlay {
    position: absolute;
    inset: auto 0 0;
    min-height: 42%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 26px 22px 22px;
    background: linear-gradient(0deg, rgba(4, 8, 19, .96), rgba(4, 8, 19, .58) 58%, transparent);
    pointer-events: none;
}

.gamenexa-stats .gamenexa-card-title {
    margin: 0;
    width: 100%;
    color: #fff;
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.025em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
    transition: color .25s ease, transform .25s ease;
}

.gamenexa-stats .gamenexa-card-desc {
    margin: 6px 0 0;
    width: 100%;
    color: rgba(230, 237, 250, .78);
    font-size: clamp(12px, 1.1vw, 14px);
    font-weight: 450;
    line-height: 1.4;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}

.gamenexa-stats .gamenexa-card-link:hover .gamenexa-card-title,
.gamenexa-stats .gamenexa-card-link:focus-visible .gamenexa-card-title {
    color: var(--gamenexa-accent, #88b6ff);
}

.gamenexa-stats .gamenexa-card-overlay::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gamenexa-accent, #88b6ff), transparent 85%);
}

.gamenexa-stats .gamenexa-card-image.gamenexa-image-failed {
    object-fit: contain;
    padding: 24%;
    background: radial-gradient(circle at center, var(--gamenexa-accent, #273c66), #0a1020 75%);
}

/* Navigation Dots */
.gamenexa-stats .gamenexa-dots {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px 16px;
}

.gamenexa-stats .gamenexa-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 999px;
    border: none;
    background: rgba(180, 201, 241, .28);
    cursor: pointer;
    transition: width .25s ease, background-color .25s ease, transform .2s ease;
}

.gamenexa-stats .gamenexa-dot:hover {
    background: rgba(180, 201, 241, .55);
}

.gamenexa-stats .gamenexa-dot.is-active {
    width: 24px;
    background: #88b6ff;
}

/* Fullscreen Mode: Responsive across Desktop, Tablet, and Mobile without 100vw scrollbar overflow */
.gamenexa-stats.gamenexa-fullscreen {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse 52% 38% at 50% 68%, rgba(38, 75, 146, .19), transparent 82%), #060a13;
}

@supports (width: 100cqw) {
    .gamenexa-stats.gamenexa-fullscreen {
        width: 100vw;
        width: 100dvw;
        margin-left: calc(50% - 50vw);
        margin-left: calc(50% - 50dvw);
    }
}

.gamenexa-fullscreen .gamenexa-container {
    flex: none;
    width: min(1440px, calc(100% - 40px));
    padding-top: clamp(12px, 3vh, 36px);
}

.gamenexa-fullscreen .gamenexa-viewport {
    flex: 1 1 auto;
    min-height: 360px;
    height: calc(100vh - 96px);
    height: calc(100dvh - 96px);
    overflow: hidden;
    perspective-origin: 50% 50%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.gamenexa-fullscreen .gamenexa-card {
    border-radius: clamp(14px, 1.7vw, 24px);
}

.gamenexa-fullscreen .gamenexa-card-overlay {
    padding: clamp(16px, 2.4vw, 30px);
}

.gamenexa-fullscreen .gamenexa-card-title {
    font-size: clamp(19px, 2.25vw, 32px);
    letter-spacing: -.035em;
}

.gamenexa-fullscreen .gamenexa-toolbar {
    padding: 0 4px;
}

.gamenexa-fullscreen .gamenexa-arrow {
    width: clamp(38px, 4vw, 48px);
    height: clamp(38px, 4vw, 48px);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Tablet Breakpoint (768px - 1024px) */
@media (max-width: 1024px) {
    .gamenexa-stats .gamenexa-viewport {
        height: 420px;
        perspective: 1550px;
    }
    .gamenexa-fullscreen .gamenexa-viewport {
        min-height: 320px;
        height: calc(100vh - 84px);
        height: calc(100dvh - 84px);
    }
    .gamenexa-stats .gamenexa-card {
        border-radius: 20px;
    }
    .gamenexa-stats .gamenexa-card-overlay {
        padding: 22px 18px 18px;
    }
}

/* Mobile Breakpoint (<= 767px) */
@media (max-width: 767px) {
    .gamenexa-stats {
        padding: 28px 0 24px;
    }
    .gamenexa-stats .gamenexa-container {
        width: calc(100% - 32px);
    }
    .gamenexa-stats .gamenexa-viewport {
        height: 340px;
        perspective: 1200px;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .gamenexa-stats.gamenexa-fullscreen {
        min-height: clamp(420px, 82dvh, 680px);
        height: clamp(420px, 82dvh, 680px);
    }
    .gamenexa-fullscreen .gamenexa-container {
        width: calc(100% - 24px);
        padding-top: 14px;
    }
    .gamenexa-fullscreen .gamenexa-viewport {
        min-height: 280px;
        height: calc(100% - 68px);
        -webkit-mask-image: none;
        mask-image: none;
    }
    .gamenexa-stats .gamenexa-card,
    .gamenexa-fullscreen .gamenexa-card {
        border-radius: 17px;
    }
    .gamenexa-stats .gamenexa-card-overlay,
    .gamenexa-fullscreen .gamenexa-card-overlay {
        min-height: 38%;
        padding: 16px 14px;
    }
    .gamenexa-stats .gamenexa-card-title,
    .gamenexa-fullscreen .gamenexa-card-title {
        font-size: clamp(17px, 5vw, 22px);
    }
    .gamenexa-stats .gamenexa-card-desc {
        font-size: 12px;
        margin-top: 4px;
    }
    .gamenexa-stats .gamenexa-arrow,
    .gamenexa-fullscreen .gamenexa-arrow {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}

/* Small Mobile Breakpoint (<= 480px) */
@media (max-width: 480px) {
    .gamenexa-stats .gamenexa-container,
    .gamenexa-fullscreen .gamenexa-container {
        width: calc(100% - 20px);
    }
    .gamenexa-stats .gamenexa-instruction {
        font-size: 9px;
        letter-spacing: .14em;
        gap: 7px;
    }
    .gamenexa-stats .gamenexa-viewport {
        height: 300px;
    }
    .gamenexa-stats.gamenexa-fullscreen {
        min-height: clamp(380px, 76dvh, 560px);
        height: clamp(380px, 76dvh, 560px);
    }
    .gamenexa-stats .gamenexa-card-overlay,
    .gamenexa-fullscreen .gamenexa-card-overlay {
        padding: 14px 12px;
    }
    .gamenexa-stats .gamenexa-card-title,
    .gamenexa-fullscreen .gamenexa-card-title {
        font-size: clamp(15px, 4.6vw, 19px);
    }
}

/* Landscape Mobile Breakpoint */
@media (max-height: 480px) {
    .gamenexa-fullscreen .gamenexa-container {
        padding-top: 6px;
    }
    .gamenexa-fullscreen .gamenexa-viewport {
        min-height: 220px;
        height: calc(100dvh - 54px);
    }
    .gamenexa-fullscreen .gamenexa-card-overlay {
        padding: 10px 12px;
    }
    .gamenexa-fullscreen .gamenexa-card-title {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gamenexa-stats .gamenexa-arrow,
    .gamenexa-stats .gamenexa-card-image,
    .gamenexa-stats .gamenexa-card-title,
    .gamenexa-stats .gamenexa-dot {
        transition: none;
    }
}
/* GameNexa 3D Carousel — customizable per-card glow. */
.gamenexa-stats.gn-glow-on {
  --gn-glow-intensity: 1;
  --gn-glow-blur: 35;
  --gn-glow-spread: 12;
  --gn-glow-opacity: .55;
  --gn-glow-front: 1.6;
  --gn-glow-hover: 1.3;
}
.gamenexa-stats.gn-glow-on .gamenexa-card {
  /* Use box-shadow so the glow follows the existing 3D card geometry. */
  box-shadow: 0 0 calc(var(--gn-glow-blur) * 1px)
    calc(var(--gn-glow-spread) * 1px)
    color-mix(in srgb, var(--gn-card-glow) calc(var(--gn-glow-opacity) * var(--gn-glow-intensity) * 55%), transparent);
  transition: box-shadow .35s ease;
}
.gamenexa-stats.gn-glow-on .gamenexa-card.gamenexa-card-front {
  box-shadow: 0 0 calc(var(--gn-glow-blur) * 1px)
    calc(var(--gn-glow-spread) * 1px)
    color-mix(in srgb, var(--gn-card-glow) clamp(0%, calc(var(--gn-glow-opacity) * var(--gn-glow-intensity) * var(--gn-glow-front) * 55%), 100%), transparent);
}
.gamenexa-stats.gn-glow-on .gamenexa-card:hover {
  box-shadow: 0 0 calc(var(--gn-glow-blur) * 1px)
    calc(var(--gn-glow-spread) * 1px)
    color-mix(in srgb, var(--gn-card-glow) clamp(0%, calc(var(--gn-glow-opacity) * var(--gn-glow-intensity) * var(--gn-glow-hover) * 55%), 100%), transparent);
}
@keyframes gn-glow-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .94; } }
.gamenexa-stats.gn-glow-on.gn-glow-animated .gamenexa-card { animation: gn-glow-breathe 3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .gamenexa-stats.gn-glow-animated .gamenexa-card { animation: none; }
}
