/*
Theme Name: APKVerse V3 SEO
Theme URI: https://example.com/apkverse-v3-seo
Author: ChatGPT
Description: Lightweight SEO-focused APK/app directory WordPress theme inspired by modern APK listing homepages. Includes Apps custom post type, app metadata, clean homepage, category archive, and app detail page.
Version: 3.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: apkverse
*/

:root {
  --green: #23c16b;
  --green-dark: #149650;
  --green-soft: #effcf4;
  --ink: #1a2333;
  --muted: #667085;
  --line: #e7edf5;
  --soft: #f4f7fb;
  --card: #ffffff;
  --card-alt: #f8fbff;
  --gold: #f7b928;
  --orange: #ff8a00;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top center, rgba(35, 193, 107, 0.08), transparent 26%),
    linear-gradient(180deg, #f6f9fd 0%, #f4f7fb 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(231, 237, 245, 0.9);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap;
}

.brand-badge {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), #1aaf61);
  color: #fff;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 8px;
}

.main-nav a {
  color: #27364d;
  font-weight: 650;
}

.main-nav a:hover {
  color: var(--green-dark);
}

.header-search {
  margin-left: auto;
  min-width: 390px;
}

.header-search form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f7fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
}

.header-search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 0;
  outline: 0;
}

.header-search button {
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #18a95e);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
}

.header-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-weight: 700;
  white-space: nowrap;
}

.homepage {
  padding: 26px 0 44px;
}

.hero-v3 {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 22px;
  align-items: stretch;
  margin: 6px 0 22px;
}

.hero-copy {
  background: linear-gradient(135deg, #18b95f, #0ea5e9);
  color: #fff;
  border-radius: 24px;
  padding: 44px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.eyebrow {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.hero-copy h1 {
  font-size: 46px;
  line-height: 1.08;
  margin: 18px 0 12px;
  letter-spacing: -1px;
}

.hero-copy p {
  max-width: 620px;
  font-size: 17px;
  margin: 0 0 24px;
  opacity: 0.92;
}

.hero-search {
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 8px;
  border-radius: 16px;
  max-width: 640px;
  position: relative;
  z-index: 1;
}

.hero-search input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 16px;
  font-size: 16px;
}

.hero-search button,
.button {
  border: 0;
  background: linear-gradient(135deg, var(--green), #18a95e);
  color: #fff;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}

.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 750;
}

.hero-panel,
.section-card,
.sidebar-card,
.single-section,
.comments-area {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(17, 24, 39, 0.04);
}

.hero-panel {
  padding: 18px;
}

.hero-panel h3,
.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-card {
  padding: 22px;
  margin-bottom: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-head > a {
  color: var(--green-dark);
  font-weight: 800;
}

.cat-grid-v3 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.cat-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  font-weight: 800;
}

.cat-chip span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #eafff2;
  color: var(--green-dark);
  border-radius: 12px;
}

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

.tabs button {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #475467;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.tabs button.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.app-grid-v3,
.app-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.app-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: 0.18s ease;
  overflow: hidden;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.app-card-link {
  display: flex;
  gap: 14px;
  padding: 14px;
  min-height: 126px;
}

.app-icon-wrap {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: #f1f5f9;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.app-icon {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 18px;
}

.app-card-body {
  min-width: 0;
}

.app-card h3 {
  font-size: 16px;
  line-height: 1.25;
  margin: 2px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.app-card-meta span {
  background: #f1f5f9;
  border-radius: 999px;
  padding: 3px 8px;
}

.app-card-compact {
  margin-bottom: 10px;
}

.app-card-compact .app-card-link {
  min-height: 90px;
  padding: 10px;
}

.app-card-compact .app-icon-wrap,
.app-card-compact .app-icon {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
  border-radius: 14px;
}

.app-card-compact h3 {
  font-size: 14px;
}

.two-col-home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.page-hero {
  padding: 28px 0;
}

.page-hero h1 {
  font-size: 38px;
  line-height: 1.1;
  margin: 0 0 8px;
}

.page-hero p,
.entry-meta {
  color: var(--muted);
  margin: 0;
}

.content-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  padding-bottom: 44px;
}

.sidebar-card {
  padding: 18px;
}

.sidebar-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
}

.app-page-header {
  padding: 18px 0 12px;
}

.single-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 15px;
}

.single-breadcrumb a {
  color: #4b5565;
}

.app-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  padding-bottom: 46px;
}

