/* --- App detail header (aligned with apkmodjoy.net) --- */

.appDetail .appdetail-header {
    background-color: #fff;
    overflow: visible;
}

/* Clear absolute site header (56px mobile / 64px desktop) — reference uses 80px / 102px */
.appDetail .appdetail-header-app {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    position: relative !important;
    padding-top: 80px !important;
    padding-bottom: 0 !important;
    gap: 0;
    min-height: 0;
    box-sizing: border-box;
}

.appDetail .appdetail-header-app .app-pic {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
}

.appDetail .appdetail-header-app .layout-place {
    position: relative;
    width: 100%;
    height: 100%;
    padding-top: 0;
}

.appDetail .appdetail-header-app .layout-apps-item-detailpic {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20%;
    display: block;
}

.appDetail .app-all {
    height: 80px;
    min-height: 0;
    position: relative;
    padding-left: 16px !important;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.appDetail .app-all-tc {
    max-height: 54px;
    overflow: hidden;
}

.appDetail .app-all-name {
    position: static !important;
    top: auto !important;
}

.appDetail .app-all-cat {
    position: static !important;
    top: auto !important;
}

.appDetail .appdetail-header-detail {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 310px;
}

.appDetail .apk-trust-box {
    display: block;
    width: 100%;
    margin-top: 8px !important;
    padding: 0;
    border-top: none;
    clear: both;
    position: relative;
    z-index: 1;
}

.appDetail .trust-main {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
    flex-wrap: wrap;
}

.appDetail .trust-badge {
    flex-shrink: 0;
    vertical-align: middle;
}

.appDetail .trust-link {
    margin-top: 2px;
}

.appDetail .trust-link a {
    font-size: 14px;
    color: #1a73e8;
    font-weight: 400;
    text-decoration: none;
    line-height: 1.4;
}

.appDetail .trust-link a:hover {
    text-decoration: underline;
}

/* Download buttons — reference colors */
.appDetail .download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 230px;
    max-width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 18px;
    font-weight: 400;
    color: #fff !important;
    background-color: #fe66c3;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    box-sizing: border-box;
}

.appDetail .telegram-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 230px;
    max-width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 18px;
    font-weight: 400;
    color: #fff !important;
    background-color: #0096da;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    box-sizing: border-box;
}

.appDetail .install-guide-btn {
    background-color: #3cb30d !important;
}

.appDetail .download-btn svg,
.appDetail .telegram-btn svg {
    fill: #fff !important;
    height: 20px;
    width: 20px;
    flex-shrink: 0;
}

