/* ==========================================================================
   Arabs PC Games - Main RTL Design System
   Core Web Vitals Optimized (CLS = 0, Pure Vanilla, Logical Properties)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-card: #f8fafc;
  --bg-elevated: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --accent: #7C3AED;
  --accent-hover: #6D28D9;
  --accent-soft: rgba(124, 58, 237, 0.1);
  --cyan: #06B6D4;
  --cyan-soft: rgba(6, 182, 212, 0.12);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 12px 28px rgba(124, 58, 237, 0.16);
  --container: 1280px;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-card: #111827;
  --bg-elevated: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --accent-soft: rgba(124, 58, 237, 0.2);
  --cyan-soft: rgba(6, 182, 212, 0.18);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 28px rgba(124, 58, 237, 0.28);
}

/* Base Reset */
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.apg-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 72px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.apg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.apg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.apg-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}

.apg-brand-text span { color: var(--accent); }

.apg-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.apg-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}

.apg-nav a:hover,
.apg-nav .current-menu-item > a {
  color: var(--accent);
  background: var(--accent-soft);
}

.apg-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.apg-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.apg-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.apg-mobile-toggle { display: none; }

[data-theme="dark"] .apg-sun-icon { display: inline-flex; }
[data-theme="dark"] .apg-moon-icon { display: none; }
.apg-sun-icon { display: none; }
.apg-moon-icon { display: inline-flex; }

/* Mobile Drawer */
.apg-mobile-drawer {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--bg);
  z-index: 55;
  padding: 20px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}

.apg-mobile-drawer.is-open { display: block; }
.apg-mobile-drawer a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   Hero Banner (Pure HTML/CSS/SVG - Ultra Fast LCP < 1.2s)
   ========================================================================== */
.apg-hero {
  position: relative;
  margin-block: 20px 28px;
  border-radius: 22px;
  background: radial-gradient(circle at 15% 50%, rgba(6, 182, 212, 0.22), transparent 42%),
              radial-gradient(circle at 85% 25%, rgba(124, 58, 237, 0.32), transparent 48%),
              linear-gradient(135deg, #0b1120 0%, #131c33 55%, #1a103d 100%);
  color: #f8fafc;
  padding: 40px 32px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.28);
  box-shadow: 0 20px 45px rgba(11, 17, 32, 0.35);
}

.apg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.apg-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.apg-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #67e8f9;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.apg-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 3.2vw, 2.55rem);
  font-weight: 800;
  line-height: 1.3;
}

.apg-hero h1 span {
  background: linear-gradient(90deg, #a78bfa, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.apg-hero p {
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 1.02rem;
  max-width: 580px;
}

/* Instant Live Search */
.apg-search-box {
  position: relative;
  max-width: 560px;
}

.apg-search-form {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  padding: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.apg-search-form:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
}

.apg-search-input {
  flex: 1;
  background: transparent;
  border: 0;
  color: #ffffff;
  padding: 10px 14px;
  outline: none;
  min-width: 0;
}

.apg-search-input::placeholder { color: #94a3b8; }

.apg-search-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #ffffff;
  border: 0;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.apg-search-submit:hover { background: var(--accent-hover); }

.apg-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline: 0;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  z-index: 80;
  display: none;
  max-height: 400px;
  overflow-y: auto;
}

.apg-search-dropdown.is-open { display: block; }

.apg-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.apg-search-item:last-child { border-bottom: 0; }
.apg-search-item:hover { background: var(--accent-soft); }

.apg-search-item img {
  width: 64px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-card);
}

.apg-search-item-info { flex: 1; min-width: 0; }
.apg-search-item-title {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apg-search-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.apg-search-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Hero Visual Rig (Pure CSS/SVG) */
.apg-hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.apg-hero-stats-card {
  width: 100%;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 18px;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  backdrop-filter: blur(8px);
}

.apg-stat-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.apg-stat-pill strong {
  display: block;
  font-size: 1.25rem;
  color: #22d3ee;
  font-weight: 800;
}

.apg-stat-pill span {
  font-size: 0.82rem;
  color: #cbd5e1;
}

/* ==========================================================================
   Genre Strip & Section Headers
   ========================================================================== */
.apg-section { margin-block: 36px; }

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

.apg-section-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.apg-section-title::before {
  content: "";
  width: 5px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--cyan));
}

.apg-genre-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.apg-genre-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.15s;
}

.apg-genre-chip:hover,
.apg-genre-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Filter Tabs */
.apg-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.apg-tab-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
}

