:root {
    --app-detail-primary: #5b5ce2;
    --app-detail-primary-dark: #39368f;
    --app-detail-accent: #f5b43c;
    --app-detail-ink: #172033;
    --app-detail-muted: #707788;
    --app-detail-border: #e7e8f2;
    --app-detail-surface: #ffffff;
    --app-detail-background: #f6f7fc;
    --app-detail-radius: 22px;
    --app-detail-shadow: 0 18px 48px rgba(31, 41, 55, .08);
}

body {
    background: var(--app-detail-background);
}

.app-detail-scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1100;
    height: 3px;
    pointer-events: none;
}

.app-detail-scroll-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--app-detail-primary),
        #7c3aed,
        var(--app-detail-accent)
    );
    box-shadow: 0 0 14px rgba(91, 92, 226, .5);
}

.app-detail-container {
    position: relative;
}

.app-detail-main {
    min-width: 0;
}

.app-detail-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(18px, 3vw, 34px);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 28px;
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(245, 180, 60, .24),
            transparent 20%
        ),
        linear-gradient(
            135deg,
            #211f62,
            #4037b0 58%,
            #7c3aed
        );
    color: #fff;
    box-shadow: 0 28px 70px rgba(38, 35, 112, .22);
    isolation: isolate;
}

.app-detail-hero::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background-image:
        linear-gradient(
            rgba(255, 255, 255, .035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, .035) 1px,
            transparent 1px
        );
    background-size: 34px 34px;
}

.app-detail-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    pointer-events: none;
}

.app-detail-hero-orb-one {
    top: -90px;
    right: -60px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, .13);
}

.app-detail-hero-orb-two {
    right: 24%;
    bottom: -150px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, .045);
}

.app-detail-breadcrumb {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, .65);
    font-size: 10px;
}

.app-detail-breadcrumb a {
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
}

.app-detail-breadcrumb a:hover {
    color: #fff;
}

.app-detail-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: clamp(22px, 4vw, 44px);
    align-items: center;
}

.app-detail-icon-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
}

.app-detail-icon-shell {
    position: relative;
    width: 190px;
    height: 190px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .23);
    border-radius: 42px;
    background: rgba(255, 255, 255, .13);
    box-shadow:
        0 28px 48px rgba(11, 11, 45, .28),
        inset 0 1px 0 rgba(255, 255, 255, .22);
    backdrop-filter: blur(14px);
    transform-style: preserve-3d;
    transition: transform .2s ease;
}

.app-detail-icon {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 31px;
    object-fit: cover;
    background: #fff;
    transform: translateZ(20px);
}

.app-detail-verified-badge {
    position: absolute;
    right: -8px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 9px;
    border: 3px solid #4037b0;
    border-radius: 999px;
    background: #fff;
    color: #37338d;
    font-size: 9px;
    font-weight: 850;
    box-shadow: 0 9px 22px rgba(10, 9, 41, .22);
}

.app-detail-verified-badge svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.app-detail-qr-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .19);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .82);
    font-size: 9px;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.app-detail-qr-trigger > svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.app-detail-qr-trigger .qr-code {
    right: 50%;
    left: auto;
    transform: translateX(50%);
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(9, 9, 36, .25);
}

.app-detail-copy {
    min-width: 0;
}

.app-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.app-detail-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .86);
    font-size: 9px;
    font-weight: 780;
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.app-detail-badge:hover {
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.app-detail-badge-primary {
    border-color: rgba(245, 180, 60, .34);
    background: rgba(245, 180, 60, .15);
    color: #ffe19c;
}

.app-detail-title {
    max-width: 760px;
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(34px, 5vw, 62px);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.05em;
    text-wrap: balance;
}

.app-detail-developer {
    margin: 0;
    color: rgba(255, 255, 255, .74);
    font-size: 13px;
}

.app-detail-rating-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 10px;
    margin-top: 14px;
    color: rgba(255, 255, 255, .73);
    font-size: 10px;
}

.app-detail-rating-row strong {
    color: #fff;
    font-size: 13px;
}

.app-detail-stars {
    display: inline-flex;
    align-items: center;
    color: #f7c54e;
}

.app-detail-stars svg,
.app-detail-stars i {
    width: 15px;
    height: 15px;
    color: #f7c54e;
}

.app-detail-update-chip {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(15, 17, 55, .28);
}

.app-detail-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 20px;
}

.app-detail-quick-stats article {
    min-width: 0;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 14px;
    background: rgba(12, 13, 54, .2);
    backdrop-filter: blur(8px);
}

