/*
 * AuraEpin shared quality layer
 * Loaded after legacy page styles so the public surfaces share one visual system.
 */

:root{
    --sq-accent:#19bdf2;
    --sq-accent-strong:#2878f0;
    --sq-accent-soft:rgba(25,189,242,.13);
    --sq-success:#25d88a;
    --sq-warning:#ffb020;
    --sq-danger:#ff5577;
    --sq-bg:#07111f;
    --sq-surface:#111d31;
    --sq-surface-2:#16243a;
    --sq-surface-3:#1b2b44;
    --sq-text:#f6f9ff;
    --sq-muted:#9babc1;
    --sq-line:rgba(120,171,226,.20);
    --sq-line-strong:rgba(51,188,245,.38);
    --sq-radius-sm:10px;
    --sq-radius:15px;
    --sq-radius-lg:20px;
    --sq-shadow:0 14px 38px rgba(0,5,18,.26);
    --sq-shadow-hover:0 18px 46px rgba(0,8,24,.34),0 0 0 1px rgba(25,189,242,.12);
}

html[data-theme="light"]{
    --sq-bg:#f4f7fb;
    --sq-surface:#ffffff;
    --sq-surface-2:#f7faff;
    --sq-surface-3:#edf4fc;
    --sq-text:#122036;
    --sq-muted:#607087;
    --sq-line:rgba(45,91,143,.16);
    --sq-line-strong:rgba(36,137,214,.30);
    --sq-shadow:0 13px 34px rgba(42,65,95,.10);
    --sq-shadow-hover:0 18px 44px rgba(34,68,108,.15),0 0 0 1px rgba(25,155,225,.10);
}

html{
    scroll-behavior:smooth;
}

body.jg-site{
    color:var(--sq-text);
    background-color:var(--sq-bg);
    accent-color:var(--sq-accent);
}

body.jg-site :where(a,button,input,select,textarea,[tabindex]):focus-visible{
    outline:3px solid rgba(25,189,242,.34)!important;
    outline-offset:2px!important;
}

body.jg-site :where(input,select,textarea){
    border-radius:var(--sq-radius-sm);
}

/* The former blue stage artwork is intentionally replaced by a calm shell. */
html[data-theme="dark"] body.jg-home-page:before,
html[data-theme="dark"] body.jg-home-page:after{
    background-image:none!important;
}

html[data-theme="dark"] body.jg-home-page{
    background:#07111f!important;
}

html[data-theme="light"] body.jg-home-page{
    background:#f4f7fb!important;
}

/* Shared header shell */
html[data-theme] body.jg-site .web-header{
    background:linear-gradient(135deg,var(--sq-surface) 0%,var(--sq-bg) 52%,var(--sq-surface) 100%)!important;
    border-bottom:1px solid var(--sq-line)!important;
    box-shadow:0 10px 28px rgba(0,6,18,.16)!important;
}

