/* ═══════════════════════════════════════════════════════════
   MODVAULT — Dark Cherry / Moody Charcoal Theme
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Dark cherry + moody charcoal palette */
    --bg-body: #19151d;
    --bg-card: #241e2a;
    --bg-raised: #2c2533;
    --bg-hover: #342c3c;
    --bg-input: #282130;

    --text-primary: #ece4ef;
    --text-secondary: #c8bdd1;
    --text-muted: #aa9db5;
    --text-heading: #fcf6ff;

    --border: #4a4056;
    --border-hover: #cd7386;

    --accent: #c0475a;
    --accent-hover: #a93a4c;
    --accent-light: #d87488;
    --accent-soft: rgba(192, 71, 90, 0.18);

    --green: #5ebd8b;
    --green-soft: rgba(94, 189, 139, 0.16);
    --pink: #d87488;
    --gold: #e0bb77;
    --red: #df6f7b;
    --red-soft: rgba(223, 111, 123, 0.18);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 8px;
    --radius-sm: 5px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow: 0 10px 28px rgba(20, 14, 26, 0.28);
    --ease: 0.18s ease;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(192, 71, 90, 0.20), transparent 60%),
        radial-gradient(900px 420px at 100% 0%, rgba(138, 116, 164, 0.14), transparent 55%),
        var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--accent-light); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(192, 71, 90, 0.32); color: #fff; }

/* ── Layout ────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ═══ HEADER ═══════════════════════════════════ */
#site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(27, 24, 32, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 52px;
}
.logo {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-heading); text-decoration: none;
    font-weight: 700; font-size: 1rem; letter-spacing: -0.01em;
}
.logo:hover { color: var(--accent-light); }
.logo-mark {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex-shrink: 0;
}
.logo-mark img {
    width: 100%; height: 100%; object-fit: contain;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 0.9375rem; font-weight: 700; color: var(--accent); }
.logo:hover .logo-text strong { color: var(--accent-light); }
.logo-text small { font-size: 0.6rem; color: var(--text-muted); }

.main-nav { display: flex; align-items: center; gap: 0; }
.nav-link {
    display: flex; align-items: center; gap: 5px; padding: 6px 14px;
    color: var(--text-secondary); font-size: 0.8rem; font-weight: 500;
    transition: all var(--ease); white-space: nowrap; border-radius: var(--radius-sm);
}
.nav-link:hover { color: var(--text-heading); background: var(--accent-soft); }
.nav-link svg { width: 14px; height: 14px; opacity: 0.4; }
.nav-link:hover svg { opacity: 0.8; }

.menu-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 4px;
    width: 32px; height: 32px; background: transparent; border: 1px solid var(--border);
    cursor: pointer; padding: 7px; border-radius: var(--radius-sm);
}
.menu-toggle span { display: block; width: 100%; height: 1.5px; background: var(--text-secondary); border-radius: 1px; transition: all var(--ease); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

/* Header Search */
.header-search { display: flex; align-items: center; gap: 0; margin-left: auto; }
.header-search-input {
    width: 180px; padding: 6px 10px; font-size: 0.78rem; font-family: var(--font);
    background: var(--bg-card); border: 1px solid var(--border); border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm); color: var(--text-primary);
    transition: border-color var(--ease);
}
.header-search-input:focus { outline: none; border-color: var(--accent); }
.header-search-input::placeholder { color: var(--text-muted); }
.header-search-btn {
    display: flex; align-items: center; justify-content: center;
    padding: 6px 10px; background: var(--accent); border: 1px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: #fff;
    cursor: pointer; transition: background var(--ease);
}
.header-search-btn:hover { background: var(--accent-hover); }
.mobile-search { display: none; }