.app-detail-quick-stats span {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, .58);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.app-detail-quick-stats strong {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-detail-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.app-modern-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 15px;
    border: 0;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.app-modern-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.app-modern-button-primary {
    background: #fff;
    color: #37338d;
    box-shadow: 0 12px 26px rgba(9, 9, 36, .22);
}

.app-modern-button-primary:hover {
    color: #37338d;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(9, 9, 36, .28);
}

.app-modern-button-accent {
    background: #f5b43c;
    color: #2e285f;
}

.app-modern-button-accent:hover {
    color: #2e285f;
    transform: translateY(-2px);
}

.app-modern-button-ghost {
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.app-modern-button-ghost:hover {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    transform: translateY(-2px);
}

.app-modern-button-disabled {
    background: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .7);
    cursor: not-allowed;
}

.app-detail-share-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 24px;
    padding-top: 17px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.app-detail-share-label {
    margin-right: 4px;
    color: rgba(255, 255, 255, .58);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.app-detail-share-bar a {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 11px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
    transition:
        transform .2s ease,
        background .2s ease;
}

.app-detail-share-bar a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .16);
    transform: translateY(-3px);
}

.app-modern-card {
    overflow: hidden;
    padding: clamp(17px, 2.4vw, 25px);
    border: 1px solid var(--app-detail-border);
    border-radius: var(--app-detail-radius);
    background: var(--app-detail-surface);
    box-shadow: var(--app-detail-shadow);
}

.app-modern-card h2,
.app-modern-card h3,
.app-modern-card h4 {
    color: var(--app-detail-ink);
    font-weight: 850;
    letter-spacing: -.025em;
}

.app-modern-card h2 {
    position: relative;
    padding-left: 14px;
    font-size: clamp(20px, 2.4vw, 28px);
}

.app-modern-card h2::before {
    position: absolute;
    top: .18em;
    bottom: .18em;
    left: 0;
    width: 4px;
    border-radius: 999px;
    content: "";
    background: linear-gradient(
        180deg,
        var(--app-detail-primary),
        #7c3aed
    );
}

.app-screenshot-section {
    padding: 12px;
}

.app-screenshot-section .screenshots {
    max-width: none;
    padding: 0;
}

#screenshot-main {
    position: relative;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #c8c9e8 transparent;
    cursor: grab;
}

#screenshot-main.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}

#screenshot-main a {
    display: block;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 16px;
    background: #eff0f7;
    box-shadow: 0 10px 26px rgba(31, 41, 55, .08);
}

#screenshot-main img {
    display: block;
    width: auto;
    height: clamp(250px, 34vw, 420px);
    margin: 0 !important;
    object-fit: cover;
    transition: transform .35s ease;
}

#screenshot-main a:hover img {
    transform: scale(1.025);
}

#screenshot-main #left,
#screenshot-main #right {
    position: sticky;
    z-index: 5;
    top: 50%;
    display: grid;
    flex: 0 0 38px;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--app-detail-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: var(--app-detail-primary);
    transform: translateY(-50%);
    cursor: pointer;
    backdrop-filter: blur(8px);
}

#screenshot-main #left {
    left: 6px;
}

#screenshot-main #right {
    right: 6px;
}

.app-version-grid > div {
    position: relative;
    padding: 13px 15px;
    border: 1px solid #ececf4;
    border-radius: 14px;
    background: #fafaff;
    color: var(--app-detail-muted);
    font-size: 11px;
}

.app-version-grid b {
    display: block;
    margin-bottom: 4px;
    color: var(--app-detail-ink);
    font-size: 9px;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.app-version-section .download-btn,
.app-version-section .download-not-btn,
.app-version-section .buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 8px;
    padding: 11px 17px;
    border-radius: 13px;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.app-version-section .download-btn:hover,
.app-version-section .buy-btn:hover {
    transform: translateY(-2px);
}

.app-tags-section ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.app-tags-section li {
    margin: 0;
}

.app-tags-section li a {
    display: inline-flex;
    padding: 7px 10px;
    border: 1px solid #e4e5ef;
    border-radius: 999px;
    background: #f8f8fc;
    color: #555d70;
    font-size: 10px;
    text-decoration: none;
    transition:
        transform .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.app-tags-section li a:hover {
    border-color: #cfcfff;
    color: var(--app-detail-primary);
    transform: translateY(-2px);
}

.app-old-versions .d-flex {
    padding: 13px;
    border: 1px solid #ececf4;
    border-radius: 14px;
    background: #fafaff;
}

.app-old-versions .download-btn-sm {
    border-radius: 10px;
}

.app-description-section .description {
    display: block;
    color: #464d5c;
    font-size: 14px;
    line-height: 1.8;
}

.app-description-section .app-description {
    color: #464d5c;
    line-height: 1.8;
}

.app-review-section .add-comment,
.app-review-section .comment-button,
.app-review-section .submit-button {
    border: 0;
    border-radius: 11px;
    background: linear-gradient(
        135deg,
        var(--app-detail-primary),
        #7c3aed
    );
    box-shadow: 0 10px 22px rgba(91, 92, 226, .2);
}

.app-review-section .card {
    border: 1px solid #e8e9f2;
    border-radius: 15px;
    background: #fbfbfe;
    box-shadow: none;
}

.app-review-section .form-control,
.app-review-section .form-select {
    min-height: 44px;
    border-color: #e1e3ec;
    border-radius: 11px;
    background: #fbfbfe;
}

.app-review-section textarea.form-control {
    min-height: 130px;
}

.app-review-section .progress {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: #ececf4;
}

.app-review-section .progress-bar {
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--app-detail-primary),
        #7c3aed
    );
}