html[data-theme="light"] body.jg-site .web-header{
    background:linear-gradient(180deg,#fff 0%,#f7faff 100%)!important;
    box-shadow:0 9px 26px rgba(34,68,108,.09)!important;
}

body.jg-site .jg-header-benefits > *{
    min-height:32px;
    border:1px solid var(--sq-line)!important;
    border-radius:10px!important;
    background:color-mix(in srgb,var(--sq-surface-2) 90%,transparent)!important;
    color:var(--sq-text)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}

body.jg-site .jg-header-benefits i,
body.jg-site .jg-header-benefits svg{
    color:var(--sq-accent)!important;
}

/* Reusable panels and buttons */
body.jg-site :where(.jg-card,.jg-content-card,.jg-form-card,.jg-profile-card,.jg-checkout-card,.market-hero,.market-toolbar,.filter-panel,.jg-gv-hero,.jg-gv-filter){
    border:1px solid var(--sq-line)!important;
    border-radius:var(--sq-radius-lg)!important;
    box-shadow:var(--sq-shadow)!important;
}

body.jg-site :where(.jg-btn,.jg-btn-buy,.jg-btn-cart,.market-add-btn,.market-filter-btn,.market-clear-btn,.listing-detail,.listing-buy,.jg-gv-btn,.jg-gv-filter-submit,.jg-gv-filter-clear){
    min-height:42px;
    border-radius:11px!important;
    font-weight:800!important;
    letter-spacing:-.01em;
    transition:transform .18s ease,box-shadow .18s ease,filter .18s ease,border-color .18s ease!important;
}

body.jg-site :where(.jg-btn,.jg-btn-buy,.jg-btn-cart,.market-add-btn,.market-filter-btn,.market-clear-btn,.listing-detail,.listing-buy,.jg-gv-btn,.jg-gv-filter-submit,.jg-gv-filter-clear):hover{
    transform:translateY(-2px);
    filter:brightness(1.05);
}

/* Product and category pages */
body.jg-site .jg-game-catalog-page{
    --jg-card-radius:var(--sq-radius);
}

body.jg-site .jg-game-catalog-page .jg-game-overview,
body.jg-site .jg-product-hero{
    overflow:hidden;
    border:1px solid var(--sq-line-strong)!important;
    border-radius:var(--sq-radius-lg)!important;
    box-shadow:var(--sq-shadow)!important;
}

body.jg-site .jg-game-catalog-page .jg-purchase-flow,
body.jg-site .jg-buy-box{
    border-radius:var(--sq-radius)!important;
    border-color:var(--sq-line)!important;
}

html[data-theme] body.jg-site .jg-product-row{
    border:1px solid var(--sq-line)!important;
    border-radius:var(--sq-radius)!important;
    box-shadow:0 7px 22px rgba(0,7,20,.13)!important;
    transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease!important;
}

html[data-theme] body.jg-site .jg-product-row:hover{
    transform:translateY(-3px)!important;
    border-color:var(--sq-line-strong)!important;
    box-shadow:var(--sq-shadow-hover)!important;
}

body.jg-site .jg-product-row :where(input,select),
body.jg-site .jg-buy-box :where(input,select){
    min-height:42px;
    border-color:var(--sq-line)!important;
    background:var(--sq-surface-2)!important;
    color:var(--sq-text)!important;
}

/* Cart and checkout */
body.jg-cart-body .jg-cart-wrap,
body.jg-guest-checkout-body .jg-checkout-shell{
    max-width:1320px!important;
}

body.jg-cart-body :where(.jg-cart-card,.jg-cart-item,.jg-order-summary,.jg-summary-card),
body.jg-guest-checkout-body :where(.jg-checkout-card,.jg-payment-panel,.jg-summary-card){
    border:1px solid var(--sq-line)!important;
    border-radius:var(--sq-radius)!important;
    box-shadow:var(--sq-shadow)!important;
}

body.jg-cart-body :where(.jg-checkout-btn,.jg-cart-checkout,.jg-pay-btn),
body.jg-guest-checkout-body :where(.jg-checkout-submit,.jg-pay-btn){
    min-height:48px;
    border:0!important;
    border-radius:12px!important;
    background:linear-gradient(135deg,var(--sq-accent-strong),var(--sq-accent))!important;
    color:#fff!important;
    font-weight:900!important;
    box-shadow:0 10px 24px rgba(26,143,231,.23)!important;
}

/* Marketplace */
body.jg-market-page .market-wrap{
    max-width:1400px!important;
}

html[data-theme] body.jg-site.jg-market-page .market-hero{
    background:linear-gradient(135deg,color-mix(in srgb,var(--sq-surface-2) 95%,transparent),color-mix(in srgb,var(--sq-accent-soft) 38%,var(--sq-surface)))!important;
}

html[data-theme] body.jg-site.jg-market-page .market-toolbar,
html[data-theme] body.jg-site.jg-market-page .filter-panel{
    background:var(--sq-surface)!important;
}

body.jg-market-page .market-grid{
    gap:16px!important;
}

html[data-theme] body.jg-site.jg-market-page:not(.admin-panel) .listing-card{
    overflow:hidden;
    border:1px solid var(--sq-line)!important;
    border-radius:var(--sq-radius)!important;
    background:var(--sq-surface)!important;
    box-shadow:0 8px 24px rgba(0,7,20,.16)!important;
    transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease!important;
}

html[data-theme] body.jg-site.jg-market-page:not(.admin-panel) .listing-card:hover{
    transform:translateY(-4px)!important;
    border-color:var(--sq-line-strong)!important;
    box-shadow:var(--sq-shadow-hover)!important;
}

html[data-theme] body.jg-site.jg-market-page .listing-media{
    overflow:hidden;
    border-radius:calc(var(--sq-radius) - 2px) calc(var(--sq-radius) - 2px) 0 0!important;
}

html[data-theme] body.jg-site.jg-market-page .listing-media img{
    transition:transform .35s ease!important;
}

html[data-theme] body.jg-site.jg-market-page:not(.admin-panel) .listing-card:hover .listing-media img{
    transform:scale(1.035);
}

html[data-theme] body.jg-site.jg-market-page .listing-body{
    padding:15px!important;
}

body.jg-market-page .listing-detail,
body.jg-market-page .listing-buy{
    min-height:38px;
}

/* Campaigns and giveaways */
body.jg-site .jg-gv-hero{
    background:linear-gradient(135deg,var(--sq-surface),color-mix(in srgb,var(--sq-surface-2) 88%,var(--sq-accent)))!important;
}

body.jg-site .jg-gv-filter{
    background:var(--sq-surface)!important;
}

body.jg-site .jg-gv-grid,
body.jg-site .jg-campaign-grid{
    gap:18px!important;
}

body.jg-site .jg-gv-card,
body.jg-site .jg-campaign-card{
    overflow:hidden;
    border:1px solid var(--sq-line)!important;
    border-radius:var(--sq-radius)!important;
    box-shadow:0 9px 26px rgba(0,7,20,.17)!important;
    transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease!important;
}

body.jg-site .jg-gv-card:hover,
body.jg-site .jg-campaign-card:hover{
    transform:translateY(-4px)!important;
    border-color:var(--sq-line-strong)!important;
    box-shadow:var(--sq-shadow-hover)!important;
}

body.jg-site .jg-gv-card :where(button,a),
body.jg-site .jg-campaign-card :where(button,a){
    border-radius:10px;
}

/* Member and account surfaces */
body.jg-account-body .jg-account-page,
body.jg-market-page .jg-account-page{
    color:var(--sq-text);
}

body.jg-account-body .jg-account-sidebar,
body.jg-market-page .jg-account-sidebar{
    overflow:hidden;
    border:1px solid var(--sq-line)!important;
    border-radius:var(--sq-radius-lg)!important;
    background:var(--sq-surface)!important;
    box-shadow:var(--sq-shadow)!important;
}

body.jg-account-body :where(.jg-profile-card,.jg-form-card,.jg-content-card,.jg-order-item,.jg-account-balance-card),
body.jg-market-page :where(.jg-profile-card,.jg-form-card,.jg-content-card,.jg-order-item,.jg-account-balance-card){
    border-color:var(--sq-line)!important;
    border-radius:var(--sq-radius)!important;
}

body.jg-account-body .jg-order-item,
body.jg-market-page .jg-order-item{
    transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease!important;
}

body.jg-account-body .jg-order-item:hover,
body.jg-market-page .jg-order-item:hover{
    transform:translateY(-2px)!important;
    border-color:var(--sq-line-strong)!important;
    box-shadow:0 10px 28px rgba(0,7,20,.15)!important;
}

/* Feedback and empty states */
body.jg-site :where(.alert,.jg-empty-state,.market-empty,.jg-no-results){
    border-radius:var(--sq-radius)!important;
}

body.jg-site :where(.pagination,.jg-pagination) a,
body.jg-site :where(.pagination,.jg-pagination) span{
    min-width:38px;
    min-height:38px;
    border-radius:10px!important;
}

@media (max-width:991.98px){
    body.jg-site :where(.jg-card,.jg-content-card,.jg-form-card,.jg-profile-card,.jg-checkout-card,.market-hero,.market-toolbar,.filter-panel,.jg-gv-hero,.jg-gv-filter){
        border-radius:16px!important;
    }

    html[data-theme] body.jg-site .jg-product-row{
        border-radius:14px!important;
    }

    body.jg-site .jg-row-actions,
    body.jg-site .jg-row-actions > *,
    body.jg-site .jg-buy-box :where(.jg-btn-buy,.jg-btn-cart){
        width:100%!important;
    }

    body.jg-cart-body :where(.jg-checkout-btn,.jg-cart-checkout,.jg-pay-btn),
    body.jg-guest-checkout-body :where(.jg-checkout-submit,.jg-pay-btn){
        width:100%!important;
    }
}

@media (max-width:575.98px){
    body.jg-site{
        overflow-x:hidden;
    }

    body.jg-market-page .market-wrap,
    body.jg-cart-body .jg-cart-wrap,
    body.jg-account-body .jg-account-page > .container,
    body.jg-market-page .jg-account-page > .container{
        width:100%!important;
        max-width:100%!important;
        padding-left:12px!important;
        padding-right:12px!important;
    }

    body.jg-market-page .market-grid,
    body.jg-site .jg-gv-grid,
    body.jg-site .jg-campaign-grid{
        gap:13px!important;
    }

    html[data-theme] body.jg-site.jg-market-page:not(.admin-panel) .listing-card,
    body.jg-site .jg-gv-card,
    body.jg-site .jg-campaign-card{
        border-radius:14px!important;
    }

    body.jg-site :where(input,select,textarea){
        font-size:16px!important;
    }
}

@media (prefers-reduced-motion:reduce){
    html{scroll-behavior:auto}
    *,*:before,*:after{
        animation-duration:.01ms!important;
        animation-iteration-count:1!important;
        transition-duration:.01ms!important;
        scroll-behavior:auto!important;
    }
}

/* Game category: compact overview and balanced category choices. */
html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview{
    grid-template-columns:112px minmax(0,1fr)!important;
    gap:16px!important;
    min-height:0!important;
    padding:14px!important;
    background:radial-gradient(circle at 89% 18%,color-mix(in srgb,var(--game-primary) 15%,transparent),transparent 22%),linear-gradient(135deg,var(--game-panel),color-mix(in srgb,var(--game-soft) 84%,var(--game-panel)))!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview:after{
    content:"";
    position:absolute;
    right:-34px;
    top:50%;
    width:190px;
    height:190px;
    border:1px solid color-mix(in srgb,var(--game-accent) 18%,transparent);
    border-radius:50%;
    box-shadow:0 0 0 28px color-mix(in srgb,var(--game-accent) 4%,transparent),0 0 0 56px color-mix(in srgb,var(--game-primary) 3%,transparent);
    transform:translateY(-50%);
    pointer-events:none;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview-media{
    width:112px!important;
    height:112px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview-content{
    position:relative!important;
    z-index:1!important;
    padding-right:130px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview h1{
    font-size:clamp(23px,2vw,29px)!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview-description{
    max-width:760px!important;
    margin-top:7px!important;
    font-size:11px!important;
    -webkit-line-clamp:1!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview-actions{
    margin-top:9px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-store-link,
html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-feature-chip{
    min-height:30px!important;
    padding:6px 10px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-purchase-flow{
    padding:8px!important;
    gap:7px!important;
    margin-bottom:10px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-purchase-step{
    grid-template-columns:32px minmax(0,1fr)!important;
    gap:8px!important;
    min-height:54px!important;
    padding:7px 9px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-purchase-step-no{
    width:32px!important;
    height:32px!important;
    border-radius:9px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-tabs{
    margin-bottom:10px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step{
    margin-bottom:10px!important;
    padding:13px!important;
    border-radius:16px!important;
    background:linear-gradient(135deg,color-mix(in srgb,var(--game-panel) 97%,var(--game-primary)),color-mix(in srgb,var(--game-soft) 94%,var(--game-accent)))!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step-head{
    margin-bottom:10px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-step-no{
    width:34px!important;
    height:34px!important;
    flex-basis:34px!important;
    border-radius:10px!important;
    font-size:14px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step-head h2{
    margin-bottom:1px!important;
    font-size:16px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step-head p{
    font-size:10.5px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step .jg-subcat-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    justify-content:stretch!important;
    gap:10px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-options-1 .jg-subcat-grid{grid-template-columns:1fr!important}
html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-options-2 .jg-subcat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-options-3 .jg-subcat-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step .jg-subcat{
    position:relative!important;
    min-height:94px!important;
    display:grid!important;
    grid-template-columns:78px minmax(0,1fr) 34px!important;
    align-items:center!important;
    gap:12px!important;
    padding:8px!important;
    border-radius:14px!important;
    box-shadow:0 7px 20px rgba(2,8,23,.13)!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step .jg-subcat:after{display:none!important}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step .jg-subcat-img{
    width:78px!important;
    height:78px!important;
    aspect-ratio:1!important;
    border-radius:11px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step .jg-subcat h3{
    min-width:0!important;
    min-height:0!important;
    display:block!important;
    padding:0!important;
    color:var(--game-text)!important;
    font-size:13px!important;
    line-height:1.28!important;
    text-align:left!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step .jg-subcat h3 small{
    display:block!important;
    margin-top:5px!important;
    color:var(--game-muted)!important;
    font-size:8px!important;
    line-height:1!important;
    letter-spacing:.08em!important;
    text-transform:uppercase!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-subcat-action{
    display:grid!important;
    place-items:center!important;
    width:32px!important;
    height:32px!important;
    border:1px solid var(--game-border)!important;
    border-radius:10px!important;
    background:color-mix(in srgb,var(--game-soft) 82%,transparent)!important;
    color:var(--game-accent)!important;
    font-size:11px!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-subcat.active .jg-subcat-action{
    border-color:transparent!important;
    background:linear-gradient(135deg,var(--game-primary),var(--game-accent))!important;
    color:#fff!important;
}

html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-product-toolbar{
    min-height:58px!important;
    margin-bottom:10px!important;
    padding:10px 12px!important;
    border-radius:14px!important;
}

@media(max-width:760px){
    html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview{
        grid-template-columns:88px minmax(0,1fr)!important;
        gap:11px!important;
        padding:11px!important;
    }
    html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview:after{display:none!important}
    html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview-media{width:88px!important;height:88px!important}
    html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview-content{padding-right:0!important}
    html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-game-overview-description{-webkit-line-clamp:2!important}
    html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step .jg-subcat-grid,
    html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-options-2 .jg-subcat-grid,
    html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-options-3 .jg-subcat-grid{grid-template-columns:1fr!important}
    html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step .jg-subcat{
        min-height:78px!important;
        grid-template-columns:62px minmax(0,1fr) 32px!important;
        gap:10px!important;
        padding:7px!important;
    }
    html[data-theme] body.jg-site.jg-game-product-page .jg-game-catalog-page .jg-category-step .jg-subcat-img{width:62px!important;height:62px!important}
}
