/* ==========================================================================
   FreeAPK Theme - Main Stylesheet
   ========================================================================== */

:root {
    --fa-primary: #5ABE3C;
    --fa-primary-dark: #4ba031;
    --fa-primary-light: #e8f7e1;
    --fa-bg: #f4f6f8;
    --fa-card-bg: #ffffff;
    --fa-text: #222222;
    --fa-text-secondary: #6b7280;
    --fa-border: #e5e7eb;
    --fa-border-light: #f3f4f6;
    --fa-rating: #ffc107;
    --fa-radius: 8px;
    --fa-radius-lg: 12px;
    --fa-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --fa-shadow: 0 1px 3px rgba(0,0,0,0.06);
    --fa-container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--fa-text);
    background: var(--fa-bg);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--fa-primary); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; padding: 0; margin: 0; }

button { cursor: pointer; font-family: inherit; }

/* ============== CONTAINER ============== */
.container {
    max-width: var(--fa-container);
    margin: 0 auto;
    padding: 0 16px;
}

/* ============== HEADER ============== */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--fa-border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--fa-shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 22px;
    color: var(--fa-text);
    flex-shrink: 0;
}

.site-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--fa-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    transform: rotate(-15deg);
}

.site-logo .logo-text { color: var(--fa-text); }

.nav-menu {
    display: flex;
    gap: 24px;
    flex: 1;
}

.nav-menu li a {
    display: block;
    padding: 8px 4px;
    font-size: 14px;
    color: var(--fa-text);
    font-weight: 500;
    transition: color 0.15s;
}

.nav-menu li a:hover,
.nav-menu .current-menu-item a { color: var(--fa-primary); }

.header-search {
    flex: 0 0 280px;
    position: relative;
}

.header-search input {
    width: 100%;
    height: 36px;
    border: 1px solid var(--fa-border);
    border-radius: 18px;
    padding: 0 14px 0 38px;
    background: var(--fa-bg);
    font-size: 13px;
    outline: none;
    transition: all 0.15s;
}

.header-search input:focus {
    background: #fff;
    border-color: var(--fa-primary);
}

.header-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fa-text-secondary);
    pointer-events: none;
}

.header-user {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--fa-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fa-text-secondary);
    flex-shrink: 0;
}

/* ============== BREADCRUMB ============== */
.breadcrumb {
    padding: 12px 0;
    font-size: 13px;
    color: var(--fa-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--fa-text-secondary); }
.breadcrumb a:hover { color: var(--fa-primary); }
.breadcrumb .separator { color: #ccc; }

/* ============== LAYOUT ============== */
.site-content { padding: 16px 0 32px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
}

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
}

/* ============== HERO SLIDER ============== */
.hero-slider {
    background: var(--fa-card-bg);
    border-radius: var(--fa-radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    box-shadow: var(--fa-shadow-sm);
}

.hero-slide {
    position: relative;
    aspect-ratio: 16/7;
    overflow: hidden;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-overlay .hero-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.hero-overlay .hero-title {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.hero-overlay .btn-download {
    margin: 0;
    padding: 6px 18px;
    height: auto;
}

/* ============== SECTION ============== */
.section {
    background: var(--fa-card-bg);
    border-radius: var(--fa-radius-lg);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--fa-shadow-sm);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--fa-text);
}

.section-more {
    color: var(--fa-text-secondary);
    display: flex;
    align-items: center;
}
.section-more:hover { color: var(--fa-primary); }

/* ============== APP CARD GRID ============== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .app-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
    .app-grid { grid-template-columns: repeat(3, 1fr); }
}

.app-card-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 4px;
    transition: transform 0.15s;
}

.app-card-small:hover {
    transform: translateY(-2px);
}

.app-card-small .app-icon-wrap {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    background: var(--fa-bg);
    margin-bottom: 6px;
}

.app-card-small .app-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-card-small .app-name {
    font-size: 12px;
    color: var(--fa-text);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    width: 100%;
}

.app-rating-row {
    margin-top: 2px;
}

.app-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: var(--fa-text-secondary);
}

.star-icon {
    flex-shrink: 0;
}

/* ============== APP ROW (icon left + info right) ============== */
.app-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--fa-border-light);
}

.app-row:last-child { border-bottom: none; }
.app-row:hover .app-row-title { color: var(--fa-primary); }

.app-row-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--fa-bg);
}

.app-row-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-row-info {
    flex: 1;
    min-width: 0;
}

.app-row-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--fa-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}

.app-row-developer,
.app-row-rating {
    font-size: 11px;
    color: var(--fa-text-secondary);
    margin-top: 2px;
}

/* ============== TWO COLUMN APP LIST ============== */
.app-list-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

