/* global.css — apk-download-v9 (Orange theme) */
* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  --FontBody: "Inter", sans-serif;
  --FontTitle: "Plus Jakarta Sans", "Inter", sans-serif;
  --Theme: #FF6B35;
  --ThemeGradient: linear-gradient(135deg, #FF6B35 0%, #E85500 100%);
  --ThemeHover: #E85500;
  --BgPage: #FFFFFF;
  --BgAlt: #F7FAFC;
  --BgNav: rgba(255,255,255,0.95);
  --BgFooter: #FFF7ED;
  --TextPrimary: #1A202C;
  --TextSecondary: #718096;
  --TextMuted: #A0AEC0;
  --Border: #F7FAFC;
  --BorderMid: #E2E8F0;
  --CardBg: #FFFFFF;
  --CardRadius: 12px;
  --CardShadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --CardShadowHover: 0 4px 16px rgba(0,0,0,0.12);
}
html {
  --dir-multiplier: 1;
  --dir-transform: rotateZ(0deg);
}
html[dir="rtl"] {
  --dir-multiplier: -1;
  --dir-transform: rotateZ(180deg);
}
body {
  font-family: var(--FontBody);
  color: var(--TextPrimary);
  background: var(--BgPage);
  -webkit-font-smoothing: antialiased;
}
p { font-family: var(--FontBody); }
h1, h2, h3, h4, h5, h6,
div, a, dl, dt, dd,
ul, ol, li, form, table,
textarea, button, span, input {
  font-family: var(--FontTitle);
}
ol, ul, li { list-style: none; }
img {
  border: none;
  vertical-align: middle;
  object-fit: cover;
}
a {
  text-decoration: none;
  color: inherit;
  outline: none;
  border: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
a:focus, a:visited { text-decoration: none; outline: none; }
input {
  outline: none;
  border: none;
  box-shadow: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
}
input:focus, input:focus-visible, input:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}
button {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
button:hover, button:focus, button:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}
table, td, tr, th { border-collapse: collapse; }
ul::-webkit-scrollbar { width: 0 !important; }

/* ---- utility ---- */
.adTitle {
  text-align: start;
  font-size: 12px;
  line-height: 16px;
  margin: 3px 0 6px 0;
  color: #ccc;
}
.adHeight { width: 100%; }
.ad-box { width: 100%; }
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-oneline {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  word-break: break-all;
}
.cover-link {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  bottom: 0;
  inset-inline-end: 0;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn 0.3s ease-in; }
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.slide-in-up { animation: slideInUp 0.4s ease-out; }
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loading-spinner { animation: spin 1s linear infinite; }

/* ---- shared section header ---- */
.section-hd {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  margin-bottom: 32px;
}
.section-hd-title {
  font-family: var(--FontTitle);
  font-size: 26px;
  font-weight: 700;
  color: var(--TextPrimary);
  line-height: 1.3;
  margin-bottom: 6px;
  position: relative;
  display: inline-block;
}
.section-hd-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--ThemeGradient);
  border-radius: 2px;
  margin-top: 8px;
}
.section-hd-desc {
  font-size: 15px;
  color: var(--TextSecondary);
  font-weight: 400;
}
@media (max-width: 767px) {
  .section-hd-title { font-size: 20px; }
}

/* ---- app card (shared) ---- */
.app-card {
  display: block;
  background: var(--CardBg);
  border-radius: var(--CardRadius);
  border: 1px solid var(--Border);
  padding: 20px;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}
.app-card:hover {
  box-shadow: var(--CardShadowHover);
  transform: translateY(-2px);
}
.app-card__top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.app-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--BorderMid);
  background: #f0f0f0;
}
.app-card__info { flex: 1; min-width: 0; }
.app-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--TextPrimary);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-card__cat {
  font-size: 12px;
  color: var(--TextMuted);
  line-height: 1.4;
}
.app-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--TextSecondary);
  margin-top: 4px;
}
.app-card__rating svg {
  width: 12px;
  height: 12px;
  fill: #F59E0B;
  flex-shrink: 0;
}

/* ---- category icon card ---- */
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--CardBg);
  border-radius: var(--CardRadius);
  border: 1px solid var(--Border);
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
.cat-card:hover {
  box-shadow: var(--CardShadowHover);
  transform: translateY(-2px);
}
.cat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}
.cat-card__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--TextPrimary);
  text-align: center;
  line-height: 1.3;
}

/* ---- page container ---- */
.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 767px) {
  .page-container { padding: 0 16px; }
  .app-card { padding: 12px; }
  .app-card__top { gap: 10px; margin-bottom: 8px; }
  .app-card__icon { width: 44px; height: 44px; border-radius: 10px; }
  .app-card__name { font-size: 13px; }
}

/* ---- btn-primary ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ThemeGradient);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(255,107,53,0.28);
  text-decoration: none;
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

/* ---- article card ---- */
.article-card {
  display: block;
  background: var(--CardBg);
  border-radius: var(--CardRadius);
  border: 1px solid var(--Border);
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.article-card:hover {
  box-shadow: var(--CardShadowHover);
  transform: translateY(-2px);
}
.article-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--BgAlt);
}
.article-card__body { padding: 16px; }
.article-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--TextPrimary);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.article-card__desc {
  font-size: 13px;
  color: var(--TextSecondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ---- breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 2px;
}
.breadcrumb-link {
  font-size: 13px;
  color: var(--Theme);
  font-weight: 500;
  text-decoration: none;
}
.breadcrumb-link:hover { text-decoration: underline; }
.breadcrumb-sep {
  padding: 0 6px;
  color: var(--TextMuted);
  font-size: 13px;
}
.breadcrumb-current {
  font-size: 13px;
  color: var(--TextSecondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- lazy img placeholder ---- */
.lazyImg[src*="loading"] {
  background: #f0f0f0;
}
