/* =========================================================
   RESET
   ========================================================= */

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

html {
    min-height: 100%;
    background: #050712;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #ffffff;

    background: #050712;

    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}


/* =========================================================
   BACKGROUND
   ========================================================= */

.background {
    position: fixed;
    inset: 0;

    z-index: -10;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(54, 101, 255, 0.18),
            transparent 40%
        ),
        #050712;
}

.grid-background {
    position: absolute;
    inset: 0;

    opacity: 0.22;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        );

    background-size: 50px 50px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 80%
        );
}

.orb {
    position: absolute;

    border-radius: 50%;

    filter: blur(100px);

    opacity: 0.32;

    pointer-events: none;
}

.orb-blue {
    width: 420px;
    height: 420px;

    background: #1558ff;

    top: -200px;
    left: -150px;

    animation:
        floatBlue 12s ease-in-out infinite;
}

.orb-purple {
    width: 360px;
    height: 360px;

    background: #722cff;

    top: 20%;
    right: -180px;

    animation:
        floatPurple 15s ease-in-out infinite;
}

@keyframes floatBlue {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(80px, 40px, 0);
    }
}

@keyframes floatPurple {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(-70px, 50px, 0);
    }
}


/* =========================================================
   HEADER
   ========================================================= */

header {
    position: sticky;
    top: 0;

    z-index: 50;

    padding: 18px 22px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.07);

    background:
        rgba(5, 7, 18, 0.72);

    backdrop-filter:
        blur(20px);

    -webkit-backdrop-filter:
        blur(20px);
}

.header-inner {
    width: min(1450px, 100%);

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 24px;
}

.brand {
    display: flex;

    align-items: center;

    gap: 13px;
}

.brand-logo {
    width: 46px;
    height: 46px;

    display: grid;

    place-items: center;

    border-radius: 14px;

    font-size: 22px;

    background:
        linear-gradient(
            135deg,
            #246bff,
            #7b35ff
        );

    box-shadow:
        0 10px 30px
        rgba(51, 92, 255, 0.28);
}

.brand-text h1 {
    font-size: 16px;

    font-weight: 900;

    letter-spacing: 1.4px;
}

.brand-text h1 span {
    color: #79a1ff;
}

.brand-text p {
    margin-top: 2px;

    color:
        rgba(255, 255, 255, 0.46);

    font-size: 11px;

    letter-spacing: 0.5px;
}

.date-box {
    text-align: center;
}

.date-label {
    display: block;

    margin-bottom: 3px;

    color:
        rgba(255, 255, 255, 0.35);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.5px;
}

#date {
    font-size: 13px;

    font-weight: 700;
}

.actions {
    display: flex;

    align-items: center;

    gap: 10px;
}

.login-button,
.refresh-button {
    min-height: 44px;

    border-radius: 13px;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    text-decoration: none;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.login-button {
    display: flex;

    align-items: center;

    gap: 9px;

    padding: 7px 14px;

    color: white;

    background:
        linear-gradient(
            135deg,
            rgba(53, 93, 255, 0.25),
            rgba(111, 54, 255, 0.2)
        );
}

.login-button:hover,
.refresh-button:hover {
    transform: translateY(-2px);

    border-color:
        rgba(108, 144, 255, 0.4);

    background:
        rgba(255, 255, 255, 0.08);
}

.epic-icon {
    font-size: 18px;
}

.login-content {
    display: flex;

    flex-direction: column;

    gap: 1px;

    font-size: 12px;

    font-weight: 800;
}

.login-content small {
    color:
        rgba(255, 255, 255, 0.4);

    font-size: 8px;

    letter-spacing: 1px;
}

.refresh-button {
    display: flex;

    align-items: center;

    gap: 7px;

    padding: 0 13px;

    border:
        1px solid
        rgba(255, 255, 255, 0.08);

    color: white;

    background:
        rgba(255, 255, 255, 0.04);

    cursor: pointer;
}

.refresh-icon {
    font-size: 20px;
}

.refresh-text {
    font-size: 11px;

    font-weight: 700;
}


/* =========================================================
   MAIN
   ========================================================= */

main {
    width:
        min(
            1450px,
            calc(100% - 44px)
        );

    margin: 0 auto;

    padding:
        50px 0 80px;
}

.shop-heading {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;
}

.section-label {
    display: block;

    margin-bottom: 7px;

    color: #789cff;

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 2px;
}

.heading-content h2 {
    font-size:
        clamp(
            30px,
            5vw,
            48px
        );

    line-height: 1;

    letter-spacing: -1.8px;
}

.heading-content p {
    margin-top: 11px;

    color:
        rgba(255, 255, 255, 0.45);

    font-size: 13px;
}

.live-badge {
    display: flex;

    align-items: center;

    gap: 8px;

    padding:
        8px 12px;

    border:
        1px solid
        rgba(74, 255, 163, 0.16);

    border-radius: 999px;

    color:
        rgba(255, 255, 255, 0.65);

    background:
        rgba(74, 255, 163, 0.06);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;
}

.live-badge span,
.loaded-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #50e89b;

    box-shadow:
        0 0 12px
        rgba(80, 232, 155, 0.8);

    animation:
        pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}