@media (max-width: 600px) {
    .app-list-2col { grid-template-columns: 1fr; }
}

/* ============== PROMO CAROUSEL ============== */
.promo-carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .promo-carousel { grid-template-columns: 1fr; }
}

.promo-card {
    position: relative;
    border-radius: var(--fa-radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.promo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.promo-card-name {
    font-size: 13px;
    font-weight: 600;
}

.promo-card .btn-download {
    padding: 4px 14px;
    font-size: 11px;
    height: auto;
}

/* ============== SIDEBAR ============== */
.sidebar { display: flex; flex-direction: column; gap: 16px; }

.widget {
    background: var(--fa-card-bg);
    border-radius: var(--fa-radius-lg);
    padding: 16px;
    box-shadow: var(--fa-shadow-sm);
}

.widget-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--fa-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-search input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--fa-border);
    border-radius: var(--fa-radius);
    padding: 0 12px;
    font-size: 13px;
    margin-bottom: 8px;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.search-tag {
    padding: 4px 10px;
    background: var(--fa-bg);
    border-radius: 12px;
    font-size: 12px;
    color: var(--fa-text-secondary);
    transition: all 0.15s;
}

.search-tag:hover {
    background: var(--fa-primary-light);
    color: var(--fa-primary-dark);
}

.app-promo-banner {
    background: linear-gradient(135deg, var(--fa-primary), var(--fa-primary-dark));
    color: #fff;
    padding: 14px;
    border-radius: var(--fa-radius);
    margin: 12px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-promo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-promo-text { flex: 1; font-size: 12px; line-height: 1.3; }
.app-promo-text strong { display: block; font-size: 13px; }

.editor-list .app-row {
    padding: 8px 0;
}

.featured-app-large {
    position: relative;
    border-radius: var(--fa-radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #ff6b6b, #fda085);
}

.featured-app-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-app-large-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.featured-app-large-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
}

/* ============== DOWNLOAD BUTTON ============== */
.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--fa-primary);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    transition: background 0.15s;
    text-decoration: none;
}

.btn-download:hover {
    background: var(--fa-primary-dark);
    color: #fff !important;
}

.btn-download.btn-download-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 16px;
}

.btn-download small {
    opacity: 0.85;
    font-weight: 400;
    margin-left: 4px;
}

/* ============== APP DETAIL HEADER ============== */
.app-detail-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.app-detail-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--fa-bg);
}

.app-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-detail-info {
    flex: 1;
    min-width: 0;
}

.app-detail-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-global {
    display: inline-block;
    background: var(--fa-bg);
    color: var(--fa-text-secondary);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.app-detail-developer {
    color: var(--fa-text-secondary);
    font-size: 13px;
    margin-bottom: 4px;
}

.app-detail-version {
    color: var(--fa-text-secondary);
    font-size: 12px;
    margin-bottom: 12px;
}

.app-detail-download-area {
    flex: 0 0 280px;
    text-align: right;
}

.app-detail-download-area .btn-download {
    width: 100%;
    margin-bottom: 8px;
}

.app-detail-xapk-help {
    font-size: 12px;
    color: var(--fa-primary);
    text-decoration: none;
}

.app-detail-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--fa-border-light);
    border-bottom: 1px solid var(--fa-border-light);
    margin-top: 16px;
}

.app-detail-meta-item {
    text-align: center;
    border-right: 1px solid var(--fa-border-light);
}
.app-detail-meta-item:last-child { border-right: none; }

.app-detail-meta-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--fa-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.app-detail-meta-label {
    font-size: 11px;
    color: var(--fa-text-secondary);
    margin-top: 2px;
}

@media (max-width: 768px) {
    .app-detail-header { flex-direction: column; }
    .app-detail-download-area { flex: 1; width: 100%; text-align: center; }
    .app-detail-meta { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .app-detail-meta-item:nth-child(2n) { border-right: none; }
}

/* ============== SCREENSHOTS ============== */
.app-screenshots {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.app-screenshots::-webkit-scrollbar { height: 6px; }
.app-screenshots::-webkit-scrollbar-track { background: var(--fa-border-light); border-radius: 3px; }
.app-screenshots::-webkit-scrollbar-thumb { background: var(--fa-border); border-radius: 3px; }

.app-screenshots img {
    height: 240px;
    width: auto;
    border-radius: var(--fa-radius);
    flex-shrink: 0;
    scroll-snap-align: start;
    object-fit: cover;
}

/* ============== INFO TABLE ============== */
.app-info-table {
    width: 100%;
    border-collapse: collapse;
}

.app-info-table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--fa-border-light);
    vertical-align: top;
    font-size: 13px;
}

