/* =========================================================
   AMERICA PIXEL GAMES
   Main Website Styles
   ========================================================= */

:root {
    --apg-bg: #05070a;
    --apg-bg-soft: #0a0e14;
    --apg-surface: #0d131b;
    --apg-surface-light: #121a24;

    --apg-white: #f5f7fa;
    --apg-muted: #8b96a5;

    --apg-cyan: #00e5ff;
    --apg-cyan-dark: #00a9bd;

    --apg-purple: #8b5cf6;
    --apg-pink: #ec4899;

    --apg-border: rgba(255, 255, 255, 0.09);

    --apg-max-width: 1280px;

    --apg-font:
        Inter,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    --apg-mono:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
}


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

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    background: var(--apg-bg);
    color: var(--apg-white);

    font-family: var(--apg-font);

    line-height: 1.6;

    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   GLOBAL
   ========================================================= */

.apg-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 80% 10%,
            rgba(0, 229, 255, 0.08),
            transparent 30%),
        radial-gradient(circle at 20% 40%,
            rgba(139, 92, 246, 0.05),
            transparent 35%),
        var(--apg-bg);
}

.apg-container {
    width: min(calc(100% - 48px),
            var(--apg-max-width));

    margin: 0 auto;
}

.apg-section {
    position: relative;

    padding: 120px 0;

    overflow: hidden;
}


/* =========================================================
   HERO
   ========================================================= */

.apg-hero {
    position: relative;

    min-height: 92vh;

    display: flex;
    align-items: center;

    overflow: hidden;

    border-bottom: 1px solid var(--apg-border);

    background:
        radial-gradient(circle at 75% 35%,
            rgba(0, 229, 255, 0.12),
            transparent 25%),
        radial-gradient(circle at 20% 70%,
            rgba(139, 92, 246, 0.08),
            transparent 30%);
}


/* Background grid */

.apg-hero::before {
    content: "";

    position: absolute;
    inset: 0;

    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: 70px 70px;

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

    pointer-events: none;
}


/* Cyan glow */

.apg-hero::after {
    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    right: -200px;
    top: 10%;

    border-radius: 50%;

    background: var(--apg-cyan);

    opacity: 0.06;

    filter: blur(100px);

    pointer-events: none;
}


.apg-hero-grid {
    position: relative;
    z-index: 2;

    width: min(calc(100% - 48px),
            var(--apg-max-width));

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        minmax(0, 1.4fr) minmax(280px, 0.6fr);

    gap: 80px;

    align-items: center;
}


.apg-hero-content {
    max-width: 850px;
}


/* Eyebrow */

.apg-eyebrow {
    display: inline-flex;

    align-items: center;
    gap: 10px;

    margin-bottom: 28px;

    color: var(--apg-cyan);

    font-family: var(--apg-mono);
    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 0.18em;
    text-transform: uppercase;
}


.apg-status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--apg-cyan);

    box-shadow:
        0 0 10px var(--apg-cyan),
        0 0 20px rgba(0, 229, 255, 0.5);

    animation: apg-pulse 2s infinite;
}


@keyframes apg-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.45;
        transform: scale(0.75);
    }
}


/* Hero title */

.apg-hero h1 {
    margin: 0;

    max-width: 1000px;

    font-size: clamp(3.5rem,
            8vw,
            7.8rem);

    line-height: 0.9;

    font-weight: 900;

    letter-spacing: -0.065em;

    text-transform: uppercase;
}


.apg-hero h1 span {
    color: var(--apg-cyan);

    text-shadow:
        0 0 30px rgba(0, 229, 255, 0.25);
}


/* ── Word cycler ── */

.apg-word-cycle {
    position: relative;

    display: inline-block;

    /* clip words as they slide in/out */
    overflow: hidden;

    /* tall enough for one line of text at any font size */
    vertical-align: bottom;

    /* match the h1 line-height exactly */
    line-height: inherit;

    color: var(--apg-cyan);

    text-shadow: 0 0 30px rgba(0, 229, 255, 0.25);
}

.apg-word {
    display: block;
}