/* =========================================================
   STATUS
   ========================================================= */

#status {
    min-height: 42px;

    margin-bottom: 20px;
}

.loading-container,
.loaded-status,
.error-status {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    min-height: 42px;

    color:
        rgba(255, 255, 255, 0.45);

    font-size: 12px;
}

.loading-spinner {
    width: 18px;
    height: 18px;

    border:
        2px solid
        rgba(255, 255, 255, 0.12);

    border-top-color:
        #7194ff;

    border-radius: 50%;

    animation:
        spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loaded-status {
    gap: 8px;
}

.error-status {
    flex-direction: column;

    color: #ff8d9b;
}

.error-status button {
    padding:
        7px 13px;

    border: 0;

    border-radius: 9px;

    color: white;

    background:
        rgba(255, 75, 100, 0.15);

    cursor: pointer;
}


/* =========================================================
   SHOP GRID
   ========================================================= */

#shop {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(
                190px,
                1fr
            )
        );

    gap: 17px;
}


/* =========================================================
   CARDS
   ========================================================= */

.card {
    position: relative;

    overflow: hidden;

    min-width: 0;

    border:
        1px solid
        rgba(255, 255, 255, 0.065);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.035);

    cursor: pointer;

    opacity: 0;

    transform:
        translateY(18px);

    animation:
        cardIn 0.5s
        cubic-bezier(.22,.61,.36,1)
        forwards;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

@keyframes cardIn {
    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}

.card:hover {
    transform:
        translateY(-7px);

    border-color:
        rgba(106, 143, 255, 0.32);

    box-shadow:
        0 20px 50px
        rgba(0, 0, 0, 0.35),
        0 0 30px
        rgba(53, 91, 255, 0.1);
}

.card-image {
    position: relative;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background:
        radial-gradient(
            circle,
            #20294b,
            #0b0e1c
        );
}

.card-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.45s ease;
}

.card:hover .card-image img {
    transform:
        scale(1.055);
}

.card-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: flex-end;

    padding: 13px;

    background:
        linear-gradient(
            to bottom,
            transparent 50%,
            rgba(3, 5, 12, 0.92)
        );
}

.card-info {
    width: 100%;
}

.card-info h3 {
    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 13px;

    font-weight: 800;
}

.card-bottom {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 6px;
}

.price {
    display: flex;

    align-items: center;

    gap: 6px;

    font-size: 14px;

    font-weight: 900;
}

.vbucks-symbol {
    display: inline-grid;

    place-items: center;

    width: 17px;
    height: 17px;

    border:
        1.5px solid
        rgba(255, 255, 255, 0.8);

    border-radius: 50%;

    font-size: 8px;

    font-weight: 900;
}

.no-image {
    width: 100%;
    height: 100%;

    display: grid;

    place-items: center;

    color:
        rgba(255, 255, 255, 0.2);

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 2px;
}


/* =========================================================
   MODALE FULLSCREEN
   ========================================================= */

.item-modal {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;

    visibility: hidden;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.item-modal.open {
    visibility: visible;

    opacity: 1;

    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.94);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);
}

.modal-content {
    position: relative;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    background:
        #000;

    isolation: isolate;
}


/* =========================================================
   FERMETURE
   ========================================================= */

.modal-close {
    position: absolute;

    top: 20px;
    right: 20px;

    z-index: 30;

    width: 48px;
    height: 48px;

    display: grid;

    place-items: center;

    border:
        1px solid
        rgba(255, 255, 255, 0.18);

    border-radius: 50%;

    color: white;

    background:
        rgba(0, 0, 0, 0.4);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    font-size: 31px;

    font-weight: 200;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.modal-close:hover {
    transform:
        scale(1.06);

    background:
        rgba(255, 255, 255, 0.13);
}


/* =========================================================
   MEDIA
   ========================================================= */

.modal-media {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    touch-action: pan-y;

    background:
        #000;
}

.preview-track {
    display: flex;

    width: 200%;
    height: 100%;

    transform:
        translateX(0);

    will-change:
        transform;
}

.preview-slide {
    position: relative;

    width: 50%;
    height: 100%;

    flex:
        0 0 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background:
        #000;
}

.modal-video,
.modal-image {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;

    object-fit: contain;

    background:
        #000;
}

.modal-video {
    display: none;
}

.modal-image {
    display: block;
}


/* =========================================================
   GRADIENT
   ========================================================= */

.modal-gradient {
    position: absolute;

    inset: 0;

    z-index: 5;

    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.38),
            transparent 22%,
            transparent 58%,
            rgba(0, 0, 0, 0.88) 100%
        );
}


/* =========================================================
   FALLBACK
   ========================================================= */

.video-fallback {
    position: absolute;

    inset: 0;

    z-index: 8;

    display: none;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 10px;

    color:
        rgba(255, 255, 255, 0.45);

    background:
        #050505;

    font-size: 12px;
}

.video-fallback.visible {
    display: flex;
}