.apg-tab-btn.is-active {
  background: var(--accent);
  color: #ffffff;
}

.apg-tab-panel { display: none; }
.apg-tab-panel.is-active { display: block; }

/* ==========================================================================
   High-Converting Game Card Grid (4 Desktop / 2 Tablet / 2 Compact Mobile)
   ========================================================================== */
.apg-games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  content-visibility: auto;
  contain-intrinsic-size: 340px;
}

.apg-game-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.apg-game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.apg-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
}

.apg-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.apg-game-card:hover .apg-card-media img { transform: scale(1.04); }

.apg-ribbon {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--accent);
  z-index: 2;
}

.apg-ribbon--updated { background: var(--cyan); color: #0b1120; }

.apg-size-tag {
  position: absolute;
  bottom: 8px;
  inset-inline-end: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
}

.apg-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px;
  gap: 8px;
}

.apg-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.apg-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}

.apg-badge--ar {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.apg-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apg-card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.apg-rating-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--warning);
}

.apg-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.15s;
}

.apg-card-cta:hover { background: var(--accent-hover); }

/* ==========================================================================
   Single Game Download Hub
   ========================================================================== */
.apg-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-block: 16px;
}

.apg-breadcrumbs a:hover { color: var(--accent); }
.apg-bc-current { color: var(--text); font-weight: 700; }

.apg-game-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 24px;
}

.apg-game-cover {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

.apg-game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apg-game-hero-info h1 {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 800;
}

.apg-specs-quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-block: 14px;
}

.apg-spec-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
}

.apg-spec-item span { display: block; font-size: 0.78rem; color: var(--text-muted); }
.apg-spec-item strong { font-weight: 800; }

.apg-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.apg-btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.apg-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.86rem;
}

.apg-btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.apg-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 22px;
}

.apg-box h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 800;
}

/* System Requirements Comparison */
.apg-req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.apg-req-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.apg-req-col h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--accent);
}

.apg-req-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.apg-req-list li:last-child { border-bottom: 0; }
.apg-req-list span { color: var(--text-muted); }

/* "Can I Run It?" Checker */
.apg-checker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.apg-checker-field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.apg-checker-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.apg-checker-result {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  display: none;
}

.apg-checker-result.is-pass { display: block; background: rgba(16, 185, 129, 0.14); color: var(--success); border: 1px solid var(--success); }
.apg-checker-result.is-warn { display: block; background: rgba(245, 158, 11, 0.14); color: var(--warning); border: 1px solid var(--warning); }
.apg-checker-result.is-fail { display: block; background: rgba(239, 68, 68, 0.14); color: var(--danger); border: 1px solid var(--danger); }

/* YouTube Facade & Gallery */
.apg-yt-facade {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.apg-yt-facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.apg-yt-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
}

.apg-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.apg-gallery-item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  padding: 0;
  background: #0f172a;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}

.apg-gallery-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.apg-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.apg-gallery-item:hover img {
  transform: scale(1.03);
}

/* High-Standard Editorial Article Structure */
.apg-entry-content {
  font-size: 1.04rem;
  line-height: 1.9;
  color: var(--text);
}

.apg-entry-content > *:first-child { margin-top: 0; }
.apg-entry-content > *:last-child { margin-bottom: 0; }

.apg-entry-content h2 {
  margin: 28px 0 12px;
  padding-inline-start: 12px;
  border-inline-start: 4px solid var(--accent);
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.4;
}

.apg-entry-content h3 {
  margin: 22px 0 10px;
  font-size: 1.14rem;
  font-weight: 800;
  color: var(--accent);
}

.apg-entry-content p { margin: 0 0 16px; }

.apg-entry-content ul,
.apg-entry-content ol {
  margin: 0 0 18px;
  padding-inline-start: 24px;
}

.apg-entry-content ul { list-style: disc; }
.apg-entry-content ol { list-style: decimal; }
.apg-entry-content li { margin-bottom: 8px; }

.apg-entry-content blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border-inline-start: 4px solid var(--cyan);
  background: var(--bg);
  border-radius: 0 12px 12px 0;
  color: var(--text-muted);
  font-weight: 600;
}

.apg-entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.apg-entry-content th,
.apg-entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: start;
}