/* Resting / visible state */
.apg-word--active {
    animation: word-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Exit: slide up and fade out */
.apg-word--exit {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    animation: word-out 0.45s cubic-bezier(0.55, 0, 1, 0.45) both;
}

/* Enter: starts below, slides up */
.apg-word--enter {
    transform: translateY(110%);
    opacity: 0;
}

@keyframes word-in {
    from {
        transform: translateY(110%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes word-out {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-110%);
        opacity: 0;
    }
}


.apg-hero-description {
    max-width: 650px;

    margin-top: 35px;

    color: var(--apg-muted);

    font-size: 1.15rem;

    line-height: 1.8;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.apg-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 14px;

    margin-top: 42px;
}


.apg-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 52px;

    padding: 0 26px;

    border: 1px solid var(--apg-border);

    font-family: var(--apg-mono);

    font-size: 0.75rem;

    font-weight: 700;

    letter-spacing: 0.12em;

    text-transform: uppercase;

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


.apg-button:hover {
    transform: translateY(-3px);
}


.apg-button-primary {
    color: #001014;

    background: var(--apg-cyan);

    border-color: var(--apg-cyan);

    box-shadow:
        0 0 25px rgba(0, 229, 255, 0.15);
}


.apg-button-primary:hover {
    background: #5ff3ff;

    box-shadow:
        0 0 35px rgba(0, 229, 255, 0.35);
}


.apg-button-secondary {
    color: var(--apg-white);

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


.apg-button-secondary:hover {
    border-color: rgba(0, 229, 255, 0.4);

    background: rgba(0, 229, 255, 0.05);
}


/* =========================================================
   HERO STATS
   ========================================================= */

.apg-hero-stats {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 1px;

    margin-top: 70px;

    max-width: 600px;

    background: var(--apg-border);

    border: 1px solid var(--apg-border);
}


.apg-stat {
    padding: 22px;

    background: rgba(5, 7, 10, 0.85);
}


.apg-stat-number {
    display: block;

    color: var(--apg-white);

    font-size: 1.8rem;

    font-weight: 800;
}


.apg-stat-label {
    display: block;

    margin-top: 4px;

    color: var(--apg-muted);

    font-family: var(--apg-mono);

    font-size: 0.65rem;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}


/* =========================================================
   HERO SIDE VISUAL
   ========================================================= */

.apg-hero-visual {
    position: relative;

    min-height: 500px;

    display: flex;

    align-items: center;
    justify-content: center;
}


.apg-hero-visual::before {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    border: 1px solid rgba(0, 229, 255, 0.2);

    transform: rotate(45deg);

    box-shadow:
        0 0 80px rgba(0, 229, 255, 0.06);

    animation: apg-float 8s ease-in-out infinite;
}


.apg-hero-visual::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    border: 1px solid rgba(139, 92, 246, 0.3);

    transform: rotate(45deg);

    animation: apg-float-reverse 7s ease-in-out infinite;
}


@keyframes apg-float {

    0%,
    100% {
        transform:
            rotate(45deg) translateY(0);
    }

    50% {
        transform:
            rotate(45deg) translateY(-20px);
    }
}


@keyframes apg-float-reverse {

    0%,
    100% {
        transform:
            rotate(45deg) translateY(0);
    }

    50% {
        transform:
            rotate(45deg) translateY(20px);
    }
}


/* =========================================================
   SECTION HEADERS
   ========================================================= */

.apg-section-header {
    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    gap: 40px;

    margin-bottom: 55px;
}


.apg-section-label {
    margin-bottom: 12px;

    color: var(--apg-cyan);

    font-family: var(--apg-mono);

    font-size: 0.7rem;

    font-weight: 700;

    letter-spacing: 0.18em;

    text-transform: uppercase;
}


.apg-section-title {
    margin: 0;

    font-size: clamp(2.5rem,
            5vw,
            5rem);

    line-height: 0.95;

    letter-spacing: -0.05em;

    text-transform: uppercase;
}


.apg-section-description {
    max-width: 450px;

    color: var(--apg-muted);

    line-height: 1.7;
}


/* =========================================================
   GAMES / GALLERY
   ========================================================= */

.apg-games {
    background: var(--apg-bg-soft);

    /* section only has top/bottom padding on the header,
       the marquee track bleeds edge-to-edge */
    padding-bottom: 0;
}

.apg-games .apg-section-header {
    margin-bottom: 50px;
}


/* ── Gallery track wrap ── */

.apg-gallery-track-wrap {
    position: relative;

    overflow: hidden;

    /* fade left/right edges */
    mask-image:
        linear-gradient(
            to right,
            transparent 0%,
            black 8%,
            black 92%,
            transparent 100%
        );
    -webkit-mask-image:
        linear-gradient(
            to right,
            transparent 0%,
            black 8%,
            black 92%,
            transparent 100%
        );

    cursor: grab;
}

.apg-gallery-track-wrap:active {
    cursor: grabbing;
}


/* ── Scrolling row ── */

.apg-gallery-track {
    display: flex;

    gap: 22px;

    padding: 20px 0 28px;

    /* marquee: total width = (tile-width + gap) × count */
    width: max-content;

    animation: apg-marquee 28s linear infinite;
    will-change: transform;
}

.apg-gallery-track-wrap:hover .apg-gallery-track {
    animation-play-state: paused;
}

@keyframes apg-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }   /* half = one set of 5 */
}


/* ── Individual game tile ── */

.apg-game-tile {
    position: relative;

    flex-shrink: 0;

    width: 200px;
    height: 200px;

    border-radius: 28px;

    overflow: hidden;

    border: 1px solid var(--apg-border);

    /* subtle lift start */
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);

    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-color 0.3s ease,
        box-shadow 0.35s ease;
}

.apg-game-tile:hover {
    transform: translateY(-10px) scale(1.04);

    border-color: rgba(0, 229, 255, 0.5);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 229, 255, 0.12);
}

.apg-game-tile img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    transition: transform 0.5s ease;
}

.apg-game-tile:hover img {
    transform: scale(1.08);
}


/* ── Glass overlay (hidden by default, shown on hover) ── */