.fallback-icon {
    font-size: 40px;

    color:
        rgba(255, 255, 255, 0.2);
}


/* =========================================================
   LABEL
   ========================================================= */

.preview-status {
    position: absolute;

    left: 24px;
    top: 24px;

    z-index: 15;

    padding:
        8px 12px;

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 999px;

    color:
        rgba(255, 255, 255, 0.72);

    background:
        rgba(0, 0, 0, 0.38);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 1.4px;
}


/* =========================================================
   POINTS
   ========================================================= */

.carousel-dots {
    position: absolute;

    left: 50%;

    bottom: 28px;

    z-index: 20;

    display: flex;

    align-items: center;

    gap: 8px;

    transform:
        translateX(-50%);
}

.carousel-dot {
    width: 7px;
    height: 7px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.34);

    cursor: pointer;

    transition:
        width 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.carousel-dot.active {
    width: 9px;
    height: 9px;

    background:
        rgba(255, 255, 255, 0.92);

    transform:
        scale(1.05);
}


/* =========================================================
   INFORMATIONS
   ========================================================= */

.modal-info {
    position: absolute;

    left: 0;
    right: 0;

    bottom: 0;

    z-index: 18;

    padding:
        30px
        clamp(
            24px,
            7vw,
            110px
        )
        42px;

    pointer-events: none;
}

.modal-label {
    display: block;

    margin-bottom: 6px;

    color:
        rgba(255, 255, 255, 0.43);

    font-size: 9px;

    font-weight: 900;

    letter-spacing: 1.8px;
}

.modal-info h2 {
    max-width: 800px;

    font-size:
        clamp(
            25px,
            4vw,
            48px
        );

    line-height: 1.05;

    letter-spacing: -1.4px;

    text-shadow:
        0 3px 20px
        rgba(0, 0, 0, 0.7);
}

.modal-info .price {
    margin-top: 10px;

    font-size:
        clamp(
            16px,
            2vw,
            22px
        );
}

.modal-extra-info {
    margin-top: 7px;

    color:
        rgba(255, 255, 255, 0.55);

    font-size: 11px;
}

.modal-description {
    max-width: 650px;

    margin-top: 8px;

    color:
        rgba(255, 255, 255, 0.48);

    font-size: 11px;

    line-height: 1.5;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    width:
        min(
            1450px,
            calc(100% - 44px)
        );

    margin: 0 auto;

    padding:
        30px 0 40px;

    color:
        rgba(255, 255, 255, 0.3);

    text-align: center;
}

.footer-logo {
    font-size: 11px;

    font-weight: 900;

    letter-spacing: 2px;
}

.footer-line {
    width: 80px;

    height: 1px;

    margin:
        14px auto;

    background:
        rgba(255, 255, 255, 0.1);
}

footer p {
    font-size: 10px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    header {
        padding:
            12px 14px;
    }

    .header-inner {
        gap: 10px;
    }

    .brand-text p,
    .date-box,
    .refresh-text {
        display: none;
    }

    .brand-logo {
        width: 40px;
        height: 40px;

        border-radius: 12px;
    }

    .brand-text h1 {
        font-size: 13px;
    }

    .actions {
        margin-left: auto;
    }

    .login-button {
        padding:
            6px 10px;
    }

    .login-content {
        font-size: 10px;
    }

    .login-content small {
        font-size: 7px;
    }

    .refresh-button {
        width: 40px;
        height: 40px;

        padding: 0;

        justify-content: center;
    }

    .refresh-icon {
        font-size: 19px;
    }

    main {
        width:
            calc(100% - 28px);

        padding:
            32px 0 60px;
    }

    .shop-heading {
        align-items: flex-start;

        margin-bottom: 22px;
    }

    .heading-content h2 {
        font-size: 29px;
    }

    .heading-content p {
        font-size: 11px;
    }

    .live-badge {
        display: none;
    }

    #shop {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );

        gap: 10px;
    }

    .card {
        border-radius: 14px;
    }

    .card-overlay {
        padding: 10px;
    }

    .card-info h3 {
        font-size: 11px;
    }

    .card .price {
        font-size: 11px;
    }

    .vbucks-symbol {
        width: 14px;
        height: 14px;

        font-size: 7px;
    }

    .modal-close {
        top: 13px;
        right: 13px;

        width: 42px;
        height: 42px;

        font-size: 28px;
    }

    .preview-status {
        top: 16px;
        left: 16px;

        padding:
            7px 10px;
    }

    .carousel-dots {
        bottom: 19px;
    }

    .modal-info {
        padding:
            25px
            18px
            55px;
    }

    .modal-info h2 {
        font-size: 26px;
    }

    .modal-description {
        max-width: 95%;
    }
}


/* =========================================================
   PETITS ÉCRANS
   ========================================================= */

@media (max-width: 380px) {

    #shop {
        gap: 8px;
    }

    .card-info h3 {
        font-size: 10px;
    }

    .modal-info h2 {
        font-size: 23px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        scroll-behavior:
            auto !important;

        transition-duration:
            0.01ms !important;
    }
}