/* =========================================================
   CRYSTAL CITY — GAME LAB
   Premium Web3 / Liquid Glass Game Cards
========================================================= */

/* =========================================================
   PAGE HEADING
========================================================= */

[data-page="games"] {
    display: grid;
    gap: 16px;
    padding-bottom: calc(var(--nav-height) + 38px);
}

[data-page="games"] .game-lab-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 2px;
}

[data-page="games"] .section-kicker {
    display: block;
    margin-bottom: 7px;

    color: var(--accent-3, #efbd52);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

[data-page="games"] .section-heading h1 {
    margin: 0;

    color: var(--text, #ffffff);
    font-size: clamp(28px, 7vw, 38px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.045em;
}

[data-page="games"] .section-description {
    max-width: 34ch;
    margin: 9px 0 0;

    color: var(--muted, rgba(220, 239, 229, 0.60));
    font-size: 12px;
    line-height: 1.5;
}

[data-page="games"] .game-lab-status {
    flex: 0 0 auto;
    padding: 8px 11px;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;

    color: rgba(238, 248, 243, 0.72);
    background: rgba(14, 43, 34, 0.72);

    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* =========================================================
   GAME GRID
========================================================= */

[data-page="games"] .game-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* =========================================================
   GAME CARD
========================================================= */

[data-page="games"] .game-card {
    position: relative;
    min-width: 0;
    min-height: 316px;
    padding: 15px;

    display: flex;
    flex-direction: column;
    gap: 13px;

    overflow: hidden;
    isolation: isolate;

    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 24px;

    background:
        radial-gradient(
            circle at 88% 4%,
            rgba(70, 226, 182, 0.13),
            transparent 34%
        ),
        radial-gradient(
            circle at 0% 100%,
            rgba(239, 190, 76, 0.10),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            rgba(12, 39, 31, 0.97),
            rgba(19, 49, 39, 0.88)
        );

    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);

    backdrop-filter: blur(20px) saturate(155%);
    -webkit-backdrop-filter: blur(20px) saturate(155%);

    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease,
        filter 220ms ease;
}

[data-page="games"] .game-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background:
        linear-gradient(
            115deg,
            rgba(255, 255, 255, 0.055),
            transparent 38%
        );
}

[data-page="games"] .game-card-featured {
    border-color: rgba(239, 190, 76, 0.26);

    background:
        radial-gradient(
            circle at 88% 4%,
            rgba(239, 190, 76, 0.17),
            transparent 36%
        ),
        radial-gradient(
            circle at 0% 100%,
            rgba(67, 222, 180, 0.14),
            transparent 44%
        ),
        linear-gradient(
            145deg,
            rgba(12, 39, 31, 0.98),
            rgba(21, 52, 41, 0.90)
        );
}

@media (hover: hover) {
    [data-page="games"] .game-card:hover {
        transform: translateY(-3px);
        border-color: rgba(93, 232, 192, 0.22);

        box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.29),
            inset 0 1px 0 rgba(255, 255, 255, 0.13);
    }
}

/* =========================================================
   CARD TOP
========================================================= */

[data-page="games"] .game-card-top {
    position: relative;
    min-height: 112px;

    display: flex;
    justify-content: center;
    align-items: center;
}

[data-page="games"] .game-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 24px;
    padding: 0 9px;

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;

    color: rgba(237, 249, 244, 0.82);
    background: rgba(23, 62, 49, 0.90);

    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.10em;
}

[data-page="games"] .game-badge-hot {
    color: #fff4cf;
    border-color: rgba(239, 190, 76, 0.25);
    background: rgba(120, 82, 22, 0.52);
}

[data-page="games"] .game-badge-new {
    color: #dffff5;
    border-color: rgba(74, 224, 182, 0.24);
    background: rgba(24, 102, 78, 0.55);
}

[data-page="games"] .game-badge-idle {
    color: #e8f3ff;
    border-color: rgba(118, 176, 255, 0.24);
    background: rgba(39, 73, 119, 0.52);
}

/* =========================================================
   GAME ICON
========================================================= */

[data-page="games"] .game-icon {
    position: relative;

    /* ===== UBAH AREA ICON DI SINI ===== */
    width: 112px;
    height: 112px;
    /* ================================== */

    display: grid;
    place-items: center;

    overflow: visible;
}

[data-page="games"] .game-icon::before {
    content: "";
    position: absolute;
    inset: 15px;

    border-radius: 50%;
    background: rgba(62, 222, 179, 0.07);

    filter: blur(14px);
    opacity: 0.75;
}

[data-page="games"] .game-icon img {
    position: relative;
    z-index: 1;

    display: block;

    /* ===== UBAH UKURAN ICON DI SINI ===== */
    width: 100px;
    height: 100px;
    transform: scale(1.12);
    /* ==================================== */

    max-width: none;
    object-fit: contain;
    object-position: center;

    filter:
        drop-shadow(0 10px 16px rgba(0, 0, 0, 0.35))
        drop-shadow(0 0 16px rgba(68, 222, 179, 0.22));

    transition:
        transform 240ms ease,
        filter 240ms ease;
}

@media (hover: hover) {
    [data-page="games"] .game-card:hover .game-icon img {
        transform: translateY(-3px) scale(1.17);

        filter:
            drop-shadow(0 12px 18px rgba(0, 0, 0, 0.38))
            drop-shadow(0 0 20px rgba(68, 222, 179, 0.30));
    }
}

/* =========================================================
   CARD CONTENT
========================================================= */

[data-page="games"] .game-card-body {
    min-width: 0;
}

[data-page="games"] .game-category {
    display: block;
    margin-bottom: 6px;

    color: var(--accent-3, #efbd52);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

[data-page="games"] .game-card h2 {
    margin: 0;

    color: var(--text, #ffffff);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.08;
    letter-spacing: -0.025em;
}

[data-page="games"] .game-card p {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;

    color: var(--muted, rgba(220, 239, 229, 0.60));
    font-size: 11px;
    line-height: 1.45;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* =========================================================
   GAME META
========================================================= */

[data-page="games"] .game-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: auto;
}

[data-page="games"] .game-meta-item {
    min-width: 0;
    padding: 8px 6px;

    text-align: center;

    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 12px;
    background: rgba(5, 24, 18, 0.28);
}

[data-page="games"] .game-meta-label {
    display: block;

    color: rgba(219, 239, 229, 0.47);
    font-size: 5px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

[data-page="games"] .game-meta-item strong {
    display: block;
    margin-top: 5px;

    overflow: hidden;
    color: #ffffff;

    font-size: 7px;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* =========================================================
   START BUTTON
========================================================= */

[data-page="games"] .game-start-button {
    position: relative;
    z-index: 2;

    width: 100%;
    min-height: 46px;
    margin-top: 0;
    padding: 0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid rgba(113, 244, 204, 0.32);
    border-radius: 15px;

    color: #f4fffb !important;
    background:
        linear-gradient(
            180deg,
            #2A5648 15%,
            #13362C 100%
        ) !important;

    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(0, 0, 0, 0.14);

    font-size: 14px;
    font-weight: 850;
    line-height: 1;

    cursor: pointer;
    opacity: 1 !important;

    transition:
        transform 180ms ease,
        filter 180ms ease,
        box-shadow 180ms ease;
}

[data-page="games"] .game-start-button::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: 0;

    border-radius: 14px;
    pointer-events: none;

    background:
        linear-gradient(
            115deg,
            rgba(255, 255, 255, 0.18),
            transparent 45%
        );
}

[data-page="games"] .game-start-button span {
    position: relative;
    z-index: 1;
}

@media (hover: hover) {
    [data-page="games"] .game-start-button:not(:disabled):hover {
        transform: translateY(-2px);
        filter: brightness(1.07);

        box-shadow:
            0 13px 26px rgba(0, 0, 0, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.32);
    }
}

[data-page="games"] .game-start-button:not(:disabled):active {
    transform: scale(0.975);
}

/* Tombol game yang benar-benar belum aktif */
[data-page="games"] .game-start-button:disabled {
    color: rgba(237, 245, 241, 0.62) !important;
    background:
        linear-gradient(
            180deg,
            rgba(102, 116, 110, 0.82),
            rgba(72, 84, 79, 0.88)
        ) !important;

    border-color: rgba(255, 255, 255, 0.10);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    cursor: not-allowed;
    opacity: 0.72 !important;
}

/* =========================================================
   ACTIVE STATE
========================================================= */

[data-page="games"] .game-card:active {
    transform: scale(0.985);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (min-width: 721px) {
    [data-page="games"] .game-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    [data-page="games"] .game-lab-heading {
        align-items: flex-start;
    }

    [data-page="games"] .game-card {
        min-height: 300px;
        padding: 13px;
        border-radius: 22px;
    }

    [data-page="games"] .game-card-top {
        min-height: 102px;
    }

    [data-page="games"] .game-icon {
        /* ===== UBAH AREA ICON HP DI SINI ===== */
        width: 102px;
        height: 102px;
        /* ===================================== */
    }

    [data-page="games"] .game-icon img {
        /* ===== UBAH UKURAN ICON HP DI SINI ===== */
        width: 92px;
        height: 92px;
        transform: scale(1.10);
        /* ======================================= */
    }

    [data-page="games"] .game-card h2 {
        font-size: 17px;
    }

    [data-page="games"] .game-card p {
        font-size: 10.5px;
    }

    [data-page="games"] .game-meta-item {
        padding: 7px 4px;
    }

    [data-page="games"] .game-meta-item strong {
        font-size: 9px;
    }
}

@media (max-width: 350px) {
    [data-page="games"] .game-grid {
        grid-template-columns: 1fr;
    }

    [data-page="games"] .game-card {
        min-height: 290px;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-page="games"] .game-card,
    [data-page="games"] .game-icon img {
        transition: none !important;
    }
}