/* ═══ BUTTONS ══════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; font-family: var(--font); font-size: 0.78rem; font-weight: 600;
    border-radius: var(--radius); border: none; cursor: pointer;
    transition: all var(--ease); white-space: nowrap; text-decoration: none; line-height: 1.4;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 5px; }
.btn-ghost:hover { color: var(--accent-light); }
.btn-danger { background: var(--red-soft); color: var(--red); border: 1px solid rgba(217,68,68,0.12); }
.btn-danger:hover { background: rgba(217,68,68,0.18); }
.btn-sm { padding: 5px 10px; font-size: 0.72rem; }
.btn-lg { padding: 10px 22px; font-size: 0.84rem; }
.btn-download {
    background: linear-gradient(135deg, #c0475a 0%, #b54257 48%, #a93a4c 100%);
    color: #fff;
    border: 1px solid rgba(216, 116, 136, 0.45);
    box-shadow: 0 10px 22px rgba(192, 71, 90, 0.28);
}
.btn-download:hover {
    background: linear-gradient(135deg, #cd5b6e 0%, #bf4e62 48%, #b13f53 100%);
    color: #fff;
    border-color: rgba(233, 150, 169, 0.55);
}
a.btn.btn-download,
a.btn.btn-download:visited,
a.btn.btn-download:hover {
    color: #fff !important;
}

/* ═══ BADGES & CHIPS ═══════════════════════════ */
.badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 3px 8px; border-radius: var(--radius-full);
    font-size: 0.65rem; font-weight: 600;
}
.badge-glow { background: var(--accent-soft); color: var(--accent-light); }
.badge-subtle { background: var(--bg-raised); color: var(--text-secondary); }
.badge-mod { background: rgba(212,88,106,0.12); color: var(--pink); }
.chip {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 4px 10px; border-radius: var(--radius-full);
    font-size: 0.67rem; font-weight: 500;
    background: var(--bg-raised); color: var(--text-secondary);
    border: 1px solid var(--border); transition: all var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent-light); background: var(--accent-soft); }

/* ═══ HERO SECTION (hidden, kept for compat) ═══ */
.hero-section { display: none; }

/* ═══ SECTION HEADER ═══════════════════════════ */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.section-header h2 { font-size: 1rem; font-weight: 700; color: var(--text-heading); }
.section-count { font-size: 0.72rem; color: var(--text-muted); }

