/* =====================================================================
   Sims4Customs — Global stylesheet
   Mobile-first, lightweight, no frameworks. Identity follows the
   original design: clean, modern, green accent, white cards, rounded.
   ===================================================================== */

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-700: #047857;
  --primary-800: #065f46;
  --primary-soft: #d1fae5;
  --accent: #06b6d4;
  --bg: #f1f5f9;
  --bg-deep: #0f172a;
  --card: #ffffff;
  --text: #1e293b;
  --text-strong: #0f172a;
  --text-secondary: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 6px 16px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.12), 0 6px 16px rgba(15, 23, 42, 0.08);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h: 64px;
  --font: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 80% 0%, rgba(16, 185, 129, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 100%, rgba(6, 182, 212, 0.05) 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--primary-700); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* ------------------------------------------------------------------ */
/* Accessibility helpers                                                */
/* ------------------------------------------------------------------ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

button { font-family: inherit; cursor: pointer; }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 0.95rem;
  border-radius: 50px; border: 2px solid transparent; padding: 12px 22px;
  transition: transform var(--ease) 0.15s, box-shadow var(--ease) 0.15s, background var(--ease) 0.15s;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-primary:hover { color: #fff; box-shadow: 0 8px 22px rgba(16, 185, 129, 0.5); transform: translateY(-1px); }

.btn-outline {
  background: #fff; border-color: var(--border-strong); color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--primary-dark); background: rgba(16, 185, 129, 0.06); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; min-height: 38px; }

/* ------------------------------------------------------------------ */
/* Badges & chips                                                      */
/* ------------------------------------------------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 11px; border-radius: 50px; white-space: nowrap;
  border: 1px solid transparent;
}
.badge-type { background: var(--primary-soft); color: var(--primary-700); }
.badge-type.mod { background: #cffafe; color: #0e7490; }
.badge-type.pack { background: #ede9fe; color: #6d28d9; }
.badge-type.cheat { background: #fef3c7; color: #b45309; }
.badge-cat { background: #f1f5f9; color: var(--text-secondary); }
.badge-cat:hover { background: var(--primary-soft); color: var(--primary-700); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 50px; border: 2px solid var(--border);
  background: var(--card); color: var(--text-secondary);
  font-family: inherit; font-weight: 600; font-size: 0.85rem;
  transition: transform var(--ease-bounce) 0.15s, border-color var(--ease) 0.15s, background var(--ease) 0.15s, color var(--ease) 0.15s;
  white-space: nowrap; min-height: 40px;
}
.chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.active:hover { color: #fff; }

/* ------------------------------------------------------------------ */
/* Navbar                                                              */
/* ------------------------------------------------------------------ */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  transition: box-shadow var(--ease) 0.2s, background var(--ease) 0.2s;
}
.navbar.scrolled { background: rgba(255, 255, 255, 0.96); box-shadow: var(--shadow); }

.navbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 20px;
  height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-strong); font-weight: 900; font-size: 1.2rem; white-space: nowrap; }
.brand:hover { color: var(--text-strong); }
.brand-logo {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35); flex-shrink: 0;
}

.nav-links { display: none; align-items: center; gap: 2px; list-style: none; }

.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px; border: 0; background: transparent;
  color: var(--text-secondary); font-family: inherit; font-weight: 600; font-size: 0.95rem;
  transition: color var(--ease) 0.15s, background var(--ease) 0.15s;
  min-height: 42px; text-decoration: none;
}
.nav-item.has-menu .nav-link { padding-right: 4px; }
.nav-link:hover { color: var(--primary-dark); background: rgba(16, 185, 129, 0.06); }
.nav-link.active { color: var(--primary-700); background: rgba(16, 185, 129, 0.1); }
.nav-link .caret { transition: transform var(--ease) 0.2s; font-size: 0.7em; }

.nav-item.has-menu[aria-expanded='true'] .caret { transform: rotate(180deg); }

/* Desktop dropdown */
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--ease) 0.18s, transform var(--ease) 0.18s, visibility var(--ease) 0.18s;
  z-index: 100;
}
.nav-item.has-menu:hover .dropdown,
.nav-item.has-menu:focus-within .dropdown,
.nav-item.has-menu .nav-caret-btn[aria-expanded='true'] ~ .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-caret-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent;
  color: var(--text-light); margin-left: 0;
  transition: color var(--ease) 0.15s, background var(--ease) 0.15s;
}
.nav-caret-btn svg { width: 16px; height: 16px; }
.nav-caret-btn:hover { color: var(--primary-dark); background: rgba(16, 185, 129, 0.08); }
.nav-caret-btn .caret { transition: transform var(--ease) 0.2s; display: inline-block; }
.nav-caret-btn[aria-expanded='true'] .caret { transform: rotate(180deg); }

.dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; color: var(--text-secondary);
  font-size: 0.9rem; font-weight: 500; text-decoration: none;
  transition: background var(--ease) 0.12s, color var(--ease) 0.12s;
}
.dropdown a:hover { background: #f1f5f9; color: var(--primary-dark); }
.dropdown .dd-head {
  display: block; padding: 9px 12px; font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); pointer-events: none;
}

/* Mobile toggle */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; color: var(--text); font-size: 1.15rem;
}
.nav-toggle[aria-expanded='true'] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Mobile menu panel */
.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; background: #fff; z-index: 999;
  overflow-y: auto; padding: 16px;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity var(--ease) 0.2s, transform var(--ease) 0.2s, visibility var(--ease) 0.2s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }

.mobile-menu ul { list-style: none; }
.mobile-menu .mm-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 6px; font-weight: 700; color: var(--text-strong);
  font-size: 1.05rem; border: 0; background: none; width: 100%; text-align: left;
  border-bottom: 1px solid var(--border); font-family: inherit;
  min-height: 48px;
}
.mobile-menu .mm-link .caret { transition: transform var(--ease) 0.2s; color: var(--text-light); }
.mobile-menu .mm-sub { display: none; padding: 4px 0 12px 12px; }
.mobile-menu .mm-sub.open { display: block; }
.mobile-menu .mm-link[aria-expanded='true'] .caret { transform: rotate(180deg); }
.mobile-menu .mm-sub a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 8px; color: var(--text-secondary); font-weight: 500;
  border-radius: 10px;
}
.mobile-menu .mm-sub a:hover { background: #f8fafc; color: var(--primary-dark); }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero { text-align: center; padding: 40px 0 8px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16, 185, 129, 0.08); color: var(--primary-700);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 7px 16px; border-radius: 50px; font-weight: 700; font-size: 0.85rem;
}
.pulse-dot { width: 9px; height: 9px; background: #22c55e; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  50% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 900; letter-spacing: -0.02em;
  color: var(--text-strong); line-height: 1.15; margin: 18px 0 10px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--text-secondary); font-size: 1.05rem; max-width: 620px; margin: 0 auto 24px; }

.hero-stats { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; margin-top: 8px; }
.hero-stat { min-width: 110px; }
.hero-stat .stat-number { font-size: 1.7rem; font-weight: 900; color: var(--primary-dark); display: block; line-height: 1.2; }
.hero-stat .stat-label { font-size: 0.82rem; color: var(--text-secondary); font-weight: 500; }

/* Hero search (home) */
.hero-search { max-width: 560px; margin: 26px auto 0; position: relative; }
.hero-search input {
  width: 100%; padding: 16px 52px 16px 20px; border-radius: 50px;
  border: 2px solid var(--border); background: #fff; font-family: inherit;
  font-size: 1rem; color: var(--text); box-shadow: var(--shadow-sm);
  transition: border-color var(--ease) 0.15s, box-shadow var(--ease) 0.15s;
}
.hero-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12); }
.hero-search .search-submit {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; display: grid; place-items: center;
}

