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

[hidden] {
    display: none !important;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(252, 100, 50, 0.045) 0, rgba(255, 255, 255, 0) 210px),
        linear-gradient(90deg, rgba(247, 183, 15, 0.06) 0, rgba(255, 255, 255, 0) 38%),
        #ffffff;
    color: #151515;
    -webkit-font-smoothing: antialiased;
}

.index-shell {
    width: 100%;
    max-width: 1060px;
    min-height: 100vh;
    padding-top: 78px;
}

.index-main {
    min-width: 0;
    padding-bottom: 24px;
    -webkit-tap-highlight-color: transparent;
}

.index-main a,
.index-main button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.index-main .mod-card,
.index-main .mod-card:visited {
    color: #151515;
}

.index-main :where(.cat-tab, .cat-tab *, .mod-card, .mod-card *) {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.index-hero {
    position: relative;
    padding: 54px 0 30px;
    border-bottom: 1px solid #e8e8e8;
}

.index-hero::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #fc6432, #f7b70f 36%, #00827b 68%, transparent);
    opacity: 0.72;
}

.index-hero__copy {
    display: grid;
    gap: 12px;
    max-width: 780px;
}

.index-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    color: #535860;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fc6432;
    box-shadow: 0 0 0 5px rgba(252, 100, 50, 0.12);
}

.index-title {
    color: #111216;
    font-size: clamp(56px, 9vw, 112px);
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: 0;
}

.index-title span {
    color: #fc6432;
    text-shadow: 0 10px 34px rgba(252, 100, 50, 0.18);
}

.index-subtitle {
    max-width: 560px;
    color: #555961;
    font-size: 16px;
    line-height: 1.55;
}

.index-search {
    position: sticky;
    top: 72px;
    z-index: 30;
    padding: 16px 0;
    border-bottom: 1px solid #e8e8e8;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
}

.index-search .cmd-search {
    min-height: 54px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.index-search .cmd-search::before {
    display: none;
}

.index-search .cmd-search input {
    height: 54px;
    padding-left: 6px;
    color: #151515;
    font-size: 18px;
    font-weight: 700;
}

.index-search .cmd-search input::placeholder {
    color: #989ca3;
}

.cmd-search-icon {
    color: #fc6432;
}

.cmd-search-clear {
    border-radius: 999px;
}

.cmd-search-kbd {
    display: none;
}

.cmd-search-meta {
    margin-top: 4px;
    color: #6b6f76;
    font-size: 12px;
}

.cmd-search-meta:empty {
    display: none;
}

.index-modules {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    padding-top: 28px;
}

.index-modules .cat-tabs {
    position: sticky;
    top: 152px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    background: transparent;
}

.index-modules .cat-tab {
    justify-content: flex-start;
    width: 100%;
    min-height: 34px;
    padding: 6px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #717680;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.index-modules .cat-tab i {
    width: 18px;
    color: #9aa0aa;
    font-size: 12px;
    text-align: center;
}

.index-modules .cat-tab:hover,
.index-modules .cat-tab.is-active {
    color: #151515;
}

.index-modules .cat-tab:hover i,
.index-modules .cat-tab.is-active i {
    color: #fc6432;
}

.index-modules .cat-tab.is-active span {
    text-decoration: underline;
    text-decoration-color: #fc6432;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.index-modules .module-content {
    display: block;
    min-width: 0;
    gap: 0;
}

.cat-section {
    padding-bottom: 36px;
    margin-bottom: 36px;
    border-bottom: 1px solid #ececec;
}

.cat-section:last-of-type {
    margin-bottom: 0;
}

.cat-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cat-label h2 {
    color: #151515;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
}

.cat-label-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
}

.cat-label-dot--purple {
    background: #6658ff;
    box-shadow: 0 0 0 5px rgba(102, 88, 255, 0.12);
}

.cat-label-dot--orange {
    background: #fc6432;
    box-shadow: 0 0 0 5px rgba(252, 100, 50, 0.12);
}

.cat-label-dot--security {
    background: #16823a;
    box-shadow: 0 0 0 5px rgba(22, 130, 58, 0.12);
}

.cat-label-dot--cyan {
    background: #00827b;
    box-shadow: 0 0 0 5px rgba(0, 130, 123, 0.12);
}

.cat-label-dot--blue {
    background: #2369ff;
    box-shadow: 0 0 0 5px rgba(35, 105, 255, 0.12);
}

