/* =========================================================
   CRYSTAL CITY — PREMIUM HOME
========================================================= */

[data-page="home"] {
    position: relative;
    display: grid;
    gap: 14px;
    padding-bottom: calc(var(--nav-height) + 38px);
    isolation: isolate;
}

[data-page="home"]::before {
    content: "";
    position: absolute;
    inset: -24px;
    z-index: -2;
    pointer-events: none;

    background:
        radial-gradient(circle at 12% 6%,
            rgba(35, 219, 167, 0.16),
            transparent 34%),
        radial-gradient(circle at 88% 20%,
            rgba(239, 187, 76, 0.12),
            transparent 34%),
        linear-gradient(180deg,
            #071511 0%,
            #0a2019 48%,
            #07130f 100%);
}

[data-page="home"]::after {
    content: "";
    position: absolute;
    inset: -24px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.09;

    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);

    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 78%);
}

/* =========================================================
   HERO
========================================================= */

[data-page="home"] .hero-panel {
    position: relative;
    min-height: 215px;
    padding: 23px;
    overflow: hidden;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    align-items: center;
    gap: 18px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;

    background:
        radial-gradient(circle at 88% 12%,
            rgba(46, 224, 174, 0.21),
            transparent 38%),
        radial-gradient(circle at 10% 110%,
            rgba(238, 186, 72, 0.16),
            transparent 44%),
        linear-gradient(145deg,
            rgba(27, 70, 55, 0.88),
            rgba(8, 29, 23, 0.96)) !important;

    box-shadow:
        0 24px 58px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        inset 0 -1px 0 rgba(255, 255, 255, 0.045);

    backdrop-filter: blur(26px) saturate(165%);
    -webkit-backdrop-filter: blur(26px) saturate(165%);
}

[data-page="home"] .hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        linear-gradient(112deg,
            transparent 16%,
            rgba(255, 255, 255, 0.10) 44%,
            transparent 69%);

    transform: translateX(-72%);
    animation: homeHeroShine 7s ease-in-out infinite;
}

[data-page="home"] .hero-panel::after {
    content: "";
    position: absolute;
    inset: 1px;
    pointer-events: none;

    border-radius: inherit;

    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.08),
            transparent 34%);
}

[data-page="home"] .hero-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
    max-width: none;
}

[data-page="home"] .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 11px;

    color: #efbe52;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

[data-page="home"] .eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;

    border-radius: 50%;
    background: #48deb4;

    box-shadow:
        0 0 0 5px rgba(72, 222, 180, 0.10),
        0 0 18px rgba(72, 222, 180, 0.50);
}

[data-page="home"] .hero-copy h1 {
    margin: 0;

    color: #ffffff;
    font-size: clamp(29px, 8vw, 43px);
    font-weight: 850;
    line-height: 0.98;
    letter-spacing: -0.055em;

    text-shadow:
        0 5px 24px rgba(0, 0, 0, 0.30);
}

[data-page="home"] .hero-copy p {
    max-width: 31ch;
    margin: 13px 0 0;

    color: rgba(225, 242, 234, 0.66);
    font-size: 13px;
    line-height: 1.55;
}

[data-page="home"] .hero-progress {
    margin-top: 21px;
    max-width: 290px;
}

[data-page="home"] .hero-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-bottom: 8px;

    color: rgba(222, 240, 231, 0.58);
    font-size: 11px;
}

[data-page="home"] .hero-progress-head strong {
    color: #ffffff;
    font-weight: 800;
}

[data-page="home"] .hero-progress-track {
    position: relative;
    height: 7px;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.30);

    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.32);
}

[data-page="home"] .hero-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;

    background:
        linear-gradient(90deg,
            #36d9aa,
            #6de1bc 52%,
            #efbd52);

    box-shadow:
        0 0 18px rgba(54, 217, 170, 0.42);
}