.apg-game-tile-glass {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 18px;

    background:
        linear-gradient(
            to top,
            rgba(5, 7, 10, 0.96) 0%,
            rgba(5, 7, 10, 0.65) 50%,
            rgba(5, 7, 10, 0.0) 100%
        );

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

    opacity: 0;

    transform: translateY(8px);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        backdrop-filter 0.3s ease;
}

.apg-game-tile:hover .apg-game-tile-glass {
    opacity: 1;

    transform: translateY(0);

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

.apg-game-tile-tag {
    color: var(--apg-cyan);

    font-family: var(--apg-mono);

    font-size: 0.58rem;

    font-weight: 700;

    letter-spacing: 0.16em;

    text-transform: uppercase;

    margin-bottom: 5px;
}

.apg-game-tile-name {
    display: block;

    color: var(--apg-white);

    font-size: 0.95rem;

    font-weight: 700;

    line-height: 1.2;

    letter-spacing: -0.01em;

    margin-bottom: 10px;
}

.apg-game-tile-cta {
    display: inline-block;

    color: var(--apg-cyan);

    font-family: var(--apg-mono);

    font-size: 0.65rem;

    font-weight: 700;

    letter-spacing: 0.1em;

    transition: letter-spacing 0.2s ease;
}

.apg-game-tile:hover .apg-game-tile-cta {
    letter-spacing: 0.18em;
}


/* ── Gallery footer CTA ── */

.apg-gallery-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding-top: 40px;
    padding-bottom: 100px;

    flex-wrap: wrap;
}

.apg-gallery-footer-text {
    margin: 0;

    color: var(--apg-muted);

    font-family: var(--apg-mono);

    font-size: 0.7rem;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}


.apg-games-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}


.apg-game-card {
    position: relative;

    min-height: 420px;

    display: flex;

    flex-direction: column;

    justify-content: flex-end;

    padding: 30px;

    overflow: hidden;

    border: 1px solid var(--apg-border);

    background:
        linear-gradient(to top,
            rgba(0, 0, 0, 0.95),
            rgba(0, 0, 0, 0.1)),
        var(--apg-surface);

    transition:
        transform 0.35s ease,
        border-color 0.35s ease;
}


.apg-game-card::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(135deg,
            rgba(0, 229, 255, 0.12),
            transparent 40%,
            rgba(139, 92, 246, 0.08));

    opacity: 0.7;

    transition: opacity 0.35s ease;
}


.apg-game-card:hover {
    transform: translateY(-8px);

    border-color:
        rgba(0, 229, 255, 0.4);
}


.apg-game-card:hover::before {
    opacity: 1;
}




.apg-game-number {
    color: var(--apg-cyan);

    font-family: var(--apg-mono);

    font-size: 0.7rem;

    letter-spacing: 0.15em;
}


.apg-game-card h3 {
    margin: 10px 0 8px;

    font-size: 2rem;

    line-height: 1;

    text-transform: uppercase;
}


.apg-game-card p {
    margin: 0;

    color: var(--apg-muted);

    font-size: 0.9rem;
}


/* =========================================================
   FUTURE / PLATFORMS
   ========================================================= */

.apg-future {
    position: relative;

    background: var(--apg-bg);
}


.apg-future-content {
    position: relative;
    z-index: 2;

    text-align: center;
}


.apg-future-title {
    max-width: 900px;

    margin: 0 auto;

    font-size: clamp(3rem,
            7vw,
            7rem);

    line-height: 0.9;

    letter-spacing: -0.06em;

    text-transform: uppercase;
}


.apg-future-title span {
    color: var(--apg-cyan);
}


.apg-platforms {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 1px;

    margin-top: 70px;

    background: var(--apg-border);

    border: 1px solid var(--apg-border);
}


.apg-platform {
    min-height: 150px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 25px;

    background: var(--apg-bg);

    color: var(--apg-muted);

    font-family: var(--apg-mono);

    font-size: 0.75rem;

    font-weight: 700;

    letter-spacing: 0.12em;

    text-align: center;

    text-transform: uppercase;

    transition:
        color 0.25s ease,
        background 0.25s ease;
}


.apg-platform:hover {
    color: var(--apg-cyan);

    background:
        rgba(0, 229, 255, 0.035);
}


/* =========================================================
   COMMUNITY
   ========================================================= */

.apg-community {
    background:
        radial-gradient(circle at 50% 0%,
            rgba(0, 229, 255, 0.08),
            transparent 40%),
        var(--apg-bg-soft);
}


.apg-community-content {
    max-width: 900px;

    margin: 0 auto;

    text-align: center;
}


.apg-community-title {
    margin: 0;

    font-size: clamp(2.8rem,
            6vw,
            6rem);

    line-height: 0.95;

    letter-spacing: -0.055em;

    text-transform: uppercase;
}


.apg-community-description {
    max-width: 650px;

    margin: 30px auto 0;

    color: var(--apg-muted);

    font-size: 1.05rem;

    line-height: 1.8;
}


.apg-socials {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 10px;

    margin-top: 45px;
}