/* Live search results dropdown */
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 200; text-align: left;
  display: none; max-height: 380px; overflow-y: auto;
}
.search-results.open { display: block; }
.search-result {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9; color: var(--text); text-decoration: none;
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: #f8fafc; }
.search-result .sr-icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  background: #e2e8f0; overflow: hidden; display: grid; place-items: center;
}
.search-result .sr-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-result .sr-icon svg { width: 20px; height: 20px; color: #94a3b8; }
.search-result .sr-text { display: flex; flex-direction: column; min-width: 0; }
.search-result .sr-name { font-weight: 700; font-size: 0.92rem; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result .sr-meta { font-size: 0.78rem; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results .sr-empty { padding: 20px; text-align: center; color: var(--text-light); font-size: 0.9rem; }

/* ------------------------------------------------------------------ */
/* Section cards (home)                                                 */
/* ------------------------------------------------------------------ */
.section-cards { display: grid; gap: 16px; margin: 30px 0 0; }

.section-card {
  position: relative; display: flex; align-items: center; gap: 18px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 20px; box-shadow: var(--shadow-sm); overflow: hidden;
  color: var(--text); text-decoration: none;
  transition: transform var(--ease) 0.18s, box-shadow var(--ease) 0.18s, border-color var(--ease) 0.18s;
}
.section-card:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-light, var(--primary)); }
.section-card .sc-icon {
  width: 76px; height: 76px; border-radius: 18px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  transition: transform var(--ease-bounce) 0.2s;
}
.section-card .sc-icon svg { width: 38px; height: 38px; }
.section-card:hover .sc-icon { transform: scale(1.06) rotate(-3deg); }
.section-card--cc .sc-icon { background: linear-gradient(135deg, #10b981, #06b6d4); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35); }
.section-card--mods .sc-icon { background: linear-gradient(135deg, #0ea5e9, #6366f1); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35); }
.section-card--packs .sc-icon { background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35); }
.section-card--cheats .sc-icon { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35); }
.section-card .sc-body { flex: 1; min-width: 0; }
.section-card .sc-title { font-weight: 900; font-size: 1.15rem; color: var(--text-strong); display: flex; align-items: center; gap: 8px; }
.section-card .sc-desc { font-size: 0.85rem; color: var(--text-secondary); margin-top: 2px; }
.section-card .sc-count {
  font-size: 0.75rem; font-weight: 700; color: var(--primary-700);
  background: var(--primary-soft); padding: 3px 10px; border-radius: 50px;
}
.section-card .sc-arrow { color: var(--text-light); font-size: 1.1rem; flex-shrink: 0; transition: transform var(--ease) 0.18s; }
.section-card:hover .sc-arrow { transform: translateX(4px); color: var(--primary); }

/* ------------------------------------------------------------------ */
/* Page header (section / category)                                    */
/* ------------------------------------------------------------------ */
.page-header { padding: 34px 0 10px; }
.page-header .ph-kicker { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary-700); margin-bottom: 6px; }
.page-header h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 900; color: var(--text-strong); letter-spacing: -0.01em; }
.page-header p { color: var(--text-secondary); max-width: 720px; margin-top: 8px; font-size: 1rem; }

/* ------------------------------------------------------------------ */
/* Breadcrumbs                                                         */
/* ------------------------------------------------------------------ */
.breadcrumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 0.82rem; color: var(--text-light); padding: 14px 0 0;
  list-style: none;
}
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs a { color: var(--text-secondary); font-weight: 500; }
.breadcrumbs a:hover { color: var(--primary-dark); }
.breadcrumbs .sep { color: var(--text-light); }
.breadcrumbs .current { color: var(--text-strong); font-weight: 600; }

/* ------------------------------------------------------------------ */
/* Control bar (search + filters)                                      */
/* ------------------------------------------------------------------ */
.control-bar {
  display: flex; flex-direction: column; gap: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; margin: 22px 0 24px; box-shadow: var(--shadow-sm);
}
.control-row { display: flex; flex-direction: column; gap: 10px; }

.search-box { position: relative; flex: 1; min-width: 0; }
.search-box input {
  width: 100%; padding: 12px 44px 12px 16px; border-radius: 50px;
  border: 2px solid var(--border); background: #f8fafc; font-family: inherit;
  font-size: 0.95rem; color: var(--text); transition: border-color var(--ease) 0.15s, background var(--ease) 0.15s, box-shadow var(--ease) 0.15s;
}
.search-box input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1); }
.search-box .search-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-light); pointer-events: none; }

.filter-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.sort-box { display: flex; align-items: center; gap: 8px; }
.sort-box label { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); white-space: nowrap; }
.sort-box select {
  font-family: inherit; font-size: 0.9rem; color: var(--text);
  padding: 9px 34px 9px 14px; border-radius: 50px; border: 2px solid var(--border);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}

.result-count { font-size: 0.85rem; color: var(--text-light); font-weight: 600; }
.result-count b { color: var(--text-strong); }

/* ------------------------------------------------------------------ */
/* Folder grid                                                         */
/* ------------------------------------------------------------------ */
.folders-grid {
  display: grid; gap: 18px; align-items: stretch;
  grid-template-columns: 1fr;
  padding-bottom: 40px;
}

/* Folder card — fixed-height, image-led, action row anchored bottom */
.folder-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; overflow: hidden; height: 100%;
  transition: transform var(--ease) 0.18s, box-shadow var(--ease) 0.18s, border-color var(--ease) 0.18s;
}
.folder-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.fc-media {
  position: relative; display: block; aspect-ratio: 4 / 3;
  background: #e2e8f0; overflow: hidden;
}
.fc-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform var(--ease) 0.45s;
}
.folder-card:hover .fc-media img { transform: scale(1.05); }
.fc-media-badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 50px;
  background: rgba(15, 23, 42, 0.72); color: #fff;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}