.app-detail-sidebar {
    position: sticky;
    top: 88px;
}

.app-detail-sidebar > * {
    border-radius: 18px !important;
    box-shadow: 0 14px 34px rgba(31, 41, 55, .07) !important;
}

.app-ui-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity .65s ease,
        transform .65s cubic-bezier(.22, 1, .36, 1);
}

.app-ui-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.app-mobile-cta {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 17px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 48px rgba(31, 41, 55, .2);
    backdrop-filter: blur(14px);
    transform: translateY(140%);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}

.app-mobile-cta.is-visible {
    transform: translateY(0);
}

.app-mobile-cta > div {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
}

.app-mobile-cta img {
    flex: 0 0 46px;
    border-radius: 12px;
    object-fit: cover;
}

.app-mobile-cta span {
    display: block;
    min-width: 0;
}

.app-mobile-cta strong,
.app-mobile-cta small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-mobile-cta strong {
    color: var(--app-detail-ink);
    font-size: 11px;
}

.app-mobile-cta small {
    color: var(--app-detail-muted);
    font-size: 9px;
}

.app-mobile-cta > a {
    flex: 0 0 auto;
    padding: 10px 13px;
    border-radius: 11px;
    background: linear-gradient(
        135deg,
        var(--app-detail-primary),
        #7c3aed
    );
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .app-detail-hero-grid {
        grid-template-columns: 160px minmax(0, 1fr);
    }

    .app-detail-icon-shell {
        width: 150px;
        height: 150px;
        border-radius: 32px;
    }

    .app-detail-icon {
        border-radius: 23px;
    }

    .app-detail-quick-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-detail-sidebar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .app-detail-container {
        padding-bottom: 84px;
    }

    .app-detail-hero {
        padding: 18px;
        border-radius: 22px;
    }

    .app-detail-breadcrumb {
        margin-bottom: 18px;
    }

    .app-detail-hero-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .app-detail-icon-column {
        align-items: flex-start;
        flex-direction: row;
    }

    .app-detail-icon-shell {
        flex: 0 0 116px;
        width: 116px;
        height: 116px;
        padding: 9px;
        border-radius: 26px;
    }

    .app-detail-icon {
        border-radius: 19px;
    }

    .app-detail-verified-badge {
        right: -12px;
        bottom: 7px;
        padding: 5px 7px;
        border-width: 2px;
        font-size: 8px;
    }

    .app-detail-qr-trigger {
        align-self: center;
    }

    .app-detail-title {
        font-size: clamp(32px, 10vw, 46px);
    }

    .app-detail-quick-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-detail-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .app-modern-button {
        width: 100%;
    }

    .app-detail-share-bar {
        justify-content: center;
    }

    #screenshot-main img {
        height: 310px;
    }

    #screenshot-main #left,
    #screenshot-main #right {
        display: none;
    }

    .app-modern-card {
        border-radius: 18px;
    }
}

@media (max-width: 399.98px) {
    .app-detail-icon-column {
        align-items: center;
        flex-direction: column;
    }

    .app-detail-quick-stats {
        grid-template-columns: 1fr 1fr;
    }

    .app-detail-rating-row {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-ui-reveal,
    .app-detail-icon-shell,
    .app-modern-button,
    .app-detail-share-bar a,
    #screenshot-main img,
    .app-mobile-cta {
        transition: none !important;
        transform: none !important;
    }
}


/* =========================================================
   APP DETAIL MAIN GRID — SIDEBAR DESKTOP
   ========================================================= */

.app-detail-container > .row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.app-detail-container .app-detail-main {
    min-width: 0;
}

@media (min-width: 992px) {
    .app-detail-container .app-detail-main {
        flex: 0 0 auto;
        width: 75%;
    }

    .app-detail-container .app-detail-main + .col-lg-3 {
        flex: 0 0 auto;
        width: 25%;
    }

    .app-detail-sidebar {
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .app-detail-container .app-detail-main,
    .app-detail-container .app-detail-main + .col-lg-3 {
        width: 100%;
    }
}


/* =========================================================
   ALIGN SEARCH BOX & SIDEBAR TOP
   ========================================================= */

/*
 * Partial search memiliki ruang internal pada bagian atas.
 * Padding sidebar berikut menyamakan posisi card pertama sidebar
 * dengan batas atas kotak pencarian pada desktop.
 */
@media (min-width: 992px) {
    .app-detail-sidebar-column {
        padding-top: 24px;
    }
}

/*
 * Pada tablet/mobile, sidebar berada di bawah konten sehingga
 * tambahan jarak desktop harus dihapus.
 */
@media (max-width: 991.98px) {
    .app-detail-sidebar-column {
        padding-top: 0;
    }
}