.apg-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    min-width: 90px;
    padding: 18px 16px 14px;

    border: 1px solid var(--apg-border);

    color: var(--apg-muted);

    font-family: var(--apg-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;

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


.apg-social:hover {
    color: var(--apg-cyan);

    border-color: rgba(0, 229, 255, 0.4);

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

    box-shadow: 0 0 20px rgba(0, 229, 255, 0.08);

    transform: translateY(-4px);
}


/* SVG icon inside each social link */

.apg-social-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.apg-social:hover .apg-social-icon {
    transform: scale(1.15);
}


/* =========================================================
   FINAL CTA
   ========================================================= */

.apg-cta {
    position: relative;

    padding: 150px 0;

    text-align: center;

    overflow: hidden;

    border-top: 1px solid var(--apg-border);
}


.apg-cta::before {
    content: "";

    position: absolute;

    width: 600px;
    height: 600px;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    background:
        radial-gradient(circle,
            rgba(0, 229, 255, 0.09),
            transparent 65%);

    pointer-events: none;
}


.apg-cta-content {
    position: relative;
    z-index: 2;
}


.apg-cta-title {
    margin: 0;

    font-size: clamp(4rem,
            10vw,
            10rem);

    line-height: 0.8;

    font-weight: 900;

    letter-spacing: -0.07em;

    text-transform: uppercase;
}


.apg-cta-title span {
    color: var(--apg-cyan);
}


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

.footer {
    padding: 35px 24px;

    background: #030405;

    border-top: 1px solid var(--apg-border);

    color: var(--apg-muted);

    font-family: var(--apg-mono);

    font-size: 0.7rem;

    letter-spacing: 0.08em;

    text-align: center;
}


.footer a {
    color: var(--apg-cyan);

    transition: opacity 0.2s ease;
}


.footer a:hover {
    opacity: 0.7;
}


/* =========================================================
   OLD FLEXJS COMPONENT COMPATIBILITY
   ========================================================= */

/*
 * These classes keep older FlexJS components usable while
 * the America Pixel Art design replaces the original UI.
 */

.header {
    background: var(--apg-bg);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--apg-border);
}


.intro-section {
    background: var(--apg-bg);
    color: var(--apg-white);
    padding: 80px 24px;
    text-align: center;
}


.features-section {
    padding: 80px 24px;
    background: var(--apg-bg-soft);
}


.feature-box {
    background: var(--apg-surface);
    padding: 25px;
    margin: 15px;
    text-align: center;
    border: 1px solid var(--apg-border);
    border-radius: 0;
    box-shadow: none;
}


.feature-box h3 {
    margin-top: 15px;
    font-size: 1.5em;
}


.icon {
    font-size: 2em;
    color: var(--apg-cyan);
}


.demos-section {
    padding: 80px 24px;
    background: var(--apg-bg);
}


.demo-row {
    margin-bottom: 40px;
}


pre {
    background: #020304;

    color: #dce7ec;

    padding: 20px;

    border: 1px solid var(--apg-border);

    border-radius: 0;

    overflow-x: auto;
}