.index-modules .bento-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    border-top: 1px solid #ececec;
}

.mod-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    min-height: 76px;
    padding: 14px 0;
    border: 0;
    border-bottom: 1px solid #ececec;
    border-radius: 0;
    background: transparent;
    color: #151515;
    text-decoration: none;
    box-shadow: none;
    transition: color 0.18s ease, transform 0.18s ease;
}

.mod-card:hover {
    color: #fc6432;
    text-decoration: none;
    transform: translateX(2px);
}

.mod-card--feature {
    grid-column: 1 / -1;
}

.mod-card-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(35, 105, 255, 0.12);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(35, 105, 255, 0.14), rgba(35, 105, 255, 0.04));
    color: #2369ff;
    font-size: 15px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.mod-card-icon--orange {
    border-color: rgba(252, 100, 50, 0.14);
    background: linear-gradient(145deg, rgba(252, 100, 50, 0.16), rgba(252, 100, 50, 0.045));
    color: #fc6432;
}

.mod-card-icon--cyan {
    border-color: rgba(0, 130, 123, 0.14);
    background: linear-gradient(145deg, rgba(0, 130, 123, 0.16), rgba(0, 130, 123, 0.045));
    color: #00827b;
}

.mod-card-icon--purple {
    border-color: rgba(102, 88, 255, 0.14);
    background: linear-gradient(145deg, rgba(102, 88, 255, 0.16), rgba(102, 88, 255, 0.045));
    color: #6658ff;
}

.mod-card-icon--gold {
    border-color: rgba(247, 183, 15, 0.18);
    background: linear-gradient(145deg, rgba(247, 183, 15, 0.22), rgba(247, 183, 15, 0.055));
    color: #9a6500;
}

.mod-card-icon--security {
    border-color: rgba(22, 130, 58, 0.14);
    background: linear-gradient(145deg, rgba(22, 130, 58, 0.16), rgba(22, 130, 58, 0.045));
    color: #16823a;
}

.cat-section[data-category="keuangan"] .mod-card-icon:not([class*="--"]) {
    border-color: rgba(252, 100, 50, 0.14);
    background: linear-gradient(145deg, rgba(252, 100, 50, 0.14), rgba(252, 100, 50, 0.04));
    color: #fc6432;
}

.cat-section[data-category="keamanan"] .mod-card-icon:not([class*="--"]) {
    border-color: rgba(22, 130, 58, 0.14);
    background: linear-gradient(145deg, rgba(22, 130, 58, 0.14), rgba(22, 130, 58, 0.04));
    color: #16823a;
}

.cat-section[data-category="kripto"] .mod-card-icon:not([class*="--"]) {
    border-color: rgba(102, 88, 255, 0.14);
    background: linear-gradient(145deg, rgba(102, 88, 255, 0.14), rgba(102, 88, 255, 0.04));
    color: #6658ff;
}

.cat-section[data-category="utilitas"] .mod-card-icon:not([class*="--"]) {
    border-color: rgba(0, 130, 123, 0.14);
    background: linear-gradient(145deg, rgba(0, 130, 123, 0.14), rgba(0, 130, 123, 0.04));
    color: #00827b;
}

.cat-section[data-category="downloader"] .mod-card-icon:not([class*="--"]) {
    border-color: rgba(35, 105, 255, 0.14);
    background: linear-gradient(145deg, rgba(35, 105, 255, 0.14), rgba(35, 105, 255, 0.04));
    color: #2369ff;
}

.cat-section[data-category="hiburan"] .mod-card-icon:not([class*="--"]) {
    border-color: rgba(102, 88, 255, 0.14);
    background: linear-gradient(145deg, rgba(102, 88, 255, 0.14), rgba(102, 88, 255, 0.04));
    color: #6658ff;
}

.mod-card:hover .mod-card-icon {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 12px 26px rgba(21, 21, 21, 0.08);
}

.mod-card-info {
    min-width: 0;
}