.fc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; min-width: 0; }

.fc-title {
  font-size: 1.02rem; font-weight: 800; color: var(--text-strong); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-decoration: none;
  min-height: 2.66em; /* title area holds two lines regardless of title length */
}
.fc-title:hover { color: var(--primary-dark); }
.fc-badges { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.fc-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fc-stat {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px;
  padding: 5px 10px; font-size: 0.78rem; font-weight: 600; color: var(--text-secondary);
}
.fc-stat svg { color: var(--text-light); flex-shrink: 0; width: 14px; height: 14px; }

.fc-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 14px; align-items: stretch; }

.like-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 14px; border-radius: 50px; border: 2px solid var(--border);
  background: #fff; color: var(--text-secondary); font-weight: 700; font-size: 0.9rem;
  transition: transform var(--ease-bounce) 0.2s, border-color var(--ease) 0.15s, color var(--ease) 0.15s, background var(--ease) 0.15s;
  min-height: 44px; white-space: nowrap; flex: 0 0 auto;
}
.like-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.like-btn:not(.liked) svg { fill: none; color: #f43f5e; }
.like-btn.liked svg { fill: currentColor; }
.like-btn:hover { border-color: #f87171; color: #dc2626; }
.like-btn.liked { background: linear-gradient(135deg, #f43f5e, #e11d48); border-color: #e11d48; color: #fff; }
.like-btn.liked:hover { color: #fff; }
.like-btn .heart { font-size: 1rem; line-height: 1; }
.like-btn .like-count { font-variant-numeric: tabular-nums; }

.download-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border: 0; border-radius: 50px; padding: 12px 16px;
  font-family: inherit; font-weight: 800; font-size: 0.86rem; letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transition: transform var(--ease-bounce) 0.18s, box-shadow var(--ease) 0.18s;
  min-height: 44px; width: auto; flex: 1 1 auto; min-width: 0;
}
.download-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.download-btn:hover { box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5); transform: translateY(-2px); }
.download-btn:active { transform: translateY(0) scale(0.98); }

/* Load more / pagination */
.load-more-wrap { text-align: center; padding: 10px 0 46px; }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; padding: 10px 0 46px; }
.pager button, .pager .page-dots {
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; color: var(--text-secondary);
  font-weight: 700; font-size: 0.9rem; font-family: inherit;
  transition: background var(--ease) 0.12s, color var(--ease) 0.12s, border-color var(--ease) 0.12s;
}
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-dark); }
.pager button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: 0.45; cursor: default; }
.pager .page-dots { border: 0; background: none; color: var(--text-light); }

.is-hidden { display: none !important; }

/* ------------------------------------------------------------------ */
/* No results                                                          */
/* ------------------------------------------------------------------ */
.no-results { text-align: center; padding: 50px 16px; display: none; }
.no-results.show { display: block; }
.no-results .nr-icon { font-size: 3.4rem; margin-bottom: 12px; }
.no-results h3 { color: var(--text-secondary); font-weight: 800; }
.no-results p { color: var(--text-light); font-size: 0.92rem; margin-top: 4px; }

/* ------------------------------------------------------------------ */
/* Folder detail page                                                  */
/* ------------------------------------------------------------------ */
.folder-detail { padding-bottom: 40px; }
.detail-hero {
  background: linear-gradient(135deg, #064e3b, #022c22);
  border-radius: var(--radius-lg); padding: 28px 26px; color: #fff; position: relative; overflow: hidden;
  margin-top: 20px;
  display: grid; gap: 22px; grid-template-columns: 1fr; align-items: center;
}
.detail-hero::before {
  content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4), transparent 70%);
  top: -110px; right: -110px; pointer-events: none;
}
.detail-hero .dh-info { position: relative; z-index: 1; min-width: 0; }
.detail-hero .dh-media { position: relative; z-index: 1; }
.detail-hero .dh-media img {
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  max-height: 320px;
  border-radius: var(--radius); border: 4px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-lg); background: rgba(255, 255, 255, 0.08);
}
.detail-hero .dh-kicker { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; }
.detail-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; margin: 8px 0 6px; letter-spacing: -0.01em; }
.detail-hero p { opacity: 0.9; max-width: 720px; }
.detail-hero .dh-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.detail-hero .dh-badges .badge { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }

.detail-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px;
}
.detail-stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm); text-align: center;
}
.detail-stat .ds-value { font-size: 1.4rem; font-weight: 900; color: var(--text-strong); line-height: 1.2; }
.detail-stat .ds-label { font-size: 0.78rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

.detail-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.detail-actions .like-btn { justify-content: center; }

.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.detail-tags .badge { background: #f1f5f9; color: var(--text-secondary); }

/* Description + How to Use (data-driven per-folder section) */
.detail-info {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-sm);
  display: grid; gap: 26px; grid-template-columns: 1fr;
}
.detail-info .di-block { min-width: 0; }
.detail-info h3 {
  font-size: 0.92rem; font-weight: 900; color: var(--text-strong);
  letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 12px;
}
.detail-info p { color: var(--text-secondary); line-height: 1.75; margin: 0; }
.detail-info ol {
  margin: 0; padding: 0; list-style: none; counter-reset: step;
  display: flex; flex-direction: column; gap: 10px;
}
.detail-info ol li {
  counter-increment: step; position: relative; padding-left: 40px;
  color: var(--text-secondary); line-height: 1.6;
}
.detail-info ol li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 900px) {
  .detail-info { grid-template-columns: 1.15fr 0.85fr; }
}

.detail-section { margin-top: 30px; }
.detail-section h2 { font-size: 1.3rem; font-weight: 900; color: var(--text-strong); margin-bottom: 14px; }
.detail-section .rel-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-section .rel-cats a {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px;
  border-radius: 50px; border: 2px solid var(--border); background: #fff;
  color: var(--text-secondary); font-weight: 700; font-size: 0.86rem;
  transition: border-color var(--ease) 0.15s, color var(--ease) 0.15s;
}
.detail-section .rel-cats a:hover { border-color: var(--primary); color: var(--primary-dark); }

/* ------------------------------------------------------------------ */
/* Home sections                                                       */
/* ------------------------------------------------------------------ */
.home-section { padding: 34px 0 0; }
.home-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.home-section-head h2 { font-size: 1.4rem; font-weight: 900; color: var(--text-strong); }
.home-section-head .see-all { font-size: 0.88rem; font-weight: 700; color: var(--primary-700); white-space: nowrap; }
.home-section-head .see-all:hover { color: var(--primary-dark); }

/* ------------------------------------------------------------------ */
/* Cheats                                                              */
/* ------------------------------------------------------------------ */
.cheat-card {
  display: flex; flex-direction: column; gap: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm);
  transition: transform var(--ease) 0.16s, box-shadow var(--ease) 0.16s, border-color var(--ease) 0.16s;
}
.cheat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.cheat-card .cc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cheat-card .cc-title { font-weight: 800; color: var(--text-strong); font-size: 0.98rem; }
.cheat-card .cc-desc { color: var(--text-secondary); font-size: 0.88rem; flex: 1; }
.cheat-card .cc-code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.92rem; font-weight: 700; color: #0f766e;
  background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px;
  padding: 10px 14px; word-break: break-word;
  display: flex; align-items: center; gap: 10px; min-height: 46px;
}
.cheat-card .cc-code code { word-break: break-word; }
.cheat-card.is-locked .cc-code {
  background: #f8fafc; border-color: var(--border); color: var(--text-light);
}
.cheat-card.is-locked .cc-code code.masked { color: var(--text-light); letter-spacing: 0.04em; }
.cc-lock-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: #fef3c7; color: #b45309;
}
.cc-lock-badge svg { width: 16px; height: 16px; }
.cheat-card .cc-note { font-size: 0.78rem; color: var(--text-light); }
.cheat-card .cc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px;
  border-radius: 50px; border: 2px solid var(--border); background: #fff;
  font-family: inherit; font-weight: 700; font-size: 0.84rem; color: var(--text-secondary);
  transition: border-color var(--ease) 0.15s, color var(--ease) 0.15s, background var(--ease) 0.15s;
}
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.copy-btn.copied { border-color: var(--primary); background: var(--primary); color: #fff; }
.copy-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.copy-btn:disabled:hover { border-color: var(--border); color: var(--text-secondary); }

.show-code-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px;
  border-radius: 50px; border: 2px solid var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-family: inherit; font-weight: 800; font-size: 0.84rem; letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: transform var(--ease-bounce) 0.18s, box-shadow var(--ease) 0.18s;
}
.show-code-btn svg { width: 15px; height: 15px; }
.show-code-btn:hover { box-shadow: 0 8px 18px rgba(16, 185, 129, 0.45); transform: translateY(-1px); }
.show-code-btn:active { transform: translateY(0) scale(0.97); }

