/* ========================================
   Single App Detail Page — Redesigned
   Inspired by liteapks.com, adapted to BoldAPKs style
   ======================================== */

/* Layout */
.single-app { margin: 0 auto; }

/* --- App Header Card --- */
.app-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 28px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.app-icon img {
    width: 120px;
    height: 120px;
    border-radius: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.app-meta { flex: 1; min-width: 0; }

.app-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 6px;
    color: var(--text);
}
.app-version-badge {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    padding: 2px 10px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 6px;
}
.app-mod-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: .8rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* [P2 2026-04-14] Last updated date — #1 trust signal for APK sites */
.app-updated-date {
    display: inline-flex;
    align-items: center;
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    margin-left: 0;
    cursor: help;
}
.app-updated-date svg { opacity: 0.75; }

/* --- Info Tags (compact badges in header) --- */
.app-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.info-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: .82rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.info-tag svg { flex-shrink: 0; opacity: .6; }

/* --- Download Button (Hero) --- */
.download-section { margin-top: 4px; }
.btn-download-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(22,163,74,.35);
    transition: all .25s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.btn-download-hero:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    box-shadow: 0 6px 20px rgba(22,163,74,.45);
    transform: translateY(-1px);
    color: #fff;
}
.btn-download-hero svg { flex-shrink: 0; }
.dl-btn-text { line-height: 1; }
.dl-btn-size { font-weight: 500; opacity: .85; }
.dl-version-label {
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

/* --- Content Area (full width, no sidebar) --- */
.app-content {
    display: block;
}
.content-main {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Section headings inside content */
.content-main h2,
.screenshots-section h2,
.description-section h2,
.mod-features h2,
.whats-new-section h2,
.app-info-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px 0;
    padding: 0 0 10px 14px;
    border-left: 4px solid var(--primary);
    border-bottom: 1px solid var(--border);
    line-height: 1.3;
}
.content-main section + section { margin-top: 32px; }

/* --- Description Content Typography --- */
.app-description {
    font-size: .95rem;
    line-height: 1.85;
    color: #374151;
}
.app-description p {
    margin-bottom: 18px;
}
.app-description h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
    margin: 28px 0 12px;
    padding-left: 0;
    position: relative;
}
.app-description h3::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}
.app-description h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 20px 0 8px;
}
.app-description ul,
.app-description ol {
    margin: 12px 0 18px 8px;
    padding-left: 20px;
}
.app-description li {
    margin-bottom: 8px;
    line-height: 1.75;
    color: #374151;
}
.app-description li strong {
    color: var(--text);
}
.app-description a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(37,99,235,.3);
    text-underline-offset: 2px;
}
.app-description a:hover {
    text-decoration-color: var(--primary);
}
.app-description blockquote {
    border-left: 3px solid var(--primary);
    margin: 16px 0;
    padding: 12px 20px;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    color: #475569;
    font-style: italic;
}

/* --- Screenshots --- */
.screenshots-section { margin-bottom: 0; }
.screenshot-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.screenshot-gallery::-webkit-scrollbar { height: 6px; }
.screenshot-gallery::-webkit-scrollbar-track { background: var(--bg); border-radius: 3px; }
.screenshot-gallery::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.screenshot-gallery::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.screenshot-img {
    max-height: 360px;
    width: auto;
    border-radius: 10px;
    scroll-snap-align: start;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    flex-shrink: 0;
}

/* --- Mod Features --- */
.mod-features { margin: 0; }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
    padding: 10px 0 10px 28px;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
    font-size: .93rem;
    color: #374151;
    line-height: 1.6;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 10px;
    color: #16a34a;
    font-weight: 700;
    font-size: .95rem;
}

/* --- What's New --- */
.whats-new-content {
    font-size: .93rem;
    line-height: 1.75;
    color: #374151;
}
.whats-new-content p { margin-bottom: 12px; }
.whats-new-content ul { margin: 8px 0 12px; padding-left: 24px; }
.whats-new-content li { margin-bottom: 6px; }

/* --- App Information Table (inside content) --- */
.app-info-section .app-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}
.app-info-table th,
.app-info-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    font-size: .9rem;
}
.app-info-table th {
    width: 140px;
    font-weight: 600;
    color: var(--text-muted);
    background: #fafbfc;
}
.app-info-table td {
    color: var(--text);
}
.app-info-table tr:last-child th,
.app-info-table tr:last-child td { border-bottom: none; }
.app-info-table a { color: var(--primary); }

/* --- Related Apps Section (full-width grid) --- */
.related-section {
    margin-top: 28px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    .app-title { font-size: 1.3rem; }
    .app-info-tags { justify-content: center; }
    .download-section { text-align: center; }
    .btn-download-hero { width: 100%; justify-content: center; }
    .content-main { padding: 20px; }
    .app-info-table th { width: auto; }
}
@media (max-width: 480px) {
    .app-header { padding: 16px; gap: 16px; }
    .app-icon img { width: 88px; height: 88px; border-radius: 18px; }
    .app-title { font-size: 1.15rem; }
    .app-version-badge { display: block; margin: 6px auto 0; }
    .info-tag { font-size: .78rem; padding: 4px 8px; }
    .btn-download-hero { padding: 12px 24px; font-size: .95rem; }
    .content-main { padding: 16px; }
    .content-main h2,
    .screenshots-section h2,
    .description-section h2,
    .mod-features h2,
    .whats-new-section h2,
    .app-info-section h2 { font-size: 1.05rem; }
    .screenshot-img { max-height: 280px; }
}