code {
    font-family: var(--apg-mono);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {

    .apg-hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .apg-hero-visual {
        display: flex;
        min-height: 340px;
        margin: 20px auto 0;
        transform: scale(0.85);
    }

    .apg-games-grid {
        grid-template-columns: 1fr 1fr;
    }

    .apg-platforms {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 700px) {

    .apg-container {
        width: min(calc(100% - 32px),
                var(--apg-max-width));
    }

    .apg-section {
        padding: 80px 0;
    }

    .apg-hero {
        min-height: 90vh;
    }

    .apg-hero-grid {
        width: min(calc(100% - 32px),
                var(--apg-max-width));
    }

    .apg-hero h1 {
        font-size: clamp(3.2rem,
                16vw,
                5.5rem);
    }

    .apg-hero-description {
        font-size: 1rem;
    }

    .apg-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .apg-button {
        width: 100%;
    }

    .apg-hero-stats {
        grid-template-columns: 1fr;
    }

    .apg-section-header {
        display: block;
    }

    .apg-section-description {
        margin-top: 25px;
    }

    .apg-games-grid {
        grid-template-columns: 1fr;
    }

    .apg-game-card {
        min-height: 350px;
    }

    .apg-platforms {
        grid-template-columns: 1fr;
    }

    .apg-platform {
        min-height: 110px;
    }

    .apg-socials {
        /* 2-column grid on mobile — icons look better than full-width */
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .apg-social {
        width: 100%;
        min-width: unset;
    }

    .apg-cta {
        padding: 100px 0;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}


:focus-visible {
    outline: 2px solid var(--apg-cyan);

    outline-offset: 4px;
}


/* =========================================================
   APG NAVBAR
   ========================================================= */

.apg-navbar {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;

    z-index: 1000;

    background: transparent;

    border-bottom: 1px solid transparent;

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

    /* start invisible, slide up */
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;

    transition:
        opacity 0.45s ease,
        transform 0.45s ease,
        background 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease,
        backdrop-filter 0.35s ease;
}


.apg-navbar-scrolled {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;

    background:
        rgba(5, 7, 10, 0.88);

    border-bottom-color:
        rgba(0, 229, 255, 0.12);

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

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.3);
}


.apg-navbar-inner {
    width: min(calc(100% - 48px),
            var(--apg-max-width));

    height: 78px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 40px;
}


/* Brand */

.apg-brand {
    display: flex;

    align-items: center;

    gap: 12px;

    flex-shrink: 0;
}


.apg-brand-mark {
    width: 40px;
    height: 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--apg-cyan);

    color: var(--apg-cyan);

    font-family: var(--apg-mono);

    font-size: 0.65rem;

    font-weight: 900;

    letter-spacing: -0.05em;

    box-shadow:
        inset 0 0 15px rgba(0, 229, 255, 0.06),
        0 0 15px rgba(0, 229, 255, 0.08);
}


.apg-brand-name {
    display: flex;

    flex-direction: column;

    color: var(--apg-white);

    font-family: var(--apg-mono);

    font-size: 0.65rem;

    line-height: 1.05;

    letter-spacing: 0.08em;
}


.apg-brand-name strong {
    color: var(--apg-cyan);

    font-weight: 800;
}


/* Desktop navigation */

.apg-nav {
    display: flex;

    align-items: center;

    gap: 34px;

    margin-left: auto;
}


.apg-nav-link {
    position: relative;

    color: var(--apg-muted);

    font-family: var(--apg-mono);

    font-size: 0.65rem;

    font-weight: 700;

    letter-spacing: 0.12em;

    transition:
        color 0.2s ease;
}


.apg-nav-link::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -8px;

    width: 0;
    height: 1px;

    background: var(--apg-cyan);

    transition:
        width 0.25s ease;
}


.apg-nav-link:hover {
    color: var(--apg-white);
}


.apg-nav-link:hover::after {
    width: 100%;
}


/* Join button */

.apg-nav-cta {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 10px 15px;

    border: 1px solid rgba(0, 229, 255, 0.35);

    color: var(--apg-cyan);

    font-family: var(--apg-mono);

    font-size: 0.62rem;

    font-weight: 700;

    letter-spacing: 0.1em;

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


.apg-nav-cta:hover {
    background:
        rgba(0, 229, 255, 0.08);

    border-color:
        var(--apg-cyan);

    transform: translateY(-2px);
}

/* Language Switcher */
.apg-lang-switch {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 24px;
    margin-right: 24px;
}

.apg-lang-btn {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--apg-mono);
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.apg-lang-btn:hover {
    color: var(--apg-white);
    background: rgba(255, 255, 255, 0.03);
}

.apg-lang-btn--active {
    color: var(--apg-cyan);
    border-color: rgba(0, 229, 255, 0.2);
    background: rgba(0, 229, 255, 0.08);
}

.apg-lang-flag {
    font-size: 1.1em;
    filter: grayscale(100%) opacity(0.5);
    transition: all 0.2s ease;
}

.apg-lang-btn:hover .apg-lang-flag {
    filter: grayscale(50%) opacity(0.8);
}

.apg-lang-btn--active .apg-lang-flag {
    filter: grayscale(0%) opacity(1);
}

.apg-lang-sep {
    color: rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.apg-mobile-lang-switch {
    display: none;
}


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

.apg-mobile-menu {
    display: none;

    width: 42px;
    height: 42px;

    padding: 10px;

    border: 1px solid var(--apg-border);

    background: transparent;

    cursor: pointer;
}


.apg-mobile-menu span {
    display: block;

    width: 100%;
    height: 1px;

    margin: 5px 0;

    background: var(--apg-white);
}


.apg-mobile-navigation {
    display: none;
}


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

.apg-footer {
    background: #030405;

    border-top:
        1px solid var(--apg-border);
}


.apg-footer-inner {
    width: min(calc(100% - 48px),
            var(--apg-max-width));

    min-height: 110px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 40px;
}


.apg-footer-brand {
    display: flex;

    align-items: center;

    gap: 14px;
}


.apg-footer-logo {
    width: 36px;
    height: 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(0, 229, 255, 0.5);

    color: var(--apg-cyan);

    font-family: var(--apg-mono);

    font-size: 0.6rem;

    font-weight: 900;
}


.apg-footer-brand div:last-child {
    display: flex;

    flex-direction: column;

    gap: 3px;
}


.apg-footer-brand strong {
    color: var(--apg-white);

    font-family: var(--apg-mono);

    font-size: 0.65rem;

    letter-spacing: 0.08em;
}


.apg-footer-brand span {
    color: var(--apg-muted);

    font-family: var(--apg-mono);

    font-size: 0.55rem;

    letter-spacing: 0.12em;
}


.apg-footer-links {
    display: flex;

    gap: 25px;
}


.apg-footer-links a {
    color: var(--apg-muted);

    font-family: var(--apg-mono);

    font-size: 0.6rem;

    letter-spacing: 0.1em;

    transition:
        color 0.2s ease;
}


.apg-footer-links a:hover {
    color: var(--apg-cyan);
}


.apg-footer-copy {
    color: #59616b;

    font-family: var(--apg-mono);

    font-size: 0.55rem;

    letter-spacing: 0.04em;
}


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

@media (max-width: 700px) {

    .apg-navbar-inner {
        width: calc(100% - 32px);

        height: 68px;
    }


    .apg-nav,
    .apg-nav-cta,
    .apg-lang-switch {
        display: none;
    }


    .apg-mobile-menu {
        display: block;
    }


    .apg-mobile-navigation {
        position: fixed;

        z-index: 999;

        top: 68px;
        left: 0;

        width: 100%;

        display: flex;

        flex-direction: column;

        padding: 20px 16px 30px;

        background:
            rgba(5, 7, 10, 0.97);

        border-bottom:
            1px solid var(--apg-border);

        backdrop-filter: blur(20px);

        transform:
            translateY(-20px);

        opacity: 0;

        pointer-events: none;

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


    .apg-mobile-navigation.is-open {
        transform:
            translateY(0);

        opacity: 1;

        pointer-events: auto;
    }

    .apg-mobile-lang-switch {
        display: flex;
    }


    .apg-mobile-navigation a {
        padding: 18px;

        border-bottom:
            1px solid var(--apg-border);

        color: var(--apg-muted);

        font-family: var(--apg-mono);

        font-size: 0.75rem;

        font-weight: 700;

        letter-spacing: 0.15em;
    }


    .apg-mobile-navigation a:hover {
        color: var(--apg-cyan);
    }


    .apg-footer-inner {
        width: calc(100% - 32px);

        padding: 30px 0;

        flex-direction: column;

        align-items: flex-start;

        gap: 25px;
    }


    .apg-footer-links {
        flex-wrap: wrap;

        gap: 18px;
    }
}


/* =========================================================
   GAME CARD IMAGES
   ========================================================= */

.apg-game-card-img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center top;

    z-index: 0;

    transition: transform 0.5s ease;
}


.apg-game-card:hover .apg-game-card-img {
    transform: scale(1.05);
}


/* overlay on top of image */
.apg-game-card::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(to top,
            rgba(5, 7, 10, 0.97) 0%,
            rgba(5, 7, 10, 0.55) 50%,
            rgba(5, 7, 10, 0.15) 100%);

    z-index: 1;
}


.apg-game-card-content {
    position: relative;
    z-index: 3;
}


/* Large card (first game card) */
.apg-game-card--large {
    grid-column: span 1;
}


/* Game link */
.apg-game-link {
    display: inline-block;

    margin-top: 14px;

    color: var(--apg-cyan);

    font-family: var(--apg-mono);

    font-size: 0.7rem;

    font-weight: 700;

    letter-spacing: 0.12em;

    transition: letter-spacing 0.2s ease, opacity 0.2s ease;
}


.apg-game-link:hover {
    letter-spacing: 0.2em;

    opacity: 0.8;
}


/* =========================================================
   SCROLL INDICATOR
   ========================================================= */

.apg-scroll-indicator {
    position: absolute;

    bottom: 36px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 10px;

    color: var(--apg-muted);

    font-family: var(--apg-mono);

    font-size: 0.6rem;

    letter-spacing: 0.18em;

    text-transform: uppercase;

    z-index: 5;

    animation: apg-fade-up 1.5s ease 1s both;
}


.apg-scroll-line {
    width: 1px;
    height: 48px;

    background:
        linear-gradient(to bottom,
            var(--apg-cyan),
            transparent);

    animation: apg-scroll-line 2s ease-in-out infinite;
}


@keyframes apg-scroll-line {
    0%, 100% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    50% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
}


@keyframes apg-fade-up {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* =========================================================
   HERO VISUAL INNER
   ========================================================= */

.apg-hero-visual-inner {
    position: relative;

    width: 320px;
    height: 320px;

    border: 1px solid rgba(0, 229, 255, 0.15);

    transform: rotate(45deg);

    animation: apg-float 8s ease-in-out infinite;
}


.apg-hero-visual-inner::before {
    content: "";

    position: absolute;
    inset: 30px;

    border: 1px solid rgba(139, 92, 246, 0.25);

    animation: apg-float-reverse 6s ease-in-out infinite;
}


.apg-hero-visual-inner::after {
    content: "";

    position: absolute;
    inset: 60px;

    border: 1px solid rgba(0, 229, 255, 0.1);

    background: rgba(0, 229, 255, 0.02);
}


/* =========================================================
   HERO LOGO OVER FLOATING GEOMETRY
   ========================================================= */

.apg-hero-visual {
    position: relative;
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apg-hero-logo-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: auto;
}

.apg-hero-logo-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(0, 229, 255, 0.45) 0%,
        rgba(139, 92, 246, 0.28) 42%,
        rgba(0, 150, 255, 0.1) 60%,
        transparent 75%
    );
    filter: blur(48px);
    animation: apg-logo-pulse 4.5s ease-in-out infinite alternate;
    pointer-events: none;
}

.apg-hero-logo-img {
    position: relative;
    z-index: 3;
    width: 330px;
    max-width: 85%;
    height: auto;
    filter: drop-shadow(0 20px 35px rgba(0, 229, 255, 0.45))
            drop-shadow(0 0 55px rgba(139, 92, 246, 0.35));
    animation: apg-dolphin-float 5s ease-in-out infinite;
    transform-origin: center center;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
    cursor: pointer;
}

.apg-hero-logo-img:hover {
    filter: drop-shadow(0 28px 48px rgba(0, 229, 255, 0.75))
            drop-shadow(0 0 75px rgba(0, 229, 255, 0.6));
    animation-play-state: paused;
}

@keyframes apg-dolphin-float {
    0% {
        transform: translateY(0px) rotate(0deg) scale(1);
        filter: drop-shadow(0 18px 30px rgba(0, 229, 255, 0.4))
                drop-shadow(0 0 45px rgba(139, 92, 246, 0.3));
    }
    50% {
        transform: translateY(-16px) rotate(-1.5deg) scale(1.025);
        filter: drop-shadow(0 32px 50px rgba(0, 229, 255, 0.6))
                drop-shadow(0 0 65px rgba(0, 229, 255, 0.5));
    }
    100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        filter: drop-shadow(0 18px 30px rgba(0, 229, 255, 0.4))
                drop-shadow(0 0 45px rgba(139, 92, 246, 0.3));
    }
}

