/* MacintoshApp v5 - clean Apple-inspired app gallery */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f5f7;
  --surface-strong: #e8e8ed;
  --text: #1d1d1f;
  --text-2: #424245;
  --text-3: #6e6e73;
  --text-4: #86868b;
  --border: rgba(0, 0, 0, 0.10);
  --border-soft: rgba(0, 0, 0, 0.06);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --green: #28cd41;
  --red: #ff3b30;
  --orange: #ff9f0a;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --container: 1160px;
  --r: 8px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur: 180ms;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
  --gap-xs: 6px;
  --gap-sm: 10px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 40px;
  --gap-2xl: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-soft: #2c2c2e;
    --surface-strong: #3a3a3c;
    --text: #f5f5f7;
    --text-2: #d1d1d6;
    --text-3: #aeaeb2;
    --text-4: #8e8e93;
    --border: rgba(255, 255, 255, 0.14);
    --border-soft: rgba(255, 255, 255, 0.08);
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; }
button, input, select, textarea { font-family: var(--font); }
button { cursor: pointer; border: 0; background: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 54px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
}
@media (prefers-color-scheme: dark) {
  .header { background: rgba(0, 0, 0, 0.72); }
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 22px;
}
.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--text);
  font-weight: 700;
}
.logo-img { width: 26px; height: 26px; }
.logo-name { font-size: 15px; letter-spacing: 0; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.header-nav a {
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--r);
}
.header-nav a:hover,
.header-nav a.active {
  color: var(--text);
  background: var(--surface-soft);
}
.search-wrap {
  position: relative;
  flex-shrink: 0;
}
.search-input {
  width: 220px;
  height: 32px;
  padding: 6px 12px 6px 32px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.search-input:focus {
  border-color: var(--blue);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}
.search-input::placeholder { color: var(--text-4); }
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
  pointer-events: none;
}

.home-intro {
  padding: 78px 0 40px;
}
.home-eyebrow {
  color: var(--text-2);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
}
.home-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 60px;
  align-items: end;
}
.home-title {
  max-width: 760px;
  font-size: 74px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
}
.home-subtitle {
  max-width: 720px;
  margin-top: 22px;
  color: var(--text-2);
  font-size: 28px;
  line-height: 1.18;
  font-weight: 700;
}
.home-proof {
  border-top: 1px solid var(--border);
}
.home-proof div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border-soft);
}
.home-proof strong {
  color: var(--text);
  font-size: 16px;
}
.home-proof span {
  color: var(--text-3);
  font-size: 14px;
}

.latest-heading {
  padding: 40px 0 16px;
}
.latest-heading h2,
.section-title,
.trust-title {
  font-weight: 800;
  letter-spacing: 0;
}
.latest-heading h2 {
  font-size: 48px;
  line-height: 1.06;
}

