:root {
    --bg: #0b0d11;
    --bg2: #10131a;
    --card: #161a24;
    --card2: #1c2130;
    --bdr: rgba(255, 255, 255, .06);
    --t1: #e8eaed;
    --t2: #8b90a0;
    --t3: #5a5f72;
    --ac: #4f7df5;
    --ac2: #3a6ae0;
    --ac3: #7ea3f7;
    --grad: #4f7df5;
    --r: 14px;
    --tr: .25s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--t1);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

#particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .45;
}

.grad {
    color: var(--ac);
}

/* NAV */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 0;
    background: rgba(10, 10, 15, .55);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid transparent;
    transition: var(--tr);
}

#navbar.scrolled {
    padding: 8px 0;
    background: rgba(10, 10, 15, .92);
    border-color: var(--bdr);
}

.nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 32px;
    filter: brightness(0) invert(1);
    transition: var(--tr);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-link {
    text-decoration: none;
    color: var(--t2);
    padding: 8px 18px;
    border-radius: 99px;
    font-size: .88rem;
    font-weight: 500;
    transition: var(--tr);
}

.nav-link:hover,
.nav-link.active {
    color: var(--t1);
    background: rgba(255, 255, 255, .06);
}

.menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--t1);
    border-radius: 2px;
    transition: var(--tr);
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* HERO */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    z-index: 1;
    overflow: hidden;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .25;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(10, 10, 15, .85) 0%, rgba(10, 10, 15, .6) 55%, rgba(10, 10, 15, .4) 100%), linear-gradient(to top, var(--bg) 0%, transparent 30%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
}

.hero-badge {
    display: inline-block;
    padding: 7px 18px;
    background: rgba(79, 125, 245, .08);
    border: 1px solid var(--bdr);
    border-radius: 99px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--ac);
    margin-bottom: 24px;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1;
    margin: 0;
}

.hero-title-sub {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 800;
    color: var(--ac);
    margin: 4px 0 24px;
}

.hero-desc {
    color: var(--t2);
    font-size: 1.05rem;
    max-width: 540px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stats {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 36px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(12px);
    border: 1px solid var(--bdr);
    border-radius: var(--r);
    padding: 24px 48px;
    margin-top: 60px;
}

.hstat {
    text-align: center;
}

.hstat-num {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
}

.hstat-lbl {
    font-size: .7rem;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .08em;
    line-height: 1.4;
}

.hstat-div {
    width: 1px;
    height: 44px;
    background: var(--bdr);
}

/* BTNS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 99px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--tr);
}

.btn-primary {
    background: var(--ac);
    color: #fff;
    box-shadow: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--ac2);
    box-shadow: 0 4px 16px rgba(79, 125, 245, .2);
}

.btn-ghost {
    background: transparent;
    color: var(--t1);
    border: 1px solid var(--bdr);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .15);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 16px;
    border-radius: 14px;
}

/* SECTIONS */
.section {
    position: relative;
    z-index: 1;
    padding: 90px 0;
}

.section-alt {
    background: var(--bg2);
}

.section-hdr {
    text-align: center;
    margin-bottom: 48px;
}

.badge {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(79, 125, 245, .08);
    border: 1px solid var(--bdr);
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 600;
    color: var(--ac);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 14px;
}

.stitle {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 10px;
}

.ssub {
    color: var(--t2);
    font-size: .95rem;
    max-width: 500px;
    margin: 0 auto;
}

.quote {
    font-style: italic;
    max-width: 600px;
    margin-top: 8px;
}

/* ENGINES */
.engines-row {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.engine-card {
    text-align: center;
    max-width: 340px;
    padding: 32px;
    background: var(--card);
    border: 1px solid var(--bdr);
    border-radius: var(--r);
    transition: var(--tr);
}

.engine-card:hover {
    transform: translateY(-6px);
    border-color: rgba(79, 125, 245, .3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

.engine-card img {
    height: 72px;
    margin-bottom: 16px;
}

.engine-card h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin-bottom: 8px;
}

.engine-card p {
    color: var(--t2);
    font-size: .85rem;
    line-height: 1.6;
}

/* PLATFORMS */
.plat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.plat-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--bdr);
    border-radius: var(--r);
    transition: var(--tr);
}

.plat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(79, 125, 245, .25);
}

.plat-ico {
    font-size: 2rem;
    flex-shrink: 0;
}

.plat-card h5 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 4px;
}

.plat-card p {
    color: var(--t2);
    font-size: .8rem;
    line-height: 1.5;
    margin: 0;
}

/* ABOUT */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.acard {
    padding: 28px;
    border-radius: var(--r);
}

.acard h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    margin-bottom: 20px;
    color: #111;
}

.aentry {
    margin-bottom: 18px;
}

.aentry h5 {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 2px;
    color: #222;
}

.aentry small {
    font-weight: 500;
    opacity: .7;
}

.adate {
    display: block;
    font-size: .8rem;
    color: rgba(0, 0, 0, .45);
    margin-bottom: 4px;
}

.aentry p {
    font-size: .85rem;
    color: rgba(0, 0, 0, .55);
    margin: 0;
}

.cert-link {
    font-size: .85rem;
    color: #0d6efd;
    text-decoration: underline;
    font-weight: 600;
}

.acard-yellow {
    background: #fff3cd;
}

.acard-green {
    background: #d1f5d3;
}

.acard-teal {
    background: #ccf0f3;
}