@keyframes apg-logo-pulse {
    0% {
        transform: scale(0.85);
        opacity: 0.55;
    }
    50% {
        transform: scale(1.18);
        opacity: 0.95;
    }
    100% {
        transform: scale(0.85);
        opacity: 0.55;
    }
}

/* Floating Pixel Particles */
.apg-hero-sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--apg-cyan);
    box-shadow: 0 0 12px var(--apg-cyan);
    pointer-events: none;
    border-radius: 2px;
    z-index: 4;
}

.apg-sparkle-1 {
    top: 24%;
    left: 20%;
    animation: apg-sparkle-float 4.2s ease-in-out infinite;
}

.apg-sparkle-2 {
    bottom: 22%;
    right: 18%;
    width: 6px;
    height: 6px;
    background: #8b5cf6;
    box-shadow: 0 0 14px #8b5cf6;
    animation: apg-sparkle-float 5s ease-in-out infinite 1.2s;
}

.apg-sparkle-3 {
    top: 64%;
    left: 14%;
    width: 10px;
    height: 10px;
    animation: apg-sparkle-float 6s ease-in-out infinite 2.5s;
}

.apg-sparkle-4 {
    top: 18%;
    right: 24%;
    width: 7px;
    height: 7px;
    background: #00e5ff;
    animation: apg-sparkle-float 4.8s ease-in-out infinite 1.8s;
}