/* ═══ APP GRID ═════════════════════════════════ */
.app-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    transition: all var(--ease);
}
.app-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(21, 14, 27, 0.36); }
.app-card-cover {
    display: block;
    position: relative;
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-raised);
}
.app-card-cover img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}
.app-card-rating {
    position: absolute; top: 2px; right: 2px;
    display: flex; align-items: center; gap: 2px;
    background: rgba(34, 26, 42, 0.74); padding: 2px 5px; border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.56rem; font-weight: 600; color: var(--gold);
}
.app-card-mod {
    position: absolute; top: 2px; left: 2px;
    background: rgba(212,88,106,0.18); color: var(--pink);
    padding: 2px 5px; border-radius: var(--radius-full);
    font-size: 0.52rem; font-weight: 700; text-transform: uppercase;
}
.app-card-body {
    padding: 0;
    min-width: 0;
    flex: 1;
}
.app-card-title {
    font-size: 0.82rem; font-weight: 600; color: var(--text-heading);
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; line-height: 1.4;
}
.app-card-title a { color: inherit; text-decoration: none; }
.app-card-title a:hover { color: var(--accent-light); }
.app-card-meta {
    font-size: 0.66rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.app-card-version {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.app-card-size {
    flex: 0 0 auto;
    white-space: nowrap;
}
.app-card-meta .sep { opacity: 0.3; flex: 0 0 auto; }
.app-card-updated {
    font-size: 0.62rem; color: var(--text-muted); margin-top: 4px;
    display: flex; align-items: center; gap: 2px; font-weight: 500;
}

/* ═══ APP DETAIL ═══════════════════════════════ */
.detail-hero { padding: 12px 0 14px; }
.detail-hero .container {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(197, 100, 129, 0.14) 0%, rgba(197, 100, 129, 0.04) 100%);
    padding: 14px 16px;
}
.detail-grid { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.detail-icon img { width: 112px; height: 112px; border-radius: var(--radius-lg); object-fit: cover; }
.detail-info h1 { font-size: 1.2rem; font-weight: 700; color: var(--text-heading); margin-bottom: 3px; }
.detail-publisher { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 8px; }
.detail-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.detail-chip-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.detail-stats-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.detail-stat {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 7px 12px; text-align: center;
}
.detail-stat strong { display: block; font-size: 0.82rem; font-weight: 700; color: var(--text-heading); }
.detail-stat span { font-size: 0.58rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.share-actions-info {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    justify-content: flex-start;
}
.share-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}
.share-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: transform var(--ease), opacity var(--ease), border-color var(--ease);
}
.share-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}
.share-facebook { color: #1877f2; border-color: rgba(24,119,242,0.3); background: rgba(24,119,242,0.12); }
.share-x { color: #e2e8f0; border-color: rgba(226,232,240,0.25); background: rgba(226,232,240,0.05); }
.share-telegram { color: #26a5e4; border-color: rgba(38,165,228,0.3); background: rgba(38,165,228,0.12); }
.share-whatsapp { color: #22c55e; border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.12); }

.detail-content { padding: 24px 0 40px; }
.detail-columns { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 20px; }
.detail-main,
.detail-sidebar { min-width: 0; }

.screenshots-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 8px;
    margin-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-raised) transparent;
}
.screenshots-row .screenshot-link {
    display: block;
    flex-shrink: 0;
    width: clamp(150px, 20vw, 220px);
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    overflow: hidden;
    cursor: zoom-in;
    scroll-snap-align: start;
    transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.screenshots-row .screenshot-link:hover {
    transform: translateY(-1px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 24px rgba(24, 16, 31, 0.34);
}
.screenshots-row img {
    width: 100%;
    height: 140px;
    border-radius: 0;
    object-fit: cover;
    display: block;
}

body.is-modal-open { overflow: hidden; }
.screenshot-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(24, 19, 30, 0.78);
    backdrop-filter: blur(4px);
}
.screenshot-modal[hidden] { display: none !important; }
.screenshot-modal-content {
    width: min(1080px, 100%);
    max-height: calc(100vh - 44px);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(28, 22, 36, 0.94);
    box-shadow: 0 24px 64px rgba(16, 10, 22, 0.52);
}
.screenshot-modal-content img {
    width: 100%;
    max-height: calc(100vh - 84px);
    object-fit: contain;
    display: block;
}
.screenshot-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(28, 22, 36, 0.9);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.article-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.article-card h2 { font-size: 0.92rem; font-weight: 700; color: var(--text-heading); margin-bottom: 12px; }
.article-body { color: var(--text-secondary); line-height: 1.7; font-size: 0.84rem; }
.article-body p { margin-bottom: 8px; }
.article-body-collapsible {
    position: relative;
    overflow: hidden;
    transition: max-height 0.22s ease;
}
.article-body-collapsible.is-collapsed {
    max-height: 320px;
}
.article-body-collapsible.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 104px;
    background: linear-gradient(to bottom, rgba(20, 27, 46, 0), rgba(20, 27, 46, 0.95) 72%);
    pointer-events: none;
}
.article-toggle-btn {
    margin-top: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--ease), background var(--ease), transform var(--ease);
}
.article-toggle-btn:hover {
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.06);
    transform: translateY(-1px);
}
.mod-info-list { margin: 0; padding-left: 18px; color: var(--text-secondary); font-size: 0.82rem; line-height: 1.6; }
.mod-info-list li { margin-bottom: 6px; }

.info-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.info-table tr { border-bottom: 1px solid var(--border); }
.info-table td { padding: 7px 0; font-size: 0.76rem; }
.info-table td:first-child { color: var(--text-muted); width: 36%; }
.info-table td:last-child { color: var(--text-primary); font-weight: 500; overflow-wrap: anywhere; word-break: break-word; }
.info-value-truncate {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══ DOWNLOAD SECTION ═════════════════════════ */
.download-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.download-section h3 { font-size: 0.88rem; font-weight: 700; color: var(--text-heading); margin-bottom: 10px; }
.version-list { display: flex; flex-direction: column; gap: 5px; }
.version-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 8px 12px;
    transition: border-color var(--ease); text-decoration: none; color: inherit;
}
.version-item:hover { border-color: var(--border-hover); }
.version-item-info { display: flex; flex-direction: column; }
.version-item-type { font-size: 0.65rem; font-weight: 700; color: var(--accent-light); text-transform: uppercase; }
.version-item-detail { font-size: 0.65rem; color: var(--text-muted); }
.version-item-size { font-size: 0.65rem; color: var(--text-secondary); white-space: nowrap; }