/* =========================================================
   HERO REWARD BOX — LARGE & SLOW ANIMATION
   ---------------------------------------------------------
   HTML:
   <div class="crystal-orbit" aria-hidden="true">
       <img src="/assets/icons/reward-box.svg?v=2" alt="">
   </div>
========================================================= */

[data-page="home"] .crystal-orbit {
    position: relative;
    z-index: 2;
    right: -20px;
    top: 0;

    /* ===== UBAH AREA LOGO HERO DI SINI ===== */
    width: 150px;
    height: 150px;
    /* ======================================== */

    display: grid;
    place-items: center;

    overflow: visible;
    justify-self: end;

    filter:
        drop-shadow(0 18px 30px rgba(0, 0, 0, 0.30))
        drop-shadow(0 0 28px rgba(239, 190, 79, 0.24));
}

[data-page="home"] .crystal-orbit::before,
[data-page="home"] .crystal-orbit::after {
    content: none !important;
    display: none !important;
}

[data-page="home"] .crystal-orbit span {
    display: none !important;
}

[data-page="home"] .crystal-orbit img {
    display: block;

    /* =====================================================
       UBAH UKURAN VISUAL REWARD BOX DI SINI
       -----------------------------------------------------
       Jika SVG masih terlihat kecil karena ruang kosong:
       2.20 = besar
       2.60 = sangat besar
       3.00 = ekstra besar

       Nilai sekarang: 2.85
    ===================================================== */
    width: 132px;
    height: 132px;
    transform: scale(2.85);
    /* =================================================== */
    max-width: none;
    transform-origin: center;

    object-fit: contain;
    object-position: center;

    border: 0;
    background: transparent;
    box-shadow: none;

    filter:
        drop-shadow(0 16px 24px rgba(0, 0, 0, 0.38))
        drop-shadow(0 0 30px rgba(239, 190, 79, 0.40));

    /* Animasi dibuat lebih lambat dan lembut */
    animation: heroRewardFloat 50s ease-in-out infinite;
    will-change: transform;
}

@keyframes heroRewardFloat {
    0%,
    100% {
        transform: translateY(0) rotate(-1deg) scale(2.85);
    }

    50% {
        transform: translateY(-3px) rotate(1deg) scale(2.85);
    }
}

/* =========================================================
   STATS
========================================================= */


[data-page="home"] .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin: 0;
}

[data-page="home"] .stat-tile {
    position: relative;
    min-width: 0;
    min-height: 88px;
    padding: 14px;

    display: flex;
    align-items: center;
    gap: 6px;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;

    background:
        radial-gradient(circle at 100% 0%,
            rgba(59, 221, 177, 0.09),
            transparent 42%),
        linear-gradient(145deg,
            rgba(13, 36, 29, 0.94),
            rgba(20, 48, 39, 0.80)) !important;

    box-shadow:
        0 15px 34px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.11);

    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

[data-page="home"] .stat-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        linear-gradient(112deg,
            rgba(255, 255, 255, 0.055),
            transparent 42%);
}