.hero { padding: 0 0 42px; }
.hero-card {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background:
    linear-gradient(120deg, #f5f5f7 0%, #ffffff 54%, color-mix(in srgb, var(--hero-accent, #0071e3) 16%, #f5f5f7) 100%);
  box-shadow: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.hero-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.hero-content {
  position: relative;
  z-index: 2;
  width: min(560px, 60%);
  padding: 68px;
}
.hero-label {
  color: var(--text-3);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 22px;
}
.hero-app-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.hero-icon,
.hero-art img,
.hero-art-initial {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}
.hero-icon {
  width: 86px;
  height: 86px;
  border-radius: 20px;
  object-fit: cover;
  flex-shrink: 0;
}
.hero-name {
  color: var(--text);
  font-size: 40px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}
.hero-category {
  color: var(--text-3);
  font-size: 17px;
  margin-top: 5px;
}
.hero-desc {
  max-width: 480px;
  color: var(--text-2);
  font-size: 21px;
  line-height: 1.34;
  margin-bottom: 28px;
}
.hero-art {
  position: absolute;
  right: 9%;
  top: 50%;
  transform: translateY(-50%);
  width: 230px;
  height: 230px;
  border-radius: 52px;
  z-index: 1;
}
.hero-art img,
.hero-art-initial {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
.hero-art-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 92px;
  font-weight: 800;
}
.btn-hero,
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn-hero {
  min-height: 44px;
  padding: 10px 22px;
  font-size: 15px;
}
.btn-hero:hover,
.btn-download:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
}

.section {
  padding: 52px 0;
}
.section + .section {
  border-top: 1px solid var(--border-soft);
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.section-title {
  font-size: 30px;
  line-height: 1.12;
}
.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.section-more::after {
  content: '>';
  font-size: 13px;
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 12px;
  scroll-snap-type: x mandatory;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-card {
  flex: 0 0 360px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background: var(--surface);
  color: inherit;
  scroll-snap-align: start;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.scroll-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.scroll-card-banner {
  position: relative;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.scroll-card-label {
  position: absolute;
  top: 16px;
  left: 18px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}
.scroll-card-icon,
.scroll-card-initial {
  width: 112px;
  height: 112px;
  border-radius: 25px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.14);
}
.scroll-card-icon { object-fit: cover; }
.scroll-card-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 52px;
  font-weight: 800;
}
.scroll-card-body {
  padding: 18px;
}
.scroll-card-name {
  color: var(--text);
  font-size: 21px;
  line-height: 1.16;
  font-weight: 800;
}
.scroll-card-short {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scroll-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.chart-box {
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background: var(--surface);
  padding: 20px;
}
.chart-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}
.app-list {
  display: flex;
  flex-direction: column;
}
.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 8px;
  border-radius: var(--r);
  color: inherit;
}
.app-row:hover {
  background: var(--surface-soft);
}
.app-row-rank {
  min-width: 24px;
  color: var(--text-4);
  text-align: right;
  font-size: 17px;
  font-weight: 800;
}
.app-row-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  overflow: hidden;
  flex-shrink: 0;
}
.app-row-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-row-info {
  flex: 1;
  min-width: 0;
}
.app-row-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-row-sub {
  color: var(--text-4);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-row-action { flex-shrink: 0; }

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
  margin-bottom: 24px;
}
.category-pills::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.pill:hover {
  background: var(--surface-strong);
  color: var(--text);
}
.pill.active,
.pill.is-active {
  background: var(--text);
  color: var(--bg);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.app-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background: var(--surface);
  color: inherit;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.app-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.app-icon,
.app-icon-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
}
.app-card-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-card-dev {
  color: var(--text-4);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.app-rating {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-category-text { color: var(--text-4); }
.stars { color: var(--orange); letter-spacing: 0; }
.btn-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.10);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.btn-price.paid {
  background: var(--blue);
  color: #fff;
}
.btn-sm {
  min-height: 24px;
  padding: 4px 10px;
  font-size: 12px;
}

.trust-section {
  padding-bottom: 80px;
}
.trust-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1fr);
  gap: 64px;
  align-items: start;
}
.trust-title {
  max-width: 560px;
  font-size: 46px;
  line-height: 1.06;
}
.trust-copy p {
  color: var(--text-2);
  font-size: 22px;
  line-height: 1.34;
  font-weight: 700;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 42px 0 32px;
}
.detail-icon,
.detail-icon-wrap > div {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.detail-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta { flex: 1; min-width: 0; }
.detail-name {
  color: var(--text);
  font-size: 38px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px;
}
.detail-dev {
  color: var(--blue);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
}
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.badge,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background: var(--surface-soft);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
}
.detail-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-download {
  min-height: 48px;
  padding: 12px 26px;
  font-size: 16px;
}
.btn-download.free {
  background: rgba(0, 113, 227, 0.10);
  color: var(--blue);
}
.detail-price {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
}
.screenshots-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0 12px;
}
.screenshots-row::-webkit-scrollbar { display: none; }
.screenshot {
  flex: 0 0 auto;
  height: 300px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background: var(--surface-soft);
}
.screenshot img {
  height: 100%;
  width: auto;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--border-soft);
  gap: 1px;
  margin-bottom: 32px;
}
.info-cell {
  background: var(--surface);
  padding: 18px;
}
.info-label {
  color: var(--text-4);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}
