/* Scoped so it doesn't fight the rest of the site */
header, footer { position: relative; z-index: 10; }


.spn-gamesPage{
    --bg0:#070a08;
    --bg1:#0b0f0c;
    --panel: rgba(255,255,255,0.05);
    --panel2: rgba(255,255,255,0.035);
    --stroke: rgba(255,255,255,0.10);
    --stroke2: rgba(255,255,255,0.07);

    --text: rgba(255,255,255,0.92);
    --muted: rgba(255,255,255,0.72);
    --muted2: rgba(255,255,255,0.56);

    --gold:#e6c070;

    --r: 18px;
    --r2: 24px;

    --shadow: 0 26px 80px rgba(0,0,0,0.45);
    --shadow2: 0 16px 50px rgba(0,0,0,0.32);

    max-width: 1120px;
    margin: 0 auto;
    padding: 28px clamp(16px, 3vw, 28px) 90px;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    position: relative;
    isolation: isolate;
}

/* Canvas just for this page (won't affect header/footer) */
.spn-gamesPage::before{
    content:"";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1100px 700px at 18% 10%, rgba(230,192,112,0.14), transparent 55%),
        radial-gradient(900px 680px at 82% 18%, rgba(255,255,255,0.08), transparent 60%),
        linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%);
}

/* Type */
.spn-eyebrow{
    margin: 0 0 10px;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.58);
}
.spn-title{
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.7px;
    line-height: 1.02;
    font-size: clamp(34px, 4.4vw, 56px);
}
.spn-lede{
    margin: 14px 0 16px;
    color: var(--muted);
    max-width: 62ch;
    line-height: 1.55;
    width: 100%;
}
.spn-h2{
    margin: 0;
    font-weight: 850;
    letter-spacing: -0.4px;
    font-size: clamp(22px, 2.6vw, 36px);
    line-height: 1.1;
}
.spn-sub{
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
    max-width: 74ch;
}

/* Buttons */
.spn-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--stroke2);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.90);
    text-decoration: none;
    font-weight: 700;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
    cursor: pointer;
}
.spn-btn:hover{ transform: translateY(-1px); border-color: rgba(255,255,255,0.14); }
.spn-btn:active{ transform: translateY(0); }
.spn-btn--primary{
    background: rgba(230,192,112,0.14);
    border-color: rgba(230,192,112,0.26);
}
.spn-btn--ghost{ background: rgba(255,255,255,0.02); }
.spn-btn--sm{ padding: 9px 12px; font-size: 13px; }

/* Badges */
.spn-badges{
    display:flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 0;
}
.spn-badge{
    display:inline-flex;
    align-items:center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--stroke2);
    background: rgba(0,0,0,0.18);
    font-size: 12px;
    color: rgba(255,255,255,0.70);
    font-weight: 650;
}
.spn-badgeDot{
    width: 6px; height: 6px; border-radius: 999px;
    background: rgba(230,192,112,0.95);
}