/* =========================================================
   ICON LEVEL / ENERGY / COIN / TOKEN
   ---------------------------------------------------------
   UBAH UKURAN WRAPPER DI SINI
========================================================= */
[data-page="home"] .stat-icon {
    position: relative;
    z-index: 1;

    display: grid;
    place-items: center;

    /* ===== WRAPPER ===== */
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    /* =================== */
    margin-left:-6px;
    padding: 0 !important;
    overflow: visible !important;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

[data-page="home"] .stat-icon::before,
[data-page="home"] .stat-icon::after {
    content: none !important;
    display: none !important;
}

[data-page="home"] .stat-icon img {
    position: relative;
    z-index: 1;
    display: block;

    /* ===== UKURAN ICON ===== */
    width: 68px;
    height: 68px;

    /* Perbesar visual icon */
    transform: scale(1.22);
    /* ======================= */

    max-width: none;

    object-fit: contain;
    object-position: center;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    filter:
        drop-shadow(0 9px 16px rgba(0,0,0,.34))
        drop-shadow(0 0 15px rgba(67,223,180,.34));

    transition:
        transform .22s ease,
        filter .22s ease;
}

[data-page="home"] .stat-tile:hover .stat-icon img {
    transform: translateY(-1px) scale(1.04);
    filter:
        drop-shadow(0 7px 12px rgba(0, 0, 0, 0.24))
        drop-shadow(0 0 11px rgba(66, 222, 178, 0.20));
}


[data-page="home"] .stat-copy {
    position: relative;
    z-index: 1;
    flex:1;
    margin-left:-4px;
    min-width: 0;
}

[data-page="home"] .stat-copy span {
    display: block;

    color: rgba(220, 239, 229, 0.55);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

[data-page="home"] .stat-copy strong {
    display: block;
    margin-top: 7px;

    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
}





/* =========================================================
   ACTIVITY — COMPACT CARD + LARGE VISUAL ICON
========================================================= */

[data-page="home"] .activity-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
}

[data-page="home"] .activity-panel {
    position: relative;
    min-width: 0;

    /* ===== UBAH TINGGI CARD DI SINI ===== */
    min-height: 202px;
    /* ==================================== */

    padding: 18px 18px 18px;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;

    border: 1px solid rgba(239, 190, 76, 0.30);
    border-radius: 25px;

    background:
        radial-gradient(
            circle at 92% 12%,
            rgba(239, 190, 76, 0.19),
            transparent 42%
        ),
        radial-gradient(
            circle at 4% 100%,
            rgba(48, 220, 173, 0.14),
            transparent 48%
        ),
        linear-gradient(
            145deg,
            rgba(11, 38, 30, 0.98),
            rgba(20, 49, 39, 0.90)
        ) !important;

    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);

    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}

[data-page="home"] .activity-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        linear-gradient(
            112deg,
            rgba(255, 255, 255, 0.055),
            transparent 40%
        );
}

[data-page="home"] .activity-head {
    position: relative;
    z-index: 2;

    display: block;
    min-height: 105px;

    /* Sisakan ruang kanan untuk icon */
    padding-right: 132px;
}