.info-value {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
}
.app-description {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.7;
  white-space: pre-line;
}
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background: var(--surface);
  padding: 18px;
}
.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}
.review-name,
.review-title {
  color: var(--text);
  font-weight: 800;
}
.review-date,
.review-body {
  color: var(--text-3);
  font-size: 14px;
}
.review-body { line-height: 1.6; }

.footer {
  border-top: 1px solid var(--border-soft);
  padding: 42px 0;
  margin-top: 24px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-logo {
  width: 20px;
  height: 20px;
  opacity: 0.55;
}
.footer-copy,
.footer-links a {
  color: var(--text-4);
  font-size: 13px;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.skeleton {
  border-radius: var(--r);
  background: linear-gradient(90deg, var(--surface-soft) 25%, var(--surface-strong) 50%, var(--surface-soft) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.empty {
  text-align: center;
  padding: 64px 18px;
  color: var(--text-3);
}
.empty-mark {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  margin: 0 auto 16px;
  position: relative;
}
.empty-mark::before,
.empty-mark::after {
  content: '';
  position: absolute;
  border: 1.5px solid var(--text-4);
  opacity: 0.55;
}
.empty-mark::before {
  inset: 13px;
  border-radius: 6px;
}
.empty-mark::after {
  inset: 19px;
  border-radius: 3px;
}
.empty-title {
  color: var(--text-2);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  padding: 12px 18px;
  border-radius: var(--r);
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 700;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast[data-type="error"] { background: var(--red); color: #fff; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface-soft);
  flex-shrink: 0;
}
.lang-btn {
  min-width: 32px;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 800;
}
.lang-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 18px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 800;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-secondary { background: var(--surface-soft); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: var(--r);
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 800;
}
.btn-ai:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { min-height: 30px; padding: 5px 12px; font-size: 13px; }

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 54px);
}
.admin-sidebar {
  border-right: 1px solid var(--border-soft);
  background: var(--surface);
  padding: 32px 20px;
}
.admin-sidebar-title {
  color: var(--text-4);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 12px;
  padding: 0 8px;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--r);
  color: var(--text-3);
  font-size: 14px;
  font-weight: 700;
}
.admin-nav a:hover,
.admin-nav a.active {
  background: var(--surface-soft);
  color: var(--text);
}
.admin-main { padding: 34px; }
.admin-header { margin-bottom: 24px; }
.admin-header h1 {
  color: var(--text);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}
.admin-header p {
  color: var(--text-3);
  margin-top: 4px;
}
.form-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background: var(--surface);
  padding: 28px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-group.full { grid-column: 1 / -1; }
.form-label {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 800;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface-soft);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}
.form-textarea { min-height: 108px; resize: vertical; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}
.upload-progress {
  display: none;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-soft);
  margin-top: 6px;
}
.upload-progress::after {
  content: '';
  display: block;
  height: 100%;
  background: var(--blue);
  animation: indeterminate 1.4s ease infinite;
  transform-origin: left;
}
@keyframes indeterminate {
  0% { transform: scaleX(0) translateX(0); }
  50% { transform: scaleX(0.6) translateX(60%); }
  100% { transform: scaleX(0) translateX(200%); }
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.data-table th {
  color: var(--text-4);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}
.data-table td {
  color: var(--text);
  font-size: 14px;
}
.data-table tr:hover td { background: var(--surface-soft); }
.status.live { color: var(--green); }
.status.draft { color: var(--text-4); }
.status.paid { color: var(--blue); }
.status.free { color: var(--green); }

/* v7 additions */
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1001;
  transform: translateY(-72px);
  padding: 9px 12px;
  border-radius: var(--r);
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); }
.header.is-scrolled { box-shadow: 0 1px 0 var(--border-soft); }
.brand-pill,
.badge-macintoshapp {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.10);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.admin-link {
  flex-shrink: 0;
  color: var(--text-4);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: var(--r);
}
.admin-link:hover { color: var(--text); background: var(--surface-soft); }
.search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--text-3);
  font-size: 16px;
  line-height: 1;
}
.search-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, 86vw);
  max-height: 380px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 8px;
}
.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: var(--r);
  color: inherit;
}
.search-dropdown-item:hover { background: var(--surface-soft); }
.search-dropdown-item strong,
.search-dropdown-item small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-dropdown-item strong { color: var(--text); font-size: 14px; }
.search-dropdown-item small { color: var(--text-4); font-size: 12px; }
.search-dropdown-icon { width: 40px; height: 40px; border-radius: 9px; overflow: hidden; flex-shrink: 0; }
.search-dropdown-icon img { width: 100%; height: 100%; object-fit: cover; }
.search-dropdown-empty { padding: 18px; color: var(--text-3); font-size: 14px; }
.mobile-menu-btn {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: var(--r);
  color: var(--text);
}
.mobile-menu-btn span {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.mobile-menu {
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}
.mobile-menu-inner {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 16px;
}
.mobile-menu a {
  padding: 10px 4px;
  color: var(--text);
  font-weight: 700;
}
.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background: var(--border-soft);
  margin-top: 38px;
}
.home-stats div {
  background: var(--surface);
  padding: 20px;
}
.home-stats strong {
  display: block;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}
