/*
Theme Name: Apkvault
Theme URI: https://example.com/apkvault
Author: Apkvault
Description: A dark-first, card-style WordPress theme for Android app and APK download sites. Bottom tab bar on phones, peeking home slider, pill quick links, rounded app cards, app page with stat tiles, download timer, ratings, version history, news, language switcher, light/dark mode and ad slots. No jQuery on the front end.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apkvault
Tags: blog, two-columns, custom-logo, custom-menu, featured-images, translation-ready, rtl-language-support
*/

/* ---------- Tokens ---------- */
:root {
	--bg: #f3f1fb;
	--surface: #ffffff;
	--ink: #171433;
	--muted: #6a6790;
	--line: #e6e2f6;
	--accent-ink: #ffffff;
	--accent-text: var(--accent, #6d4aff);
	--accent-soft: color-mix(in srgb, var(--accent, #6d4aff) 11%, var(--surface));
	--accent2: color-mix(in srgb, var(--accent, #6d4aff) 40%, #ff4d8d);
	--star: #f5a524;
	--mod: #ffc933;
	--mod-ink: #3a2a00;
	--ok: #0b8a68;
	--ok-soft: #dcf5ec;
	--font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Noto Sans', 'Noto Nastaliq Urdu', 'Noto Sans Arabic', sans-serif;
	--shot-h: 240px;
	--radius: 22px;
	color-scheme: light;
}
html[data-theme='dark'] {
	--bg: #0b0a1a;
	--surface: #14122f;
	--ink: #f1effd;
	--muted: #a39fca;
	--line: #27234d;
	--accent-text: color-mix(in srgb, var(--accent, #6d4aff) 58%, #ffffff);
	--accent-soft: color-mix(in srgb, var(--accent, #6d4aff) 24%, var(--surface));
	--ok: #4fd6ac;
	--ok-soft: #12362d;
	color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.ico { display: block; flex: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent, #6d4aff) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }

/* ---------- Buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: 500 0.95rem/1.2 var(--font); cursor: pointer; text-decoration: none !important; transition: filter 0.15s, background-color 0.15s, border-color 0.15s; }
.btn-primary { background: var(--accent, #6d4aff); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(0.93); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent, #6d4aff); }
.btn-outline { background: transparent; border-color: var(--accent, #6d4aff); color: var(--accent-text); }
.btn-outline:hover { background: var(--accent-soft); }
.btn-sm { padding: 7px 14px; font-size: 0.86rem; }
.btn-xl { padding: 16px 20px; font-size: 1.08rem; border-radius: 8px; }
.btn-block { display: flex; width: 100%; justify-content: space-between; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

.tape { display: inline-block; padding: 1px 15px 1px 9px; font: 600 0.74rem/1.55 var(--font); color: var(--accent-text); background: var(--accent-soft); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); border-radius: 4px 0 0 4px; white-space: nowrap; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 6px; font: 700 0.72rem/1.6 var(--font); }
.chip-mod { background: var(--mod); color: var(--mod-ink); }
.chip-new { background: var(--ok-soft); color: var(--ok); }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--accent, #6d4aff); color: #fff; }
.bar { position: relative; display: flex; align-items: center; gap: 6px; height: 58px; }
.bar-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; flex: none; }
.bar-btn:hover { background: rgba(255, 255, 255, 0.16); }
.bar-btn:focus-visible { outline-color: #fff; }
.bar-right { display: flex; gap: 2px; margin-inline-start: auto; }
.bar-mode { display: none; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none !important; min-width: 0; }
.bar .brand { position: absolute; inset-inline: 56px; justify-content: center; pointer-events: none; }
.bar .brand > * { pointer-events: auto; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: #fff; position: relative; flex: none; }
.brand-mark::after { content: ''; position: absolute; inset: 8px 7px 7px; border: 2.5px solid var(--accent, #6d4aff); border-top: 0; border-radius: 0 0 8px 8px; }
.brand-name { font: 700 1.3rem var(--font); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { max-height: 38px; width: auto; }
.bar-nav { display: none; }
.i-sun { display: none; }
html[data-theme='dark'] .i-sun { display: block; }
html[data-theme='dark'] .i-moon { display: none; }

.search-panel { display: none; padding-bottom: 12px; }
.search-panel.is-open { display: block; }
.sbox { position: relative; display: flex; background: #fff; border-radius: 12px; color: #1f2430; }
.sbox input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 14px; outline: none; color: #1f2430; }
.sbox button { border: 0; background: transparent; padding: 0 14px; color: #667085; cursor: pointer; }
.live { position: absolute; top: calc(100% + 6px); inset-inline: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 36px rgba(10, 16, 40, 0.22); overflow: hidden; z-index: 60; }
.live a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--ink); text-decoration: none; }
.live a:hover, .live a:focus { background: var(--accent-soft); }
.live img, .live .icon-ph { width: 40px; height: 40px; border-radius: 22%; object-fit: cover; flex: none; }
.live strong { display: block; font-weight: 500; font-size: 0.95rem; }
.live em { font-style: normal; font-size: 0.8rem; color: var(--muted); }
.live-empty { margin: 0; padding: 14px; color: var(--muted); }

.scrim { position: fixed; inset: 0; background: rgba(8, 12, 24, 0.5); z-index: 80; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(84vw, 320px); background: var(--surface); color: var(--ink); z-index: 90; transform: translateX(-102%); transition: transform 0.22s ease; overflow-y: auto; display: flex; flex-direction: column; outline: none; visibility: hidden; }
html[dir='rtl'] .drawer { transform: translateX(102%); }
.drawer.is-open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; background: var(--accent, #6d4aff); }
.drawer-head .bar-btn { margin-inline-start: auto; }
.drawer .menu { display: block; list-style: none; }
.drawer .menu a { display: block; padding: 14px 20px; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; }
.drawer .menu a:hover, .drawer .menu .current-menu-item > a, .drawer .menu .current-cat > a { background: var(--accent-soft); color: var(--accent-text); }
.drawer .menu .sub-menu { list-style: none; background: var(--bg); }
.drawer .menu .sub-menu a { padding-inline-start: 36px; font-size: 0.95rem; }
.drawer-foot { margin-top: auto; border-top: 1px solid var(--line); }
.drawer-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 20px; border: 0; background: none; color: var(--ink); text-align: start; cursor: pointer; text-decoration: none !important; }
.drawer-row:hover { background: var(--accent-soft); }
.drawer-row .ico { color: var(--muted); }

@media (min-width: 900px) {
	.bar-menu { display: none; }
	.bar .brand { position: static; inset: auto; pointer-events: auto; }
	.bar-nav { display: block; flex: 1; margin-inline-start: 18px; overflow: hidden; }
	.bar-nav .menu { display: flex; gap: 2px; list-style: none; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
	.bar-nav a { display: block; padding: 8px 14px; border-radius: 10px; color: #fff; font-weight: 500; text-decoration: none; }
	.bar-nav a:hover, .bar-nav .current-menu-item > a, .bar-nav .current-cat > a { background: rgba(255, 255, 255, 0.18); }
	.bar-mode { display: grid; }
	.drawer, .scrim { display: none !important; }
	.search-panel .sbox { max-width: 640px; margin-inline: auto; }
}

/* ---------- Slider ---------- */
.slider { position: relative; }
.slides { display: flex; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 16 / 11; max-height: 420px; }
.slide-link { position: relative; display: block; height: 100%; color: #fff; text-decoration: none !important; background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #6d4aff) 65%, #000), var(--accent, #6d4aff)); overflow: hidden; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-bg.is-icon { filter: blur(26px) saturate(1.5) brightness(0.9); transform: scale(1.6); }
.slide-link::after { content: ''; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); }
.slide-info { position: absolute; inset-inline: 16px; bottom: 26px; z-index: 1; display: flex; align-items: center; gap: 12px; }
.slide-info .icon { width: 50px; height: 50px; border: 2px solid rgba(255, 255, 255, 0.85); }
.slide-info strong { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.dots { position: absolute; inset-inline: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.dots span { width: 6px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.55); transition: width 0.2s, background-color 0.2s; }
.dots span.on { width: 18px; background: #fff; }
@media (min-width: 900px) {
	.slider { max-width: 1120px; margin: 16px auto 0; padding-inline: 16px; }
	.slides { gap: 12px; }
	.slide { flex-basis: calc(50% - 6px); aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; }
	.dots { bottom: 8px; }
}

/* ---------- Quick links, promo ---------- */
.quick { background: var(--surface); padding: 14px 8px 12px; margin-bottom: 8px; }
.quick ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; list-style: none; max-width: 640px; margin-inline: auto; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 0.92rem; text-decoration: none !important; }
.q-ico { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; color: #fff; }
.promo { background: var(--surface); padding: 12px 0; margin-bottom: 8px; border-top: 1px solid var(--line); }
.promo-row { display: flex; align-items: center; gap: 12px; }
.promo-ico { color: #229ed9; flex: none; }
.promo-text { flex: 1; min-width: 0; display: block; }
.promo-text strong { display: block; font-weight: 500; }
.promo-text span { display: block; font-size: 0.88rem; color: var(--muted); }

/* ---------- Blocks ---------- */
.home-wrap { padding-inline: 0; }
.block, .sec { background: var(--surface); padding: 16px; margin-block: 8px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.block-head h2, .sec > h2 { font-size: 1.2rem; font-weight: 500; }
.sec > h2 { margin-bottom: 12px; }
.block-head h2 a, .sec > h2 a { display: inline-flex; align-items: center; gap: 2px; color: inherit; text-decoration: none; }
html[dir='rtl'] .block-head .ico, html[dir='rtl'] .sec > h2 .ico, html[dir='rtl'] .discover .ico { transform: scaleX(-1); }
@media (min-width: 700px) {
	.block, .sec { border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-block: 14px; }
	.home-wrap { padding-inline: 16px; }
}

/* ---------- Icon tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 12px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(8, 1fr); } }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; color: var(--ink); text-decoration: none !important; }
.tile .icon { width: 100%; max-width: 96px; height: auto; aspect-ratio: 1; }
.tile-name { font-size: 0.88rem; line-height: 1.3; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--muted); }
.tile-star { color: var(--star); font-weight: 500; }
.rail-tiles { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin; }
.rail-tiles .tile { flex: 0 0 84px; scroll-snap-align: start; }
@media (min-width: 700px) { .rail-tiles .tile { flex-basis: 96px; } }

/* ---------- App rows ---------- */
.apps { display: grid; grid-template-columns: 1fr; }
@media (min-width: 700px) { .apps { grid-template-columns: repeat(2, 1fr); column-gap: 24px; } }
@media (min-width: 1040px) { .apps { grid-template-columns: repeat(3, 1fr); } }
.app { min-width: 0; border-bottom: 1px solid var(--line); }
.app-link { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--ink); text-decoration: none !important; }
.icon { width: 60px; height: 60px; flex: none; border-radius: 22%; object-fit: cover; background: var(--line); display: block; }
.icon-ph { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font: 600 1.4rem var(--font); }
.app-body { min-width: 0; flex: 1; display: block; }
.app-name { font: 500 1rem/1.3 var(--font); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-cat { display: block; font-size: 0.84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; }
.app-meta:empty { display: none; }
.size { font-size: 0.82rem; color: var(--muted); }
.app-score { align-self: flex-start; display: inline-flex; align-items: center; gap: 3px; font: 500 0.86rem var(--font); color: var(--star); }
.more-wrap { text-align: center; margin: 18px 0 0; }

.col-rail { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, auto); grid-auto-columns: 88%; gap: 0 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.col-rail::-webkit-scrollbar { display: none; }
.col-rail .app { scroll-snap-align: start; border-bottom: 0; }
@media (min-width: 700px) { .col-rail { grid-auto-columns: calc(50% - 9px); } }
@media (min-width: 1040px) { .col-rail { grid-auto-columns: calc(33.333% - 12px); } }

/* ---------- News ---------- */
.news-list { display: grid; }
@media (min-width: 800px) { .news-grid { grid-template-columns: repeat(2, 1fr); column-gap: 24px; } }
.news-row a { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.news-thumb { display: block; flex: 0 0 38%; max-width: 240px; aspect-ratio: 16 / 9; background: var(--line); border-radius: 8px; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-text h3 { font: 400 1rem/1.4 var(--font); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-text time { display: block; margin-top: 6px; font-size: 0.84rem; color: var(--muted); }
.rail-news { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin; }
.news-card { flex: 0 0 min(72%, 260px); scroll-snap-align: start; display: block; color: var(--ink); text-decoration: none !important; }
.news-card .news-thumb { display: block; max-width: none; margin-bottom: 8px; }
.news-card strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 400; line-height: 1.4; }
.news-meta { display: flex; gap: 14px; color: var(--muted); font-size: 0.9rem; }
.news-hero img { width: 100%; border-radius: 12px; margin-bottom: 16px; }
.tags a { display: inline-block; margin: 0 6px 6px 0; padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); font-size: 0.85rem; }

/* ---------- Page heads ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 14px 0 10px; font-size: 0.88rem; color: var(--muted); }
.crumbs i { font-style: normal; margin-inline: 6px; opacity: 0.6; }
.crumbs a { color: var(--muted); }
.crumbs span { color: var(--accent-text); }
.page-head { margin: 10px 0 18px; }
.page-head h1 { font-size: clamp(1.4rem, 3.6vw, 2rem); font-weight: 600; }
.page-desc { margin-top: 8px; color: var(--muted); max-width: 70ch; }
.empty { padding: 30px 0; }
.search-form { display: flex; gap: 8px; margin-top: 12px; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; padding: 11px 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; }
.search-form .search-submit { padding: 11px 18px; border: 0; border-radius: 10px; background: var(--accent, #6d4aff); color: #fff; font-weight: 500; cursor: pointer; }
.pagination { margin: 26px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.page-numbers { min-width: 40px; padding: 8px 12px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 500; text-decoration: none; }
.page-numbers.current { background: var(--accent, #6d4aff); border-color: var(--accent, #6d4aff); color: #fff; }
.page-body h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 600; margin-bottom: 12px; }
.archive-wrap .apps, .wrap > .apps { background: var(--surface); padding: 4px 16px; border-radius: 14px; }

/* ---------- App page ---------- */
.app-page { margin-inline: -16px; }
.app-top { display: flex; gap: 16px; padding: 16px; background: var(--surface); }
.app-icon { width: 96px; height: 96px; border-radius: 22%; object-fit: cover; background: var(--line); flex: none; }
.app-icon.icon-ph { font-size: 2.4rem; }
.app-top-main { min-width: 0; }
.app-top h1 { font-size: clamp(1.25rem, 3.4vw, 1.9rem); font-weight: 500; overflow-wrap: anywhere; }
.by { margin: 6px 0 4px; color: var(--muted); font-size: 0.95rem; }
.by a { color: var(--muted); text-transform: uppercase; letter-spacing: 0.02em; font-size: 0.88rem; }
.ver { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 4px 0 0; }
.mod-text { margin: 6px 0 0; font-size: 0.9rem; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; background: var(--surface); padding: 6px 4px 16px; }
.stats li { text-align: center; padding: 4px 6px; border-inline-start: 1px solid var(--line); min-width: 0; }
.stats li:first-child { border-inline-start: 0; }
.stats strong { display: flex; justify-content: center; align-items: center; gap: 4px; min-height: 1.6em; font-weight: 500; font-size: 0.95rem; line-height: 1.25; overflow-wrap: anywhere; }
.stats span { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--muted); }
.star-ico { color: var(--star); }

.app-cta { display: grid; gap: 10px; padding: 0 16px 16px; background: var(--surface); }

.app-cols { display: block; }
.app-main, .app-side { min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-block: 14px; }
.panel-title { font-size: 1.05rem; margin-bottom: 12px; }
.app-side { display: none; }

.reviewed { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 14px; }
.reviewed .avatar { border-radius: 50%; }
.reviewed-by { color: var(--muted); font-size: 0.88rem; flex-basis: 100%; margin-bottom: -6px; padding-inline-start: 54px; }
.role { padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font-size: 0.82rem; }
.sub { color: var(--muted); margin-bottom: 8px; }

.prose { line-height: 1.8; overflow-wrap: anywhere; color: color-mix(in srgb, var(--ink) 88%, var(--surface)); }
.prose.lead-first > p:first-child { font-weight: 600; color: var(--ink); }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose h2, .prose h3, .prose h4 { margin: 1.5em 0 0.5em; color: var(--ink); font-weight: 500; }
.prose h2 { font-size: 1.25rem; }
.prose h3 { font-size: 1.1rem; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.3em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-inline-start: 3px solid var(--line); color: var(--muted); }

.clamp { max-height: 4.9em; overflow: hidden; position: relative; }
.clamp p { margin: 0; line-height: 1.6; }
.clamp:not(.is-open)::after { content: ''; position: absolute; inset: auto 0 0 0; height: 2.2em; background: linear-gradient(transparent, var(--surface)); }
.clamp.is-open { max-height: none; }
.linkbtn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 0 0; border: 0; background: none; color: var(--accent-text); cursor: pointer; }
.linkbtn[hidden] { display: none; }
.linkbtn.is-open .ico { transform: rotate(180deg); }

.dl-list { list-style: none; }
.dl-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.dl-item:first-child { border-top: 0; padding-top: 0; }
.dl-info { min-width: 0; }
.dl-info strong, .old-info strong { display: block; font-weight: 500; overflow-wrap: anywhere; }
.dl-info span, .old-info span { display: inline-block; margin-inline-end: 12px; font-size: 0.84rem; color: var(--muted); }
.dl-wait { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.dl-bar { display: block; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.dl-bar i { display: block; height: 100%; width: 0; background: var(--accent, #6d4aff); transition: width 1s linear; }
.dl-txt { font-size: 0.82rem; color: var(--muted); }
.how { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.how summary, .report summary { cursor: pointer; color: var(--accent-text); }
.how ol { margin: 10px 0 0; padding-inline-start: 1.3em; }
.how li { margin-bottom: 6px; }

.shots { display: flex; gap: 10px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; scrollbar-width: thin; }
.shots li { flex: none; scroll-snap-align: start; }
.shots img { display: block; height: var(--shot-h); width: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--line); }
.yt { position: relative; display: block; height: var(--shot-h); aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; border: 0; border-radius: 0; }
.yt-play { position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); }
.yt-play::after { content: ''; position: absolute; top: 17px; left: 23px; border: 12px solid transparent; border-left: 18px solid #fff; border-right: 0; }
.shot-video iframe { display: block; height: var(--shot-h); aspect-ratio: 16 / 9; width: auto; border: 0; border-radius: 10px; }

.old-list { list-style: none; }
.old-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.old-list li:first-child { border-top: 0; padding-top: 0; }
.plats { display: flex; flex-wrap: wrap; gap: 10px; }

.reviews { background: var(--bg); border-radius: 14px; padding: 14px; }
.reviews-top { display: flex; align-items: center; gap: 12px; }
.reviews-top .icon { width: 56px; height: 56px; }
.rate { display: flex; flex-direction: column; gap: 4px; }
.stars { display: inline-block; font-size: 1.3rem; letter-spacing: 2px; line-height: 1; }
.stars::before { content: '\2605\2605\2605\2605\2605'; background: linear-gradient(90deg, var(--star) var(--pct, 0%), color-mix(in srgb, var(--muted) 35%, var(--bg)) var(--pct, 0%)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rate-avg { font-size: 0.9rem; color: var(--muted); }
.rate-avg strong { color: var(--ink); }
.rate-line { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
.rate-label { font-size: 0.88rem; color: var(--muted); }
.rate-pick { display: inline-flex; flex-direction: row-reverse; }
.rate-pick button { border: 0; background: none; padding: 2px 3px; font-size: 1.5rem; line-height: 1; color: color-mix(in srgb, var(--muted) 35%, var(--bg)); cursor: pointer; }
.rate-pick button:hover, .rate-pick button:hover ~ button { color: var(--star); }
.rate-line.done { color: var(--ok); }
.reviews-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.report-box { background: var(--surface); border: 1px solid var(--line); margin: 14px 16px; padding: 12px 16px; }
.report-box strong { display: block; font-weight: 500; margin-bottom: 6px; }
.report-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.report-form select { flex: 1; min-width: 180px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.form-msg { flex-basis: 100%; margin: 0; font-size: 0.88rem; color: var(--ok); }
.form-msg:empty { display: none; }

.info { width: 100%; border-collapse: collapse; }
.info th, .info td { text-align: start; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 400; vertical-align: top; }
.info th { width: 38%; color: var(--muted); padding-inline-end: 12px; }
.info td { overflow-wrap: anywhere; }

.discover { margin: 14px 16px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; overflow: hidden; }
.discover h2 { padding: 14px 16px; font-size: 1.15rem; background: color-mix(in srgb, var(--accent, #6d4aff) 9%, var(--surface)); }
.discover ul { list-style: none; }
.discover a { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.discover a .ico { color: var(--muted); }

.mini-list { list-style: none; }
.mini-list a { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--ink); text-decoration: none; }
.mini-list .icon { width: 44px; height: 44px; }
.mini-list strong { display: block; font-weight: 500; font-size: 0.92rem; line-height: 1.3; }
.mini-list em { font-style: normal; font-size: 0.8rem; color: var(--muted); }

.ad { margin: 12px auto; text-align: center; overflow: hidden; }
.ad-note { display: block; font-size: 0.7rem; color: var(--muted); margin-bottom: 4px; }

.dock { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); transition: transform 0.2s; }
.dock.is-hidden { transform: translateY(100%); }
.dock-info strong { display: block; font-weight: 500; }
.dock-info span { font-size: 0.8rem; color: var(--muted); }
body.is-app { padding-bottom: 76px; }

.fab { position: fixed; inset-inline-end: 16px; bottom: 92px; z-index: 45; width: 52px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #ff6b4a; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28); cursor: pointer; }
body:not(.is-app) .fab { bottom: 20px; }
.toast { position: fixed; left: 50%; bottom: 160px; transform: translate(-50%, 20px); background: #222; color: #fff; padding: 9px 16px; border-radius: 99px; font-size: 0.9rem; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 70; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
	.app-page { margin-inline: 0; }
	.app-top { border-radius: 16px 16px 0 0; padding: 24px; gap: 24px; }
	.app-icon { width: 128px; height: 128px; }
	.stats { padding-bottom: 20px; }
	.app-cta { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 0 24px 24px; border-radius: 0 0 16px 16px; margin-bottom: 14px; }
	.report-box, .discover { margin-inline: 0; }
	:root { --shot-h: 300px; }
}
@media (min-width: 1000px) {
	.app-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 22px; }
	.app-side { display: block; }
	.dock { display: none; }
	body.is-app { padding-bottom: 0; }
	body.is-app .fab { bottom: 24px; }
	:root { --shot-h: 340px; }
}

/* ---------- Screenshot viewer ---------- */
.lb { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(8, 12, 24, 0.92); }
.lb img { max-width: 92vw; max-height: 88vh; border-radius: 10px; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lb-x { top: 14px; inset-inline-end: 14px; }
.lb-prev { inset-inline-start: 10px; top: 50%; }
.lb-next { inset-inline-end: 10px; top: 50%; }

/* ---------- Comments ---------- */
.comments { margin-inline: 16px; }
.comment-list { list-style: none; }
.comment-list .children { list-style: none; padding-inline-start: 18px; }
.comment-body { padding: 12px 0; border-top: 1px solid var(--line); }
.comment-meta { font-size: 0.85rem; color: var(--muted); }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-inline-end: 8px; }
.comment-form input[type='text'], .comment-form input[type='email'], .comment-form input[type='url'], .comment-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.comment-form label { display: block; font-size: 0.88rem; margin-bottom: 4px; }
@media (min-width: 700px) { .comments { margin-inline: 0; } }

/* ---------- Footer ---------- */
.site-foot { margin-top: 32px; background: var(--surface); padding: 24px 0 8px; }
.site-foot .brand { color: var(--ink); }
.site-foot .brand-mark { background: var(--accent, #6d4aff); }
.site-foot .brand-mark::after { border-color: #fff; }
.foot-desc { margin: 12px 0; color: var(--muted); max-width: 56ch; }
.socials { display: flex; gap: 18px; list-style: none; margin-bottom: 8px; }
.socials a { color: var(--muted); }
.socials a:hover { color: var(--accent-text); }
.foot-cols { display: grid; gap: 4px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.foot-col h2 { font-size: 1.15rem; margin: 18px 0 6px; }
.foot-links { list-style: none; }
.foot-links a { display: block; padding: 7px 0; color: var(--muted); }
.foot-links a:hover { color: var(--accent-text); }
@media (min-width: 800px) { .foot-cols { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.lang { position: relative; display: flex; justify-content: center; margin: 22px 0 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.lang-btn:hover { border-color: var(--accent, #6d4aff); }
.lang-pop { position: absolute; bottom: calc(100% - 6px); left: 50%; transform: translateX(-50%); width: min(92vw, 380px); max-height: 60vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(10, 16, 40, 0.25); padding: 8px; z-index: 60; }
.lang-pop[hidden] { display: none; }
.lang-pop ul { display: grid; grid-template-columns: 1fr 1fr; list-style: none; }
.lang-pop a { display: block; padding: 11px 12px; text-align: center; color: var(--ink); border-radius: 8px; }
.lang-pop a:hover { background: var(--accent-soft); text-decoration: none; }
.lang-pop .is-current { color: var(--accent-text); font-weight: 600; }

.foot-base { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0 16px; text-align: center; color: var(--muted); font-size: 0.88rem; }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: center; list-style: none; }
.legal-links a { color: var(--muted); }

/* ---------- Right-to-left ---------- */
html[dir='rtl'] .tape { clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%); padding: 1px 9px 1px 15px; border-radius: 0 4px 4px 0; }
html[dir='rtl'] .lang-pop { left: 50%; }

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

/* =====================================================================
   Vault design layer: floating cards, glass header, bottom tab bar
   ===================================================================== */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
.btn { border-radius: 14px; font-weight: 600; }
.btn-xl { border-radius: 18px; padding: 17px 22px; }
.btn-primary { background: linear-gradient(120deg, var(--accent, #6d4aff), color-mix(in srgb, var(--accent, #6d4aff) 60%, #ff4d8d)); box-shadow: 0 12px 24px -14px var(--accent, #6d4aff); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost:hover, .btn-outline:hover { border-color: var(--accent, #6d4aff); }

/* Header */
.site-head { background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); border-bottom: 1px solid var(--line); }
.bar-btn { color: var(--ink); }
.bar-btn:hover { background: var(--accent-soft); }
.bar-btn:focus-visible { outline-color: var(--accent, #6d4aff); }
.bar-menu { display: none; }
.bar .brand, .brand { color: var(--ink); }
.bar .brand { position: static; inset: auto; justify-content: flex-start; pointer-events: auto; }
.brand-mark, .site-foot .brand-mark { background: linear-gradient(135deg, var(--accent, #6d4aff), var(--accent2)); border-radius: 10px; }
.brand-mark::after, .site-foot .brand-mark::after { border-color: #fff; }
.brand-name { font-weight: 800; }
.sbox { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
.sbox:focus-within { border-color: var(--accent, #6d4aff); }
.sbox input { color: var(--ink); padding-inline: 18px; }
.sbox button { color: var(--muted); }
.drawer-head { background: linear-gradient(120deg, var(--accent, #6d4aff), var(--accent2)); }
.drawer-head .brand, .drawer-head .bar-btn { color: #fff; }
.drawer-head .brand-mark { background: #fff; }
.drawer-head .brand-mark::after { border-color: var(--accent, #6d4aff); }
@media (min-width: 900px) {
	.bar-nav a { color: var(--muted); border-radius: 999px; }
	.bar-nav a:hover, .bar-nav .current-menu-item > a, .bar-nav .current-cat > a { background: var(--accent-soft); color: var(--accent-text); }
}

/* Bottom tab bar (phones) */
.tabbar { display: none; }
@media (max-width: 899px) {
	.tabbar { position: fixed; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 16px 36px -16px rgba(20, 10, 80, 0.6); }
	.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border: 0; background: none; color: var(--muted); font: 600 0.72rem var(--font); border-radius: 16px; cursor: pointer; text-decoration: none !important; }
	.tab:hover, .tab.is-on { background: var(--accent-soft); color: var(--accent-text); }
	body { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
	body.is-app { padding-bottom: calc(164px + env(safe-area-inset-bottom, 0px)); }
	.dock { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); inset-inline: 10px; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 14px 30px -16px rgba(20, 10, 80, 0.6); }
	.fab, body:not(.is-app) .fab { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
	body.is-app .fab { bottom: calc(168px + env(safe-area-inset-bottom, 0px)); }
	.toast { bottom: calc(230px + env(safe-area-inset-bottom, 0px)); }
}

/* Slider: rounded cards that peek at the next slide, dots underneath */
.slider { padding-top: 14px; }
.slides { gap: 10px; padding-inline: 12px; scroll-padding-inline: 12px; }
.slide { flex: 0 0 88%; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; }
.slide-info { inset-inline: 10px; bottom: 10px; padding: 10px 12px; background: rgba(14, 8, 40, 0.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 16px; }
.slide-info .icon { width: 44px; height: 44px; border-radius: 14px; border-width: 0; }
.dots { position: static; margin: 12px 0 0; }
.dots span { background: var(--line); }
.dots span.on { width: 22px; background: var(--accent, #6d4aff); }
@media (min-width: 900px) {
	.slider { max-width: 1120px; margin: 0 auto; padding: 16px 16px 0; }
	.slides { padding-inline: 0; gap: 14px; }
	.slide { flex-basis: calc(50% - 7px); aspect-ratio: 16 / 8; }
}

/* Quick links as pills, promo as a gradient card */
.quick { background: transparent; padding: 14px 0 2px; margin-bottom: 0; }
.quick ul { display: flex; gap: 10px; max-width: none; overflow-x: auto; padding: 4px 12px; scrollbar-width: none; }
.quick ul::-webkit-scrollbar { display: none; }
.quick li { flex: none; }
.quick a { flex-direction: row; gap: 10px; padding: 7px 18px 7px 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.q-ico { width: 38px; height: 38px; border-radius: 50%; }
.q-ico .ico { width: 20px; height: 20px; }
@media (min-width: 900px) { .quick ul { max-width: 1120px; margin-inline: auto; padding-inline: 16px; } }
.promo { background: transparent; border: 0; padding: 0; margin: 14px 12px 0; }
.promo-row { max-width: none; padding: 14px 16px; background: linear-gradient(120deg, var(--accent, #6d4aff), var(--accent2)); color: #fff; border-radius: var(--radius); box-shadow: 0 16px 30px -18px var(--accent, #6d4aff); }
.promo-ico, .promo-text span, .promo-text strong { color: #fff; }
.promo-text span { opacity: 0.85; }
.promo .btn-primary { background: #fff; color: #2b1a8a; box-shadow: none; }
@media (min-width: 900px) { .promo { max-width: 1088px; margin-inline: auto; } }

/* Section cards */
.block, .sec { margin: 14px 12px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 34px -28px rgba(40, 20, 140, 0.55); }
.home-wrap { padding-inline: 0; }
@media (min-width: 700px) {
	.home-wrap { padding-inline: 16px; }
	.block, .sec { margin: 16px 0; padding: 22px; }
}
.block-head h2, .sec > h2 { font-size: 1.15rem; }
.block-head h2::before, .sec > h2::before { content: ''; display: inline-block; width: 5px; height: 1.05em; margin-inline-end: 10px; border-radius: 5px; background: linear-gradient(var(--accent, #6d4aff), var(--accent2)); vertical-align: -0.15em; }
.block-head > a, .block-head h2 a { color: var(--accent-text); }

/* Tiles and app cards */
.tile { align-items: center; text-align: center; }
.tile .icon { border-radius: 26%; box-shadow: 0 12px 22px -14px color-mix(in srgb, var(--accent, #6d4aff) 80%, #000); }
.tile-name { color: var(--ink); font-weight: 500; }
.icon { border-radius: 26%; }
.apps { gap: 10px 12px; }
@media (min-width: 700px) { .apps { column-gap: 12px; } }
.app, .col-rail .app { border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--bg) 55%, var(--surface)); padding-inline: 12px; }
.app:hover { border-color: var(--accent, #6d4aff); }
.col-rail { gap: 10px 12px; }
.app-name { font-weight: 600; }
.archive-wrap .apps, .wrap > .apps { background: transparent; padding: 0; }
.tape, html[dir='rtl'] .tape { clip-path: none; border-radius: 999px; padding: 1px 10px; font-weight: 700; }
.chip { border-radius: 999px; padding: 1px 9px; }
.news-row a { padding: 10px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--bg) 55%, var(--surface)); }
.news-thumb { border-radius: 14px; }

/* App page */
.app-top { background: linear-gradient(165deg, color-mix(in srgb, var(--accent, #6d4aff) 26%, var(--surface)), var(--surface) 78%); }
.app-icon { border-radius: 28%; box-shadow: 0 18px 30px -16px color-mix(in srgb, var(--accent, #6d4aff) 80%, #000); }
.stats { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px 16px; background: transparent; }
.stats li, .stats li:first-child { text-align: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.stats strong { justify-content: flex-start; font-weight: 700; }
.app-cta { background: transparent; }
.panel, .reviews, .discover, .report-box { border-radius: var(--radius); }
.discover h2 { background: var(--accent-soft); font-size: 1.05rem; }
@media (min-width: 700px) {
	.app-top { border-radius: var(--radius); }
	.stats { grid-template-columns: repeat(4, 1fr); padding: 14px 0 4px; }
	.app-cta { padding: 8px 0 20px; border-radius: 0; margin-bottom: 0; }
}

/* Footer: always dark */
.site-foot { margin-top: 36px; padding-top: 30px; background: #100d2b; color: #cfcbf2; border-radius: 30px 30px 0 0; }
.site-foot .brand, .foot-col h2 { color: #fff; }
.foot-desc, .socials a, .foot-links a, .foot-base, .legal-links a { color: #b9b4e3; }
.socials a:hover, .foot-links a:hover, .legal-links a:hover { color: #fff; }
.foot-cols, .lang { border-color: rgba(255, 255, 255, 0.12); }
.lang-btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); border-radius: 999px; }
.lang-btn:hover { border-color: #fff; }
