/*
Theme Name: Modder Store (Grok)
Theme URI: https://modder.me
Author: Modder
Description: Giao diện kho ứng dụng di động phong cách Grok Store (Inter, indigo/tím gradient, thẻ bo tròn). Giữ nguyên toàn bộ dữ liệu ACF, taxonomy, trang tải xuống, đánh giá và tìm kiếm trực tiếp của theme Modder.
Version: 2.0.0
Text Domain: k
*/

/* ==========================================================
   1. Tokens & reset
   ========================================================== */
:root {
	--bg: #f9fafb;
	--surface: #ffffff;
	--text: #111827;
	--text-2: #374151;
	--muted: #6b7280;
	--faint: #9ca3af;
	--line: #e5e7eb;
	--line-soft: #f3f4f6;
	--primary: #4f46e5;
	--primary-600: #4f46e5;
	--primary-700: #4338ca;
	--primary-50: #eef2ff;
	--primary-100: #e0e7ff;
	--accent: #764ba2;
	--gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	--star: #f59e0b;
	--green: #16a34a;
	--red: #dc2626;
	--radius: 16px;
	--radius-sm: 12px;
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
	--shadow: 0 4px 12px -2px rgba(0, 0, 0, .08);
	--shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, .15);
	--header-h: 64px;
	--header-bg: rgba(255, 255, 255, .9);
	--soft-green: #f0fdf4; --soft-green-line: #bbf7d0; --soft-green-text: #166534;
	--soft-amber: #fffbeb; --soft-amber-line: #fde68a; --soft-amber-text: #92400e;
	color-scheme: light;
}