.cheats-grid { display: grid; gap: 14px; grid-template-columns: 1fr; padding-bottom: 40px; }

.cheats-tip {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius);
  padding: 14px 16px; color: #92400e; font-size: 0.9rem; margin-bottom: 18px;
}

/* ------------------------------------------------------------------ */
/* Related / generic section block                                     */
/* ------------------------------------------------------------------ */
.section-block { padding-bottom: 10px; }

/* ------------------------------------------------------------------ */
/* Modal (content locker)                                              */
/* ------------------------------------------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px); z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; visibility: hidden; transition: opacity var(--ease) 0.2s, visibility var(--ease) 0.2s;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }

.modal {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px; max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 24px; transform: translateY(14px) scale(0.98);
  transition: transform var(--ease-bounce) 0.25s;
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { font-size: 1.15rem; font-weight: 900; color: var(--text-strong); line-height: 1.3; }
.modal-close {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; color: var(--text-light); font-size: 1.1rem; flex-shrink: 0;
  display: grid; place-items: center;
}
.modal-close:hover { color: #dc2626; border-color: #fecaca; }

.locker-step { display: none; }
.locker-step.active { display: block; }

.locker-note { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 16px; }
.locker-note b { color: var(--text-strong); }

.locker-demo {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 22px 18px; text-align: center; background: #f8fafc;
}
.locker-demo .ld-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); margin-bottom: 8px; }
.locker-demo .ld-title { font-weight: 800; color: var(--text-strong); font-size: 1rem; }
.locker-demo .ld-desc { font-size: 0.85rem; color: var(--text-secondary); margin: 8px 0 16px; }
.locker-demo .btn { width: 100%; }

/* Real embed slot — AdBlueMedia iframe/script goes here */
#s4c-locker-container { width: 100%; }
#s4c-locker-container iframe { width: 100%; min-height: 320px; border: 0; border-radius: var(--radius); }

.locker-unlock {
  text-align: center; padding: 10px 0;
}
.locker-unlock .lu-check {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; display: grid; place-items: center; font-size: 1.7rem;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.45);
}
.locker-unlock h4 { font-size: 1.1rem; font-weight: 900; color: var(--text-strong); }
.locker-unlock p { font-size: 0.88rem; color: var(--text-secondary); margin: 6px 0 18px; }
.locker-unlock .btn { width: 100%; }
.locker-unlock .lu-file { font-size: 0.8rem; color: var(--text-light); margin-top: 12px; word-break: break-all; }

/* ------------------------------------------------------------------ */
/* Toast                                                               */
/* ------------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(130px);
  background: var(--bg-deep); color: #fff; padding: 13px 26px; border-radius: 50px;
  font-weight: 700; font-size: 0.92rem; z-index: 3000; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg); transition: transform var(--ease) 0.4s;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--primary-dark); }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.footer {
  background: #0f172a; color: #94a3b8; margin-top: 40px;
  padding: 36px 0 24px; font-size: 0.88rem;
}
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 10px; font-weight: 800; }
.footer a { color: #94a3b8; display: inline-flex; align-items: center; gap: 6px; padding: 3px 0; }
.footer a:hover { color: var(--primary-light, #34d399); }
.footer-col { min-width: 0; }
.footer-brand p { margin-top: 8px; max-width: 320px; color: #64748b; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 28px; padding-top: 18px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.footer-bottom a { color: #cbd5e1; font-weight: 700; }
.footer-bottom .demo-note { color: #64748b; font-size: 0.78rem; }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (min-width: 640px) {
  .container { padding: 0 24px; }
  .folders-grid { grid-template-columns: repeat(2, 1fr); }
  .cheats-grid { grid-template-columns: repeat(2, 1fr); }
  .section-cards { grid-template-columns: repeat(2, 1fr); }
  .control-row { flex-direction: row; align-items: center; }
  .detail-stats { grid-template-columns: repeat(4, 1fr); }
  .detail-actions { flex-direction: row; align-items: center; }
  .detail-actions .download-btn { flex: 1; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none; }
  .folders-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-hero { grid-template-columns: 1.15fr 0.85fr; }
}

@media (min-width: 1180px) {
  .folders-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 56px 0 12px; }
}

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