.app-detail-main {
  min-width: 0;
}

.app-detail-sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

/* ── Ratings Card ──────────────────────────────────────── */
.app-ratings-card {
  margin-top: 18px;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px 26px;
}

.ratings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.ratings-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ratings-card-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: center;
}

.rating-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: linear-gradient(135deg, #f5fdf8, #eefbf4);
  border: 1px solid #d3f4e2;
  border-radius: 20px;
  padding: 24px 16px;
}

.star-row--lg .star { font-size: 20px; }

.rating-bars-block {
  display: grid;
  gap: 11px;
}

.rating-breakdown-row {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 42px;
  gap: 10px;
  align-items: center;
}

.bar-label {
  font-size: 13px;
  font-weight: 700;
  color: #425166;
  white-space: nowrap;
}

.bar-star { color: var(--gold); }

.rating-bar {
  height: 10px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
}

.rating-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bar-green { background: linear-gradient(90deg, #23c16b, #2bb673); }
.bar-yellow { background: linear-gradient(90deg, #f7b928, #f6a61c); }
.bar-red { background: linear-gradient(90deg, #ff8a00, #e67300); }

.bar-pct {
  font-size: 13px;
  font-weight: 700;
  color: #425166;
  text-align: right;
}

.see-reviews {
  display: inline-flex;
  align-items: center;
  color: var(--green-dark);
  font-weight: 800;
  font-size: 14px;
  gap: 4px;
}

/* ── Bottom Row ─────────────────────────────────────────── */
.app-bottom-row {
  display: grid;
  grid-template-columns: 210px 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.bottom-card {
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.bottom-card-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 14px;
}

.bottom-card--download .action-download {
  margin-bottom: 10px;
}

/* ── Similar Apps Sidebar ───────────────────────────────── */
.similar-apps-card {
  padding: 20px;
}

.similar-apps-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.01em;
}

.similar-app-item {
  display: flex;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 14px;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
  margin-bottom: 2px;
}

.similar-app-item:hover {
  background: var(--soft);
}

.similar-app-icon {
  flex: 0 0 52px;
}

.sim-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.sim-thumb--placeholder {
  background: linear-gradient(135deg, #d1e8ff, #aacfff);
  color: #2a68c4;
  font-weight: 900;
  font-size: 20px;
  display: grid;
  place-items: center;
}

.similar-app-info { min-width: 0; flex: 1; }

.similar-app-name {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.similar-app-dev {
  font-size: 12px;
  color: var(--muted);
  margin: 1px 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.similar-app-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  margin-bottom: 5px;
}

.sim-star {
  color: var(--gold);
  font-weight: 800;
}

.sim-dl {
  color: var(--muted);
  font-size: 11px;
}

.similar-app-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.sim-badge {
  background: #f1f5f9;
  color: #475467;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.no-similar {
  color: var(--muted);
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
}

.see-more-similar {
  display: block;
  text-align: center;
  margin-top: 14px;
  padding: 10px;
  background: var(--soft);
  border-radius: 12px;
  color: var(--green-dark);
  font-weight: 800;
  font-size: 14px;
  transition: background 0.15s;
}

.see-more-similar:hover {
  background: var(--green-soft);
}

.rating-panel--main {
  display: none;
}

.app-hero-card,
.app-content-card,
.feature-strip-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.app-hero-card {
  padding: 22px;
}

.app-hero-content {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.app-hero-media {
  display: flex;
  justify-content: center;
}

.single-icon {
  width: 176px;
  height: 176px;
  object-fit: cover;
  border-radius: 36px;
  background: #eef3f9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.single-icon--placeholder {
  background: linear-gradient(135deg, #edf2f7, #dfe7f0);
}

.app-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.app-title {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.verified-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  flex: 0 0 auto;
}

.app-rating-row,
.app-taxonomy-row,
.hero-tag-row,
.trust-pill-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-rating-row {
  margin-bottom: 12px;
}

.star-row {
  display: inline-flex;
  gap: 3px;
  color: #d0d6df;
}

.star-row--compact {
  font-size: 18px;
}

.star {
  color: #cfd6e1;
  font-size: 22px;
  line-height: 1;
}

.star.is-filled {
  color: var(--gold);
}

.rating-number {
  font-size: 17px;
}

.editor-choice {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f3f6fb;
  color: #596579;
  font-weight: 700;
  font-size: 14px;
}

.app-taxonomy-row {
  color: var(--green-dark);
  font-size: 18px;
  margin-bottom: 24px;
}

.app-taxonomy-row span + span::before {
  content: "•";
  margin-right: 12px;
  color: #98a2b3;
}

.app-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.app-stat-item {
  min-width: 0;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.app-stat-item:last-child {
  border-right: 0;
  padding-right: 0;
}

.app-stat-item strong,
.app-stat-item span {
  display: block;
}

.app-stat-item strong {
  font-size: 22px;
  line-height: 1.2;
}

.app-stat-item span {
  color: var(--muted);
  font-size: 14px;
}

.hero-tag-row {
  margin-top: 22px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: #f3f6fb;
  color: #4a566b;
  font-weight: 700;
}

.trust-strip {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid #dbf3e5;
  border-radius: 18px;
  background: linear-gradient(90deg, #f5fdf8, #fbfffd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2f6d4b;
  font-weight: 700;
}

.trust-pill::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ddf8e8;
  box-shadow: inset 0 0 0 5px var(--green);
}

.trust-pill--lead {
  color: #223247;
}

.trust-pill--lead::before {
  background: #e8fbef;
}

.app-content-card {
  margin-top: 18px;
  padding: 20px 22px 24px;
}

.detail-tab-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.detail-tab {
  border: 0;
  background: transparent;
  color: #596579;
  padding: 0 0 13px;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.detail-tab.is-active {
  color: var(--green-dark);
  border-bottom-color: var(--green);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.screenshot-card {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef3f9;
}

.screenshot-card img {
  width: 100%;
  height: 145px;
  object-fit: cover;
  display: block;
}

.app-description {
  color: #435166;
}

.app-summary {
  margin-top: 0;
  color: #506075;
  font-size: 17px;
}

.empty-media-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-bottom: 22px;
  border: 1px dashed #cfd9e7;
  border-radius: 18px;
  background: #f9fbfe;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.feature-strip-card {
  margin-top: 18px;
  padding: 14px 20px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 12px;
}

.feature-item strong,
.feature-item span {
  display: block;
}

.feature-item span {
  color: var(--muted);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  flex: 0 0 auto;
}

.feature-icon--blue {
  background: linear-gradient(135deg, #3f8cff, #2a68f6);
}

.feature-icon--gold {
  background: linear-gradient(135deg, #ffcb47, #f6a61c);
}

.feature-icon--green {
  background: linear-gradient(135deg, #67da96, #39b977);
}

.feature-icon--mint {
  background: linear-gradient(135deg, #5fd8be, #24ba8e);
}

.action-card {
  padding: 22px;
}

.action-download {
  min-height: 106px;
  border-radius: 18px;
  flex-direction: column;
  gap: 4px;
  font-size: 18px;
}

.action-download small {
  font-size: 15px;
  opacity: 0.92;
}

.action-download.is-disabled {
  opacity: 0.72;
  cursor: default;
  pointer-events: none;
}

.block-btn {
  display: flex;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.subtle-action {
  min-height: 56px;
  margin-top: 12px;
  font-size: 18px;
  color: #25354d;
}

.rating-panel--main {
  padding: 22px;
  margin-top: 20px;
}

.rating-panel {
  padding: 22px;
}

.rating-panel-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.rating-panel-score {
  font-size: 56px;
  line-height: 1;
  font-weight: 900;
}

.rating-review-count {
  color: var(--muted);
  font-size: 15px;
}

.rating-breakdown {
  display: grid;
  gap: 10px;
}

.rating-breakdown-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  color: #425166;
  font-weight: 700;
}

.rating-bar {
  height: 10px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
}

.rating-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #2bb673);
}

.see-reviews {
  display: inline-flex;
  margin-top: 18px;
  color: #1264dc;
  font-weight: 800;
}

.app-info-panel,
.meta-card-stack {
  padding: 22px;
}

.info-list {
  display: grid;
  gap: 14px;
}

.info-list-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.info-list-row span {
  color: #48576d;
}

.info-list-row strong {
  color: #1c8b56;
  font-weight: 700;
}

.mini-meta-card {
  padding: 14px 16px;
  background: var(--card-alt);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-top: 12px;
}

.mini-meta-card span,
.mini-meta-card strong {
  display: block;
}

.mini-meta-card span {
  color: var(--muted);
  margin-bottom: 4px;
}

.single-section {
  padding: 22px;
  margin-top: 22px;
}

.single-section h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.single-meta-grid,
.app-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.meta-box,
.app-detail-item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.meta-row,
.app-detail-copy span {
  display: block;
  color: #475467;
  margin-top: 5px;
}

.app-detail-item {
  display: flex;
  gap: 12px;
}

.app-detail-icon {
  font-size: 24px;
}

.app-detail-copy strong {
  display: block;
}

.app-detail-copy small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.full-span {
  grid-column: 1 / -1;
}

.hash-line {
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.security-panel {
  margin-top: 18px;
  background: #ecfdf3;
  border: 1px solid #b7efc8;
  border-radius: 18px;
  padding: 18px;
}

.security-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.security-title {
  font-weight: 900;
  color: #157347;
}

.security-note {
  color: #39825c;
  font-size: 13px;
}

.security-verified {
  background: #16a34a;
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 900;
  font-size: 12px;
  height: max-content;
}

.security-checks {
  margin: 14px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.security-checks span {
  background: #dffbe8;
  color: #157347;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 13px;
}

.security-meta {
  display: grid;
  gap: 8px;
  color: #244637;
}

.version-list {
  display: grid;
  gap: 10px;
}

.version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.version-meta {
  color: var(--muted);
  font-size: 13px;
}

.entry-content {
  color: #344054;
}

.entry-content h2,
.entry-content h3 {
  color: var(--ink);
}

.site-footer {
  background: #111827;
  color: #d1d5db;
  margin-top: 36px;
  padding: 34px 0 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
}

.site-footer h3,
.site-footer h4 {
  color: #fff;
  margin-top: 0;
}

.site-footer a {
  display: block;
  color: #d1d5db;
  margin: 6px 0;
}

.copyright {
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  margin-top: 20px;
}

.navigation,
.pagination {
  margin: 20px 0;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a,
.nav-links span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}

.screen-reader-text {
  position: absolute;
  left: -999em;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-field {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.search-submit {
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .app-detail-layout {
    grid-template-columns: 1fr;
  }

  .app-detail-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screenshot-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-bottom-row {
    grid-template-columns: 1fr 1fr;
  }

  .bottom-card--download {
    grid-column: 1 / -1;
  }

  .ratings-card-body {
    grid-template-columns: 160px 1fr;
    gap: 20px;
  }
}

@media (max-width: 980px) {
  .hero-v3,
  .content-sidebar,
  .two-col-home {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .main-nav {
    order: 2;
    width: 100%;
    overflow: auto;
  }

  .header-search {
    order: 3;
    width: 100%;
    min-width: 0;
  }

  .app-grid-v3,
  .app-grid,
  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cat-grid-v3,
  .single-meta-grid,
  .app-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-hero-content {
    grid-template-columns: 1fr;
  }

  .app-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-stat-item {
    border-right: 0;
    padding-right: 0;
  }

  .app-detail-sidebar {
    grid-template-columns: 1fr;
  }

  .app-bottom-row {
    grid-template-columns: 1fr;
  }

  .bottom-card--download {
    grid-column: auto;
  }

  .ratings-card-body {
    grid-template-columns: 1fr;
  }

  .rating-score-block {
    flex-direction: row;
    gap: 16px;
    justify-content: flex-start;
    padding: 16px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 20px, 1280px);
  }

  .brand {
    font-size: 18px;
  }

  .header-inner {
    gap: 12px;
  }

  .header-lang {
    margin-left: auto;
  }

  .hero-copy {
    padding: 28px 20px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-search {
    display: block;
  }

  .hero-search input {
    width: 100%;
    margin-bottom: 8px;
  }

  .hero-search button {
    width: 100%;
  }

  .app-grid-v3,
  .app-grid,
  .archive-grid,
  .cat-grid-v3,
  .single-meta-grid,
  .app-detail-grid,
  .screenshot-grid,
  .feature-strip {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-title {
    font-size: 32px;
  }

  .single-icon {
    width: 132px;
    height: 132px;
    border-radius: 28px;
  }

  .trust-strip,
  .rating-panel-top,
  .version-item,
  .security-top,
  .info-list-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .rating-breakdown-row {
    grid-template-columns: 34px minmax(0, 1fr) 38px;
  }
}
