/* =========================================================================
   Home redesign — 9mod-style hero + card grid (scoped to .home-9mod)
   ========================================================================= */
.home-9mod{
  --accent:#16a34a; --accent-dark:#13854a; --accent-soft:#e7f7ee;
  --ink:#1f2937; --muted:#6b7280; --line:#eceff2;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 4px 14px rgba(16,24,40,.06);
  --shadow-lg:0 10px 28px rgba(16,24,40,.12);
  color:var(--ink);
}
.home-9mod *{ box-sizing:border-box; }

/* ---------- HERO SLIDER ---------- */
.home-hero{ margin:0 0 2.5rem; }
.hero-slider{
  display:flex; gap:16px; overflow-x:auto; scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch; padding-bottom:6px;
}
.hero-slider::-webkit-scrollbar{ height:0; }
.hero-slide{ min-width:100%; scroll-snap-align:center; }
.hero-card{
  position:relative; height:260px; border-radius:24px; overflow:hidden;
  display:flex; align-items:center;
}
@media (min-width:768px){ .hero-card{ height:360px; } }
@media (min-width:1024px){ .hero-card{ height:420px; } }
.hero-card__bg{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.38; transition:transform .7s, opacity .7s; }
.hero-card:hover .hero-card__bg{ opacity:.5; transform:scale(1.05); }
.hero-card__veil{ position:absolute; inset:0; background:linear-gradient(90deg,rgba(0,0,0,.82),rgba(0,0,0,.45) 55%,transparent); }
.hero-card__content{ position:relative; z-index:2; padding:0 24px; max-width:640px; }
@media (min-width:768px){ .hero-card__content{ padding:0 48px; } }
.hero-chip{
  display:inline-flex; align-items:center; gap:7px; margin-bottom:14px;
  background:#7c3aed; color:#fff; font-size:11px; font-weight:700; letter-spacing:.3px;
  padding:6px 12px; border-radius:999px; box-shadow:0 6px 16px rgba(124,58,237,.4);
}
.hero-chip .dot{ width:7px; height:7px; border-radius:50%; background:#fff; animation:pulse 1.6s infinite; }
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.35} }
.hero-card__title{ color:#fff; font-weight:800; font-size:1.6rem; line-height:1.15; margin:0 0 10px; letter-spacing:-.01em; }
@media (min-width:768px){ .hero-card__title{ font-size:2.6rem; } }
.hero-card__desc{ color:rgba(255,255,255,.9); font-size:.95rem; line-height:1.5; margin:0 0 16px; max-width:34rem;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.hero-card__stats{ display:flex; align-items:center; gap:14px; color:rgba(255,255,255,.85); font-size:.9rem; margin-bottom:20px; }
.hero-card__stats .star{ color:#fbbf24; }
.hero-dl{
  display:inline-flex; align-items:center; gap:8px;
  background:linear-gradient(135deg,#22c277,#13a55f); color:#fff !important;
  font-weight:700; padding:12px 22px; border-radius:999px; text-decoration:none;
  box-shadow:0 10px 24px rgba(19,165,95,.45); transition:transform .15s, filter .15s;
}
.hero-dl:hover{ transform:translateY(-2px); filter:brightness(1.04); color:#fff; }
.hero-dl svg{ width:18px; height:18px; fill:none; stroke:#fff; stroke-width:2; }
/* gradient themes per slide */
.g-purple{ background:linear-gradient(120deg,#4c1d95,#6d28d9,#3730a3); }
.g-emerald{ background:linear-gradient(120deg,#064e3b,#0f766e,#155e75); }
.g-rose{ background:linear-gradient(120deg,#881337,#9d174d,#7c2d12); }
.g-blue{ background:linear-gradient(120deg,#1e3a8a,#1d4ed8,#0e7490); }
.g-amber{ background:linear-gradient(120deg,#7c2d12,#b45309,#92400e); }

/* ---------- BROWSE CATEGORIES ---------- */
.cat-browse{ margin:0 0 2.5rem; }
.cat-row{ display:flex; gap:14px; overflow-x:auto; padding:4px 2px 10px; scroll-snap-type:x proximity; }
.cat-row::-webkit-scrollbar{ height:6px; }
.cat-row::-webkit-scrollbar-thumb{ background:#d1d5db; border-radius:999px; }
.cat-tile{ flex:0 0 auto; width:92px; display:flex; flex-direction:column; align-items:center; gap:8px; text-decoration:none; scroll-snap-align:start; }
.cat-tile__icon{
  width:68px; height:68px; border-radius:50%; overflow:hidden;
  background:#fff; border:1px solid #e8edf2; padding:0;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 3px 10px rgba(16,24,40,.10);
  transition:transform .18s, box-shadow .18s, border-color .18s;
}
.cat-tile:hover .cat-tile__icon{ transform:translateY(-3px); box-shadow:0 10px 22px rgba(16,24,40,.16); border-color:var(--accent); }
.cat-tile__icon img{ width:100%; height:100%; object-fit:cover; }
.cat-tile__icon .ini{ font-weight:800; font-size:1.5rem; color:var(--accent-dark); }
.cat-tile__name{ font-size:.78rem; font-weight:700; color:var(--ink); line-height:1.15; text-align:center; max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cat-tile:hover .cat-tile__name{ color:var(--accent-dark); }
.cat-tile__count{ font-size:.68rem; color:var(--muted); margin-top:-3px; }

/* ---------- SECTION HEADERS ---------- */
.home-section{ margin:0 0 2.5rem; }
.home-section__head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:1.1rem; }
.home-section__title{
  font-size:1.3rem; font-weight:800; color:var(--ink); margin:0;
  display:inline-flex; align-items:center; gap:9px; position:relative; padding-bottom:8px;
}
@media (min-width:768px){ .home-section__title{ font-size:1.55rem; } }
.home-section__title svg{ width:24px; height:24px; color:var(--accent); fill:currentColor; flex:0 0 auto; }
.home-section__title a{ color:inherit; text-decoration:none; }
.home-section__title::after{ content:""; position:absolute; left:0; bottom:0; width:54px; height:4px; border-radius:4px; background:var(--accent); }
.home-section__sub{ color:var(--muted); font-size:.85rem; margin:6px 0 0; }
.home-viewall{
  display:inline-flex; align-items:center; gap:5px; flex:0 0 auto;
  color:var(--accent-dark); font-weight:700; font-size:.85rem; text-decoration:none;
  background:var(--accent-soft); padding:7px 14px; border-radius:999px; transition:.15s;
}
.home-viewall:hover{ background:#d6f0e0; color:var(--accent-dark); }
.home-viewall svg{ width:14px; height:14px; transition:transform .15s; }
.home-viewall:hover svg{ transform:translateX(3px); }

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

.app-card{
  background:#fff; border:1px solid var(--line); border-radius:16px; overflow:hidden;
  box-shadow:var(--shadow); transition:transform .18s, box-shadow .18s;
}
.app-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-lg); }
.app-card a{ display:block; text-decoration:none; color:inherit; }
.app-card__thumb{
  position:relative; aspect-ratio:1/1; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(180deg,#f8fafc,#f1f5f9); padding:14px;
}
.app-card__thumb img{ width:84px; height:84px; object-fit:cover; border-radius:16px; box-shadow:0 4px 12px rgba(16,24,40,.12); transition:transform .25s; }
.app-card:hover .app-card__thumb img{ transform:scale(1.06); }
.app-card__badge{ position:absolute; top:10px; left:10px; background:#f1e9ff; color:#7c3aed; font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:999px; }
.app-card__body{ padding:11px 12px 13px; }
.app-card__title{ font-size:.85rem; font-weight:700; color:var(--ink); margin:0; line-height:1.3;
  display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.app-card:hover .app-card__title{ color:var(--accent-dark); }
.app-card__meta{ font-size:.72rem; color:var(--muted); margin:6px 0 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.app-card__rate{ display:flex; align-items:center; gap:6px; margin-top:6px; min-width:0; }
.app-card__star{ color:#f59e0b; font-size:.72rem; font-weight:700; white-space:nowrap; flex:0 0 auto; }
.app-card__mod{ font-size:.72rem; color:#9ca3af; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- ARCHIVE / CATEGORY HEADER ---------- */
.archive-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap; margin:0 0 1.25rem; }
.archive-title{ font-size:1.6rem; font-weight:800; color:var(--ink); margin:0; letter-spacing:-.01em; display:flex; align-items:center; gap:10px; }
.archive-title svg{ width:26px; height:26px; fill:var(--accent); flex:0 0 auto; }
@media (min-width:768px){ .archive-title{ font-size:2rem; } .archive-title svg{ width:30px; height:30px; } }
.archive-count{ color:var(--muted); font-size:.9rem; margin:6px 0 0; }
.archive-count b{ color:var(--ink); }
.archive-desc{ color:#475569; font-size:.92rem; line-height:1.6; margin:0 0 1.5rem; background:#f8fafc; border:1px solid var(--line); border-radius:12px; padding:12px 16px; }

/* sort tabs */
.sort-tabs{ display:flex; flex-wrap:wrap; gap:8px; }
.sort-tab{
  display:inline-flex; align-items:center; font-size:.82rem; font-weight:600; text-decoration:none;
  padding:8px 15px; border-radius:999px; color:var(--muted); background:#f1f5f9; transition:.15s; white-space:nowrap;
}
.sort-tab:hover{ background:#e2e8f0; color:var(--ink); }
.sort-tab.is-active{ background:var(--accent); color:#fff; box-shadow:0 4px 12px rgba(22,163,74,.3); }

/* ---------- PAGINATION ---------- */
.home-9mod .nav-pagination{ margin:28px 0 8px; }
.home-9mod .pagination{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; list-style:none; padding:0; margin:0; }
.home-9mod .page-item{ margin:0; }
.home-9mod .page-link{
  display:inline-flex; align-items:center; justify-content:center; min-width:42px; height:42px; padding:0 12px;
  border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); font-weight:600; font-size:.9rem;
  text-decoration:none; transition:.15s; box-shadow:var(--shadow);
}
.home-9mod .page-link:hover{ border-color:var(--accent); color:var(--accent-dark); background:var(--accent-soft); }
.home-9mod .page-item.active .page-link{ background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:0 6px 16px rgba(22,163,74,.35); }
.home-9mod .page-link svg{ width:13px; height:13px; fill:currentColor; }

/* ---------- ABOUT (bottom of homepage) ---------- */
.home-about{
  background:#fff; border:1px solid var(--line); border-radius:16px;
  padding:26px 24px; margin:2.5rem 0 1rem; box-shadow:var(--shadow);
}
@media (min-width:768px){ .home-about{ padding:34px 38px; } }
.home-about h2{
  font-size:1.4rem; font-weight:800; color:var(--ink); margin:0 0 16px;
  position:relative; padding-bottom:12px;
}
@media (min-width:768px){ .home-about h2{ font-size:1.7rem; } }
.home-about h2::after{ content:""; position:absolute; left:0; bottom:0; width:56px; height:4px; border-radius:4px; background:var(--accent); }
.home-about p{ color:#475569; font-size:.96rem; line-height:1.75; margin:0 0 14px; max-width:80ch; }
.home-about p:last-child{ margin-bottom:0; }