@keyframes apg-sparkle-float {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-22px) translateX(10px) scale(1.25);
        opacity: 0.95;
    }
    100% {
        transform: translateY(-44px) translateX(20px) scale(0.5);
        opacity: 0;
    }
}


/* =========================================================
   SECTION TITLE / LABEL SPAN COLORS
   ========================================================= */

.apg-section-title span,
.apg-future-title span,
.apg-community-title span {
    color: var(--apg-cyan);
}


/* =========================================================
   FUTURE SECTION EXTRAS
   ========================================================= */

.apg-future-description {
    max-width: 580px;

    margin: 25px auto 0;

    color: var(--apg-muted);

    font-size: 1.05rem;

    line-height: 1.8;
}


/* =========================================================
   CTA DESCRIPTION
   ========================================================= */

.apg-cta-description {
    max-width: 480px;

    margin: 20px auto 40px;

    color: var(--apg-muted);

    font-size: 1.05rem;

    line-height: 1.7;
}


/* =========================================================
   PLATFORM INNER LAYOUT
   ========================================================= */

.apg-platform {
    flex-direction: column;
    gap: 6px;
}

.apg-platform span {
    color: var(--apg-cyan);

    font-family: var(--apg-mono);

    font-size: 0.6rem;

    letter-spacing: 0.15em;
}

.apg-platform strong {
    font-size: 1rem;

    font-weight: 700;

    letter-spacing: 0.05em;
}

.apg-platform small {
    font-size: 0.6rem;

    letter-spacing: 0.12em;
}


/* =========================================================
   THE VAULT / CARDS & ASSETS GALLERY
   ========================================================= */

.apg-vault {
    position: relative;
    background: radial-gradient(circle at 50% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 60%),
                radial-gradient(circle at 80% 80%, rgba(0, 229, 255, 0.04) 0%, transparent 50%),
                #04060a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

/* Controls / Filter Tabs */
.apg-vault-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 40px auto 48px;
    flex-wrap: wrap;
}

.apg-vault-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--apg-muted);
    font-family: var(--apg-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.apg-vault-tab:hover {
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.4);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.15);
}

.apg-vault-tab--active {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(139, 92, 246, 0.25));
    border-color: var(--apg-cyan);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.28);
}

.apg-vault-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.65rem;
    color: var(--apg-cyan);
}

.apg-vault-tab--active .apg-vault-tab-count {
    background: rgba(0, 229, 255, 0.25);
    color: #ffffff;
}