/* ===== Dark theme ===== */
:root[data-theme="dark"] {
	--bg: #0b0f1a; --surface: #151a28; --text: #f3f4f6; --text-2: #d1d5db; --muted: #9ca3af; --faint: #6b7280;
	--line: #262d3f; --line-soft: #1e2536;
	--primary: #6366f1; --primary-700: #4f46e5; --primary-50: rgba(99, 102, 241, .16); --primary-100: rgba(99, 102, 241, .28);
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 4px 12px -2px rgba(0, 0, 0, .5); --shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, .6);
	--header-bg: rgba(21, 26, 40, .88);
	--soft-green: rgba(34, 197, 94, .12); --soft-green-line: rgba(34, 197, 94, .3); --soft-green-text: #86efac;
	--soft-amber: rgba(245, 158, 11, .12); --soft-amber-line: rgba(245, 158, 11, .3); --soft-amber-text: #fcd34d;
	color-scheme: dark;
}
:root[data-theme="dark"] .section-more, :root[data-theme="dark"] .breadcrumb-item a, :root[data-theme="dark"] .app-hero__dev,
:root[data-theme="dark"] .info-row a, :root[data-theme="dark"] .entry-content a, :root[data-theme="dark"] .app-card__mod,
:root[data-theme="dark"] .rank-item__mod { color: #a5b4fc; }
:root[data-theme="dark"] .chip.is-active, :root[data-theme="dark"] .chip.active { color: #fff; }
:root[data-theme="dark"] .rank-no { color: rgba(129, 140, 248, .22); }
:root[data-theme="dark"] .pill-age { background: #374151; }
:root[data-theme="dark"] .brand img, :root[data-theme="dark"] .footer-brand img[src$=".svg"] { filter: invert(1) hue-rotate(180deg) brightness(1.15) saturate(1.1); }
:root[data-theme="dark"] .dl-row__icon, :root[data-theme="dark"] .dl-row__badge, :root[data-theme="dark"] .dl-file__icon { filter: brightness(.95) saturate(1.1); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	color: var(--text);
	background: var(--bg);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
.screen-reader-text, .sr-only {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

.wrap { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 16px; }
.wrap--md { max-width: 56rem; }
.wrap--sm { max-width: 46rem; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

main { display: block; padding: 24px 0 48px; }
.fade-in { animation: fadeIn .25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ==========================================================
   2. Header
   ========================================================== */
.site-header {
	position: sticky; top: 0; z-index: 999;
	background: var(--header-bg);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
	box-shadow: var(--shadow-sm);
}
.site-header__inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-mark {
	width: 36px; height: 36px; border-radius: 12px; background: var(--gradient);
	display: flex; align-items: center; justify-content: center;
	color: #fff; font-weight: 700; font-size: 18px; box-shadow: var(--shadow);
}
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: -.02em; display: none; }
.brand img { height: 36px; width: auto; }
@media (min-width: 640px) { .brand-name { display: block; } }

.icon-btn {
	width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent;
	display: inline-flex; align-items: center; justify-content: center; color: var(--text-2);
	transition: background .15s;
}
@media (hover: hover) { .icon-btn:hover { background: var(--line-soft); } }
.icon-btn:focus { outline: none; }
.icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.header-search { flex: 1; max-width: 42rem; position: relative; }
.header-search form { position: relative; margin: 0; }
.header-search .fa-magnifying-glass {
	position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 14px; pointer-events: none;
}
.header-search input[type=text], .header-search input[type=search] {
	width: 100%; padding: 10px 16px 10px 40px; border-radius: 999px; border: 0;
	background: var(--line-soft); font-size: 14px; color: var(--text); outline: none; transition: box-shadow .15s, background .15s;
}
.header-search input:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--primary); }
.search-results {
	position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line);
	border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 1000;
}
.search-results:empty { display: none; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-size: 14px; }
.search-item:hover { background: var(--primary-50); }
.search-item img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.search-item strong { color: var(--primary); font-weight: 600; }
.search-item--empty { color: var(--muted); justify-content: center; }
.search-spinner { position: absolute; right: 14px; top: 50%; margin-top: -9px; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: none; }

.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: auto; }
.header-search + .header-actions { margin-left: 0; }

/* Drawer navigation */
.site-nav {
	position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); background: var(--surface); z-index: 1001;
	padding: 16px 20px 32px; overflow-y: auto; transform: translateX(-100%); transition: transform .25s ease;
	box-shadow: var(--shadow-lg);
}
body.open-site-nav .site-nav { transform: none; }
.site-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 1000; }
.site-nav__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.site-nav ul { list-style: none; }
.site-nav .menu > li > a { display: block; padding: 12px 12px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.site-nav .menu > li > a:hover, .site-nav .menu > li.current-menu-item > a { background: var(--primary-50); color: var(--primary-700); }
.site-nav .sub-menu { display: none; padding-left: 14px; }
.site-nav li.active > .sub-menu { display: block; }
.site-nav .sub-menu a { display: block; padding: 8px 12px; color: var(--muted); font-size: 14px; }

/* Detail header */
.detail-header .site-header__inner { height: 56px; gap: 12px; }
.detail-header__title { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }

/* ==========================================================
   3. Chips, hero, section heads
   ========================================================== */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 8px; }
.chip {
	flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
	background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s;
}
.chip i { font-size: 12px; }
.chip:hover { background: var(--bg); }
.chip.is-active, .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow); }
.chip--sm { padding: 6px 14px; font-size: 13px; }