.download-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.download-help {
    margin: 0 0 10px;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.download-card {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.download-app-icon {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}
.download-subtitle {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}
.download-version-picker {
    margin: 14px 0 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.download-version-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-raised);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
}
.download-version-link:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}
.download-version-link.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-light);
}
.download-version-meta {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 0.75rem;
}
.download-actions {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.download-actions .btn[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.72;
}
.download-actions .btn.is-loading {
    border-style: dashed;
}
.download-loading {
    width: 100%;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.5;
}
.download-progress {
    width: min(320px, 92%);
    height: 7px;
    margin: 2px auto 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.download-progress-bar {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #c0475a 0%, #d56d82 45%, #e09db4 100%);
    transition: width 0.26s ease;
}
.download-error {
    width: 100%;
    margin: 0;
    color: var(--red);
    font-size: 0.74rem;
    line-height: 1.5;
}
.download-note {
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* ═══ GENRES ═══════════════════════════════════ */
.genres-section { padding: 16px 0; border-bottom: 1px solid var(--border); }
.genres-grid { display: flex; flex-wrap: wrap; gap: 5px; }

/* ═══ SEARCH ═══════════════════════════════════ */
.search-section { padding: 32px 0; }
.search-box { max-width: 500px; margin: 0 auto 28px; }
.search-input-group { display: flex; gap: 6px; }
.search-input {
    flex: 1; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-primary); font-family: inherit; font-size: 0.88rem;
    transition: border-color var(--ease);
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }

/* ═══ STATIC PAGES ═════════════════════════════ */
.page-section { padding: 16px 0 40px; }
.page-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; max-width: 700px; margin: 0 auto;
}
.page-card h1 { font-size: 1.2rem; font-weight: 700; color: var(--text-heading); margin-bottom: 14px; }
.page-card h2 { font-size: 0.96rem; font-weight: 700; color: var(--text-heading); margin: 16px 0 8px; }
.page-card p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px; font-size: 0.84rem; }
.page-card ul { padding-left: 16px; color: var(--text-secondary); margin-bottom: 10px; }
.page-card li { margin-bottom: 3px; line-height: 1.6; font-size: 0.84rem; }
.page-card a { color: var(--accent-light); }