.apg-entry-content th {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.apg-entry-content img {
  border-radius: 12px;
  margin-block: 16px;
  box-shadow: var(--shadow);
}

.apg-entry-content a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Lightbox Modal */
.apg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 17, 32, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.apg-lightbox.is-open { display: flex; }
.apg-lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; }
.apg-lightbox-close {
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Download Mirrors & Password */
.apg-mirror-list { display: flex; flex-direction: column; gap: 10px; }
.apg-mirror-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.apg-mirror-type {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--cyan-soft);
  color: var(--cyan);
}

.apg-password-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  margin-bottom: 16px;
}

/* Interactive Star Rating & Breakdown */
.apg-rating-widget {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.apg-stars { display: inline-flex; gap: 4px; direction: ltr; }
.apg-star-btn {
  background: transparent;
  border: 0;
  padding: 2px;
  cursor: pointer;
  color: #cbd5e1;
  transition: color 0.15s, transform 0.15s;
}

.apg-star-btn.is-filled,
.apg-star-btn:hover { color: var(--warning); transform: scale(1.1); }

.apg-rating-breakdown {
  margin-top: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  max-width: 340px;
}

.apg-bd-row {
  display: grid;
  grid-template-columns: 42px 1fr 38px;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.apg-bd-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.apg-bd-fill { height: 100%; background: var(--warning); }

/* HowTo Install Steps */
.apg-howto-list { counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.apg-howto-list li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.apg-howto-list li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}

/* ==========================================================================
   Modern Accordion FAQs
   ========================================================================== */
.apg-faq-list { display: flex; flex-direction: column; gap: 12px; }
.apg-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.apg-faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 700;
  text-align: start;
  cursor: pointer;
}

.apg-faq-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}

.apg-faq-item.is-open .apg-faq-icon {
  transform: rotate(45deg);
  background: var(--accent);
  color: #ffffff;
}

.apg-faq-panel {
  display: none;
  padding: 0 18px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.apg-faq-item.is-open .apg-faq-panel { display: block; }

/* ==========================================================================
   Blog & Guides (2-Column Grid + Bullet-Free Chevron Sidebar)
   ========================================================================== */
.apg-content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-block: 24px;
}

.apg-blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.apg-blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.apg-blog-card img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.apg-blog-card-body { padding: 16px; }
.apg-blog-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.apg-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}

.apg-widget-title { margin: 0 0 12px; font-size: 1.05rem; font-weight: 800; }

.apg-pill-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
}

.apg-pill-list li a:hover { border-color: var(--accent); color: var(--accent); }

/* CLS-Safe Ad Slot */
.apg-ad-slot {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block: 16px;
  overflow: hidden;
}

/* Pagination */
.apg-pagination .nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 28px;
}

.apg-pagination .page-numbers {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-weight: 700;
}

.apg-pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Sticky Mobile Download Bar */
.apg-sticky-dl {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 70;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ==========================================================================
   4-Pillar Authority Footer (#0b1120)
   ========================================================================== */
.site-footer {
  background: #0b1120;
  color: #cbd5e1;
  padding-block: 48px 24px;
  margin-top: 48px;
  border-top: 1px solid #1e293b;
}

.apg-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 28px;
  margin-bottom: 32px;
}

.site-footer h3 {
  color: #ffffff;
  font-size: 1.05rem;
  margin: 0 0 14px;
}

.apg-footer-links li { margin-bottom: 8px; }
.apg-footer-links a { font-size: 0.92rem; color: #94a3b8; transition: color 0.15s; }
.apg-footer-links a:hover { color: #22d3ee; }

.apg-social-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.apg-social-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
}

.apg-social-pill:hover { background: var(--accent); border-color: var(--accent); }

.apg-footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: #64748b;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .apg-games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apg-hero-grid { grid-template-columns: 1fr; }
  .apg-game-hero { grid-template-columns: 1fr; }
  .apg-content-layout { grid-template-columns: 1fr; }
  .apg-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .apg-nav { display: none; }
  .apg-mobile-toggle { display: inline-flex; }
  .apg-games-grid { gap: 10px; }
  .apg-card-body { padding: 10px; }
  .apg-card-title { font-size: 0.88rem; }
  .apg-req-grid { grid-template-columns: 1fr; }
  .apg-checker-grid { grid-template-columns: 1fr; }
  .apg-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .apg-blog-grid { grid-template-columns: 1fr; }
  .apg-footer-grid { grid-template-columns: 1fr; }
  .apg-sticky-dl { display: flex; }
  body.single-pc_game { padding-bottom: 70px; }
}