[data-page="home"] .activity-kicker {
    display: block;
    margin-bottom: 7px;

    color: #efbd52;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

[data-page="home"] .activity-panel h2 {
    margin: 0;

    color: #ffffff;
    font-size: 19px;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

[data-page="home"] .activity-panel p {
    max-width: 24ch;
    margin: 9px 0 0;

    color: rgba(220, 239, 229, 0.62);
    font-size: 11px;
    line-height: 1.48;
}

/* =========================================================
   ICON REWARD BOX / LUCKY DRAW / EXPEDITION
   ---------------------------------------------------------
   Icon dibuat absolute agar tidak membesarkan card.
========================================================= */

[data-page="home"] .activity-symbol {
    position: absolute;
    z-index: 3;

    top: 18px;
    right: 14px;

    /* ===== UBAH AREA ICON DI SINI ===== */
    width: 116px;
    height: 116px;
    /* ================================== */

    display: grid;
    place-items: center;

    padding: 0 !important;
    overflow: visible !important;

    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    pointer-events: none;
}

[data-page="home"] .activity-symbol::before,
[data-page="home"] .activity-symbol::after {
    content: none !important;
    display: none !important;
}

[data-page="home"] .activity-symbol img {
    position: relative;
    z-index: 1;

    display: block;

    /* =====================================================
       UBAH UKURAN VISUAL ICON DI SINI
       -----------------------------------------------------
       Karena SVG kemungkinan memiliki ruang kosong di viewBox,
       icon diperbesar memakai scale tanpa memperbesar card.

       1.00 = normal
       1.40 = besar
       1.70 = sangat besar (nilai saat ini)
       2.00 = ekstra besar
    ===================================================== */
    width: 104px;
    height: 104px;
    transform: scale(2.10);
    /* =================================================== */

    max-width: none;
    transform-origin: center;

    object-fit: contain;
    object-position: center;

    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    filter:
        drop-shadow(0 12px 18px rgba(0, 0, 0, 0.38))
        drop-shadow(0 0 18px rgba(72, 222, 180, 0.34));

    transition:
        transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 280ms ease;
}

[data-page="home"] .activity-panel:hover .activity-symbol img {
    transform: translateY(-2px) scale(1.78);

    filter:
        drop-shadow(0 14px 20px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 22px rgba(72, 222, 180, 0.42));
}

/* Tombol tetap di bawah dan tidak terdorong icon */
[data-page="home"] .activity-panel .primary-button,
[data-page="home"] .activity-panel .secondary-button {
    position: relative;
    z-index: 4;
    margin-top: 0;
}

/* =========================================================
   BUTTONS
========================================================= */

[data-page="home"] .primary-button,
[data-page="home"] .secondary-button {
    position: relative;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 50px;
    padding: 0 18px;

    overflow: hidden;

    border: 1px solid rgba(92, 232, 192, 0.24);
    border-radius: 16px;

    color: #edf9f4;

    background:
        linear-gradient(
            145deg,
            rgba(31, 83, 66, 0.96),
            rgba(17, 51, 41, 0.98)
        ) !important;

    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);

    font-size: 14px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.01em;

    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;

    transition:
        transform 180ms ease,
        filter 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

[data-page="home"] .primary-button::before,
[data-page="home"] .secondary-button::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: 0;

    border-radius: calc(16px - 1px);
    pointer-events: none;

    background:
        linear-gradient(
            110deg,
            rgba(255, 255, 255, 0.10),
            transparent 46%
        );
}

[data-page="home"] .primary-button,
[data-page="home"] .secondary-button {
    isolation: isolate;
}

[data-page="home"] .primary-button > *,
[data-page="home"] .secondary-button > * {
    position: relative;
    z-index: 1;
}

[data-page="home"] .primary-button:hover,
[data-page="home"] .secondary-button:hover {
    filter: brightness(1.06);
    border-color: rgba(92, 232, 192, 0.36);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-page="home"] .primary-button:active,
[data-page="home"] .secondary-button:active {
    transform: scale(0.97);
}

/* =========================================================
   ANIMATION
========================================================= */

@keyframes homeHeroShine {

    0%,
    55% {
        transform: translateX(-72%);
        opacity: 0;
    }

    70% {
        opacity: 0.70;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes homeCrystalFloat {

    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-7px) rotate(2deg);
    }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (min-width: 721px) {
    [data-page="home"] .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    [data-page="home"] .activity-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    [data-page="home"] .hero-panel {
        min-height: 205px;
        grid-template-columns: minmax(0, 1fr) 100px;
        padding: 20px;
    }

    [data-page="home"] .crystal-orbit {
        width: 138px;
        height: 138px;
        transform: none;
        transform-origin: center;
    }

    [data-page="home"] .crystal-orbit img {
        width: 124px;
        height: 124px;

        /* ===== UBAH UKURAN HERO DI HP DI SINI ===== */
        transform: scale(2.70);
        /* ========================================== */

        animation-name: heroRewardFloatMobile;
    }

    [data-page="home"] .activity-panel {
        min-height: 202px;
    }

    [data-page="home"] .activity-head {
        padding-right: 126px;
    }

    [data-page="home"] .activity-symbol {
        width: 112px;
        height: 112px;
        right: 12px;
    }

    [data-page="home"] .activity-symbol img {
        width: 100px;
        height: 100px;

        /* ===== UBAH BESAR ICON HP DI SINI ===== */
        transform: scale(1.70);
        /* ====================================== */
    }
}

@media (max-width: 390px) {
    [data-page="home"] {
        gap: 11px;
    }

    [data-page="home"] .hero-panel {
        grid-template-columns: minmax(0, 1fr) 82px;
        padding: 18px;
    }

    [data-page="home"] .hero-copy h1 {
        font-size: 27px;
    }

    [data-page="home"] .hero-copy p {
        font-size: 12px;
    }

    [data-page="home"] .crystal-orbit {
        width: 122px;
        height: 122px;
        transform: none;
    }

    [data-page="home"] .crystal-orbit img {
        width: 112px;
        height: 112px;

        /* ===== UBAH UKURAN HERO HP KECIL DI SINI ===== */
        transform: scale(2.55);
        /* ============================================= */

        animation-name: heroRewardFloatSmall;
    }

    [data-page="home"] .stat-tile {
        padding: 12px;
        gap: 10px;
    }

    [data-page="home"] .stat-icon {
        /* ===== WRAPPER HP ===== */
        flex: 0 0 66px;
        width: 66px;
        height: 66px;
        /* ====================== */
    }

    [data-page="home"] .stat-icon img {
        /* ===== ICON HP ===== */
        width: 62px;
        height: 62px;
        transform: scale(1.18);
        /* =================== */
    }

    [data-page="home"] .activity-panel {
        min-height: 198px;
        padding: 17px;
    }

    [data-page="home"] .activity-head {
        min-height: 102px;
        padding-right: 118px;
    }

    [data-page="home"] .activity-symbol {
        top: 16px;
        right: 8px;
        width: 108px;
        height: 108px;
    }

    [data-page="home"] .activity-symbol img {
        width: 96px;
        height: 96px;

        /* ===== UBAH BESAR ICON HP KECIL DI SINI ===== */
        transform: scale(1.72);
        /* ============================================ */
    }

    [data-page="home"] .activity-panel:hover .activity-symbol img {
        transform: translateY(-2px) scale(1.78);
    }
}




@keyframes heroRewardFloatMobile {
    0%,
    100% {
        transform: translateY(0) rotate(-1deg) scale(2.70);
    }

    50% {
        transform: translateY(-3px) rotate(1deg) scale(2.70);
    }
}

@keyframes heroRewardFloatSmall {
    0%,
    100% {
        transform: translateY(0) rotate(-1deg) scale(2.55);
    }

    50% {
        transform: translateY(-2px) rotate(1deg) scale(2.55);
    }
}

@media (prefers-reduced-motion: reduce) {

    [data-page="home"] .hero-panel::before,
    [data-page="home"] .crystal-orbit img,
    [data-page="home"] .stat-icon img,
    [data-page="home"] .activity-symbol img {
        animation: none !important;
        transition: none !important;
    }
}

/* =========================================================
   FIX AREA PUTIH DI ATAS TOPBAR
========================================================= */

html,
body {
    background: #071511 !important;
}

body {
    background:
        radial-gradient(
            circle at 12% 6%,
            rgba(35, 219, 167, 0.16),
            transparent 34%
        ),
        radial-gradient(
            circle at 88% 20%,
            rgba(239, 187, 76, 0.12),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            #071511 0%,
            #0a2019 48%,
            #07130f 100%
        ) !important;
}

.app-bg {
    background:
        radial-gradient(
            circle at 12% 6%,
            rgba(35, 219, 167, 0.16),
            transparent 34%
        ),
        radial-gradient(
            circle at 88% 20%,
            rgba(239, 187, 76, 0.12),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            #071511 0%,
            #0a2019 48%,
            #07130f 100%
        ) !important;
}

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;

    background:
        radial-gradient(
            circle at 12% 6%,
            rgba(35, 219, 167, 0.16),
            transparent 34%
        ),
        radial-gradient(
            circle at 88% 20%,
            rgba(239, 187, 76, 0.12),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            #071511 0%,
            #0a2019 48%,
            #07130f 100%
        ) !important;
}

/*
Area kosong/padding sebelum topbar akan memakai warna yang sama.
Tidak mengubah desain topbar.
*/

/*
Pastikan konten tidak mempunyai background putih.
*/
.page-stack,
.page-view {
    background: transparent !important;
}