/* Cards Grid */
.apg-vault-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    align-items: stretch;
}

@media (max-width: 1200px) {
    .apg-vault-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 680px) {
    .apg-vault-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.apg-vault-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.apg-vault-item--hidden {
    display: none !important;
}

/* Card 3D & Hologram */
.apg-vault-card {
    position: relative;
    border-radius: 14px;
    padding: 2px;
    background: linear-gradient(145deg, rgba(0, 229, 255, 0.3) 0%, rgba(139, 92, 246, 0.35) 45%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.75);
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    height: 100%;
}

.apg-vault-card:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 229, 255, 0.4), 0 0 24px rgba(139, 92, 246, 0.25);
}

.apg-vault-card-inner {
    position: relative;
    border-radius: 12px;
    background: #070a12;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Floating Badges */
.apg-vault-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.apg-card-badge {
    font-family: var(--apg-mono);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 3px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.apg-badge-game {
    background: rgba(4, 7, 14, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.apg-badge-card {
    background: rgba(139, 92, 246, 0.3);
    color: #ddd6fe;
    border: 1px solid rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

/* Image Wrap */
.apg-vault-card-img-wrap {
    width: 100%;
    aspect-ratio: 9 / 14;
    overflow: hidden;
    background: #090d18;
    position: relative;
}

.apg-vault-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: block;
}

.apg-vault-card:hover .apg-vault-card-img-wrap img {
    transform: scale(1.05);
}

/* Holographic Rainbow Sheen */
.apg-card-sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    z-index: 4;
    transition: opacity 0.25s ease;
    mix-blend-mode: color-dodge;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(0, 229, 255, 0.45) 25%,
        rgba(255, 0, 150, 0.35) 50%,
        rgba(255, 220, 0, 0.25) 75%,
        transparent 100%
    );
    background-size: 200% 200%;
}

/* Card Footer */
.apg-vault-card-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 30px 10px 10px;
    background: linear-gradient(to top, rgba(3, 5, 10, 0.98) 0%, rgba(3, 5, 10, 0.8) 65%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 6px;
}

.apg-vault-card-info {
    flex: 1;
    min-width: 0;
}

.apg-vault-card-rarity {
    display: block;
    font-family: var(--apg-mono);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--apg-cyan);
    margin-bottom: 2px;
}

.apg-vault-card-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 2px 0;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apg-vault-card-game {
    font-family: var(--apg-mono);
    font-size: 0.55rem;
    color: var(--apg-muted);
    margin: 0;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apg-vault-inspect-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apg-vault-card:hover .apg-vault-inspect-btn,
.apg-vault-inspect-btn:hover {
    background: var(--apg-cyan);
    color: #000000;
    border-color: var(--apg-cyan);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* Lightbox Modal */
.apg-vault-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.apg-vault-modal--open {
    opacity: 1;
    pointer-events: auto;
}

.apg-vault-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 8, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.apg-vault-modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(145deg, #0d1222, #070a14);
    border: 1px solid rgba(0, 229, 255, 0.35);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.85), 0 0 60px rgba(0, 229, 255, 0.15);
    border-radius: 24px;
    transform: translateY(24px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.apg-vault-modal--open .apg-vault-modal-dialog {
    transform: translateY(0) scale(1);
}

.apg-vault-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.apg-vault-modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg);
}

.apg-vault-modal-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    padding: 36px;
}

@media (max-width: 768px) {
    .apg-vault-modal-body {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }
}

.apg-vault-modal-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.apg-vault-modal-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.3);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
    aspect-ratio: 9 / 14;
    width: 100%;
    max-width: 320px;
    background: #090d18;
}

.apg-vault-modal-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.apg-vault-modal-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.apg-vault-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.apg-vault-modal-tags {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.apg-vault-serial {
    font-family: var(--apg-mono);
    font-size: 0.72rem;
    color: var(--apg-muted);
    letter-spacing: 0.1em;
}

.apg-vault-modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.apg-vault-modal-sub {
    font-family: var(--apg-mono);
    font-size: 0.78rem;
    color: var(--apg-cyan);
    letter-spacing: 0.12em;
    margin: 0 0 24px 0;
}

.apg-vault-modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 480px) {
    .apg-vault-modal-meta-grid {
        grid-template-columns: 1fr;
    }
}

.apg-meta-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
}

.apg-meta-label {
    display: block;
    font-family: var(--apg-mono);
    font-size: 0.58rem;
    color: var(--apg-muted);
    letter-spacing: 0.12em;
    margin-bottom: 4px;
}

.apg-meta-value {
    font-size: 0.86rem;
    font-weight: 700;
    color: #ffffff;
}

.apg-vault-modal-lore {
    background: rgba(0, 229, 255, 0.03);
    border-left: 3px solid var(--apg-cyan);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 28px;
}

.apg-lore-heading {
    font-family: var(--apg-mono);
    font-size: 0.65rem;
    color: var(--apg-cyan);
    letter-spacing: 0.15em;
    margin: 0 0 6px 0;
}

.apg-vault-modal-lore p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.apg-vault-modal-actions {
    display: flex;
    gap: 16px;
}