.hero {
	position: relative; overflow: hidden; border-radius: 24px; background: var(--gradient); color: #fff;
	padding: 24px; box-shadow: var(--shadow-lg); margin-bottom: 32px;
}
@media (min-width: 640px) { .hero { padding: 32px; } }
.hero__body { position: relative; z-index: 1; max-width: 32rem; }
.hero__eyebrow { color: #c7d2fe; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.hero__title { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
@media (min-width: 640px) { .hero__title { font-size: 30px; } }
.hero__desc { color: #e0e7ff; font-size: 14px; margin-bottom: 16px; }
.hero__btn {
	display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #4338ca;
	padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: background .15s;
}
.hero__btn:hover { background: #eef2ff; }
.hero__ghost { position: absolute; right: 0; bottom: 0; opacity: .2; font-size: 120px; line-height: 1; padding: 0 16px 8px 0; }
.hero__icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 104px; height: 104px; border-radius: 24px; border: 3px solid rgba(255,255,255,.5); box-shadow: var(--shadow-lg); display: none; object-fit: cover; }
@media (min-width: 640px) { .hero__icon { display: block; } }

.section { margin-bottom: 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title { font-size: 18px; font-weight: 600; color: var(--text); }
.section-more { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 14px; font-weight: 500; padding: 4px 10px; border-radius: 999px; }
.section-more i { font-size: 11px; }
.section-more:hover { background: var(--primary-50); }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
@media (min-width: 640px) { .page-title { font-size: 28px; } }
.page-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.result-count { color: var(--muted); font-size: 14px; }

/* ==========================================================
   4. App cards
   ========================================================== */
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 640px) { .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .app-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .app-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.app-card {
	display: block; background: var(--surface); border-radius: var(--radius); padding: 12px; border: 1px solid var(--line-soft);
	box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; min-width: 0;
}
.app-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .15); }
.app-card__icon { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; background: var(--line-soft); }
.app-card__icon .app-icon { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.app-card__icon img.app-icon { display: block; }
.app-icon--letter { display: flex !important; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 28px; width: 100%; height: 100%; }
.app-card__title { font-size: 14px; font-weight: 600; line-height: 1.25; margin-bottom: 4px; }
.app-card__cat { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.app-card__mod { font-size: 12px; color: var(--primary); margin-bottom: 6px; }
.app-card__meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.app-card__meta .fa-star { color: var(--star); }
.app-card__meta b { color: var(--text); font-weight: 500; }
.app-card__meta .dot { color: var(--faint); }
.badge-ver { background: var(--line-soft); padding: 0 6px; border-radius: 6px; font-size: 11px; color: var(--text-2); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stars { color: var(--star); letter-spacing: 1px; }
.stars i { font-size: 12px; }

/* Horizontal scroller */
.h-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { flex-shrink: 0; scroll-snap-align: start; }

/* Featured wide card */
.feature-card { display: block; width: 270px; background: var(--surface); border-radius: 20px; overflow: hidden; border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card__cover { height: 120px; background: var(--gradient); position: relative; overflow: hidden; }
.feature-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-card__body { padding: 0 14px 14px; position: relative; }
.feature-card__icon { width: 56px; height: 56px; border-radius: 14px; border: 3px solid var(--surface); margin-top: -28px; box-shadow: var(--shadow); object-fit: cover; background: var(--surface); display: block; }
.feature-card__icon.app-icon--letter { font-size: 22px; }
.feature-card__score { position: absolute; right: 14px; top: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; background: var(--line-soft); padding: 2px 8px; border-radius: 999px; }
.feature-card__score i { color: var(--star); }
.feature-card__title { margin-top: 10px; font-size: 15px; font-weight: 600; }
.feature-card__cat { font-size: 12px; color: var(--muted); }

/* Ranked list */
.rank-list { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .rank-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .rank-list { grid-template-columns: repeat(3, 1fr); } }
.rank-item { position: relative; display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.rank-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.rank-item__img { position: relative; width: 88px; flex-shrink: 0; background: var(--line-soft); }
.rank-item__img img, .rank-item__img .app-icon--letter { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rank-item__body { min-width: 0; flex: 1; padding: 12px 16px 12px 14px; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }
.rank-item__title { font-size: 14px; font-weight: 600; }
.rank-item__mod { font-size: 12px; color: var(--primary); min-height: 18px; }
.rank-item__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rank-item__meta .fa-star { color: var(--star); }
.rank-no { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 52px; font-weight: 800; font-style: italic; line-height: 1; color: var(--primary-100); z-index: 0; user-select: none; }

/* Must-have banner */
.must-banner { border-radius: 24px; background: var(--gradient); padding: 24px; margin-bottom: 32px; box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
@media (min-width: 1024px) { .must-banner { grid-template-columns: 220px 1fr; align-items: center; } }
.must-banner__title { color: #fff; font-size: 24px; font-weight: 700; }
.must-banner .app-card { width: 160px; }

/* Tips */
.tip-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tip-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tip-grid { grid-template-columns: repeat(3, 1fr); } }
.tip-card { position: relative; display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--gradient) center / cover; box-shadow: var(--shadow); transition: transform .2s; }
.tip-card:hover { transform: translateY(-4px); }
.tip-card__shade { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 10px; padding: 14px; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0)); color: #fff; }
.tip-card__shade img { width: 44px; height: 44px; border-radius: 12px; border: 2px solid #fff; flex-shrink: 0; }
.tip-card__title { font-size: 15px; font-weight: 600; color: #fff; }
.tip-card__meta { font-size: 12px; color: rgba(255,255,255,.8); }
.tip-row { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); }
.tip-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.tip-row h3 { font-size: 14px; font-weight: 600; }

/* ==========================================================
   5. Archive pieces: sort tabs, breadcrumb, pagination
   ========================================================== */
.sort-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 20px; padding-bottom: 4px; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; padding-right: 6px; color: var(--faint); }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-2); }
.nav-pagination { display: flex; justify-content: center; margin: 32px 0 8px; }
.pagination { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.page-link { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--text-2); box-shadow: var(--shadow-sm); }
.page-link:hover { background: var(--bg); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link svg { width: 12px; height: 12px; fill: currentColor; }
.empty-state { text-align: center; padding: 64px 16px; color: var(--muted); }
.empty-state i { font-size: 40px; opacity: .5; margin-bottom: 12px; }
.empty-state p { font-size: 16px; font-weight: 500; margin: 0 0 4px; }

/* ==========================================================
   6. Buttons & alerts
   ========================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--radius-sm);
	padding: 12px 24px; font-weight: 600; font-size: 15px; color: #fff; background: var(--primary); box-shadow: var(--shadow); transition: background .15s, transform .1s;
}
.btn:hover { background: var(--primary-700); }
.btn:active { transform: scale(.98); }
.btn--green { background: var(--green); }
.btn--block { width: 100%; }
.btn--light { background: var(--surface); color: var(--text-2); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn--light:hover { background: var(--bg); }
.btn--telegram { background: #229ed9; }
.btn--youtube { background: #ff2c2d; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-warning { background: var(--soft-amber); color: var(--soft-amber-text); border: 1px solid var(--soft-amber-line); }
.alert-success { background: var(--soft-green); color: var(--soft-green-text); border: 1px solid var(--soft-green-line); }
.alert-danger { background: rgba(239,68,68,.12); color: #991b1b; border: 1px solid #fecaca; }
.ad-slot { margin-bottom: 16px; text-align: center; overflow: hidden; }

/* ==========================================================
   7. Single app page
   ========================================================== */
.app-hero { display: flex; gap: 16px; margin-bottom: 24px; }
@media (min-width: 640px) { .app-hero { gap: 20px; } }
.app-hero__icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow-lg); flex-shrink: 0; object-fit: cover; background: var(--line-soft); }
@media (min-width: 640px) { .app-hero__icon { width: 112px; height: 112px; } }
.app-hero__icon.app-icon--letter { font-size: 40px; }
.app-hero__info { flex: 1; min-width: 0; }
.app-hero__title { font-size: 20px; font-weight: 700; line-height: 1.25; }
@media (min-width: 640px) { .app-hero__title { font-size: 24px; } }
.app-hero__dev { color: var(--primary); font-weight: 500; font-size: 14px; margin-top: 2px; display: block; }
.app-hero__meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.app-hero__rate { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; font-size: 14px; }
.app-hero__rate b { font-weight: 600; }
.app-hero__rate .sep { color: #d1d5db; }
.app-hero__rate .stars i { font-size: 14px; }

.cta { margin-bottom: 8px; }
.cta .btn { width: 100%; padding: 14px 32px; }
@media (min-width: 640px) { .cta .btn { width: auto; min-width: 220px; } }
.cta-note { font-size: 12px; color: var(--faint); margin: 0 0 24px; }

.block { margin-bottom: 32px; }
.block-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

.shots { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 4px 8px; margin: 0 -4px; }
.shots a { flex-shrink: 0; scroll-snap-align: start; display: block; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); background: var(--line-soft); }
.shots img { height: 280px; width: auto; display: block; }
@media (min-width: 640px) { .shots img { height: 340px; } }

.info-table { background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--line-soft); font-size: 14px; }
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; }
.info-row + .info-row { border-top: 1px solid var(--line-soft); }
.info-row > span:first-child { color: var(--muted); flex-shrink: 0; }
.info-row > span:last-child, .info-row > a { font-weight: 500; text-align: right; max-width: 62%; word-break: break-word; }
.info-row a { color: var(--primary); }
.info-row s { color: var(--red); margin-right: 6px; }
.pill-age { background: #111827; color: #fff; border-radius: 6px; padding: 0 6px; font-size: 12px; }

.note-box { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: var(--radius-sm); padding: 14px 16px 2px; font-size: 14px; margin-bottom: 24px; }

.dl-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.dl-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dl-row__icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.dl-row__body { flex: 1; min-width: 0; }
.dl-row__title { display: block; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-row__meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.dl-row__note { color: var(--red); }
.dl-row__badge { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; flex-shrink: 0; }
.dl-row__arrow { color: var(--faint); flex-shrink: 0; }

.whatsnew { background: var(--soft-green); border: 1px solid var(--soft-green-line); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; }

.rating-panel { display: flex; align-items: center; gap: 24px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; flex-wrap: wrap; }
.rating-panel__score { text-align: center; min-width: 96px; }
.rating-panel__num { font-size: 40px; font-weight: 700; line-height: 1; }
.rating-panel__count { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rating-panel__rate { flex: 1; min-width: 180px; }
.rating-panel__rate p { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.rating { display: inline-block; }

.entry-content { font-size: 15px; color: var(--text-2); line-height: 1.7; overflow-wrap: anywhere; }
.entry-content h2 { font-size: 20px; margin: 1.4em 0 .6em; color: var(--text); }
.entry-content h3 { font-size: 17px; margin: 1.2em 0 .5em; color: var(--text); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1em; }
.entry-content a { color: var(--primary); text-decoration: underline; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 12px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }

.more-row { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.more-row .app-card { width: 128px; flex-shrink: 0; padding: 10px; }

/* Comments */
.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment img { border-radius: 50%; width: 40px; height: 40px; flex-shrink: 0; }
.comment__bubble { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; flex: 1; min-width: 0; }
.comment__author { font-weight: 600; font-size: 14px; }
.comment__text { font-size: 14px; word-break: break-word; margin: 2px 0 4px; }
.comment__foot { font-size: 12px; color: var(--muted); display: flex; gap: 8px; }
.comment__foot a { color: var(--primary); }
.comment-replies { padding-left: 48px; }
.form-control { width: 100%; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 14px; outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.form-comment h2 { font-size: 16px; margin-bottom: 12px; }

/* ==========================================================
   8. Download page
   ========================================================== */
.dl-hero { text-align: center; margin-bottom: 20px; }
.dl-hero img, .dl-hero .app-icon--letter { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow-lg); margin: 0 auto 12px; display: flex; }
.dl-hero h2 { font-size: 20px; }
.dl-hero p { color: var(--muted); font-size: 13px; }
.dl-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line-soft); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.dl-file { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dl-file__icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dl-file p { margin: 0; font-size: 14px; font-weight: 500; word-break: break-all; }
.dl-file small { font-size: 12px; color: var(--muted); }
.fi-dl-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; border-radius: var(--radius-sm); padding: 14px; background: var(--primary); color: #fff; font-weight: 600; font-size: 15px; margin-bottom: 14px; box-shadow: var(--shadow); }
.fi-dl-btn:hover { background: var(--primary-700); }
#progress-btn { background: #a5b4fc; cursor: default; }
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-row .btn { padding: 10px 12px; font-size: 14px; }
.note-red { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; margin-bottom: 20px; }
.note-red > i { color: var(--red); margin-top: 3px; }
.accordion .toggler { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 500; font-size: 14px; background: var(--surface); }
.accordion .toggler::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 11px; color: var(--muted); transition: transform .2s; }
.accordion .toggler:not(.collapsed)::after { transform: rotate(180deg); }
.accordion-item { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 8px; background: var(--surface); }
.accordion-body { padding: 4px 16px 14px; font-size: 14px; color: var(--text-2); }
.collapse:not(.show) { display: none; }

/* ==========================================================
   9. Footer
   ========================================================== */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 40px 0 24px; margin-top: 24px; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 2fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { height: 30px; width: auto; }
.footer-intro { font-size: 14px; color: var(--muted); }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: var(--line-soft); display: flex; align-items: center; justify-content: center; }
.socials a:hover { background: var(--primary-50); }
.socials svg { width: 18px; height: 18px; fill: var(--text-2); }
.footer-cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.footer-cols h3 { font-size: 14px; margin-bottom: 12px; }
.footer-cols ul { list-style: none; }
.footer-cols li { margin-bottom: 8px; }
.footer-cols a { font-size: 14px; color: var(--muted); }
.footer-cols a:hover { color: var(--primary); }
.copyright { text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); margin-top: 28px; padding-top: 18px; }

/* 404 */
.notfound { text-align: center; padding: 32px 0; }
.notfound h1 { font-size: 28px; margin-bottom: 12px; }
.notfound img { margin: 24px auto 0; display: block; }
.notfound p { color: var(--muted); }
.notfound a { color: var(--primary); }

/* Aside categories (sidebar) */
.aside-box { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.aside-box h4 { font-size: 15px; margin-bottom: 12px; }
.aside-cats { display: flex; flex-wrap: wrap; gap: 8px; }

/* Toast */
.toast {
	position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	background: #111827; color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
	box-shadow: var(--shadow-lg); z-index: 3000; transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* ==========================================================
   Favorites + theme toggle
   ========================================================== */
.app-card { position: relative; }
.app-card__link { display: block; }
.fav-btn, .icon-btn.js-fav { position: relative; }
.fav-btn {
	position: absolute; top: 18px; right: 18px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 0;
	background: rgba(255, 255, 255, .92); color: #6b7280; display: flex; align-items: center; justify-content: center;
	box-shadow: var(--shadow); transition: transform .15s, color .15s; font-size: 14px;
}
:root[data-theme="dark"] .fav-btn { background: rgba(21, 26, 40, .9); color: #d1d5db; }
.fav-btn:hover { transform: scale(1.12); }
.js-fav.is-fav { color: #ef4444 !important; }
.js-fav.is-fav i { font-weight: 900; }
.fav-btn.is-fav { animation: pop .25s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }
.js-fav-open .fav-count {
	position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
	background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.js-fav-open { position: relative; }
.js-theme i { font-size: 16px; }

.fav-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: var(--surface); z-index: 2001;
	transform: translateX(100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.fav-panel.is-open { transform: none; }
.fav-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, .5); z-index: 2000; opacity: 0; pointer-events: none; transition: opacity .25s; }
.fav-overlay.is-open { opacity: 1; pointer-events: auto; }
.fav-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 17px; }
.fav-panel__list { flex: 1; overflow-y: auto; padding: 12px; }
.fav-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); }
.fav-item:hover { background: var(--primary-50); }
.fav-item img, .fav-item .fav-item__ph { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--gradient); }
.fav-item__body { flex: 1; min-width: 0; }
.fav-item__title { font-size: 14px; font-weight: 600; }
.fav-item__meta { font-size: 12px; color: var(--muted); }
.fav-item__rm { border: 0; background: transparent; color: var(--faint); width: 32px; height: 32px; border-radius: 50%; }
.fav-item__rm:hover { color: #ef4444; background: var(--line-soft); }
.fav-empty { text-align: center; color: var(--muted); padding: 48px 16px; font-size: 14px; }
.fav-empty i { font-size: 36px; opacity: .5; display: block; margin-bottom: 10px; }


/* Hero slider */
.hero-slider { position: relative; margin-bottom: 32px; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; gap: 12px; border-radius: 24px; }
.hero-track .hero-slide { flex: 0 0 100%; scroll-snap-align: start; margin-bottom: 0; min-height: 200px; display: flex; align-items: center; }
.hero-track .hero__icon { right: 28px; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.hero-dot { pointer-events: auto; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .5); transition: width .2s, background .2s; }
.hero-dot.is-active { width: 22px; background: #fff; }


/* Mobile search: icon opens a full-width search bar over the header */
.search-open, .search-close { display: none; }
.header-search { display: flex; align-items: center; }
@media (max-width: 639px) {
	.site-header__inner { gap: 8px; }
	.brand img { height: 28px; }
	.search-open { display: inline-flex; }
	.header-actions { margin-left: auto; }
	.header-search {
		display: none; position: absolute; left: 0; right: 0; top: 0; height: var(--header-h); max-width: none;
		background: var(--surface); padding: 0 12px; z-index: 5; gap: 4px;
	}
	.site-header.is-search-open .header-search { display: flex; }
	.search-close { display: inline-flex; }
	.search-results { left: 12px; right: 12px; }
	.header-search input[type=text] { font-size: 16px; }
}


/* Hero slider v2 */
.hero-track { gap: 0; }
.hero-track .hero-slide { padding: 28px 28px 52px; min-height: 260px; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
@media (min-width: 640px) { .hero-track .hero-slide { padding: 40px 48px 56px; min-height: 300px; } }
.hero-slide__bg { position: absolute; inset: -20%; background-size: cover; background-position: center; filter: blur(60px) saturate(1.6); opacity: .35; }
.hero-slide__orb { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); pointer-events: none; }
.hero-slide__orb--1 { width: 320px; height: 320px; right: -80px; top: -120px; }
.hero-slide__orb--2 { width: 180px; height: 180px; right: 160px; bottom: -90px; background: rgba(255, 255, 255, .08); }
.hero-track .hero__body { max-width: 36rem; flex: 1; min-width: 0; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .18); color: #fff; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-bottom: 14px; }
.hero__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hero__icon-sm { width: 56px; height: 56px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .6); box-shadow: var(--shadow-lg); flex-shrink: 0; object-fit: cover; }
@media (min-width: 640px) { .hero__icon-sm { display: none; } }
.hero__head .hero__title { margin: 0; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hero__chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; max-width: 100%; }
.hero__chip--mod { background: rgba(255, 255, 255, .92); color: #4338ca; border-color: transparent; font-weight: 600; }
.hero__actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.hero__fav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .18); color: #fff; display: inline-flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero__fav.is-fav { background: #fff; color: #ef4444 !important; }
.hero__showcase { display: none; position: relative; flex-shrink: 0; margin-right: 24px; }
@media (min-width: 640px) { .hero__showcase { display: block; } }
.hero__showcase::before { content: ""; position: absolute; inset: -22px; border-radius: 44px; background: rgba(255, 255, 255, .15); transform: rotate(-8deg); }
.hero__showcase::after { content: ""; position: absolute; inset: -44px; border-radius: 60px; border: 1px dashed rgba(255, 255, 255, .3); transform: rotate(6deg); }
.hero-track .hero__icon { position: relative; display: block; right: auto; top: auto; transform: rotate(4deg); width: 140px; height: 140px; border-radius: 32px; z-index: 1; }
.hero-dots { justify-content: flex-start; left: 28px; bottom: 20px; }
@media (min-width: 640px) { .hero-dots { left: 48px; bottom: 24px; } }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .22); color: #fff; display: none; align-items: center; justify-content: center; z-index: 3; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero-arrow--prev { left: 12px; } .hero-arrow--next { right: 12px; }
@media (min-width: 900px) { .hero-arrow { display: inline-flex; } .hero-arrow:hover { background: rgba(255, 255, 255, .4); } }
