/* App Market – premium light/dark UI (no inline styles; CSP friendly) */
:root {
  --bg:#f4f6fb; --surface:#ffffff; --surface-2:#eef1f8; --text:#141a2a; --muted:#69728a;
  --primary:#4f46e5; --primary-2:#7c3aed; --ok:#10b981; --danger:#e11d48; --warn:#f59e0b;
  --border:#e2e6f0; --shadow:0 8px 28px rgba(20,26,42,.08); --radius:18px;
  --font:'Noto Sans Bengali','Hind Siliguri',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
}
[data-theme=dark] {
  --bg:#0d1020; --surface:#161a2e; --surface-2:#1f2440; --text:#eef0fa; --muted:#9aa3bd;
  --border:#272d4a; --shadow:0 8px 28px rgba(0,0,0,.45);
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--text); font-family:var(--font); line-height:1.55; transition:background .25s,color .25s; }
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }
h1,h2,h3,p { margin:0; }
.container { width:100%; max-width:1180px; margin:0 auto; padding:0 16px; }
.main { padding-top:18px; padding-bottom:28px; min-height:70vh; }
.icon { flex:none; }
.show-dark { display:none; } [data-theme=dark] .show-dark { display:inline-flex; } [data-theme=dark] .show-light { display:none; }

/* Page load bar + skeleton */
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skeleton { background:linear-gradient(90deg,var(--surface-2) 25%,var(--border) 50%,var(--surface-2) 75%); background-size:200% 100%; animation:shimmer 1.3s linear infinite; }
.js .skeleton img { opacity:0; } .skeleton img.loaded, img.loaded { opacity:1; transition:opacity .3s; }