.app-info-table td:first-child {
    color: var(--fa-text-secondary);
    width: 40%;
}

/* ============== VERSION HISTORY ============== */
.versions-list { display: flex; flex-direction: column; gap: 8px; }

.version-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--fa-bg);
    border-radius: var(--fa-radius);
}

.version-row-info { display: flex; flex-direction: column; gap: 2px; }

.version-name { font-weight: 500; font-size: 13px; }
.version-name .ext {
    background: var(--fa-primary-light);
    color: var(--fa-primary-dark);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
}

.version-meta { font-size: 12px; color: var(--fa-text-secondary); }

/* ============== SECURITY VERIFIED ============== */
.security-block {
    background: var(--fa-primary-light);
    border-radius: var(--fa-radius);
    padding: 14px;
    margin: 12px 0;
}

.security-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--fa-primary-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.security-checks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-size: 12px;
}

.security-check {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--fa-text-secondary);
}

.security-check svg { color: var(--fa-primary); flex-shrink: 0; }

@media (max-width: 600px) {
    .security-checks { grid-template-columns: 1fr; }
}

/* ============== TAGS ============== */
.app-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.app-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--fa-bg);
    border-radius: 16px;
    font-size: 12px;
    color: var(--fa-text-secondary);
    border: 1px solid var(--fa-border-light);
}

.app-tag:hover {
    background: var(--fa-primary-light);
    color: var(--fa-primary-dark);
    border-color: var(--fa-primary-light);
}

/* ============== CATEGORY GRID (archive) ============== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
}

@media (max-width: 768px) {
    .category-grid { grid-template-columns: 1fr; }
}

/* ============== TAXONOMY CHIP LIST ============== */
.taxonomy-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.taxonomy-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 6px;
    background: var(--fa-bg);
    border-radius: 18px;
    font-size: 12px;
    color: var(--fa-text);
    transition: background 0.15s;
}

.taxonomy-chip:hover {
    background: var(--fa-primary-light);
    color: var(--fa-primary-dark);
}

.taxonomy-chip-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
}

/* ============== FEATURED BANNER (3 large games) ============== */
.featured-banners {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.featured-banner {
    position: relative;
    border-radius: var(--fa-radius);
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--fa-bg);
}

.featured-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .featured-banners { grid-template-columns: 1fr; }
}

/* ============== HORIZONTAL APP LIST (5x2) ============== */
.apps-horizontal-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

@media (max-width: 768px) {
    .apps-horizontal-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .apps-horizontal-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============== NEWS SECTION ============== */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.news-card {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--fa-border-light);
}

.news-card-img {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--fa-bg);
}

.news-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.news-card-content { flex: 1; min-width: 0; }
.news-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--fa-text);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}
.news-card-date { font-size: 11px; color: var(--fa-text-secondary); }
.news-card:hover .news-card-title { color: var(--fa-primary); }

@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
}

/* ============== FOOTER ============== */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--fa-border-light);
    padding: 32px 0 16px;
    margin-top: 24px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .footer-inner { grid-template-columns: 1fr; }
}

.footer-about p {
    font-size: 12px;
    color: var(--fa-text-secondary);
    line-height: 1.6;
    margin: 12px 0 16px;
}

.footer-social { display: flex; gap: 10px; }

.footer-social a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--fa-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fa-text-secondary);
    transition: all 0.15s;
}

.footer-social a:hover {
    background: var(--fa-primary);
    color: #fff;
}

.footer-col h4 {
    font-size: 13px;
    margin: 0 0 12px;
    color: var(--fa-text);
    font-weight: 600;
}

.footer-col ul li { margin-bottom: 8px; font-size: 13px; }
.footer-col ul li a { color: var(--fa-text-secondary); }
.footer-col ul li a:hover { color: var(--fa-primary); }

.badge-new {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: middle;
}

.footer-bottom {
    padding-top: 16px;
    border-top: 1px solid var(--fa-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--fa-text-secondary);
    flex-wrap: wrap;
    gap: 8px;
}

/* ============== PAGINATION ============== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 24px 0;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--fa-radius);
    background: #fff;
    border: 1px solid var(--fa-border);
    font-size: 13px;
    color: var(--fa-text);
}

.pagination .current,
.pagination a:hover {
    background: var(--fa-primary);
    color: #fff;
    border-color: var(--fa-primary);
}

/* ============== RELATED APPS ============== */
.related-apps {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .related-apps { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
    .related-apps { grid-template-columns: repeat(3, 1fr); }
}

/* ============== UTILITY ============== */
.text-muted { color: var(--fa-text-secondary); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* Hide scrollbar nicely */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.scroll-x::-webkit-scrollbar { height: 4px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--fa-border); border-radius: 2px; }