.home-stats span {
  display: block;
  margin-top: 8px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 700;
}
.section-kicker {
  color: var(--text-4);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 6px;
}
.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}
.count-badge {
  display: inline-flex;
  margin-top: 8px;
  color: var(--text-4);
  font-size: 13px;
  font-weight: 800;
}
.sort-label { min-width: 190px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.scroll-card-banner {
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--card-accent, #0071e3) 30%, transparent), transparent 58%),
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent, #0071e3) 16%, var(--surface-soft)), var(--surface));
}
.app-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.app-card-short {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.brand-statement {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
  gap: 48px;
  align-items: center;
  overflow: hidden;
}
.brand-copy h2 {
  max-width: 640px;
  color: var(--text);
  font-size: 46px;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: 0;
}
.brand-copy > p:last-child {
  max-width: 560px;
  margin-top: 18px;
  color: var(--text-2);
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
}
.floating-icons {
  position: relative;
  min-height: 320px;
}
.floating-icon {
  position: absolute;
  display: block;
  transform: translate3d(0, 0, 0);
}
.floating-icon-1 { left: 7%; top: 20%; }
.floating-icon-2 { left: 28%; top: 8%; }
.floating-icon-3 { left: 49%; top: 28%; }
.floating-icon-4 { left: 16%; top: 58%; }
.floating-icon-5 { left: 66%; top: 54%; }
.floating-icon-6 { left: 78%; top: 17%; }
.floating-app-icon {
  overflow: hidden;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.16);
}
.floating-app-icon img { width: 100%; height: 100%; object-fit: cover; }
[data-animate],
.scroll-card,
.app-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 360ms var(--ease), transform 360ms var(--ease), box-shadow var(--dur) var(--ease);
}
[data-animate].is-visible,
.scroll-card.is-visible,
.app-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 28px 0 16px;
  color: var(--text-4);
  font-size: 14px;
  font-weight: 700;
}
.back-link::before {
  content: '<';
  color: currentColor;
}
.detail-hero {
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 0 34px;
  margin-bottom: 42px;
}
.detail-developer {
  color: var(--text-3);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
}
.detail-rating-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}
.detail-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.detail-section {
  padding: 34px 0;
  border-top: 1px solid var(--border-soft);
}
.detail-copy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 32px;
  align-items: start;
}
.app-description.is-collapsed {
  max-height: 220px;
  overflow: hidden;
}
.text-button {
  margin-top: 14px;
  padding: 0;
  background: transparent;
}
.release-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background: var(--surface);
  padding: 20px;
}
.release-card p {
  color: var(--text-2);
  white-space: pre-line;
  margin-top: 12px;
}
.screenshots-row .screenshot {
  cursor: zoom-in;
}
.reviews-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.review-form {
  position: sticky;
  top: 78px;
}
.review-form h3 {
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1180px, 94vw);
  max-height: 86vh;
  border-radius: var(--r);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}