.mod-card-info h3 {
    overflow: hidden;
    color: inherit;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mod-card-info p {
    margin-top: 4px;
    color: #6b6f76;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mod-card-badge {
    display: inline-flex;
    min-height: 20px;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f6f7f8;
    color: #5f6570;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.mod-card-badge--purple,
.mod-card-badge--live {
    background: rgba(102, 88, 255, 0.1);
    color: #6658ff;
}

.mod-card-badge--live {
    background: rgba(22, 130, 58, 0.1);
    color: #16823a;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #16823a;
}

.no-results {
    display: none;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    color: #777b82;
    text-align: center;
}

.no-results.visible {
    display: flex;
}

.no-results i {
    color: #fc6432;
    font-size: 22px;
}

.no-results p {
    color: #151515;
    font-size: 15px;
    font-weight: 900;
}

.no-results span {
    font-size: 12px;
}

.index-footer {
    margin-top: 10px;
    border-top: 1px solid #ececec;
    background: transparent;
}

.index-footer__inner {
    display: grid;
    gap: 20px;
    padding: 28px 0 24px;
}

.index-footer__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.index-footer__logo {
    width: 118px;
}

.index-footer__brand p {
    max-width: 520px;
    color: #6b6f76;
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
}

.index-footer__links,
.index-footer__bottom,
.index-footer__socials {
    display: flex;
    align-items: center;
}

.index-footer__links {
    flex-wrap: wrap;
    gap: 10px 18px;
}

.index-footer__links a,
.index-footer__socials a {
    color: #151515;
    text-decoration: none;
}

.index-footer__links a {
    font-size: 13px;
    font-weight: 900;
}

.index-footer__links a:hover,
.index-footer__socials a:hover {
    color: #fc6432;
    text-decoration: none;
}

.index-footer__bottom {
    justify-content: space-between;
    gap: 16px;
    color: #6b6f76;
    font-size: 12px;
}

.index-footer__socials {
    gap: 8px;
}

.index-footer__socials a {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #ffffff;
}

@media (max-width: 1023px) {
    .index-modules {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .index-modules .cat-tabs {
        position: static;
        flex-direction: row;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .index-modules .cat-tabs::-webkit-scrollbar {
        display: none;
    }

    .index-modules .cat-tab {
        width: auto;
        flex: 0 0 auto;
        gap: 7px;
    }
}

@media (max-width: 720px) {
    .index-shell {
        padding-top: 58px;
    }

    .index-shell .header-actions {
        gap: 8px;
    }

    .index-shell .hdr-donate-btn {
        display: inline-flex !important;
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        border-radius: 10px;
        box-shadow: 0 8px 18px rgba(252, 100, 50, 0.18);
    }

    .index-shell .hdr-donate-btn span {
        display: none;
    }

    .index-shell .hdr-donate-btn i {
        font-size: 15px;
    }

    .index-hero {
        padding: 30px 0 20px;
    }

    .index-title {
        font-size: 54px;
    }

    .index-subtitle {
        max-width: 330px;
        font-size: 13px;
    }

    .index-search {
        position: static;
        padding: 10px 0;
    }

    .index-search .cmd-search input {
        height: 50px;
        font-size: 15px;
    }

    .index-modules {
        padding-top: 18px;
    }

    .cat-section {
        padding-bottom: 26px;
        margin-bottom: 26px;
    }

    .index-modules .bento-grid {
        grid-template-columns: 1fr;
    }

    .mod-card {
        grid-template-columns: 34px minmax(0, 1fr);
        min-height: 72px;
        padding: 12px 0;
    }

    .mod-card-badge {
        grid-column: 2;
        width: fit-content;
        margin-top: -2px;
    }

    .mod-card-info h3 {
        white-space: normal;
    }

    .index-footer__brand,
    .index-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .index-footer__brand p {
        text-align: left;
    }
}

@media (max-width: 420px) {
    .index-title {
        font-size: 48px;
    }
}

/* --- PWA Popup --- */
.pwa-popup {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 100;
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 16px;
    max-width: 360px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwa-popup.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.pwa-popup__content {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.pwa-popup__icon img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pwa-popup__text {
    flex: 1;
    min-width: 0;
}

.pwa-popup__text h4 {
    font-size: 15px;
    font-weight: 900;
    color: #151515;
    margin: 0 0 4px 0;
}

.pwa-popup__text p {
    font-size: 12px;
    color: #6b6f76;
    margin: 0;
    line-height: 1.3;
}

.pwa-popup__btn {
    background: #fc6432;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.pwa-popup__btn:hover {
    opacity: 0.9;
}

.pwa-popup__close {
    position: absolute;
    top: -8px;
    right: -8px;
    background: transparent;
    border: none;
    color: #989ca3;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.pwa-popup__close:hover {
    color: #151515;
}

@media (max-width: 600px) {
    .pwa-popup {
        bottom: 16px;
        left: 16px;
        right: 16px;
        max-width: none;
    }
}
