:root {
  --ink: #111;
  --muted: #667085;
  --line: #e8eaef;
  --bg: #fff;
  --soft: #f4f7fb;
  --blue: #0b67c2;
  --blue-deep: #084e96;
  --green: #1b8a4a;
  --amber: #f5b400;
  --trust: #eaf4fb;
  --shadow: 0 8px 24px rgba(17, 17, 17, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input { font-family: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wide { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #6ecbff, #0b67c2);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
  color: #333;
}
.nav-links a:hover { color: var(--blue); }
.nav-links details { position: relative; }
.nav-links summary {
  list-style: none;
  cursor: pointer;
}
.nav-links summary::-webkit-details-marker { display: none; }
.dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 380px;
  z-index: 40;
}
.dropdown a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
}
.dropdown a:hover { background: var(--soft); color: var(--blue); }
.header-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  min-width: 220px;
}
.header-search input {
  border: 0;
  padding: 8px 14px;
  width: 180px;
  outline: none;
  font-size: 0.88rem;
}
.header-search button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--muted);
}
.menu-btn {
  display: none;
  background: none;
  border: 0;
  font-size: 1.4rem;
  cursor: pointer;
}

.trust-bar {
  background: var(--trust);
  color: #4d6b80;
  text-align: center;
  font-size: 0.86rem;
  padding: 9px 16px;
}
.trust-bar b { color: #2b4556; font-weight: 600; }

/* Hero */
.hero {
  padding: 56px 24px 28px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  max-width: 18ch;
  margin: 0 auto;
}
.hero-search {
  display: flex;
  max-width: 640px;
  margin: 28px auto 0;
  border: 1px solid #d9dee6;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.hero-search input {
  flex: 1;
  border: 0;
  padding: 14px 22px;
  font-size: 1rem;
  outline: none;
}
.hero-search button {
  border: 0;
  background: transparent;
  padding: 0 20px;
  cursor: pointer;
  color: #888;
  font-size: 1.1rem;
}

/* Sections */
.section { padding: 18px 0 8px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}
.section-head h2 { font-size: 1.35rem; }
.more {
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 600;
}
.more:hover { text-decoration: underline; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px 18px;
}
.app-tile { min-width: 0; }
.app-tile:hover .app-name { color: var(--blue); }
.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 10px;
  overflow: hidden;
  background: #eef2f6;
  position: relative;
}
.app-icon img,
.app-icon-lg img,
.rel-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 8px;
}
.app-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
}
.app-ver { font-weight: 500; color: #333; }
.app-desc {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px 16px;
}
.news-tile:hover h3 { color: var(--blue); }
.news-thumb {
  height: 92px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px;
  text-align: center;
}
.news-tile .date { font-size: 0.72rem; color: var(--muted); }
.news-tile h3 { font-size: 0.9rem; margin-top: 4px; }

/* Ads */
.ad-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9aa4b7;
  margin-bottom: 8px;
  font-weight: 600;
}
.ad-slot {
  background: #fafbfc;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  overflow: hidden;
}
.ad-block { margin: 22px 0; }
.top-ad-wrap {
  margin: 14px auto 8px;
  text-align: center;
}
.top-ad-wrap .ad-block {
  margin: 0;
}
.sticky-bottom-ad {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  padding: 4px;
}

/* Category chips */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 28px;
}
.cat-tabs a {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #445;
}
.cat-tabs a:hover,
.cat-tabs a.active {
  border-color: var(--blue);
  color: var(--blue);
  background: #eef6fc;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 96px;
  background: #f7f9fb;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
}
.site-footer h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 10px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.site-footer a { color: #4a5565; font-size: 0.86rem; }
.site-footer a:hover { color: var(--blue); }
.fine {
  margin-top: 26px;
  font-size: 0.74rem;
  color: #98a2b3;
  max-width: 80ch;
}

/* Detail page */
.crumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 22px 0 18px;
}
.crumb span { margin: 0 6px; }
.crumb a:hover { color: var(--blue); }

.app-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 8px 0 20px;
}
.app-icon-lg {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.app-icon-lg img { width: 84px; height: 84px; object-fit: contain; background: #fff; }
.app-head h1 { font-size: 1.7rem; }
.app-head h1 .ver { font-weight: 500; color: var(--muted); font-size: 1.05rem; }
.app-meta { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.app-meta a { color: var(--blue); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip {
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #556;
}
.rating-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.stars { color: var(--amber); letter-spacing: 1px; }
.rating-row span { font-size: 0.82rem; color: var(--muted); }
.cta-row { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-primary {
  background: var(--blue);
  color: #fff;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}
.btn-primary:hover { background: var(--blue-deep); }
.btn-secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}
.safe-tag { color: var(--green); font-size: 0.8rem; font-weight: 700; }

.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: start;
  padding-bottom: 40px;
}
.sidebar { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 22px; }
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.panel h2 { font-size: 1.15rem; margin-bottom: 14px; }
.panel p { color: #3d4654; font-size: 0.94rem; margin: 0 0 12px; }
.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  font-weight: 600;
  font-size: 0.9rem;
}
.tabs a { padding-bottom: 10px; color: var(--muted); }
.tabs a.active { color: var(--blue-deep); border-bottom: 2px solid var(--blue); }

.facts { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.facts td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts td:first-child { color: var(--muted); width: 38%; }
.facts td:last-child { font-weight: 600; }

.rel-list { display: flex; flex-direction: column; gap: 12px; }
.rel-item { display: flex; gap: 10px; align-items: center; }
.rel-item:hover .name { color: var(--blue); }
.rel-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.rel-icon img { width: 38px; height: 38px; object-fit: contain; background: #fff; }
.rel-item .name { font-weight: 700; font-size: 0.85rem; }
.rel-item .desc { font-size: 0.76rem; color: var(--muted); }

.article-body { max-width: 760px; }
.article-body p { font-size: 1rem; color: #333; margin: 0 0 16px; }
.article-kicker { color: var(--muted); font-size: 0.85rem; margin-bottom: 10px; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .app-grid, .news-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
  .nav-links, .header-search { display: none; }
  .menu-btn { display: block; }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .app-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .app-head { flex-direction: column; }
  .hero { padding-top: 36px; }
}