.lightbox-close {
  position: fixed;
  right: 24px;
  top: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 24px;
}
.login-shell {
  min-height: calc(100vh - 54px);
  display: grid;
  place-items: center;
  padding: 42px 16px;
  background: var(--bg);
}
.login-shell[hidden] { display: none; }
.login-card {
  width: min(390px, 100%);
  display: grid;
  gap: 14px;
  text-align: center;
}
.login-card img { margin: 0 auto 4px; }
.login-card h1 { font-size: 24px; line-height: 1.15; font-weight: 800; }
.login-card p,
.login-card small { color: var(--text-3); }
.admin-layout[hidden] { display: none; }
.admin-stats-grid {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.admin-stat-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  background: var(--surface-soft);
  padding: 16px;
}
.admin-stat-card strong {
  display: block;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}
.admin-stat-card span {
  display: block;
  margin-top: 7px;
  color: var(--text-4);
  font-size: 12px;
  font-weight: 800;
}
.form-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.check-row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.check-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}
.self-made-row {
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: var(--r);
  background: rgba(0, 113, 227, 0.06);
  padding: 14px;
}
.self-made-row span {
  color: var(--text-4);
  font-size: 12px;
}
.accent-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 10px;
}
.accent-preset-btn {
  width: 30px;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--border-soft);
}
.accent-preset-btn.is-active {
  border-color: var(--text);
}
.accent-custom-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 180px);
  gap: 10px;
  align-items: center;
}
.accent-custom-row input[type="color"] {
  width: 54px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  padding: 4px;
}
.table-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.table-card {
  padding: 0;
  overflow: auto;
}
.admin-app-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}
.admin-app-cell img,
.admin-app-cell > span {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  flex-shrink: 0;
}
.admin-app-cell > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
}
.admin-app-cell strong,
.admin-app-cell small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-app-cell small {
  color: var(--text-4);
  font-size: 12px;
}
.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .home-intro-grid,
  .trust-layout,
  .brand-statement,
  .detail-copy-grid,
  .reviews-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .home-proof { max-width: 560px; }
  .charts-grid { grid-template-columns: 1fr; }
  .hero-content { width: 64%; padding: 44px; }
  .hero-art { width: 170px; height: 170px; border-radius: 38px; right: 6%; opacity: 0.55; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .review-form { position: static; }
}

@media (max-width: 680px) {
  .container { padding: 0 16px; }
  .header-inner { gap: 10px; }
  .header-nav { display: none; }
  .admin-link { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .search-wrap { flex: 1; min-width: 0; }
  .search-input { width: 100%; min-width: 118px; }
  .home-intro { padding: 46px 0 28px; }
  .home-title { font-size: 44px; line-height: 1.05; }
  .home-subtitle { font-size: 23px; line-height: 1.24; }
  .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-proof div { grid-template-columns: 92px 1fr; }
  .latest-heading { padding-top: 26px; }
  .latest-heading h2 { font-size: 36px; }
  .hero-card { min-height: 330px; }
  .hero-content { width: 100%; padding: 30px 26px; }
  .hero-art { display: none; }
  .hero-name { font-size: 30px; }
  .hero-desc { font-size: 18px; }
  .section { padding: 42px 0; }
  .section-title { font-size: 26px; }
  .scroll-card { flex-basis: 84vw; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-card { padding: 14px; min-height: 176px; }
  .detail-header { flex-direction: column; }
  .detail-hero { padding: 0 20px; }
  .detail-name { font-size: 32px; }
  .detail-cta-row .btn,
  .detail-cta-row .btn-download { width: 100%; justify-content: center; }
  .screenshots-row .screenshot { height: 220px; }
  .trust-title { font-size: 34px; }
  .trust-copy p { font-size: 19px; }
  .brand-copy h2 { font-size: 34px; }
  .brand-copy > p:last-child { font-size: 18px; }
  .floating-icons { min-height: 220px; }
  .admin-main { padding: 22px 16px; }
}

@media (max-width: 440px) {
  .logo-name { display: none; }
  .brand-pill { display: none; }
  .home-title { font-size: 40px; }
  .latest-heading h2 { font-size: 34px; }
  .hero-app-row { align-items: flex-start; }
  .hero-icon { width: 68px; height: 68px; border-radius: 15px; }
}
