:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1c2333;
  --muted: #667085;
  --line: #e4e8f0;
  --brand: #12a37f;
  --brand-dark: #0c7d61;
  --accent: #2f6fed;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --card: #171e2d;
    --text: #e6e9f0;
    --muted: #98a2b3;
    --line: #273042;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* Header */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 600; white-space: nowrap; }
.logo b { color: var(--brand); }
.logo-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; font-weight: 700;
}
.search { flex: 1; display: flex; max-width: 460px; }
.search input {
  flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-right: 0;
  border-radius: 10px 0 0 10px; background: var(--bg); color: var(--text); font-size: 15px;
}
.search button {
  padding: 0 16px; border: 0; border-radius: 0 10px 10px 0; background: var(--brand); color: #fff;
  font-weight: 600; cursor: pointer;
}
.search button:hover { background: var(--brand-dark); }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--brand); }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; font-size: 24px; color: var(--text); cursor: pointer; }

/* Hero */
.hero {
  margin: 28px 0; padding: 36px; border-radius: 18px; color: #fff;
  background: linear-gradient(120deg, #0c7d61, #2f6fed);
}
.hero h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.2; }
.hero ul { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.hero li::before { content: "✔ "; }

/* Layout */
.layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; margin-bottom: 40px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.panel h3 { margin: 0 0 12px; font-size: 16px; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.cat-list a:hover, .cat-list a.active { background: var(--bg); color: var(--brand); }

.section-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px; }
.section-head h2, .section-head h1 { margin: 0; font-size: 22px; }
.side-title { margin: 0 0 12px; font-size: 16px; }
.intro { color: var(--muted); margin: -6px 0 14px; }
.link { color: var(--accent); }
.prose h2 { margin-top: 0; }
.prose h3 { margin: 22px 0 8px; }
.prose details { border-top: 1px solid var(--line); padding: 10px 0; }
.prose summary { cursor: pointer; font-weight: 600; }
.prose details p { margin: 8px 0 0; color: var(--muted); }
.page h2 { font-size: 19px; margin: 22px 0 8px; }
.app-icon img { width: 70%; height: 70%; object-fit: contain; }
.app-icon.has-img { background: #fff !important; border: 1px solid var(--line); }
.contact-form .field input, .contact-form .field textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit;
}
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.field small { font-weight: 400; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.btn-primary { padding: 11px 22px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.btn-primary:hover { background: var(--brand-dark); }
.winget-box { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.cmd { display: flex; gap: 8px; align-items: stretch; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 10px 12px; border-radius: 8px; background: #0f1420; color: #d7f5ea; font-size: 14px; }
.copy-btn { padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.copy-btn:hover { border-color: var(--brand); color: var(--brand); }
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 2px 0; font-size: 14px; }
.share-bar a { color: var(--accent); font-weight: 500; }
.share-bar .report { margin-left: auto; color: var(--muted); }
.bulk { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 18px 0; }
.bulk-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 10px 14px 14px; margin: 0; }
.bulk-group legend { font-weight: 700; padding: 0 6px; }
.bulk-item { display: flex; align-items: center; gap: 10px; padding: 6px 4px; cursor: pointer; border-radius: 8px; }
.bulk-item:hover { background: var(--bg); }
.bulk-item .app-icon { width: 30px; height: 30px; font-size: 14px; border-radius: 8px; }
.bulk-out { position: sticky; bottom: 12px; margin-bottom: 40px; box-shadow: 0 8px 30px rgba(16, 24, 40, .18); }
.bulk-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.bulk-head .btn-primary { margin-left: auto; }
.btn-primary:disabled, .chip:disabled { opacity: .5; cursor: not-allowed; }
.cmd-block { margin: 0; padding: 12px; border-radius: 8px; background: #0f1420; color: #d7f5ea; font-size: 13px; white-space: pre-wrap; word-break: break-all; max-height: 140px; overflow: auto; }
.form-error { padding: 10px 14px; border-radius: 9px; background: #fdecec; color: #b42318; }
h1 { line-height: 1.25; }
.section-head a { color: var(--accent); font-weight: 500; }
.section { margin-bottom: 32px; }

/* App cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card {
  display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--brand); }
.card-title { font-weight: 600; }
.card-meta { font-size: 13px; color: var(--muted); }
.app-icon {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  color: #fff; font-weight: 700; font-size: 20px;
}
.app-icon.lg { width: 88px; height: 88px; font-size: 38px; border-radius: 20px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #e7f6f1; color: var(--brand-dark); }
.badge.trial { background: #fff4e5; color: #b54708; }
.badge.paid { background: #fdecec; color: #b42318; }

/* List rows */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.row-body { flex: 1; min-width: 0; }
.row-side { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Detail page */
.crumbs { margin: 22px 0 14px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--accent); }
.detail-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.detail-head h1 { margin: 0; font-size: 28px; }
.detail-head .by { color: var(--muted); }
.dl-btn {
  margin-left: auto; display: inline-flex; flex-direction: column; align-items: center; padding: 14px 28px;
  border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; font-size: 17px;
}
.dl-btn small { font-weight: 400; font-size: 12px; opacity: .9; }
.dl-btn:hover { background: var(--brand-dark); }
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; margin: 24px 0 40px; }
.detail-grid h2 { font-size: 20px; margin: 0 0 10px; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.proscons ul { margin: 0; padding-left: 18px; }
.pros h3 { color: var(--brand); }
.cons h3 { color: #d92d20; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs td:first-child { color: var(--muted); width: 45%; }
.old-list { list-style: none; padding: 0; margin: 0; }
.old-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.old-list a { color: var(--accent); }
.stars { color: #f5a524; letter-spacing: 1px; }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { display: inline-block; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; font-size: 14px; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 40px; }
.cat-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; font-weight: 600; }
.cat-tile span { display: block; font-size: 30px; margin-bottom: 6px; }
.cat-tile small { color: var(--muted); font-weight: 400; }
.cat-tile:hover { border-color: var(--brand); }

.page { max-width: 760px; margin: 30px auto 50px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--card); padding: 28px 0 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer p { color: var(--muted); margin: 8px 0 0; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.copy { font-size: 13px; margin-top: 20px !important; }

/* Responsive */
@media (max-width: 900px) {
  .layout, .detail-grid { grid-template-columns: 1fr; }
  .layout aside { order: 2; }
}
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .menu-btn { display: block; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; gap: 10px; order: 4; margin: 0; }
  .nav.open { display: flex; }
  .hero { padding: 24px; }
  .hero h1 { font-size: 24px; }
  .dl-btn { margin-left: 0; width: 100%; }
  .proscons { grid-template-columns: 1fr; }
  .row-side { display: none; }
}