/* Top bar */
.topbar { position:sticky; top:0; z-index:50; background:color-mix(in srgb,var(--surface) 88%,transparent); backdrop-filter:blur(14px); border-bottom:1px solid var(--border); }
.topbar-inner { display:flex; align-items:center; gap:16px; height:62px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:800; font-size:1.15rem; letter-spacing:-.2px; margin-right:auto; }
.brand-mark { width:36px; height:36px; border-radius:11px; display:grid; place-items:center; color:#fff; background:linear-gradient(135deg,var(--primary),var(--primary-2)); box-shadow:0 6px 16px rgba(79,70,229,.35); }
.brand-logo { width:36px; height:36px; border-radius:10px; object-fit:cover; }
.nav-desktop { display:none; gap:6px; }
.nav-desktop a { display:flex; align-items:center; gap:8px; padding:9px 14px; border-radius:12px; color:var(--muted); font-weight:600; transition:.2s; }
.nav-desktop a:hover { background:var(--surface-2); color:var(--text); }
.nav-desktop a.active { background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; }
.icon-btn { width:40px; height:40px; border-radius:12px; border:1px solid var(--border); background:var(--surface); color:var(--text); display:grid; place-items:center; cursor:pointer; transition:.2s; }
.icon-btn:hover { transform:translateY(-1px); box-shadow:var(--shadow); }

/* Bottom nav (mobile) */
.nav-bottom { position:fixed; left:0; right:0; bottom:0; z-index:60; display:flex; justify-content:space-around; padding:8px 8px calc(8px + env(safe-area-inset-bottom)); background:color-mix(in srgb,var(--surface) 92%,transparent); backdrop-filter:blur(14px); border-top:1px solid var(--border); }
.nav-bottom a { flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 4px; border-radius:14px; color:var(--muted); font-size:.74rem; font-weight:700; transition:none; }
.nav-bottom a.active { color:var(--primary); background:color-mix(in srgb,var(--primary) 12%,transparent); }
@media (min-width:820px) { .nav-desktop { display:flex; } }

/* Search */
.search-bar { display:flex; gap:8px; background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:6px; box-shadow:var(--shadow); }
.search-bar input { flex:1; min-width:0; border:0; background:transparent; color:var(--text); font:inherit; padding:10px 12px; outline:none; }
.search-bar .btn { border-radius:12px; }
.hero { padding:10px 0 4px; }

/* Sections & cards */
.section { margin-top:26px; }
.section-head { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:12px; }
.section-head h2 { font-size:1.2rem; font-weight:800; }
.see-all { color:var(--primary); font-weight:700; font-size:.9rem; }
.hscroll { display:flex; gap:14px; overflow-x:auto; padding:4px 2px 14px; scroll-snap-type:x proximity; scrollbar-width:thin; }
.hscroll > * { scroll-snap-align:start; flex:0 0 158px; }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.app-card { display:flex; flex-direction:column; gap:12px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px; box-shadow:var(--shadow); transition:transform .2s, box-shadow .2s; }
.app-card:hover { transform:translateY(-4px); box-shadow:0 14px 34px rgba(79,70,229,.18); }
.card-link { display:flex; flex-direction:column; align-items:flex-start; gap:2px; flex:1; }
.app-icon { width:64px; height:64px; border-radius:16px; overflow:hidden; display:block; margin-bottom:8px; box-shadow:0 4px 12px rgba(0,0,0,.12); }
.app-icon img { width:100%; height:100%; object-fit:cover; }
.icon-fallback { display:grid; place-items:center; color:#fff; font-weight:800; font-size:1.6rem; }
.c0{background:linear-gradient(135deg,#6366f1,#8b5cf6)} .c1{background:linear-gradient(135deg,#06b6d4,#3b82f6)} .c2{background:linear-gradient(135deg,#10b981,#059669)} .c3{background:linear-gradient(135deg,#f59e0b,#ef4444)}
.c4{background:linear-gradient(135deg,#ec4899,#f43f5e)} .c5{background:linear-gradient(135deg,#14b8a6,#0ea5e9)} .c6{background:linear-gradient(135deg,#a855f7,#ec4899)} .c7{background:linear-gradient(135deg,#f97316,#eab308)}
.app-name { font-size:.98rem; font-weight:700; line-height:1.25; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.app-cat { color:var(--muted); font-size:.82rem; }
.app-meta { display:flex; gap:10px; align-items:center; font-size:.82rem; color:var(--muted); margin-top:4px; }
.rating { display:inline-flex; align-items:center; gap:3px; color:var(--warn); font-weight:700; }
.big .app-card { flex-basis:250px; }
.big .app-icon { width:76px; height:76px; border-radius:20px; }
.big .app-card { background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 16%,var(--surface)),var(--surface)); }

/* Buttons & chips */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:11px 20px; border-radius:14px; border:0; font:inherit; font-weight:700; color:#fff; cursor:pointer; background:linear-gradient(135deg,var(--primary),var(--primary-2)); box-shadow:0 8px 18px rgba(79,70,229,.3); transition:transform .15s, filter .15s; }
.btn:hover { transform:translateY(-1px); filter:brightness(1.07); }
.btn:active { transform:scale(.98); }
.btn-sm { padding:8px 14px; font-size:.88rem; border-radius:12px; }
.btn-block { width:100%; }
.btn-outline { background:transparent; color:var(--text); border:1px solid var(--border); box-shadow:none; }
.btn-danger { background:linear-gradient(135deg,#f43f5e,#e11d48); box-shadow:0 8px 18px rgba(225,29,72,.25); }
.btn-ok { background:linear-gradient(135deg,#10b981,#059669); box-shadow:none; }
.btn-disabled { background:var(--surface-2); color:var(--muted); box-shadow:none; cursor:not-allowed; }
.btn-disabled:hover { transform:none; filter:none; }
.chips { display:flex; gap:8px; overflow-x:auto; padding:4px 2px 10px; scrollbar-width:none; }
.chip { flex:none; padding:8px 16px; border-radius:999px; background:var(--surface); border:1px solid var(--border); color:var(--muted); font-weight:700; font-size:.88rem; transition:.2s; }
.chip:hover { color:var(--text); }
.chip.active { background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; border-color:transparent; }

/* Forms */
.field { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.field > label, .label { font-weight:700; font-size:.9rem; }
.hint { color:var(--muted); font-size:.82rem; }
.input, .select, .textarea { width:100%; padding:11px 14px; border-radius:12px; border:1px solid var(--border); background:var(--surface); color:var(--text); font:inherit; outline:none; transition:border .2s, box-shadow .2s; }
.input:focus, .select:focus, .textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 22%,transparent); }
.textarea { min-height:120px; resize:vertical; }
.check { display:flex; align-items:center; gap:10px; font-weight:600; }
.check input { width:18px; height:18px; accent-color:var(--primary); }
.filters { display:grid; gap:10px; margin:14px 0; }
.filters .row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.filters .select { width:auto; min-width:160px; }
.alert { padding:12px 16px; border-radius:14px; margin-bottom:14px; font-weight:600; border:1px solid transparent; }
.alert-success { background:color-mix(in srgb,var(--ok) 14%,var(--surface)); color:var(--ok); border-color:color-mix(in srgb,var(--ok) 35%,transparent); }
.alert-error { background:color-mix(in srgb,var(--danger) 12%,var(--surface)); color:var(--danger); border-color:color-mix(in srgb,var(--danger) 35%,transparent); }
.alert ul { margin:6px 0 0; padding-left:20px; }

/* Pagination & empty */
.pager { display:flex; justify-content:center; align-items:center; gap:12px; margin:26px 0 6px; color:var(--muted); font-weight:600; }
.empty { text-align:center; padding:56px 16px; color:var(--muted); display:flex; flex-direction:column; align-items:center; gap:10px; }
.empty h3 { color:var(--text); }
.muted { color:var(--muted); }
.count { color:var(--muted); font-weight:600; }

/* App details */
.detail-head { display:flex; gap:18px; align-items:center; flex-wrap:wrap; background:var(--surface); border:1px solid var(--border); border-radius:24px; padding:20px; box-shadow:var(--shadow); }
.detail-head .app-icon { width:96px; height:96px; border-radius:24px; margin:0; }
.detail-info { flex:1; min-width:200px; display:flex; flex-direction:column; gap:4px; }
.detail-info h1 { font-size:1.55rem; line-height:1.2; }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; margin-top:16px; }
.stat { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:12px 14px; }
.stat b { display:block; font-size:1.02rem; } .stat span { color:var(--muted); font-size:.8rem; }
.prose { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; white-space:pre-line; overflow-wrap:anywhere; }
.shots { display:flex; gap:12px; overflow-x:auto; padding-bottom:10px; }
.shots img { height:340px; width:auto; max-width:none; border-radius:16px; border:1px solid var(--border); cursor:zoom-in; background:var(--surface-2); }
.lightbox { position:fixed; inset:0; z-index:200; background:rgba(0,0,0,.86); display:grid; place-items:center; padding:16px; cursor:zoom-out; }
.lightbox img { max-height:92vh; max-width:100%; border-radius:12px; }

/* Settings */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow); margin-bottom:16px; }
.card h2 { font-size:1.1rem; margin-bottom:12px; }
.seg { display:inline-flex; background:var(--surface-2); border-radius:14px; padding:4px; gap:4px; }
.seg button { border:0; background:transparent; color:var(--muted); font:inherit; font-weight:700; padding:9px 18px; border-radius:11px; cursor:pointer; display:inline-flex; align-items:center; gap:8px; }
.seg button[aria-pressed=true] { background:var(--surface); color:var(--primary); box-shadow:0 2px 8px rgba(0,0,0,.12); }
.page-title { font-size:1.5rem; font-weight:800; margin-bottom:14px; }

/* Admin */
.table-wrap { overflow-x:auto; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
table { width:100%; border-collapse:collapse; min-width:560px; }
th, td { text-align:left; padding:11px 14px; border-bottom:1px solid var(--border); vertical-align:middle; font-size:.92rem; }
th { color:var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.4px; }
tr:last-child td { border-bottom:0; }
.cell-app { display:flex; align-items:center; gap:10px; font-weight:700; }
.cell-app .app-icon { width:40px; height:40px; border-radius:11px; margin:0; font-size:1rem; }
.actions { display:flex; gap:6px; flex-wrap:wrap; }
.actions form { display:inline; }
.badge { display:inline-block; padding:2px 10px; border-radius:999px; font-size:.75rem; font-weight:700; background:var(--surface-2); color:var(--muted); }
.badge-on { background:color-mix(in srgb,var(--ok) 18%,var(--surface)); color:var(--ok); }
.form-grid { display:grid; gap:0 16px; grid-template-columns:1fr; }
@media (min-width:720px) { .form-grid { grid-template-columns:1fr 1fr; } .form-grid .full { grid-column:1 / -1; } }
.previews { display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
.previews img { width:84px; height:84px; object-fit:cover; border-radius:12px; border:1px solid var(--border); }
.shot-edit { display:flex; flex-wrap:wrap; gap:10px; }
.shot-edit label { display:flex; flex-direction:column; gap:4px; align-items:center; font-size:.78rem; color:var(--muted); }
.shot-edit img { width:84px; height:120px; object-fit:cover; border-radius:10px; border:1px solid var(--border); }
.login-box { max-width:400px; margin:7vh auto 0; }
@media (min-width:820px) { .hscroll > * { flex-basis:176px; } .big .app-card { flex-basis:290px; } .grid { grid-template-columns:repeat(auto-fill,minmax(176px,1fr)); } }
@media (prefers-reduced-motion:reduce) { .topbar-progress { display:none; } * { animation:none !important; transition:none !important; } }

/* ---------- Duotone icons ---------- */
.icon .d { fill:currentColor; fill-opacity:.18; }

/* ---------- Admin: premium UI ---------- */
body.admin { background:
  radial-gradient(700px 420px at 0% -5%, color-mix(in srgb,var(--primary) 16%,transparent), transparent 70%),
  radial-gradient(600px 380px at 100% 0%, color-mix(in srgb,var(--primary-2) 14%,transparent), transparent 70%),
  var(--bg); background-attachment:fixed; }
.tile { flex:none; width:46px; height:46px; border-radius:15px; display:grid; place-items:center; color:#fff; box-shadow:0 8px 18px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.4); }
.tile .icon .d { fill:#fff; fill-opacity:.3; }
.t-blue{background:linear-gradient(135deg,#60a5fa,#4f46e5)} .t-purple{background:linear-gradient(135deg,#a78bfa,#7c3aed)}
.t-green{background:linear-gradient(135deg,#34d399,#059669)} .t-orange{background:linear-gradient(135deg,#fbbf24,#f97316)}
.t-pink{background:linear-gradient(135deg,#f472b6,#e11d48)} .t-teal{background:linear-gradient(135deg,#2dd4bf,#0891b2)}
.inline-form { display:inline; margin:0; }
.icon-btn-danger { color:var(--danger); }
.icon-btn-danger:hover { background:color-mix(in srgb,var(--danger) 12%,var(--surface)); }
.brand-name { display:flex; flex-direction:column; line-height:1.1; white-space:nowrap; }
.bn-sub { font-size:.66rem; font-weight:800; letter-spacing:1.2px; text-transform:uppercase; color:var(--primary); margin-top:3px; }
.admin-top .topbar-inner { max-width:1100px; gap:10px; }
.admin-top .brand { margin-right:auto; min-width:0; }

.admin-page { max-width:1100px; margin:0 auto; padding:16px 16px 56px; }
.menu-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:22px; }
.menu-tile { display:flex; align-items:center; gap:12px; padding:12px; border-radius:22px; min-width:0;
  background:color-mix(in srgb,var(--surface) 82%,transparent); border:1px solid var(--border);
  box-shadow:var(--shadow); backdrop-filter:blur(12px); transition:transform .2s, box-shadow .2s, background .2s; }
.menu-tile:hover { transform:translateY(-3px); box-shadow:0 16px 34px rgba(79,70,229,.2); }
.menu-tile:active { transform:scale(.98); }
.mt-text { display:flex; flex-direction:column; min-width:0; line-height:1.2; }
.mt-text b { font-size:.98rem; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mt-text small { font-size:.72rem; color:var(--muted); font-weight:600; margin-top:2px; }
.menu-tile.active { background:linear-gradient(135deg,var(--primary),var(--primary-2)); border-color:transparent; color:#fff; box-shadow:0 16px 34px rgba(79,70,229,.42); }
.menu-tile.active .mt-text small { color:rgba(255,255,255,.8); }
.menu-tile.active .tile { background:rgba(255,255,255,.22); box-shadow:inset 0 1px 0 rgba(255,255,255,.45); }
@media (min-width:900px) { .admin-page { padding:24px 24px 56px; } .menu-tile { padding:14px; } }

.admin-main { min-width:0; animation:fadeUp .35s ease backwards; }
.page-head { display:flex; align-items:center; gap:14px; margin:4px 0 18px; }
.page-head h1 { font-size:1.5rem; line-height:1.2; letter-spacing:-.3px; }
.page-head p { color:var(--muted); font-size:.9rem; }
.login-head { display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.login-head .page-title { margin:0; }
.block-title { display:flex; align-items:center; gap:10px; font-size:1.1rem; margin:28px 0 12px; }
.block-title .icon, .card-title .icon { color:var(--primary); }
.card-title { display:flex; align-items:center; gap:10px; }

.hero-card { position:relative; overflow:hidden; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; padding:24px; border-radius:28px; color:#fff;
  background:radial-gradient(120% 140% at 0% 0%,#8b5cf6 0%,#4f46e5 55%,#2563eb 100%); box-shadow:0 20px 44px rgba(79,70,229,.38); margin-bottom:18px; }
.hero-card::after { content:""; position:absolute; right:-40px; top:-60px; width:200px; height:200px; border-radius:50%; background:rgba(255,255,255,.12); }
.hero-card h1 { font-size:1.5rem; margin-bottom:4px; }
.hero-card p { opacity:.9; max-width:460px; }
.hero-actions { position:relative; z-index:1; display:flex; gap:10px; flex-wrap:wrap; }
.btn-light { background:#fff; color:#4f46e5; box-shadow:0 8px 18px rgba(0,0,0,.2); }
.btn-glass { background:rgba(255,255,255,.18); color:#fff; box-shadow:none; border:1px solid rgba(255,255,255,.38); }

.stat-cards { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
@media (min-width:760px) { .stat-cards { grid-template-columns:repeat(4,1fr); } }
.stat-card { display:flex; align-items:center; gap:14px; background:var(--surface); border:1px solid var(--border); border-radius:22px; padding:16px; box-shadow:var(--shadow); transition:transform .2s; }
.stat-card:hover { transform:translateY(-3px); }
.stat-card b { display:block; font-size:1.55rem; line-height:1.1; }
.stat-card span:not(.tile) { color:var(--muted); font-weight:600; font-size:.82rem; }

.card { border-radius:24px; padding:20px; }
.table-wrap { border-radius:24px; box-shadow:var(--shadow); }
th { background:var(--surface-2); }
tbody tr { transition:background .15s; } tbody tr:hover { background:color-mix(in srgb,var(--primary) 5%,transparent); }
.badge { border:0; font:inherit; font-size:.75rem; font-weight:700; } button.badge { cursor:pointer; }
.admin .field > label, .admin .label { color:var(--text); }
.admin .input, .admin .select, .admin .textarea { background:var(--bg); padding:13px 15px; border-radius:14px; }
.admin .search-bar { margin-bottom:12px; }
.admin .btn { padding:12px 20px; }
.admin .btn-sm { padding:8px 14px; }

/* ---------- Admin bottom navigation dock ---------- */
.admin-page { padding-bottom:120px; }
.admin-dock { position:fixed; left:50%; transform:translateX(-50%); bottom:calc(12px + env(safe-area-inset-bottom)); z-index:60; width:min(580px,calc(100% - 20px)); display:flex; gap:4px; padding:8px; border-radius:28px;
  background:color-mix(in srgb,var(--surface) 90%,transparent); backdrop-filter:blur(18px); border:1px solid var(--border); box-shadow:0 20px 50px rgba(20,26,42,.28); }
.admin-dock a { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:3px; padding:9px 2px 8px; border-radius:20px; color:var(--muted); font-size:.68rem; font-weight:800; transition:background .2s,color .2s,transform .2s; }
.admin-dock a span { max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.admin-dock a:active { transform:scale(.95); }
.admin-dock a.active { background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; box-shadow:0 10px 22px rgba(79,70,229,.45); }
.admin-dock a.active .icon .d { fill:#fff; fill-opacity:.3; }

/* ---------- Upload limit & file inputs ---------- */
.limit-pill { align-self:flex-start; display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:999px; font-size:.82rem; font-weight:700; color:var(--primary); background:color-mix(in srgb,var(--primary) 12%,var(--surface)); border:1px solid color-mix(in srgb,var(--primary) 28%,transparent); }
.hint.warn { color:var(--warn); background:color-mix(in srgb,var(--warn) 12%,var(--surface)); border:1px solid color-mix(in srgb,var(--warn) 35%,transparent); border-radius:12px; padding:8px 12px; }
.field-error { color:var(--danger); font-weight:700; font-size:.88rem; background:color-mix(in srgb,var(--danger) 10%,var(--surface)); border:1px solid color-mix(in srgb,var(--danger) 30%,transparent); border-radius:12px; padding:8px 12px; }
.field-error[hidden] { display:none; }
input[type=file].input { padding:8px; }
input[type=file]::file-selector-button { margin-right:12px; padding:9px 16px; border:0; border-radius:12px; font:inherit; font-weight:700; color:#fff; cursor:pointer; background:linear-gradient(135deg,var(--primary),var(--primary-2)); }
.previews img { background:var(--surface-2); }

/* APK upload progress */
.upload-progress{margin-top:.5rem}
.upload-bar{height:10px;border-radius:99px;background:rgba(99,102,241,.15);overflow:hidden}
.upload-bar span{display:block;height:100%;width:0;background:linear-gradient(90deg,#4f46e5,#7c3aed);transition:width .2s}
.upload-progress small{display:block;margin-top:.25rem;opacity:.8}

/* ---------- All Apps list: keep the icon square (was squeezed by the table) ---------- */
.cell-app { min-width:170px; }
.cell-app .app-icon { flex:0 0 44px; width:44px; height:44px; min-width:44px; border-radius:12px; }
.cell-app .app-icon img { display:block; width:100%; height:100%; object-fit:cover; }

/* ---------- Category icons ---------- */
.cat-ico { flex:none; display:inline-grid; place-items:center; border-radius:30%; color:#fff;
    background:linear-gradient(145deg,var(--c1),var(--c2));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.45), inset 0 -3px 6px rgba(0,0,0,.18), 0 4px 10px color-mix(in srgb,var(--c2) 38%,transparent); }
.cat-ico svg { filter:drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.chip { display:inline-flex; align-items:center; gap:8px; }
.chip { padding-left:8px; }
.chip.active .cat-ico { box-shadow:inset 0 1px 0 rgba(255,255,255,.5), 0 0 0 2px rgba(255,255,255,.55); }
.cat-cell { display:flex; align-items:center; gap:10px; min-width:220px; }

/* ---------- Premium dropdown (replaces the plain phone popup) ---------- */
.ps { position:relative; }
.ps select.ps-native { position:absolute; inset:0; opacity:0; pointer-events:none; width:100%; height:100%; }
.ps-btn { width:100%; display:flex; align-items:center; gap:12px; padding:11px 14px; min-height:52px; border-radius:16px; border:1px solid var(--border);
    background:var(--bg); color:var(--text); font:inherit; font-weight:700; text-align:left; cursor:pointer; transition:border .2s, box-shadow .2s, transform .1s; }
.ps-btn:active { transform:scale(.99); }
.ps.open .ps-btn, .ps-btn:focus-visible { border-color:var(--primary); box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 22%,transparent); outline:none; }
.ps-label { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ps-chev { flex:none; width:22px; height:22px; color:var(--muted); transition:transform .25s; }
.ps.open .ps-chev { transform:rotate(180deg); color:var(--primary); }
.ps-backdrop { position:fixed; inset:0; z-index:190; background:rgba(10,12,28,.45); backdrop-filter:blur(3px); opacity:0; pointer-events:none; transition:opacity .2s; }
.ps-backdrop.open { opacity:1; pointer-events:auto; }
.ps-list { position:absolute; left:0; right:0; top:calc(100% + 8px); z-index:200; margin:0; padding:8px; list-style:none; max-height:min(380px,60vh); overflow:auto;
    background:var(--surface); border:1px solid var(--border); border-radius:20px; box-shadow:0 24px 60px rgba(20,16,60,.28);
    opacity:0; transform:translateY(-6px) scale(.98); pointer-events:none; transition:opacity .18s, transform .18s; }
.ps-list.open { opacity:1; transform:none; pointer-events:auto; }
.ps-opt { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px; cursor:pointer; font-weight:600; color:var(--text); transition:background .15s; }
.ps-opt:hover, .ps-opt:focus-visible { background:var(--surface-2); outline:none; }
.ps-opt[aria-selected="true"] { background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 16%,transparent),color-mix(in srgb,var(--primary-2) 10%,transparent)); }
.ps-opt .ps-tick { margin-left:auto; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; color:#fff; opacity:0; background:linear-gradient(135deg,var(--primary),var(--primary-2)); }
.ps-opt[aria-selected="true"] .ps-tick { opacity:1; }
.ps-opt .ps-noicon { width:36px; height:0; flex:none; display:none; }
.ps-grip { display:none; }
@media (max-width:640px) {
    .ps-list { position:fixed; left:10px; right:10px; top:auto; bottom:calc(10px + env(safe-area-inset-bottom)); max-height:72vh; border-radius:28px; padding:10px 10px 12px; transform:translateY(40px); }
    .ps-list.open { transform:none; }
    .ps-grip { display:block; width:44px; height:5px; border-radius:9px; background:var(--border); margin:4px auto 10px; }
    .ps-opt { padding:12px; }
}

/* category icon colours + sizes (classes, because inline styles are blocked by CSP) */
.ci-tools{--c1:#38bdf8;--c2:#2563eb}
.ci-social{--c1:#f472b6;--c2:#8b5cf6}
.ci-fun{--c1:#fb923c;--c2:#e11d48}
.ci-edu{--c1:#34d399;--c2:#0d9488}
.ci-action{--c1:#f87171;--c2:#f59e0b}
.ci-racing{--c1:#fbbf24;--c2:#dc2626}
.ci-puzzle{--c1:#a78bfa;--c2:#4f46e5}
.ci-game{--c1:#818cf8;--c2:#7c3aed}
.ci-music{--c1:#f472b6;--c2:#e11d48}
.ci-video{--c1:#fb7185;--c2:#be123c}
.ci-photo{--c1:#2dd4bf;--c2:#0891b2}
.ci-health{--c1:#fb7185;--c2:#e11d48}
.ci-finance{--c1:#4ade80;--c2:#15803d}
.ci-shop{--c1:#fb923c;--c2:#ea580c}
.ci-news{--c1:#94a3b8;--c2:#475569}
.ci-travel{--c1:#38bdf8;--c2:#0ea5e9}
.ci-food{--c1:#fbbf24;--c2:#ea580c}
.ci-sports{--c1:#4ade80;--c2:#16a34a}
.ci-book{--c1:#c084fc;--c2:#7e22ce}
.ci-default{--c1:#818cf8;--c2:#7c3aed}
.ci-s22{width:22px;height:22px}
.ci-s28{width:28px;height:28px}
.ci-s36{width:36px;height:36px}
.ci-s38{width:38px;height:38px}

/* ---------- Dropdown: locked in the middle of the screen ---------- */
html.ps-lock, html.ps-lock body { overflow:hidden; }
.ps-list { position:fixed; left:50%; top:50%; right:auto; bottom:auto; width:min(420px,calc(100vw - 28px)); max-height:min(74vh,520px);
    transform:translate(-50%,-46%) scale(.96); border-radius:26px; padding:8px 10px 12px; }
.ps-list.open { transform:translate(-50%,-50%) scale(1); }
.ps-title { padding:12px 12px 8px; font-weight:800; font-size:1.02rem; color:var(--text); position:sticky; top:-8px; background:var(--surface); z-index:1; }
.ps-grip { display:none !important; }
@media (max-width:640px) {
    .ps-list { left:50%; right:auto; bottom:auto; top:50%; max-height:72vh; border-radius:26px; padding:8px 10px 12px; transform:translate(-50%,-46%) scale(.96); }
    .ps-list.open { transform:translate(-50%,-50%) scale(1); }
}

/* ===== White theme + lightweight 3D + smooth motion ===== */
:root { --bg:#ffffff; --surface:#ffffff; --surface-2:#f2f5f7; --text:#0f1b2d; --muted:#64748b; --border:#e8ecf1; --edge:#dde3e9;
  --primary:#0d9488; --primary-2:#0891b2; --lime:#bef264; --ink:#0b1f1d; --radius:26px;
  --shadow:0 1px 2px rgba(15,27,45,.04),0 10px 24px rgba(15,27,45,.06); --ring:0 0 0 3px rgba(13,148,136,.25); --ease:cubic-bezier(.22,.8,.2,1); }
[data-theme=dark] { --bg:#060d0d; --surface:#0e1a19; --surface-2:#152826; --text:#ecf6f3; --muted:#8fa6a1; --border:#1c3330; --edge:#040909;
  --primary:#2dd4bf; --primary-2:#38bdf8; --shadow:0 10px 24px rgba(0,0,0,.5); }
html { scroll-behavior:smooth; }
body { background:var(--bg); overflow-x:clip; }

/* top bar (solid = smooth scrolling) with search */
.topbar { background:var(--bg); backdrop-filter:none; border-bottom:1px solid var(--border); }
.brand { margin-right:auto; }
.brand-mark { background:linear-gradient(135deg,var(--primary),var(--lime)); color:var(--ink); box-shadow:0 4px 0 rgba(13,148,136,.35); }
.head-search { position:relative; flex:1; min-width:0; max-width:230px; margin-left:auto; }
.head-search input { width:100%; height:42px; padding:0 46px 0 16px; border-radius:999px; border:1px solid var(--border); background:var(--surface-2); color:var(--text); font:inherit; font-size:.92rem; transition:border-color .2s,background .2s,box-shadow .2s; }
.head-search input::placeholder { color:var(--muted); }
.head-search input:focus { outline:none; background:var(--surface); border-color:var(--primary); box-shadow:var(--ring); }
.head-search button { position:absolute; right:4px; top:4px; width:34px; height:34px; display:grid; place-items:center; border:0; border-radius:50%; cursor:pointer; background:var(--ink); color:var(--lime); transition:transform .2s var(--ease); }
.head-search button:active { transform:scale(.9); }
[data-theme=dark] .head-search button { background:var(--lime); color:var(--ink); }
@media (min-width:820px) { .head-search { max-width:340px; } }
.nav-desktop a.active { background:var(--ink); color:var(--lime); }
[data-theme=dark] .nav-desktop a.active { background:var(--lime); color:var(--ink); }

.section-head h2 { font-size:1.35rem; font-weight:800; letter-spacing:-.025em; }
.section-head h2::after { content:""; display:block; width:34px; height:4px; margin-top:6px; border-radius:4px; background:linear-gradient(90deg,var(--primary),var(--lime)); }
.see-all { color:var(--primary); font-weight:700; }

.chip { border-radius:999px; background:var(--surface); border:1px solid var(--border); box-shadow:0 3px 0 var(--edge); transition:transform .25s var(--ease),box-shadow .25s var(--ease),background .2s; }
.chip:active { transform:translateY(3px); box-shadow:0 0 0 var(--edge); }
.chip.active { background:var(--ink); color:var(--lime); border-color:var(--ink); box-shadow:0 3px 0 #000; }
[data-theme=dark] .chip.active { background:var(--lime); color:var(--ink); border-color:var(--lime); box-shadow:0 3px 0 #6b8f1f; }

/* 3D tiles: thick edge + floating icon */
.app-card { position:relative; padding:16px; border-radius:var(--radius); background:var(--surface); border:1px solid var(--border);
  box-shadow:0 6px 0 var(--edge),0 18px 30px rgba(15,27,45,.10); animation:none;
  transition:transform .35s var(--ease),box-shadow .35s var(--ease); }
.app-card:active { transform:translateY(5px); box-shadow:0 1px 0 var(--edge),0 6px 12px rgba(15,27,45,.10); transition-duration:.12s; }
.app-icon { border-radius:24px; box-shadow:0 5px 0 rgba(15,27,45,.16),0 14px 22px rgba(15,27,45,.22); transition:transform .35s var(--ease); }
.app-name { font-weight:800; letter-spacing:-.015em; }
.app-card .btn { background:var(--surface-2); color:var(--primary); border-radius:999px; font-weight:800; box-shadow:0 4px 0 var(--edge); }
.app-card .btn:hover { background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; box-shadow:0 4px 0 #0a625a; }
.app-card .btn:active { transform:translateY(3px); box-shadow:0 1px 0 var(--edge); }
.app-card::after { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; opacity:0; transition:opacity .3s;
  background:radial-gradient(220px circle at var(--gx,50%) var(--gy,0%),rgba(13,148,136,.14),transparent 60%); }
@media (hover:hover) and (pointer:fine) {
  .app-card:hover { transform:perspective(900px) translateY(-5px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); box-shadow:0 10px 0 var(--edge),0 28px 44px rgba(13,148,136,.16); }
  .app-card.tilt { transition-duration:.12s; }
  .app-card.tilt,.app-card.tilt > * { transform-style:preserve-3d; }
  .app-card.tilt .app-icon { transform:translateZ(30px); }
  .app-card.tilt::after { opacity:1; }
}

.btn { background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; border-radius:999px; font-weight:800; box-shadow:0 5px 0 #0a625a,0 14px 22px rgba(13,148,136,.25); transition:transform .2s var(--ease),box-shadow .2s var(--ease); }
.btn:hover { transform:translateY(-2px); box-shadow:0 7px 0 #0a625a,0 18px 26px rgba(13,148,136,.28); }
.btn:active { transform:translateY(4px); box-shadow:0 1px 0 #0a625a,0 5px 8px rgba(13,148,136,.2); }
input:focus,textarea:focus,select:focus { outline:none; box-shadow:var(--ring); }
.card { border-radius:30px; border:1px solid var(--border); box-shadow:0 5px 0 var(--edge),var(--shadow); }

.detail-head { position:relative; overflow:hidden; border:0; color:#eafff8; border-radius:32px; padding:26px 20px;
  background:radial-gradient(60% 90% at 90% 0%,rgba(45,212,191,.45),transparent 70%),radial-gradient(50% 80% at 5% 100%,rgba(190,242,100,.3),transparent 70%),var(--ink);
  box-shadow:0 7px 0 #040f0e,0 24px 40px rgba(6,32,31,.25); }
.detail-head .muted { color:rgba(234,255,248,.7); }
.previews img,.shots img { border-radius:22px; box-shadow:0 5px 0 var(--edge),0 16px 28px rgba(15,27,45,.2); }

.nav-bottom { left:50%; right:auto; transform:translateX(-50%); width:min(440px,calc(100% - 28px)); bottom:calc(12px + env(safe-area-inset-bottom)); padding:7px; border-radius:999px;
  background:var(--surface); border:1px solid var(--border); backdrop-filter:none; box-shadow:0 5px 0 var(--edge),0 18px 34px rgba(15,27,45,.14); }
.nav-bottom a { color:var(--muted); border-radius:999px; transition:none; }
.nav-bottom a:active { transform:none; }
.nav-bottom a.active { background:var(--ink); color:var(--lime); box-shadow:none; }
[data-theme=dark] .nav-bottom a.active { background:var(--lime); color:var(--ink); }

/* scroll reveal: animation only touches opacity + translate, never transform */
.js .reveal:not(.in) { opacity:0; }
.js .reveal.in { animation:rvIn .55s var(--ease) var(--d,0ms) backwards; }
@keyframes rvIn { from { opacity:0; translate:0 20px; } }

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

/* ===== Home banner (set in Admin > Settings) ===== */
.home-banner { margin-bottom:8px; border-radius:26px; overflow:hidden; background:var(--surface-2); border:1px solid var(--border); box-shadow:0 5px 0 var(--edge),var(--shadow); }
.home-banner img { display:block; width:100%; height:auto; max-height:360px; object-fit:cover; }

/* ===== App banner behind the header ===== */
.detail-head .hero-bg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.detail-head.has-banner::before { content:""; position:absolute; inset:0; z-index:1; background:linear-gradient(180deg,rgba(4,12,12,.2) 0%,rgba(4,12,12,.86) 100%); }
.detail-head > :not(.hero-bg) { position:relative; z-index:2; }
.rating-link { color:inherit; opacity:.8; font-size:.85em; }
.previews-wide img { width:100%; max-width:360px; height:auto; aspect-ratio:2/1; object-fit:cover; }

/* ===== Ratings & reviews ===== */
.review-summary { display:grid; grid-template-columns:auto 1fr; gap:16px; align-items:center; background:var(--surface); border:1px solid var(--border); border-radius:26px; padding:16px; box-shadow:0 5px 0 var(--edge); }
.rs-score { display:flex; flex-direction:column; align-items:center; gap:4px; min-width:96px; }
.rs-score b { font-size:2.4rem; line-height:1; }
.rs-score small { color:var(--muted); font-size:.72rem; text-align:center; }
.rs-bars { display:flex; flex-direction:column; gap:5px; }
.rs-row { display:grid; grid-template-columns:14px 1fr 28px; gap:8px; align-items:center; font-size:.78rem; color:var(--muted); font-weight:700; }
.rs-row progress { height:8px; }
.rs-row em { font-style:normal; text-align:right; }
.stars { display:inline-flex; gap:1px; } .stars .on { color:var(--warn); } .stars .off { color:var(--border); }
.review-form { margin-top:14px; }
.star-input { display:inline-flex; flex-direction:row-reverse; justify-content:flex-end; gap:2px; }
.star-input input { position:absolute; opacity:0; width:1px; height:1px; }
.star-input label { cursor:pointer; color:var(--border); line-height:0; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color:var(--warn); }
.star-input input:focus-visible + label { outline:2px solid var(--primary); border-radius:6px; }
.hp-field { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.review-list { display:flex; flex-direction:column; gap:12px; margin-top:14px; }
.review { background:var(--surface); border:1px solid var(--border); border-radius:22px; padding:14px; box-shadow:0 3px 0 var(--edge); }
.review header { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.review header > div { flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.25; }
.review header small { color:var(--muted); font-size:.74rem; }
.review p { overflow-wrap:anywhere; white-space:pre-line; }
.avatar { flex:none; width:38px; height:38px; border-radius:50%; display:grid; place-items:center; color:#fff; font-weight:800; }
.review-cell { max-width:340px; overflow-wrap:anywhere; }
@media (max-width:420px) { .review-summary { grid-template-columns:1fr; } }



.section-head h2 { flex:none; }
.pwa-btn { color:var(--primary); }
.is-standalone .pwa-btn { display:none; }

/* ===== Install app popup (premium) ===== */
.pwa-pop { position:fixed; left:14px; bottom:calc(14px + env(safe-area-inset-bottom)); z-index:60; width:min(440px,calc(100% - 28px)); display:flex; gap:14px; align-items:flex-start; padding:16px; border-radius:28px; color:#eafff8;
  background:radial-gradient(70% 120% at 100% 0%,rgba(45,212,191,.35),transparent 70%),radial-gradient(60% 100% at 0% 100%,rgba(190,242,100,.22),transparent 70%),var(--ink);
  box-shadow:0 7px 0 #040f0e,0 26px 44px rgba(6,32,31,.4); transform:translateX(calc(-100% - 28px)); transition:transform .6s cubic-bezier(.22,1,.36,1); }
.pwa-pop[hidden] { display:none; }
.pwa-pop.show { transform:translateX(0); }
.pwa-ic { width:58px; height:58px; flex:none; border-radius:18px; box-shadow:0 0 0 2px rgba(190,242,100,.55),0 8px 20px rgba(0,0,0,.45); }
.pwa-body { flex:1; min-width:0; }
.pwa-body b { display:block; font-size:1.05rem; font-weight:800; letter-spacing:-.01em; color:#fff; }
.pwa-body p { margin:3px 0 14px; font-size:.84rem; line-height:1.45; color:rgba(234,255,248,.72); }
.pwa-ios, .pwa-manual { display:none; }
.pwa-pop.ios .pwa-ios, .pwa-pop.manual .pwa-manual { display:block; }
.pwa-pop.ios .pwa-text, .pwa-pop.manual .pwa-text, .pwa-pop.ios [data-pwa-install], .pwa-pop.manual [data-pwa-install] { display:none; }
.pwa-actions { display:flex; gap:10px; }
.pwa-pop .btn, .pwa-later { flex:1; display:inline-flex; align-items:center; justify-content:center; gap:8px; height:46px; padding:0 14px; border-radius:999px; font:inherit; font-weight:800; cursor:pointer; transition:transform .2s var(--ease),box-shadow .2s var(--ease),filter .2s; }
.pwa-pop .btn { border:0; color:var(--ink); background:linear-gradient(135deg,#ecfccb,var(--lime) 45%,#5eead4); box-shadow:0 5px 0 #5f8420,0 12px 20px rgba(190,242,100,.25); }
.pwa-pop .btn:active { transform:translateY(4px); box-shadow:0 1px 0 #5f8420; }
.pwa-later { color:#eafff8; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.22); box-shadow:0 5px 0 rgba(0,0,0,.35); }
.pwa-later:active { transform:translateY(4px); box-shadow:0 1px 0 rgba(0,0,0,.35); }
.pwa-btn { color:var(--primary); }
.is-standalone .pwa-btn { display:none; }
.pwa-done { display:none; }
.pwa-pop.done .pwa-done { display:block; }
.pwa-pop.done .pwa-text, .pwa-pop.done [data-pwa-install] { display:none; }

/* ===== Loading splash (site open / app launch) ===== */
.splash { position:fixed; inset:0; z-index:200; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:20px; color:#eafff8;
  background:radial-gradient(60% 50% at 50% 38%,rgba(45,212,191,.30),transparent 70%),radial-gradient(50% 40% at 85% 92%,rgba(190,242,100,.18),transparent 70%),var(--ink);
  transition:opacity .5s ease,visibility .5s; animation:splashFailsafe .3s ease 7s forwards; }
.splash.hide { opacity:0; visibility:hidden; }
.no-splash .splash { display:none; }
.splash-logo { position:relative; width:112px; height:112px; }
.splash-logo img { width:100%; height:100%; border-radius:30px; box-shadow:0 14px 36px rgba(0,0,0,.55); animation:splashPop .8s cubic-bezier(.22,1,.36,1) both; }
.splash-logo::before, .splash-logo::after { content:""; position:absolute; inset:-10px; border-radius:40px; border:2px solid rgba(190,242,100,.55); animation:splashRing 1.8s ease-out infinite; }
.splash-logo::after { animation-delay:.9s; }
.splash-name { font-size:1.3rem; font-weight:800; letter-spacing:-.01em; animation:fadeUp .6s ease .25s both; }
.splash-bar { width:150px; height:4px; border-radius:4px; background:rgba(255,255,255,.14); overflow:hidden; }
.splash-bar i { display:block; width:40%; height:100%; border-radius:4px; background:linear-gradient(90deg,var(--lime),#5eead4); animation:splashBar 1.2s ease-in-out infinite; }
@keyframes splashPop { from { opacity:0; transform:scale(.6); } }
@keyframes splashRing { 0% { transform:scale(.92); opacity:.9; } 100% { transform:scale(1.4); opacity:0; } }
@keyframes splashBar { 0% { transform:translateX(-110%); } 100% { transform:translateX(360%); } }
@keyframes splashFailsafe { to { opacity:0; visibility:hidden; } }

/* ===== Smoother scrolling ===== */
.splash.gone { display:none; }
.section + .section { content-visibility:auto; contain-intrinsic-size:auto 420px; }
.app-card { box-shadow:0 5px 0 var(--edge),0 10px 18px rgba(15,27,45,.08); transition:transform .35s var(--ease); }
.card { box-shadow:0 4px 0 var(--edge),0 8px 16px rgba(15,27,45,.06); }
.nav-bottom { box-shadow:0 4px 0 var(--edge),0 10px 22px rgba(15,27,45,.12); }

/* ===== Detail page: orange download button + coloured 3D info tiles ===== */
.detail-head .btn { color:#3b1d00; background:linear-gradient(135deg,#fde68a,#fbbf24 45%,#f97316); box-shadow:0 6px 0 #b45309,0 16px 26px rgba(249,115,22,.35); }
.detail-head .btn:hover { filter:brightness(1.06); transform:translateY(-2px); box-shadow:0 8px 0 #b45309,0 20px 30px rgba(249,115,22,.4); }
.detail-head .btn:active { transform:translateY(5px); box-shadow:0 1px 0 #b45309,0 6px 10px rgba(249,115,22,.3); }
.stats { gap:18px 14px; padding-bottom:8px; }
.stats .stat { border:0; border-radius:22px; padding:16px 18px; transition:transform .25s var(--ease); }
.stats .stat b { font-size:1.15rem; font-weight:800; }
.stats .stat span { color:inherit; opacity:.74; font-weight:700; }
.stats .stat:active { transform:translateY(5px); }
.stats .stat:nth-child(1) { color:#053b36; background:linear-gradient(145deg,#ccfbf1,#5eead4); box-shadow:inset 0 2px 0 rgba(255,255,255,.7),0 6px 0 #14a89a,0 14px 20px rgba(20,184,166,.28); }
.stats .stat:nth-child(2) { color:#4a2f00; background:linear-gradient(145deg,#fef3c7,#fcd34d); box-shadow:inset 0 2px 0 rgba(255,255,255,.7),0 6px 0 #d99a06,0 14px 20px rgba(245,158,11,.3); }
.stats .stat:nth-child(3) { color:#06324d; background:linear-gradient(145deg,#e0f2fe,#7dd3fc); box-shadow:inset 0 2px 0 rgba(255,255,255,.7),0 6px 0 #0e9fe0,0 14px 20px rgba(14,165,233,.28); }
.stats .stat:nth-child(4) { color:#2a1466; background:linear-gradient(145deg,#ede9fe,#c4b5fd); box-shadow:inset 0 2px 0 rgba(255,255,255,.7),0 6px 0 #7c5cf0,0 14px 20px rgba(124,92,240,.28); }

/* ===== One blue for every Download button + two-colour brand name ===== */
:root { --dl:linear-gradient(135deg,#3b82f6,#2563eb 55%,#4f46e5); --dl-edge:#1e3fa8; --dl-glow:rgba(37,99,235,.35); }
.app-card .btn, .detail-head .btn { color:#fff; background:var(--dl); box-shadow:0 5px 0 var(--dl-edge),0 12px 20px var(--dl-glow); }
.app-card .btn:hover, .detail-head .btn:hover { color:#fff; background:var(--dl); filter:brightness(1.08); transform:translateY(-2px); box-shadow:0 7px 0 var(--dl-edge),0 16px 26px var(--dl-glow); }
.app-card .btn:active, .detail-head .btn:active { transform:translateY(4px); box-shadow:0 1px 0 var(--dl-edge),0 4px 8px var(--dl-glow); }
.app-card .btn.btn-disabled, .detail-head .btn.btn-disabled { color:var(--muted); background:var(--surface-2); filter:none; transform:none; box-shadow:0 4px 0 var(--edge); }
.bn-a { color:#2563eb; }
.bn-b { background:linear-gradient(90deg,#f59e0b,#f97316); -webkit-background-clip:text; background-clip:text; color:transparent; }
[data-theme=dark] .bn-a { color:#60a5fa; }
[data-theme=dark] .bn-b { background:linear-gradient(90deg,#fbbf24,#fb923c); -webkit-background-clip:text; background-clip:text; }

/* ===== Brand name side by side, one calm tile colour, highlighted legal cards ===== */
.brand-name.brand-name-inline { display:block; }
.bn-a { color:#0f2a27; }
.bn-b { background:linear-gradient(90deg,#0d9488,#10b981); -webkit-background-clip:text; background-clip:text; color:transparent; }
[data-theme=dark] .bn-a { color:#f1f5f9; }
[data-theme=dark] .bn-b { background:linear-gradient(90deg,#5eead4,#bef264); -webkit-background-clip:text; background-clip:text; }

.stats .stat:nth-child(n) { color:#1b2b63; background:linear-gradient(145deg,#eaf0ff,#c9d8ff); box-shadow:inset 0 2px 0 rgba(255,255,255,.8),0 6px 0 #9bb2f0,0 14px 20px rgba(79,110,229,.22); }
[data-theme=dark] .stats .stat:nth-child(n) { color:#e6ecff; background:linear-gradient(145deg,#22346d,#18254f); box-shadow:inset 0 2px 0 rgba(255,255,255,.08),0 6px 0 #0b1330,0 14px 20px rgba(0,0,0,.4); }

.legal-card { background:linear-gradient(180deg,#f2f7ff,#ffffff 75%); border:1px solid #cddcf6; border-left:6px solid var(--primary); box-shadow:0 6px 0 #cdd9ee,0 14px 22px rgba(37,99,235,.10); }
.legal-card h2 { display:flex; align-items:center; gap:10px; }
.legal-card h2::before { content:""; flex:none; width:10px; height:10px; border-radius:50%; background:var(--primary); box-shadow:0 0 0 4px rgba(13,148,136,.18); }
[data-theme=dark] .legal-card { background:linear-gradient(180deg,#12203a,#0e1a19 85%); border-color:#24406b; border-left-color:var(--primary); box-shadow:0 6px 0 #070f1e,0 14px 22px rgba(0,0,0,.4); }

/* ===== Glassmorphism cards (page background unchanged) ===== */
:root { --glass-bg:linear-gradient(145deg,rgba(255,255,255,.95),rgba(219,233,255,.80) 50%,rgba(200,243,234,.72)); --glass-border:rgba(255,255,255,.95); --glass-ring:rgba(110,140,210,.32); --glass-shadow:0 12px 26px rgba(45,90,200,.16),0 2px 6px rgba(45,90,200,.08); }
[data-theme=dark] { --glass-bg:linear-gradient(145deg,rgba(255,255,255,.11),rgba(120,160,255,.07) 55%,rgba(45,212,191,.06)); --glass-border:rgba(255,255,255,.16); --glass-ring:rgba(255,255,255,.06); --glass-shadow:0 12px 26px rgba(0,0,0,.45); }
.app-card, .card, .chip, .search-bar, .legal-card, [data-theme=dark] .legal-card {
  background:var(--glass-bg); border:1px solid var(--glass-border);
  box-shadow:0 0 0 1px var(--glass-ring),inset 0 1px 0 rgba(255,255,255,.55),inset 0 -1px 0 rgba(110,140,210,.12),var(--glass-shadow); }
.app-card:active { box-shadow:0 0 0 1px var(--glass-ring),inset 0 1px 0 rgba(255,255,255,.55),0 4px 10px rgba(45,90,200,.14); }
@media (hover:hover) and (pointer:fine) {
  .app-card:hover { box-shadow:0 0 0 1px rgba(80,120,220,.45),inset 0 1px 0 rgba(255,255,255,.6),0 22px 40px rgba(45,90,200,.22); }
}
.chip.active { background:var(--ink); border-color:var(--ink); box-shadow:0 3px 0 #000; }
[data-theme=dark] .chip.active { background:var(--lime); border-color:var(--lime); box-shadow:0 3px 0 #6b8f1f; }

/* ===== Contact buttons (logo + name only) ===== */
.contact-list { display:grid; gap:14px; margin-top:16px; }
.contact-item { display:flex; align-items:center; gap:14px; padding:12px 14px; border-radius:22px; color:var(--text); text-decoration:none;
  background:var(--glass-bg); border:1px solid var(--glass-border);
  box-shadow:0 0 0 1px var(--glass-ring),inset 0 1px 0 rgba(255,255,255,.55),0 5px 0 rgba(110,140,210,.30),0 12px 20px rgba(45,90,200,.12); transition:transform .25s var(--ease),box-shadow .25s var(--ease); }
.contact-item:active { transform:translateY(5px); box-shadow:0 0 0 1px var(--glass-ring),inset 0 1px 0 rgba(255,255,255,.55),0 0 0 rgba(0,0,0,0); }
.ci-logo { flex:none; width:48px; height:48px; display:grid; place-items:center; border-radius:15px; background:#fff; box-shadow:0 0 0 1px rgba(110,140,210,.25),0 4px 10px rgba(15,27,45,.12); }
.ci-logo svg { width:28px; height:28px; display:block; }
.ci-name { flex:1; min-width:0; font-size:1.04rem; font-weight:800; letter-spacing:-.01em; }
.ci-go { flex:none; width:32px; height:32px; display:grid; place-items:center; border-radius:50%; background:var(--ink); color:var(--lime); }
.ci-go svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round; }
[data-theme=dark] .ci-go { background:var(--lime); color:var(--ink); }

/* ===== Extras: heart, bell, toast, saved, report, versions, slider, chart ===== */
.fav-btn { position:absolute; top:10px; right:10px; z-index:3; width:38px; height:38px; display:grid; place-items:center; border:0; border-radius:50%; cursor:pointer; color:#64748b; background:rgba(255,255,255,.9); box-shadow:0 0 0 1px rgba(110,140,210,.28),0 3px 8px rgba(15,27,45,.18); transition:transform .2s var(--ease),color .2s; }
.fav-btn svg { fill:none; stroke:currentColor; stroke-width:2.2; stroke-linejoin:round; }
.fav-btn.on { color:#ef4444; }
.fav-btn.on svg { fill:currentColor; }
.fav-btn:active { transform:scale(.88); }
.detail-head .fav-btn { top:14px; right:14px; z-index:4; }
.heart-ic { stroke:currentColor; fill:none; stroke-width:2; stroke-linejoin:round; }
.push-btn { color:var(--primary); }
.push-btn.on { background:var(--ink); color:var(--lime); }
[data-theme=dark] .push-btn.on { background:var(--lime); color:var(--ink); }
.toast { position:fixed; left:50%; bottom:calc(24px + env(safe-area-inset-bottom)); z-index:90; max-width:min(380px,calc(100% - 32px)); padding:12px 18px; border-radius:999px; background:var(--ink); color:#eafff8; font-size:.92rem; font-weight:700; text-align:center;
  box-shadow:0 5px 0 #040f0e,0 18px 30px rgba(6,32,31,.35); transform:translateX(-50%); animation:toastIn .35s var(--ease) both,toastOut .35s ease 2.5s forwards; }
@keyframes toastIn { from { opacity:0; transform:translate(-50%,14px); } }
@keyframes toastOut { to { opacity:0; transform:translate(-50%,14px); } }
.report-row { margin:14px 0 0; }
.report-btn { display:inline-flex; align-items:center; gap:8px; padding:9px 16px; border:0; border-radius:999px; cursor:pointer; font:inherit; font-size:.88rem; font-weight:700; color:var(--muted); background:var(--glass-bg); box-shadow:0 0 0 1px var(--glass-ring),0 3px 0 rgba(110,140,210,.25); transition:transform .2s var(--ease),box-shadow .2s; }
.report-btn:active { transform:translateY(3px); box-shadow:0 0 0 1px var(--glass-ring); }
.vh-list { display:grid; gap:12px; }
.vh-item { padding:14px 16px; border-radius:20px; background:var(--glass-bg); border:1px solid var(--glass-border); box-shadow:0 0 0 1px var(--glass-ring),var(--glass-shadow); }
.vh-item header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.vh-item header b { font-weight:800; color:var(--primary); }
.vh-item header small { color:var(--muted); }
.vh-item p { margin:8px 0 0; color:var(--muted); line-height:1.55; }
.banner-slider { position:relative; }
.bs-track { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; }
.bs-track::-webkit-scrollbar { display:none; }
.bs-track img { flex:0 0 100%; width:100%; height:auto; max-height:360px; object-fit:cover; scroll-snap-align:center; }
.bs-dots { position:absolute; left:0; right:0; bottom:10px; display:flex; justify-content:center; gap:7px; }
.bs-dots button { width:8px; height:8px; padding:0; border:0; border-radius:99px; cursor:pointer; background:rgba(255,255,255,.55); box-shadow:0 0 0 1px rgba(0,0,0,.2); transition:width .3s var(--ease),background .3s; }
.bs-dots button.on { width:22px; background:var(--lime); }
.chart-card { padding:14px 12px 8px; }
.chart-svg { width:100%; height:auto; display:block; color:var(--primary); }
.chart-svg .ct { fill:var(--muted); }

/* ===== Download animation overlay ===== */
.dl-lock { overflow:hidden; }
.dl-overlay { position:fixed; inset:0; z-index:300; display:none; align-items:center; justify-content:center; padding:20px; background:rgba(4,15,14,.74); }
.dl-overlay.open { display:flex; animation:dlFade .3s ease both; }
.dl-overlay.closing { animation:dlOut .3s ease both; }
@keyframes dlFade { from { opacity:0; } }
@keyframes dlOut { to { opacity:0; } }
.dl-card { width:min(340px,100%); padding:26px 22px 20px; border-radius:30px; text-align:center; color:#eafff8;
  background:radial-gradient(70% 90% at 80% 0%,rgba(45,212,191,.3),transparent 70%),radial-gradient(60% 80% at 0% 100%,rgba(190,242,100,.2),transparent 70%),var(--ink);
  box-shadow:0 8px 0 #040f0e,0 30px 60px rgba(0,0,0,.5); animation:dlPop .55s var(--ease) both; }
@keyframes dlPop { from { opacity:0; transform:translateY(24px) scale(.92); } }
.dl-ring { position:relative; width:132px; height:132px; margin:0 auto 14px; }
.dl-ring > svg { width:100%; height:100%; transform:rotate(-90deg); }
.dl-track { fill:none; stroke:rgba(255,255,255,.12); stroke-width:6; }
.dl-arc { fill:none; stroke:var(--lime); stroke-width:6; stroke-linecap:round; stroke-dasharray:264px; stroke-dashoffset:calc(264px * (1 - var(--p,0))); filter:drop-shadow(0 0 6px rgba(190,242,100,.7)); transition:stroke-dashoffset 1s linear; }
.dl-icon, .dl-check { position:absolute; inset:0; margin:auto; width:78px; height:78px; border-radius:22px; display:grid; place-items:center; }
.dl-icon { overflow:hidden; background:#fff; color:var(--ink); font-size:2rem; font-weight:900; transition:opacity .3s; }
.dl-icon img { width:100%; height:100%; object-fit:cover; }
.dl-icon img[hidden] { display:none; }
.dl-check { border-radius:50%; background:var(--lime); color:var(--ink); opacity:0; transform:scale(.4); transition:opacity .35s,transform .45s var(--ease); }
.dl-check svg { width:40px; height:40px; fill:none; stroke:currentColor; stroke-width:3.2; stroke-linecap:round; stroke-linejoin:round; }
.dl-overlay.done .dl-check { opacity:1; transform:scale(1); }
.dl-overlay.done .dl-icon { opacity:0; }
.dl-name { display:block; font-size:1.1rem; font-weight:800; }
.dl-num { margin-top:6px; font-size:2.6rem; font-weight:900; line-height:1.1; color:var(--lime); font-variant-numeric:tabular-nums; } /* shows the real seconds left, e.g. "7s" */
.dl-bar { height:10px; margin:12px 0 10px; border-radius:99px; overflow:hidden; background:rgba(255,255,255,.12); }
.dl-bar i { display:block; height:100%; width:100%; border-radius:99px; transform-origin:left; transform:scaleX(var(--p,0)); background:linear-gradient(90deg,#2dd4bf,#bef264); transition:transform 1s linear; }
.dl-status { margin:0 0 14px; min-height:1.3em; font-size:.9rem; color:rgba(234,255,248,.75); }
.dl-cancel { width:100%; height:44px; border-radius:999px; font:inherit; font-weight:800; cursor:pointer; color:#eafff8; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.22); box-shadow:0 5px 0 rgba(0,0,0,.35); transition:transform .2s var(--ease),box-shadow .2s; }
.dl-cancel:active { transform:translateY(4px); box-shadow:0 1px 0 rgba(0,0,0,.35); }
.dl-overlay.done .dl-cancel { display:none; }

/* ===== Admin: APK upload progress card ===== */
.up-card { margin-top:.8rem; padding:14px 16px; border-radius:20px; color:#eafff8; background:linear-gradient(145deg,#0b1f1d,#10332f); box-shadow:0 5px 0 #040f0e,0 14px 26px rgba(6,32,31,.3); }
.up-top { display:flex; align-items:center; gap:12px; }
.up-ic { flex:none; width:38px; height:38px; display:grid; place-items:center; border-radius:12px; color:var(--lime); background:rgba(190,242,100,.14); animation:upBounce 1.2s ease-in-out infinite; }
.up-label { flex:1; font-weight:800; }
.up-num { font-style:normal; font-size:1.5rem; font-weight:900; color:var(--lime); font-variant-numeric:tabular-nums; }
.up-card .upload-bar { height:12px; margin-top:12px; background:rgba(255,255,255,.12); }
.up-card .upload-bar span { position:relative; transition:none; background:linear-gradient(90deg,#2dd4bf,#bef264); box-shadow:0 0 14px rgba(190,242,100,.6); }
.up-card .upload-bar span::after { content:""; position:absolute; inset:0; background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.55) 50%,transparent 70%); transform:translateX(-100%); animation:upShimmer 1.4s linear infinite; }
.up-sub { display:block; margin-top:8px; opacity:.7; font-variant-numeric:tabular-nums; }
@keyframes upShimmer { to { transform:translateX(100%); } }
@keyframes upBounce { 50% { transform:translateY(-4px); } }

/* ===== Soft page changes (user + admin): instant swap, short fade, thin loading line ===== */
.js .reveal.in { animation-duration:.3s; }
.spa-bar { position:fixed; left:0; top:0; z-index:400; width:100%; height:3px; opacity:0; pointer-events:none; transform:scaleX(0); transform-origin:left; background:linear-gradient(90deg,#2dd4bf,#bef264); box-shadow:0 0 10px rgba(45,212,191,.7); }
.spa-bar.on { opacity:1; animation:spaBar 1.6s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes spaBar { from { transform:scaleX(.05); } to { transform:scaleX(.92); } }
.spa-in { animation:spaIn .2s ease both; }
@keyframes spaIn { from { opacity:0; transform:translateY(6px); } }
::view-transition-old(root) { animation:.1s ease both vtOut; }
::view-transition-new(root) { animation:.16s ease both vtIn; }
@keyframes vtOut { to { opacity:0; } }
@keyframes vtIn { from { opacity:0; } }

/* ===== App page header: compact banner (logo + text on top, Download below) ===== */
.detail-head { padding:16px; gap:12px 14px; border-radius:26px; align-items:center; }
.detail-head .app-icon { width:72px; height:72px; border-radius:20px; flex:none; }
.detail-info { flex:1 1 calc(100% - 86px); min-width:0; gap:2px; }
.detail-info h1 { font-size:1.25rem; line-height:1.25; text-shadow:0 2px 8px rgba(0,0,0,.55); }
.detail-info .muted, .detail-info .rating { text-shadow:0 1px 6px rgba(0,0,0,.55); }
.detail-head.has-banner::before { background:linear-gradient(180deg,rgba(4,12,12,.3) 0%,rgba(4,12,12,.82) 100%); }
.detail-head .btn { min-height:42px; padding:0 24px; }

.detail-actions { flex:1 1 100%; display:flex; flex-wrap:wrap; align-items:center; gap:10px 12px; }
.copy-btn { display:inline-flex; align-items:center; gap:8px; min-height:42px; padding:0 18px; border-radius:999px; cursor:pointer; font:inherit; font-weight:800; color:#fff;
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.4); box-shadow:0 5px 0 rgba(0,0,0,.35); text-shadow:0 1px 4px rgba(0,0,0,.4); transition:transform .2s var(--ease),box-shadow .2s var(--ease),background .2s; }
.copy-btn:active { transform:translateY(4px); box-shadow:0 1px 0 rgba(0,0,0,.35); }
.copy-btn.copied { background:var(--lime); border-color:var(--lime); color:var(--ink); text-shadow:none; }
.copy-tmp { position:fixed; top:0; left:0; width:1px; height:1px; opacity:0; pointer-events:none; }

/* ===== Ads ===== */
.ad-slot { margin:14px 0; max-width:100%; overflow:hidden; text-align:center; }
.ad-slot::before { content:attr(data-label); display:block; margin-bottom:4px; font-size:.7rem; letter-spacing:.5px; color:var(--muted); }
.ad-slot iframe, .ad-slot img, .ad-slot video { max-width:100%; }
.dl-ad { margin:0 0 12px; max-height:280px; overflow:hidden; }
.dl-ad:empty { display:none; }
.code-area { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.82rem; line-height:1.45; }

/* ---------- Visitor accounts ---------- */
.seg a { border:0; background:transparent; color:var(--muted); font:inherit; font-weight:700; padding:9px 18px; border-radius:11px; cursor:pointer; display:inline-flex; align-items:center; gap:8px; text-decoration:none; }
.seg a[aria-pressed=true] { background:var(--surface); color:var(--primary); box-shadow:0 2px 8px rgba(0,0,0,.12); }
.login-box .seg { margin-bottom:14px; }
.my-limits { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 12px; }
.my-list { display:flex; flex-direction:column; gap:12px; }
.my-app { display:flex; flex-direction:column; gap:12px; margin:0; }
.my-app-info { display:flex; align-items:center; gap:12px; color:inherit; text-decoration:none; }
.my-app-text { display:flex; flex-direction:column; min-width:0; }
.my-app-text small { color:var(--muted); }

/* ---------- Hamburger menu (site + admin) ---------- */
body.menu-open { overflow:hidden; }
.menu-overlay { position:fixed; inset:0; z-index:79; background:rgba(8,16,28,.5); opacity:0; pointer-events:none; transition:opacity .2s; }
body.menu-open .menu-overlay { opacity:1; pointer-events:auto; }
.menu-panel { position:fixed; top:0; right:0; bottom:0; z-index:80; width:min(340px,88vw); display:flex; flex-direction:column; background:var(--surface); color:var(--text); border-left:1px solid var(--border); box-shadow:-18px 0 40px rgba(8,16,28,.25);
  padding-top:env(safe-area-inset-top); transform:translateX(105%); visibility:hidden; transition:transform .25s ease,visibility 0s linear .25s; }
body.menu-open .menu-panel { transform:none; visibility:visible; transition:transform .25s ease; }
.menu-head { flex:none; display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--border); font-size:1.1rem; }
.menu-body { flex:1; overflow-y:auto; padding:12px 12px calc(20px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; gap:12px; }
.menu-sec { border:1px solid var(--border); border-radius:18px; padding:6px; background:var(--surface); }
.menu-sec-title { padding:8px 10px 4px; font-size:.72rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.menu-row { display:flex; align-items:center; gap:12px; width:100%; padding:12px 12px; border:0; border-radius:14px; background:transparent; color:var(--text); font:inherit; font-weight:700; text-align:left; cursor:pointer; text-decoration:none; }
.menu-row:hover { background:var(--surface-2); }
.menu-row .icon, .menu-row svg { flex:none; }
.menu-row.active { background:color-mix(in srgb,var(--primary) 14%,var(--surface)); color:var(--primary); }
.menu-primary { background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; padding:15px 14px; }
.menu-primary:hover { background:linear-gradient(135deg,var(--primary),var(--primary-2)); filter:brightness(1.06); }
.menu-danger { background:color-mix(in srgb,var(--danger) 14%,var(--surface)); color:var(--danger); }
.menu-danger:hover { background:color-mix(in srgb,var(--danger) 22%,var(--surface)); }
.menu-push { border:1px solid var(--border); border-radius:18px; padding:14px 16px; }
.menu-push[hidden] { display:none; }
.menu-push.on::after { content:"✓"; margin-left:auto; font-weight:800; }
.menu-user { margin:0; padding:6px 10px 8px; font-weight:700; color:var(--muted); overflow-wrap:anywhere; }
.menu-panel .seg { display:flex; width:100%; }
.menu-panel .seg button, .menu-panel .seg a { flex:1; justify-content:center; padding:9px 8px; }
.menu-panel form { margin:0; }

/* ---------- Account page ---------- */
.avatar { display:inline-flex; align-items:center; justify-content:center; flex:none; width:44px; height:44px; border-radius:50%; overflow:hidden; background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; font-weight:800; }
.avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.avatar-lg { width:76px; height:76px; font-size:1.9rem; }
.acc-head { display:flex; align-items:center; gap:14px; }
.acc-head h2 { margin:0; overflow-wrap:anywhere; }
.acc-head p { margin:2px 0 0; color:var(--muted); overflow-wrap:anywhere; }
.acc-stats { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin:14px 0; }
.acc-actions { display:flex; flex-wrap:wrap; gap:10px; }
.acc-actions form { margin:0; }

.badge-off { background:color-mix(in srgb,var(--danger) 16%,var(--surface)); color:var(--danger); }
.detail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin:14px 0; }
.detail-grid div { background:var(--surface-2); border-radius:14px; padding:10px 12px; }
.detail-grid small { display:block; color:var(--muted); font-size:.75rem; }
.detail-grid b { overflow-wrap:anywhere; }

.views-pill { display:inline-flex; align-items:center; gap:7px; padding:6px 13px; border-radius:999px; background:var(--surface-2); color:var(--muted); font-weight:800; }
.views-pill b { color:var(--text); }
.views-row { margin-top:4px; }

/* ---------- Admin reviews ---------- */
body.modal-open { overflow:hidden; }
.rv-list { display:flex; flex-direction:column; gap:12px; }
.rv-card { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:14px; display:flex; flex-direction:column; gap:10px; }
.rv-top { display:flex; align-items:center; gap:10px; }
.rv-app { display:flex; align-items:center; gap:10px; flex:1; min-width:0; font-weight:800; color:inherit; text-decoration:none; }
.rv-app .app-icon { width:42px; height:42px; border-radius:12px; flex:none; margin:0; font-size:1rem; }
.rv-app .t { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rv-stars { flex:none; }
.rv-box { background:var(--surface-2); border-radius:14px; padding:10px 12px; }
.rv-who { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:.82rem; }
.rv-who b { color:var(--text); font-size:.95rem; overflow-wrap:anywhere; }
.rv-text { margin:6px 0 0; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.rv-actions { display:flex; gap:8px; justify-content:flex-end; align-items:center; }
.rv-actions form { margin:0; }
.rv-modal { position:fixed; inset:0; z-index:85; display:flex; align-items:center; justify-content:center; padding:16px; }
.rv-modal[hidden] { display:none; }
.rv-backdrop { position:absolute; inset:0; background:rgba(8,16,28,.55); }
.rv-dialog { position:relative; width:min(520px,100%); max-height:85vh; display:flex; flex-direction:column; gap:10px; background:var(--surface); color:var(--text); border-radius:22px; padding:18px; box-shadow:0 24px 60px rgba(8,16,28,.35); }
.rv-x { position:absolute; top:10px; right:10px; }
.rv-dhead { display:flex; align-items:center; gap:10px; font-weight:800; padding-right:48px; min-width:0; }
.rv-dhead .app-icon { width:44px; height:44px; border-radius:12px; flex:none; margin:0; font-size:1rem; }
.rv-dhead .t { overflow-wrap:anywhere; }
.rv-full { overflow-y:auto; max-height:55vh; white-space:pre-wrap; overflow-wrap:anywhere; background:var(--surface-2); border-radius:14px; padding:12px 14px; line-height:1.55; }

/* ---------- Admin users list ---------- */
.ul-list { display:flex; flex-direction:column; gap:12px; }
.ul-card { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:14px; display:flex; flex-direction:column; gap:10px; }
.ul-top { display:flex; align-items:center; gap:12px; }
.ul-main { display:flex; align-items:center; gap:12px; flex:1; min-width:0; color:inherit; text-decoration:none; }
.ul-main > span:last-child { display:flex; flex-direction:column; min-width:0; }
.ul-main b, .ul-main small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ul-main small { color:var(--muted); }
.ul-meta { display:flex; flex-wrap:wrap; gap:4px 14px; color:var(--muted); font-size:.82rem; }
.ul-meta b { color:var(--text); }
.ul-actions { display:flex; gap:8px; justify-content:flex-end; align-items:center; }
.ul-actions form { margin:0; }

/* ---------- Admin app cards ---------- */
.ap-list { display:flex; flex-direction:column; gap:12px; }
.ap-card { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:14px; display:flex; flex-direction:column; gap:10px; }
.ap-main { display:flex; align-items:center; gap:12px; color:inherit; text-decoration:none; min-width:0; }
.ap-main .app-icon { width:48px; height:48px; border-radius:13px; flex:none; margin:0; font-size:1.1rem; }
.ap-main > span:last-child { display:flex; flex-direction:column; min-width:0; }
.ap-main b { overflow-wrap:anywhere; }
.ap-main small { color:var(--muted); }
.ap-flags { display:flex; flex-wrap:wrap; gap:8px; }
.ap-flags form { margin:0; }

/* ---------- App page: reviews in one scrolling card, version history button ---------- */
.review-box { padding:10px; margin-top:14px; }
.review-box .review-list { margin-top:0; max-height:460px; overflow-y:auto; padding-right:4px; gap:10px; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.review-box .review { background:var(--surface-2); box-shadow:none; border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:16px; }
.review-box .review header b { align-self:flex-start; display:inline-block; padding:2px 11px; border-radius:999px; background:color-mix(in srgb,var(--primary) 14%,var(--surface)); color:var(--primary); }
.vh-box > summary { list-style:none; cursor:pointer; }
.vh-box > summary::-webkit-details-marker { display:none; }
.vh-box[open] > summary { margin-bottom:12px; }
.vh-box .vh-list { max-height:380px; overflow-y:auto; overscroll-behavior:contain; }

/* ---------- Device lists (admin) ---------- */
.ul-link { border:0; background:var(--surface-2); color:var(--muted); font:inherit; font-size:.82rem; padding:5px 12px; border-radius:999px; cursor:pointer; }
.ul-link b { color:var(--primary); }
.ul-link:hover { background:color-mix(in srgb,var(--primary) 14%,var(--surface)); }
.dev-list { overflow-y:auto; max-height:55vh; display:flex; flex-direction:column; gap:8px; overscroll-behavior:contain; }
.dev-row { background:var(--surface-2); border-radius:12px; padding:9px 12px; border-left:4px solid var(--primary); display:flex; flex-direction:column; }
.dev-row b { overflow-wrap:anywhere; }
.dev-row small { color:var(--muted); }

/* ---------- Sign in with Google ---------- */
.or-sep { display:flex; align-items:center; gap:12px; margin:16px 0; color:var(--muted); font-size:.85rem; }
.or-sep::before, .or-sep::after { content:""; flex:1; height:1px; background:var(--border); }
.btn-google { background:#fff; color:#1f1f1f; border:1px solid #dadce0; box-shadow:0 1px 2px rgba(0,0,0,.12); justify-content:center; gap:10px; }
.btn-google:hover { background:#f8f9fa; }

/* ---------- Screenshots: 9:16 frames, swipeable lightbox ---------- */
.shots .shot { flex:none; height:340px; aspect-ratio:9/16; border-radius:22px; overflow:hidden; background:#0b1220; border:1px solid var(--border); box-shadow:0 5px 0 var(--edge),0 16px 28px rgba(15,27,45,.2); }
.shots .shot img { display:block; width:100%; height:100%; object-fit:contain; border:0; border-radius:0; box-shadow:none; background:transparent; }
.lightbox { cursor:default; touch-action:pan-y; }
.lightbox > img { max-height:88vh; max-width:100%; object-fit:contain; user-select:none; -webkit-user-drag:none; }
.lb-btn { position:absolute; border:0; background:rgba(255,255,255,.16); color:#fff; font-size:2rem; line-height:1; width:46px; height:46px; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; backdrop-filter:blur(6px); }
.lb-btn[hidden] { display:none; }
.lb-prev { left:10px; top:50%; transform:translateY(-50%); }
.lb-next { right:10px; top:50%; transform:translateY(-50%); }
.lb-close { right:12px; top:calc(12px + env(safe-area-inset-top)); }
.lb-count { position:absolute; bottom:calc(16px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); color:#fff; background:rgba(0,0,0,.45); padding:4px 12px; border-radius:999px; font-weight:700; font-size:.85rem; }
.lb-count[hidden] { display:none; }

/* ---------- Menu page tiles ---------- */
.menu-nav { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:4px; }
.menu-tile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:18px 8px; border-radius:18px; background:var(--surface-2); color:var(--text); font-weight:800; text-decoration:none; border:1px solid var(--border); }
.menu-tile:hover { background:color-mix(in srgb,var(--primary) 10%,var(--surface)); }
.menu-tile.active { background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; border-color:transparent; box-shadow:0 8px 18px rgba(79,70,229,.28); }

/* ---------- Premium touches: gentle entrance + hover lift ---------- */
@keyframes riseIn { from { opacity:0; transform:translateY(14px); } }
.card, .ap-card, .ul-card, .rv-card, .acc-head { animation:riseIn .45s var(--ease) both; }
.ap-card, .ul-card, .rv-card { transition:transform .2s var(--ease), box-shadow .2s var(--ease); }
.ap-card:hover, .ul-card:hover, .rv-card:hover { transform:translateY(-3px); box-shadow:0 14px 30px rgba(15,27,45,.12); }
.menu-tile { transition:transform .2s var(--ease), background .2s; }
.menu-tile:hover { transform:translateY(-2px); }
.menu-tile:active { transform:scale(.95); }
.ul-link, .badge { transition:transform .15s var(--ease); }
.ul-link:active, .badge:active { transform:scale(.95); }

/* ---------- Toggle switches (theme / language) ---------- */
.switch-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 8px; }
.switch-row-label { display:flex; align-items:center; gap:6px; font-weight:700; color:var(--muted); font-size:.92rem; }
.switch { position:relative; display:inline-flex; width:46px; height:26px; flex:none; }
.switch input { position:absolute; inset:0; opacity:0; margin:0; cursor:pointer; z-index:1; }
.switch-track { position:absolute; inset:0; border-radius:999px; background:var(--border); transition:background .25s var(--ease); }
.switch-thumb { position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 2px 6px rgba(8,16,28,.3); transition:transform .25s var(--ease); }
.switch input:checked ~ .switch-track { background:linear-gradient(135deg,var(--primary),var(--primary-2)); }
.switch input:checked ~ .switch-track .switch-thumb { transform:translateX(20px); }
.switch input:focus-visible ~ .switch-track { box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 30%,transparent); }

/* ---------- Themed confirm pop-up (replaces the browser's confirm()) ---------- */
.confirm-overlay { position:fixed; inset:0; z-index:95; display:flex; align-items:center; justify-content:center; padding:20px;
  background:rgba(8,16,28,0); backdrop-filter:blur(0px); transition:background .22s var(--ease), backdrop-filter .22s var(--ease); }
.confirm-overlay.open { background:rgba(8,16,28,.55); backdrop-filter:blur(3px); }
.confirm-card { width:min(380px,100%); background:var(--surface); color:var(--text); border-radius:24px; padding:28px 22px 22px; text-align:center;
  box-shadow:0 30px 60px rgba(8,16,28,.35); transform:translateY(18px) scale(.94); opacity:0; transition:transform .22s var(--ease), opacity .22s var(--ease); }
.confirm-overlay.open .confirm-card { transform:translateY(0) scale(1); opacity:1; }
.confirm-icon { width:56px; height:56px; margin:0 auto 14px; border-radius:50%; display:grid; place-items:center; background:color-mix(in srgb,var(--danger) 14%,var(--surface)); color:var(--danger); }
.confirm-text { margin:0 0 20px; font-weight:700; line-height:1.55; overflow-wrap:anywhere; }
.confirm-actions { display:flex; gap:10px; }
.confirm-actions .btn { flex:1; }

/* ---------- A little more premium motion, site-wide ---------- */
.grid > *, .hscroll > * { animation:riseIn .5s var(--ease) both; }
.grid > *:nth-child(2), .hscroll > *:nth-child(2) { animation-delay:.04s; }
.grid > *:nth-child(3), .hscroll > *:nth-child(3) { animation-delay:.08s; }
.grid > *:nth-child(4), .hscroll > *:nth-child(4) { animation-delay:.12s; }
.grid > *:nth-child(5), .hscroll > *:nth-child(5) { animation-delay:.16s; }
.grid > *:nth-child(6), .hscroll > *:nth-child(6) { animation-delay:.2s; }
.section-head h2 { animation:riseIn .4s var(--ease) both; }
.btn-primary, .btn:not(.btn-outline):not(.btn-sm) { position:relative; overflow:hidden; }
.menu-panel { transition:transform .32s cubic-bezier(.22,1,.36,1); }
.push-btn.on { color:var(--lime); }
[data-theme=dark] .push-btn.on { color:var(--lime); }

/* ---------- Fix: an earlier theme pass redefined .btn's background/shadow unconditionally,
   which silently overrode the .btn-outline / .btn-danger / .btn-ok variants (Delete, Logout,
   Edit, etc. all looked identical). Re-assert the variants here, after everything else. ---------- */
.btn-outline { background:transparent !important; color:var(--text) !important; border:1px solid var(--border) !important; box-shadow:none !important; }
.btn-outline:hover { background:var(--surface-2) !important; box-shadow:none !important; }
.btn-outline:active { transform:translateY(2px) !important; box-shadow:none !important; }
.btn-danger { background:linear-gradient(135deg,#f43f5e,#e11d48) !important; color:#fff !important; box-shadow:0 8px 18px rgba(225,29,72,.3) !important; }
.btn-danger:hover { box-shadow:0 10px 22px rgba(225,29,72,.35) !important; }
.btn-danger:active { transform:translateY(3px) !important; box-shadow:0 2px 6px rgba(225,29,72,.3) !important; }
.btn-ok { background:linear-gradient(135deg,#10b981,#059669) !important; color:#fff !important; box-shadow:0 8px 18px rgba(5,150,105,.3) !important; }
.btn-ok:hover { box-shadow:0 10px 22px rgba(5,150,105,.35) !important; }

/* ---------- In-feed / sponsored card ad (sits inline among app cards) ---------- */
.ad-infeed-card { position:relative; overflow:hidden; padding-top:20px; }
.ad-infeed-card::before { content:attr(data-label); position:absolute; top:4px; left:10px; font-size:.65rem; letter-spacing:.5px; color:var(--muted); text-transform:uppercase; }
.ad-infeed-card img, .ad-infeed-card iframe { max-width:100%; }

/* ---------- Smart link countdown pop-up (before a download) ---------- */
.sl-card { width:min(400px,100%); }
.sl-title { margin:0 0 8px; font-size:1.15rem; }
.sl-text { margin-bottom:14px; font-weight:600; color:var(--muted); }
.sl-count { display:flex; align-items:baseline; justify-content:center; gap:8px; margin:6px 0 12px; }
.sl-num { font-size:2.6rem; line-height:1; color:var(--primary); font-variant-numeric:tabular-nums; }
.sl-unit { color:var(--muted); font-weight:700; }
.sl-bar { height:8px; margin-bottom:16px; }
.sl-bar span { display:block; height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg,var(--primary),var(--primary-2)); transition:width .25s linear; }
.sl-reopen { display:block; margin:0 0 14px; color:var(--primary); font-weight:700; font-size:.9rem; text-decoration:underline; }
.sl-reopen[hidden], .sl-count[hidden] { display:none; }
.sl-go.btn-disabled { pointer-events:none; }

/* Ads: banner (always 320x50) under the header + inside the download timer */
.ad-top { padding-top:10px; padding-bottom:0; }
.ad-slot { margin:14px auto; width:320px; max-width:100%; }
.ad-top .ad-slot { margin:0 auto; }
.ad-frame { display:block; width:320px; height:50px; max-width:100%; margin:0 auto; border:0; background:transparent; overflow:hidden; }
.ad-slot.ad-wait::before { display:none; }                       /* no label until an ad really loaded */
.ad-slot.ad-empty { height:0; margin:0; overflow:hidden; }       /* nothing came: no label, no blank gap */
.ad-slot.ad-empty::before { display:none; }
.sl-ad { margin:0 0 14px; }
.sl-ad .ad-slot { margin:0 auto; }
.sl-ad:has(.ad-empty) { margin:0; }
.sl-ad[hidden] { display:none; }

/* Download timer inside the Download button (no pop-up) */
a.dl-busy { position:relative; overflow:hidden; cursor:progress; }
a.dl-busy .dl-fill { position:absolute; left:0; top:0; bottom:0; width:0; background:rgba(255,255,255,.3); transition:width .25s linear; }
a.dl-busy .dl-label { position:relative; display:inline-flex; align-items:baseline; justify-content:center; gap:6px; font-weight:800; }
a.dl-busy .dl-num { font-size:1.15em; font-variant-numeric:tabular-nums; }
.dl-timer-ad { margin:12px 0 0; text-align:center; }
.dl-timer-ad .ad-slot { margin:0 auto; }