/* HERO layout */
.spn-gHero__inner{
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
    align-items: stretch;
}
.spn-gHero__cta{ display:flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* Featured panel (distinct from homepage) */
.spn-feature{
    position: relative;
    border-radius: var(--r2);
    border: 1px solid var(--stroke);
    background: var(--panel2);
    box-shadow: var(--shadow2);
    padding: 18px;
    overflow: hidden;
    min-height: 270px;
}
.spn-feature__top{
    display:flex; justify-content: space-between; align-items: center; gap: 12px;
    margin-bottom: 12px;
}
.spn-meta{ color: rgba(255,255,255,0.62); font-size: 12px; font-weight: 650; }
.spn-feature__title{ margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -0.3px; }
.spn-feature__desc{ margin: 10px 0 14px; color: var(--muted); line-height: 1.5; max-width: 44ch; }
.spn-feature__stats{
    display:grid; grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
    margin: 10px 0 14px;
}
.spn-stat{
    border: 1px solid var(--stroke2);
    background: rgba(0,0,0,0.16);
    border-radius: 14px;
    padding: 10px;
}
.spn-stat__k{ font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.spn-stat__v{ margin-top: 6px; font-weight: 850; color: rgba(255,255,255,0.88); }
.spn-feature__actions{ display:flex; gap: 10px; flex-wrap: wrap; }
.spn-feature__bg{
    position:absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(700px 420px at 70% 20%, rgba(230,192,112,0.18), transparent 56%),
        radial-gradient(700px 420px at 10% 90%, rgba(255,255,255,0.08), transparent 60%);
    opacity: 0.95;
}

/* Catalog head */
.spn-catalog{  margin-top: 100px; }
.spn-catalog__head{
    display:flex;
    align-items:flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

/* Chips + search */
.spn-tools{ display:flex; gap: 12px; align-items:center; flex-wrap: wrap; }
.spn-chips{ display:flex; gap: 10px; flex-wrap: wrap; }
.spn-chip{
    border: 1px solid var(--stroke2);
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.78);
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 750;
    font-size: 12px;
    cursor: pointer;
}
.spn-chip.is-active{
    background: rgba(230,192,112,0.12);
    border-color: rgba(230,192,112,0.26);
    color: rgba(255,255,255,0.92);
}
.spn-search{
    display:inline-flex; align-items:center; gap:10px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--stroke2);
    background: rgba(255,255,255,0.02);
}
.spn-search__icon{
    width: 12px; height: 12px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(230,192,112,0.10);
}
.spn-search input{
    width: 210px;
    border: 0; outline: 0;
    background: transparent;
    color: rgba(255,255,255,0.90);
}
.spn-search input::placeholder{ color: rgba(255,255,255,0.45); }

/* Game grid */
.spn-grid{
    display:grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 12px;
}
.spn-card{
    border-radius: var(--r2);
    border: 1px solid var(--stroke);
    background: var(--panel2);
    box-shadow: var(--shadow2);
    overflow:hidden;
    display:flex;
    flex-direction: column;
    padding: 16px;
    min-height: 220px;
    position: relative;
}
.spn-card::before{
    content:"";
    position:absolute;
    inset: 0;
    background:
        radial-gradient(560px 320px at 20% 10%, rgba(230,192,112,0.10), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent 55%);
    opacity: 0;
    transition: opacity .18s ease;
}
.spn-card:hover::before{ opacity: 1; }

.spn-card__top{
    display:flex; align-items:center; justify-content: space-between; gap: 10px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
.spn-tag{
    display:inline-flex;
    align-items:center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--stroke2);
    background: rgba(0,0,0,0.16);
    color: rgba(255,255,255,0.74);
    font-weight: 700;
    font-size: 12px;
}
.spn-pulse{
    width: 7px; height: 7px; border-radius: 999px;
    background: rgba(230,192,112,0.95);
    box-shadow: 0 0 0 0 rgba(230,192,112,0.45);
    animation: spnPulse 1.6s infinite;
}
@keyframes spnPulse{
    0%{ box-shadow: 0 0 0 0 rgba(230,192,112,0.40); }
    70%{ box-shadow: 0 0 0 10px rgba(230,192,112,0.0); }
    100%{ box-shadow: 0 0 0 0 rgba(230,192,112,0.0); }
}

.spn-card__title{
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.2px;
    font-size: 16px;
    position: relative;
    z-index: 1;
}
.spn-card__desc{
    margin: 10px 0 14px;
    color: var(--muted);
    line-height: 1.52;
    font-size: 13px;
    position: relative;
    z-index: 1;
}
.spn-card__meta{
    display:flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    position: relative;
    z-index: 1;
}
.spn-pill{
    border: 1px solid var(--stroke2);
    background: rgba(0,0,0,0.16);
    padding: 7px 10px;
    border-radius: 999px;
    color: rgba(255,255,255,0.70);
    font-weight: 700;
    font-size: 12px;
}
.spn-card__actions{
    margin-top: 12px;
    display:flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Why section */
.spn-why{ margin-top: 28px; }
.spn-why__card{
    border-radius: var(--r2);
    border: 1px solid var(--stroke);
    background: var(--panel2);
    box-shadow: var(--shadow2);
    padding: 18px;
    margin-top: 150px
}
.spn-why__rows{
    margin-top: 14px;
    display:grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
}
.spn-whyRow{
    border: 1px solid var(--stroke2);
    background: rgba(0,0,0,0.14);
    border-radius: 16px;
    padding: 12px;
    display:flex;
    gap: 12px;
    align-items:flex-start;
}
.spn-whyRow p{
    margin: 0;
    color: rgba(255,255,255,0.68);
    line-height: 1.5;
}

/* Quick play bar */
.spn-quickPlay{
    position: fixed;
    left: 0; right: 0;
    bottom: 18px;
    z-index: 50;
    display:flex;
    justify-content: center;
    pointer-events: none;
}
.spn-quickPlay__inner{
    width: min(980px, calc(100vw - 28px));
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(10,12,11,0.72);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    padding: 10px 12px;
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: auto;
}
.spn-quickPlay__left{ display:flex; align-items:center; gap: 10px; }
.spn-quickPlay__dot{
    width: 10px; height: 10px; border-radius: 999px;
    background: rgba(230,192,112,0.95);
}
.spn-quickPlay__k{ font-size: 12px; color: rgba(255,255,255,0.62); font-weight: 700; }
.spn-quickPlay__v{ font-size: 13px; color: rgba(255,255,255,0.86); font-weight: 800; }
.spn-quickPlay__right{ display:flex; gap: 10px; }

/* Modal */
.spn-modal{ position: fixed; inset: 0; z-index: 100; display:grid; place-items:center; }
.spn-modal[hidden]{ display:none; }
.spn-modal__backdrop{ position:absolute; inset:0; background: rgba(0,0,0,0.58); backdrop-filter: blur(10px); }
.spn-modal__panel{
    position: relative;
    width: min(680px, calc(100vw - 28px));
    border-radius: var(--r2);
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(12,14,13,0.92);
    box-shadow: var(--shadow);
    padding: 18px;
}
.spn-modal__close{
    position:absolute; top: 10px; right: 10px;
    width: 40px; height: 40px;
    border-radius: 999px;
    border: 1px solid var(--stroke2);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.84);
    font-size: 22px;
    cursor: pointer;
}
.spn-modal__badge{
    display:inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(230,192,112,0.22);
    background: rgba(230,192,112,0.10);
    font-weight: 800;
    font-size: 12px;
}
.spn-modal__title{ margin: 12px 0 0; font-weight: 900; letter-spacing: -0.2px; }
.spn-modal__desc{ margin: 10px 0 0; color: rgba(255,255,255,0.70); line-height: 1.55; }
.spn-modal__meta{ margin-top: 14px; display:flex; gap: 10px; flex-wrap: wrap; }
.spn-metaPill{
    border: 1px solid var(--stroke2);
    background: rgba(0,0,0,0.16);
    padding: 7px 10px;
    border-radius: 999px;
    color: rgba(255,255,255,0.74);
    font-weight: 700;
    font-size: 12px;
}
.spn-modal__actions{ margin-top: 16px; display:flex; gap: 10px; flex-wrap: wrap; }
.spn-modal__fine{ margin-top: 12px; font-size: 12px; color: rgba(255,255,255,0.50); }

/* Responsive */
@media (max-width: 980px){
    .spn-gHero__inner{ grid-template-columns: 1fr; }
    .spn-feature__stats{ grid-template-columns: 1fr; }
    .spn-grid{ grid-template-columns: 1fr; }
    .spn-search input{ width: 160px; }
    .spn-why__rows{ grid-template-columns: 1fr; }
}