/* ═══ PAGINATION ═══════════════════════════════ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 24px 0; }
.page-numbers { display: flex; gap: 2px; }
.page-num {
    display: flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; border-radius: var(--radius-sm);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-secondary); font-size: 0.72rem; font-weight: 500;
    transition: all var(--ease); padding: 0 4px;
}
.page-num:hover { border-color: var(--accent); color: var(--accent-light); }
.page-num.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-dots { color: var(--text-muted); padding: 0 3px; font-size: 0.75rem; }

/* ═══ EMPTY STATE ══════════════════════════════ */
.empty-state { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.empty-state svg { margin-bottom: 10px; opacity: 0.2; }
.empty-state p { font-size: 0.82rem; }

/* ═══ BREADCRUMB ═══════════════════════════════ */
.breadcrumb { display: flex; align-items: center; gap: 4px; font-size: 0.72rem; margin-bottom: 12px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb span { color: var(--text-muted); opacity: 0.35; }
.breadcrumb .current { color: var(--text-secondary); opacity: 1; }

/* ═══ FOOTER ═══════════════════════════════════ */
#site-footer {
    border-top: 1px solid var(--border); margin-top: 24px;
    padding: 16px 0;
}
.footer-grid {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-logo { display: flex; align-items: center; gap: 6px; }
.footer-logo strong { font-size: 0.82rem; color: var(--text-heading); }
.footer-desc { display: none; }
.footer-links-col { display: none; }
.footer-links-inline {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.footer-links-inline a {
    font-size: 0.72rem; color: var(--text-muted);
    transition: color var(--ease);
}
.footer-links-inline a:hover { color: var(--accent-light); }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.65rem; color: var(--text-muted); }

/* ═══ RESPONSIVE ═══════════════════════════════ */
@media (max-width: 1024px) {
    .detail-columns { grid-template-columns: 1fr; }
    .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed; top: 52px; left: 0; right: 0;
        background: var(--bg-card); border-bottom: 1px solid var(--border);
        flex-direction: column; padding: 6px; gap: 1px;
        visibility: hidden; opacity: 0; transform: translateY(-8px);
        transition: all var(--ease); z-index: 99;
    }
    .main-nav.open { visibility: visible; opacity: 1; transform: translateY(0); }
    .nav-link { width: 100%; padding: 10px 12px; }
    .menu-toggle { display: flex; }
    .header-search { display: none; }
    .mobile-search {
        display: block;
        padding: 10px 16px 12px;
        background: linear-gradient(180deg, rgba(192,71,90,0.08) 0%, rgba(192,71,90,0.02) 100%);
        border-bottom: 1px solid var(--border);
    }
    .mobile-search .search-input-group {
        display: flex;
        gap: 0;
        border: 1px solid var(--border);
        border-radius: 10px;
        overflow: hidden;
        background: var(--bg-card);
    }
    .mobile-search .search-input-group:focus-within {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px var(--accent-soft);
    }
    .mobile-search .header-search-input {
        flex: 1;
        width: 100%;
        border: 0;
        border-right: 1px solid var(--border);
        border-radius: 0;
        padding: 10px 12px;
        font-size: 0.84rem;
    }
    .mobile-search .header-search-btn {
        min-width: 44px;
        padding: 10px 12px;
        border: 0;
        border-radius: 0;
    }
    .logo-text small { display: none; }
    .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .app-card { padding: 9px; gap: 9px; }
    .app-card-cover { width: 76px; height: 76px; flex-basis: 76px; }
    .app-card-title { font-size: 0.78rem; }
    .breadcrumb { justify-content: flex-start; text-align: left; }
    .detail-grid { grid-template-columns: 1fr; gap: 12px; text-align: center; }
    .detail-icon { display: flex; justify-content: center; }
    .detail-icon img { width: 98px; height: 98px; }
    .detail-info h1 { font-size: 1.05rem; }
    .detail-chips {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        margin: 10px 0 14px;
    }
    .detail-chip-mod-row { width: 100%; justify-content: center; }
    .detail-chip-tags-row { justify-content: center; }
    .detail-chip-row .chip,
    .detail-chip-row .badge { white-space: nowrap; }
    .detail-stats-row {
        justify-content: center;
        gap: 8px;
        margin: 0 0 14px;
    }
    .detail-actions { justify-content: center; }
    .share-actions-info { justify-content: center; }
    .detail-hero .container { padding: 12px; }
    .page-card { padding: 18px 14px; }
    .screenshots-row .screenshot-link { width: 160px; }
    .screenshots-row img { height: 110px; }
    .article-body-collapsible.is-collapsed { max-height: 260px; }
    .footer-grid { flex-direction: column; align-items: flex-start; gap: 8px; }
    .pagination .btn { padding: 5px 8px; font-size: 0.68rem; }
    .page-num { min-width: 28px; height: 28px; font-size: 0.66rem; }
}

@media (max-width: 480px) {
    .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .app-card { padding: 8px; gap: 8px; }
    .app-card-cover { width: 70px; height: 70px; flex-basis: 70px; }
    .detail-grid { grid-template-columns: 1fr; text-align: center; }
    .detail-icon { display: flex; justify-content: center; }
    .detail-icon img { width: 92px; height: 92px; }
    .detail-actions { justify-content: center; }
    .share-actions-info { justify-content: center; }
    .breadcrumb { justify-content: flex-start; text-align: left; }
    .download-actions .btn { width: 100%; }
}