.appDetail .appdetail-header-app > .download-all {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.appDetail .download-all-mb {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
}

@media only screen and (max-width: 768px) {
    .appDetail .appdetail-header-app {
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    .appDetail .appdetail-header-app > .download-all {
        display: none !important;
    }

    .appDetail .download-all-mb {
        display: flex !important;
        width: 100%;
        max-width: 100%;
        margin-top: 12px;
    }

    .appDetail .download-btn,
    .appDetail .telegram-btn {
        width: 100%;
    }

    .appDetail .appdetail-header-detail {
        max-width: 100%;
    }

    .appDetail .apk-trust-box {
        margin-top: 12px !important;
    }
}

@media screen and (min-width: 601px) {
    .appDetail .appdetail-header-app .app-pic {
        width: 80px;
        height: 80px;
    }

    .appDetail .app-all {
        padding-left: 24px !important;
        height: 90px;
    }
}

@media screen and (min-width: 769px) {
    .appDetail .appdetail-header-app {
        padding-top: 102px !important;
    }

    .appDetail .appdetail-header-app .app-pic {
        width: 106px;
        height: 106px;
    }

    .appDetail .app-all-cat {
        display: none !important;
    }
}

.appDetail .layout-minheaderbox {
    max-width: 1202px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Detail page layout — reference: 1162px container, left 728px (~63%), gap 60px, right ~374px (~32%) */
.appDetail.layout-detailmaxbox {
    box-sizing: border-box;
    max-width: 1162px;
    margin-left: auto;
    margin-right: auto;
}

.appDetail .layout-bothbox {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
}

.appDetail .layout-leftbox {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

.appDetail .layout-rightbox {
    position: static;
    top: auto;
    left: auto;
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    margin-top: 32px;
    flex: 1 1 auto;
}

@media screen and (min-width: 1024px) {
    .appDetail .layout-bothbox {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    /* Left main column — fixed 728px, not 50% */
    .appDetail .layout-leftbox {
        flex: 0 0 728px;
        width: 728px;
        max-width: 728px;
        min-width: 0;
    }

    /* Right sidebar — remaining width minus 60px gutter (788 = 728 + 60) */
    .appDetail .layout-rightbox {
        flex: 0 0 calc(100% - 788px);
        width: calc(100% - 788px);
        max-width: calc(100% - 788px);
        min-width: 0;
        margin-left: 60px;
        margin-top: 0;
        position: sticky;
        top: 70px !important;
        align-self: flex-start;
    }
}

@media (max-width: 768px) {
    .appDetail.layout-detailmaxbox {
        padding-left: 12px;
        padding-right: 12px;
    }

    .appDetail .about-maxpic {
        height: auto;
        min-height: 160px;
        padding-top: 16px;
        padding-bottom: 8px;
    }

    .appDetail .maxpic-slides .slides {
        -webkit-overflow-scrolling: touch;
    }

    .appDetail .appdetail-maintab {
        padding-top: 8px;
    }

    .appDetail .maintab-item {
        width: 50%;
    }

    .appDetail .comments-area {
        padding: 16px 12px;
    }
}

.trust-editor {
    margin-top: 6px;
    margin-bottom: 14px;
}

.trust-editor a {
    font-size: 14px;
    color: #555;
    font-weight: 500;
    text-decoration: none;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
}

.table-custom th,
.table-custom td {
    border: 1px solid #dee2e6;
    padding: 8px 12px;
}

.table-custom thead th {
    background: #f8f9fa;
}

#toggle-rows-btn {
    background-color: #fe66c3;
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(254, 102, 195, 0.3);
}

.layout-art-tit {
    font-size: 20px;
    line-height: 28px;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 700;
}

@media screen and (min-width: 601px) {
    .appDetail .layout-art-tit,
    .layout-mintit {
        font-size: 24px;
        line-height: 28px;
        margin-top: 28px;
        margin-bottom: 12px;
    }
}

.layout-article .wrapcontent > * {
    margin-bottom: 16px;
}

.layout-article ul {
    margin-left: 25px;
}

.layout-article table {
    width: 100%;
    border-collapse: collapse;
}

.layout-article table td,
.layout-article table th {
    border: 1px solid #ddd;
    padding: 8px;
}

.refe-button {
    list-style: none;
    padding-top: 24px;
    padding-bottom: 12px;
    margin: 24px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

#appDetail-otherdown #download-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.refe-button-item {
    list-style: none;
}

.refe-button-gocolor .refe-button-con {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fe66c3;
    color: #fff;
    text-align: center;
    padding: 14px 24px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
}

#appDetail-otherdown #download-btn.refe-button-gocolor {
    justify-content: center;
}

#appDetail-otherdown .refe-button-gocolor .item-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
}

#appDetail-otherdown .refe-button-gocolor .button-item-text {
    padding-left: 0;
    text-align: center;
    width: 100%;
}

.loading-spinner-time {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

#time-left {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: #333;
    font-weight: 700;
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}

.ratings {
    display: flex;
    flex-wrap: wrap;
    padding: 12px 0;
}

.ratings-left {
    padding-right: 24px;
    box-sizing: border-box;
    width: 100%;
}

@media screen and (min-width: 601px) {
    .ratings-left {
        width: 25%;
    }
}

.ratings-left-grade {
    line-height: 36px;
    font-size: 48px;
    text-align: center;
}

.ratings-me {
    display: flex;
    justify-content: center;
    margin: 8px 0;
}

.ratings-mystar svg {
    width: 24px;
    height: 24px;
    fill: #efeff4;
    cursor: pointer;
    transition: fill 0.2s;
}

.ratings-left-vot {
    font-size: 14px;
    text-align: center;
    color: #666;
}

.ratings-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 8px;
    margin-top: 16px;
}

@media screen and (min-width: 601px) {
    .ratings-right {
        margin-top: 0;
    }
}

.ratings-right-item {
    display: flex;
    align-items: center;
}

.right-item-grade {
    width: 8px;
    font-size: 14px;
}

.right-item-peo {
    height: 10px;
    background-color: #efeff4;
    margin-left: 16px;
    flex: 1;
    border-radius: 16px;
}

.peo-num {
    height: 100%;
    background-color: #2fc0b7;
    border-radius: 24px;
}

.rating-thankyou {
    color: green;
    font-weight: bold;
    text-align: center;
    padding: 10px;
}

.all-apps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media screen and (min-width: 768px) {
    .all-apps {
        grid-template-columns: repeat(3, 1fr);
    }
}

.app-con {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.app-img img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
}

.sidebar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-con {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.sidebar-img img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
}

.comments-area {
    margin-top: 32px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comments-area textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
}

.comments-area .comment-submit {
    margin-top: 10px;
    background: #2fc0b7;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.maxpic-slides .slides {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
}

.maxpic-slides .slide-pic img {
    height: 120px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .table-custom th:nth-child(n+4),
    .table-custom td:nth-child(n+4) {
        display: none;
    }
}

#wpdcom .wpd-ai-comments-notice {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #f7f9fb;
    border: 1px solid #e6ebf0;
    border-radius: 8px;
}

#wpdcom .wpd-ai-comments-text {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

#wpdcom .wpd-ai-comments-text i {
    margin-right: 8px;
    color: #2fc0b7;
}

#wpdcom .wpd-no-comments {
    margin: 12px 0 20px;
    color: #888;
    font-size: 14px;
}

#wpdcom.wpd-comments-closed .wpd-reply-button {
    display: none;
}