/* GAMES */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.fbtn {
    padding: 10px 24px;
    border-radius: 99px;
    font-size: .82rem;
    font-weight: 600;
    border: 1px solid var(--bdr);
    background: transparent;
    color: var(--t2);
    cursor: pointer;
    transition: var(--tr);
}

.fbtn:hover {
    color: var(--t1);
    border-color: rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .03);
}

.fbtn.active {
    background: var(--ac);
    color: #fff;
    border-color: transparent;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Premium Game Card */
.game-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--bdr);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all .4s cubic-bezier(.4, 0, .2, 1);
    opacity: 0;
    transform: translateY(28px);
    animation: cardUp .55s ease forwards;
}

.game-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    background: var(--ac);
    opacity: 0;
    z-index: -1;
    transition: opacity .4s;
    padding: 2px;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
}

.game-card:hover::before {
    opacity: 0;
}

/* Card Image */
.game-card .gimg {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.game-card .gimg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}

.game-card:hover .gimg img {
    transform: scale(1.12);
}

.game-card .gimg .gover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all .4s;
}

.game-card:hover .gimg .gover {
    opacity: 1;
}

.gover span {
    padding: 10px 24px;
    border-radius: 99px;
    background: #fff;
    color: #111;
    font-size: .8rem;
    font-weight: 700;
    transform: translateY(12px);
    transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
    letter-spacing: .02em;
}

.game-card:hover .gover span {
    transform: translateY(0);
}

/* Engine badge on image */
.gimg .engine-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: .68rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    z-index: 2;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.engine-badge.eb-construct {
    background: rgba(38, 166, 91, .85);
    color: #fff;
}

.engine-badge.eb-unity {
    background: rgba(30, 30, 30, .85);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
}

.engine-badge.eb-others {
    background: rgba(255, 149, 0, .85);
    color: #fff;
}

/* Card Body */
.game-card .gbody {
    padding: 18px 20px 20px;
}

.game-card .gtags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.game-card .gtag {
    padding: 3px 10px;
    border-radius: 99px;
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.gtag-c1 {
    background: rgba(79, 125, 245, .08);
    color: var(--ac3);
    border: 1px solid rgba(79, 125, 245, .12);
}

.gtag-c2 {
    background: rgba(255, 255, 255, .04);
    color: var(--t2);
    border: 1px solid var(--bdr);
}

.game-card .gtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.game-card .gdesc {
    font-size: .8rem;
    color: var(--t2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
}

.game-card .gfoot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--bdr);
    font-size: .75rem;
    color: var(--t3);
}

.game-card .gfoot .gplatform {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: var(--tr);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--bg2);
    border: 1px solid var(--bdr);
    border-radius: 20px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(.92) translateY(16px);
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-x {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(8px);
    border: 1px solid var(--bdr);
    color: var(--t1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--tr);
}

.modal-x:hover {
    background: rgba(255, 255, 255, .1);
}

.modal-hero {
    position: relative;
}

.modal-hero img {
    width: 100%;
    aspect-ratio: 2.5 / 1;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

.modal-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, var(--bg2), transparent);
}

.modal-body {
    padding: 20px 24px 24px;
    margin-top: -28px;
    position: relative;
    z-index: 2;
}

.modal-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.modal-tags .tag {
    padding: 3px 9px;
    border-radius: 99px;
    font-size: .68rem;
    font-weight: 500;
    background: rgba(79, 125, 245, .08);
    color: var(--ac3);
    border: 1px solid rgba(79, 125, 245, .12);
}

.modal-body h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-body>p {
    color: var(--t2);
    font-size: .85rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.modal-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.modal-meta>div {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--bdr);
    border-radius: 10px;
    text-align: center;
}

.ml {
    display: block;
    font-size: .62rem;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 2px;
}

.mv {
    font-weight: 600;
    font-size: .9rem;
}

/* CONTACT */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.ccard {
    text-decoration: none;
    color: var(--t1);
    padding: 28px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--bdr);
    border-radius: var(--r);
    transition: var(--tr);
}

.ccard:hover {
    transform: translateY(-6px);
    border-color: rgba(79, 125, 245, .25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

.cico {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 14px;
}

.ccard h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 1rem;
}

.ccard p {
    color: var(--t3);
    font-size: .8rem;
    margin: 0;
}

/* FOOTER */
.footer {
    padding: 28px 0;
    border-top: 1px solid var(--bdr);
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer p {
    color: var(--t3);
    font-size: .8rem;
}

/* ANIMATIONS */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp .7s ease forwards;
}

.d1 {
    animation-delay: .1s;
}

.d2 {
    animation-delay: .2s;
}

.d3 {
    animation-delay: .3s;
}

.d4 {
    animation-delay: .4s;
}

.d5 {
    animation-delay: .55s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--card2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ac);
}

/* RESPONSIVE */
@media(max-width:900px) {

    .plat-grid,
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        margin-top: 32px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 20px 28px;
        gap: 24px;
    }

    .hero {
        padding: 100px 20px 40px;
    }

    .hero-overlay {
        background: radial-gradient(ellipse at center, rgba(10, 10, 15, .9), rgba(10, 10, 15, .7)) !important;
    }
}

@media(max-width:640px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 12px;
        background: rgba(10, 10, 15, .96);
        backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--bdr);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: flex;
    }

    .plat-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        gap: 20px;
        padding: 16px 20px;
    }

    .hstat-num {
        font-size: 1.4rem;
    }

    .hstat-div {
        display: none;
    }
}