/* ==========================================================================
   PremiumX Web Store CSS — Matching apkzone exact distribution & EncRep Royal Theme
   ========================================================================== */

:root {
  --primary:        #141F91;
  --primary-hover:  #0A1466;
  --primary-light:  #3B47D9;
  --primary-dark:   #0A1466;
  --primary-deeper: #050A3D;
  --primary-glow:   rgba(20, 31, 145, 0.22);
  --primary-50:     #F3F4FD;
  --primary-100:    #E8EAFB;
  --primary-200:    #C8CDF5;

  --accent-gold:    #D4A574;
  --accent-gold-deep:#B8894F;
  --secondary:      #0891B2;
  --success:        #059669;
  --warning:        #D97706;
  --danger:         #DC2626;
  --gold:           #F59E0B;

  --bg-base:        #F5F7FC;
  --bg-primary:     #FFFFFF;
  --bg-secondary:   #F1F3FB;
  --bg-card:        #FFFFFF;
  --bg-card-hover:  #F5F7FC;
  --bg-input:       #FFFFFF;
  --bg-glass:       rgba(255, 255, 255, 0.95);

  --border:         #C8CDF5;
  --border-light:   #E3E6F3;
  --border-card:    #E3E6F3;

  --text:           #0A0F2E;
  --text-secondary: #475069;
  --text-muted:     #6B7494;
  --text-disabled:  #B4BCD6;

  --grad-primary: linear-gradient(135deg, #0A1466 0%, #141F91 100%);
  --grad-brand:   linear-gradient(135deg, #050A3D 0%, #141F91 50%, #3B47D9 100%);
  --grad-cyan:    linear-gradient(135deg, #0891B2 0%, #06B6D4 100%);
  --grad-green:   linear-gradient(135deg, #059669 0%, #10B981 100%);
  --grad-gold:    linear-gradient(135deg, #B8894F 0%, #D4A574 100%);
  --grad-red:     linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
  --grad-hero:    linear-gradient(145deg, #050A3D 0%, #0A1466 40%, #141F91 75%, #3B47D9 100%);

  --r-sm:   8px;
  --r:      14px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-full: 9999px;

  --shadow-sm:   0 2px 8px rgba(20, 31, 145, 0.06);
  --shadow:      0 4px 16px rgba(20, 31, 145, 0.12);
  --shadow-lg:   0 12px 36px rgba(20, 31, 145, 0.18);
  --header-h:    70px;

  --font: 'Cairo', 'Tajawal', sans-serif;
}

:root[data-theme="dark"] {
  --bg-base:        #060B18;
  --bg-primary:     #0A1628;
  --bg-secondary:   #0F1E35;
  --bg-card:        #132140;
  --bg-card-hover:  #1A2D52;
  --bg-input:       #0F1E35;
  --bg-glass:       rgba(10, 22, 40, 0.96);
  --border:         #141F91;
  --border-light:   #1E3A8A;
  --border-card:    #1A2D52;
  --text:           #F5F7FC;
  --text-secondary: #C8CDF5;
  --text-muted:     #7BA7D4;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text);
  direction: rtl;
  text-align: right;
  line-height: 1.75;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: var(--font); }

.container { max-width: 1300px; margin: 0 auto; padding: 0 16px; }
.section { padding: 40px 0; }
.page-wrapper { margin-top: var(--header-h); }

/* ── Fixed Site Header ─────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: var(--header-h);
  background: var(--bg-glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(200, 205, 245, 0.3);
  box-shadow: var(--shadow-sm);
}

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

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 44px; height: 44px;
  background: var(--grad-gold);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(184, 137, 79, 0.4);
}

.logo-title { font-size: 22px; font-weight: 900; color: var(--primary-dark); line-height: 1; }
:root[data-theme="dark"] .logo-title { color: #FFFFFF; }
.brand-gold { color: var(--accent-gold-deep); }
.logo-tagline { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }

/* Header Search */
.header-search { flex: 1; max-width: 480px; }
.search-input-wrap {
  position: relative; display: flex; align-items: center;
}

.search-input {
  width: 100%; height: 42px;
  padding: 0 44px 0 85px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-full);
  font-size: 13px; color: var(--text);
  transition: all 0.25s ease;
}

.search-input:focus {
  outline: none; border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(20, 31, 145, 0.1);
  background: #FFFFFF;
}

.search-icon {
  position: absolute; right: 14px; color: var(--text-muted); font-size: 20px; pointer-events: none;
}

.search-btn {
  position: absolute; left: 4px;
  height: 34px; padding: 0 16px;
  background: var(--grad-primary);
  color: #FFFFFF; border: none;
  border-radius: var(--r-full);
  font-weight: 700; font-size: 12px;
  cursor: pointer;
}

/* Nav Links */
.main-nav { display: flex; gap: 20px; }
.main-nav a {
  font-size: 14px; font-weight: 700; color: var(--text-secondary); transition: color 0.2s;
}
.main-nav a.active, .main-nav a:hover { color: var(--primary-light); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.vip-badge-pill {
  background: rgba(212, 165, 116, 0.15);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold-deep);
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; gap: 4px;
}

.theme-btn {
  width: 38px; height: 38px;
  border-radius: 50%; background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
}

/* ── Hero Section (apkzone style) ───────────────────────────────────────── */
.hero {
  background: var(--grad-hero);
  color: #FFFFFF;
  position: relative; overflow: hidden;
  padding: 48px 0;
  box-shadow: inset 0 -10px 30px rgba(0,0,0,0.2);
}

.hero-particles { position: absolute; inset: 0; pointer-events: none; }
.hero-glow {
  position: absolute; top: -20%; right: -10%; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.3) 0%, transparent 70%);
}

.hero-content { position: relative; z-index: 2; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(200, 205, 245, 0.3);
  padding: 6px 16px; border-radius: var(--r-full);
  font-size: 13px; font-weight: 700; margin-bottom: 16px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900; margin-bottom: 14px; line-height: 1.3;
}

.highlight {
  background: linear-gradient(135deg, #FCD34D, var(--accent-gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 600px; margin: 0 auto 24px; color: #C8CDF5; font-size: 15px;
}

.hero-cta { display: flex; justify-content: center; gap: 14px; }
.btn-hero-primary {
  background: var(--grad-gold); color: var(--primary-deeper);
  padding: 12px 28px; border-radius: var(--r);
  font-weight: 800; font-size: 14px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 20px rgba(184, 137, 79, 0.4);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.12); color: #FFFFFF;
  padding: 12px 28px; border-radius: var(--r);
  font-weight: 700; font-size: 14px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(200, 205, 245, 0.3);
  backdrop-filter: blur(10px);
}

/* ── Section Headers & Grids ────────────────────────────────────────────── */
.section-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}

.section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 800; color: var(--text);
}

.section-title-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #FFFFFF; font-size: 18px;
}

.grad-gold { background: var(--grad-gold); }
.grad-primary { background: var(--grad-primary); }
.grad-cyan { background: var(--grad-cyan); }

.apps-count-tag {
  background: var(--primary-100); color: var(--primary-dark);
  padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 800;
}

/* Featured Apps Grid */
.featured-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px;
}

.featured-card {
  background: var(--bg-card); border: 1.5px solid var(--border-card);
  border-radius: var(--r); padding: 18px; display: flex; gap: 16px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: all 0.25s ease;
}

.featured-card:hover {
  transform: translateY(-4px); border-color: var(--primary-light); box-shadow: var(--shadow);
}

.featured-card-icon img {
  width: 68px; height: 68px; border-radius: 16px; object-fit: cover;
  border: 1px solid var(--border-light);
}

.featured-card-name { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.featured-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }

/* Categories Grid */
.categories-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
}

.category-card {
  background: var(--bg-card); border: 1.5px solid var(--border-card);
  border-radius: var(--r); padding: 16px; text-align: center;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: all 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px); border-color: var(--primary-light); background: var(--primary-50);
}

.category-icon {
  width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center; color: #FFFFFF;
}

.category-name { font-size: 13px; font-weight: 800; color: var(--text); }
.category-count { font-size: 11px; color: var(--text-muted); }

/* Filter Chips Bar */
.filter-bar {
  display: flex; gap: 10px; overflow-x: auto; padding: 12px 0; margin-bottom: 12px;
}

.filter-chip {
  background: var(--bg-card); border: 1px solid var(--border-card);
  color: var(--text-secondary); padding: 8px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.filter-chip.active, .filter-chip:hover {
  background: var(--primary); color: #FFFFFF; border-color: var(--primary);
}

/* Main Grid Apps (Matching apkzone exact card structure) */
.grid-apps {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}

.app-card-inner {
  background: var(--bg-card); border: 1.5px solid var(--border-card);
  border-radius: var(--r); padding: 16px; text-align: center;
  box-shadow: var(--shadow-sm); position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: all 0.3s ease;
}

.app-card-inner:hover {
  transform: translateY(-6px); border-color: var(--primary-light); box-shadow: var(--shadow-lg);
}

.app-badges {
  position: absolute; top: 10px; right: 10px; display: flex; gap: 4px;
}

.badge-mod {
  background: var(--grad-gold); color: var(--primary-deeper);
  font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 6px;
}

.app-icon-wrap {
  width: 76px; height: 76px; margin: 10px auto 12px;
  border-radius: 18px; overflow: hidden;
  border: 1.5px solid var(--border-card); box-shadow: var(--shadow-sm);
}

.app-name {
  font-size: 15px; font-weight: 800; color: var(--text);
  line-height: 1.3; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.app-category-tag { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }

.star-rating {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--gold); margin-bottom: 10px;
}

.app-meta {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
  border-top: 1px dashed var(--border-card); padding-top: 8px; margin-bottom: 12px;
}

.btn-download-card {
  width: 100%; background: var(--primary-50); color: var(--primary);
  border: 1px solid var(--border-card); padding: 8px; border-radius: 10px;
  font-weight: 800; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.2s ease;
}

.app-card-inner:hover .btn-download-card {
  background: var(--primary); color: #FFFFFF; border-color: var(--primary);
}

/* ── Full Detail Modal (Matching apkzone app.php) ───────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5, 10, 61, 0.8); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-card {
  background: var(--bg-primary); border-radius: var(--r-xl);
  width: 92%; max-width: 900px; max-height: 90vh;
  position: relative; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
}

.modal-close-btn {
  position: absolute; top: 16px; left: 16px; z-index: 10;
  background: var(--bg-secondary); border: none;
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; color: var(--text-secondary);
}

.modal-body-scroll {
  overflow-y: auto; padding: 32px;
}

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted); margin-bottom: 20px;
}

.app-detail-header {
  display: flex; gap: 24px; margin-bottom: 28px;
}

.app-detail-icon img {
  width: 110px; height: 110px; border-radius: 24px;
  box-shadow: var(--shadow); border: 1.5px solid var(--border-card);
}

.app-detail-name { font-size: 24px; font-weight: 900; color: var(--text); }
.app-detail-developer { font-size: 13px; color: var(--text-muted); margin: 4px 0 10px; }

.app-detail-stats {
  display: flex; gap: 24px; margin: 16px 0;
  background: var(--bg-secondary); padding: 12px 20px; border-radius: var(--r);
}

.app-stat-num { font-size: 18px; font-weight: 900; color: var(--primary); }
.app-stat-label { font-size: 11px; color: var(--text-muted); }

.btn-download-big {
  background: var(--grad-primary); color: #FFFFFF;
  padding: 12px 28px; border-radius: var(--r);
  font-weight: 800; font-size: 15px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow); text-decoration: none;
}

.btn-purchase-big {
  background: var(--grad-gold); color: var(--primary-deeper);
  padding: 12px 28px; border-radius: var(--r);
  font-weight: 800; font-size: 15px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 15px rgba(184, 137, 79, 0.4);
}

.tech-info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px;
}

.tech-info-box {
  background: var(--bg-secondary); padding: 10px 14px;
  border-radius: var(--r-sm); border: 1px solid var(--border-card);
}

.tech-info-label { font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.tech-info-val { font-size: 13px; font-weight: 800; color: var(--text); margin-top: 2px; }

.features-grid-box {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px;
}

.feature-item-card {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-secondary); padding: 10px 14px;
  border-radius: var(--r-sm); border: 1px solid var(--border-card);
  font-size: 13px; color: var(--text);
}

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

/* Activation license key */
.license-box {
  background: #F0FDF4; border: 1.5px dashed #22C55E;
  padding: 16px; border-radius: var(--r); margin: 20px 0; text-align: center;
}

.license-key-code {
  font-family: monospace; font-size: 18px; font-weight: 900; color: #15803D;
  background: #FFFFFF; padding: 6px 16px; border-radius: 8px; display: inline-block; margin-top: 6px;
}

/* ==========================================================================
   Aptoide App Details Screen Theme & Custom Layout Styles
   ========================================================================== */

:root {
  --aptoide-orange: #FE6446;
  --aptoide-orange-glow: rgba(254, 100, 70, 0.35);
  --aptoide-orange-dark: #E25236;
  --aptoide-green: #10B981;
  --aptoide-green-light: #ECFDF5;
}

/* Main Grid Layout */
.app-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

@media (max-width: 992px) {
  .app-main-grid {
    grid-template-columns: 1fr;
  }
}

/* Aptoide Navigation Tabs Bar */
.aptoide-tabs-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--r-xl);
  padding: 8px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.aptoide-tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 20px;
  border-radius: var(--r-lg);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.aptoide-tab-btn:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.aptoide-tab-btn.active {
  background: var(--grad-primary);
  color: #FFFFFF !important;
  box-shadow: var(--shadow-sm);
}

.aptoide-tab-btn.active .material-icons {
  color: #FFFFFF !important;
}

/* Aptoide Hero Card Component */
.aptoide-hero-card {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.aptoide-hero-bg-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(254, 100, 70, 0.12) 0%, rgba(20, 31, 145, 0.05) 50%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.aptoide-hero-top {
  display: flex;
  gap: 26px;
  align-items: flex-start;
}

@media (max-width: 640px) {
  .aptoide-hero-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.aptoide-app-icon {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  object-fit: cover;
  border: 2px solid var(--border-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.aptoide-app-icon:hover {
  transform: scale(1.03);
}

.aptoide-app-meta-wrap {
  flex: 1;
}

.aptoide-app-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 8px;
}

.aptoide-app-developer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.aptoide-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-weight: 800;
  font-size: 12px;
}

:root[data-theme="dark"] .aptoide-verified-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

.aptoide-trusted-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* CTA Download Button Area */
.aptoide-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn-aptoide-download {
  background: linear-gradient(135deg, var(--aptoide-orange) 0%, var(--aptoide-orange-dark) 100%);
  color: #FFFFFF !important;
  padding: 14px 38px;
  border-radius: var(--r-lg);
  font-weight: 900;
  font-size: 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px var(--aptoide-orange-glow);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
}

.btn-aptoide-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(254, 100, 70, 0.5);
  background: linear-gradient(135deg, #FF7256 0%, #FE6446 100%);
}

.btn-aptoide-download .size-tag {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  margin-right: 4px;
}

.btn-aptoide-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1.5px solid var(--border-card);
  padding: 14px 20px;
  border-radius: var(--r-lg);
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-aptoide-secondary:hover {
  background: var(--primary-50);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* Aptoide Metric Stats Strip */
.aptoide-metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-top: 26px;
  background: var(--bg-secondary);
  padding: 16px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-card);
}

.aptoide-metric-pill {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aptoide-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.aptoide-metric-val {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
}

.aptoide-metric-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Screenshots Gallery with Horizontal Smooth Scroll */
.screenshots-gallery-wrapper {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-top: 24px;
}

.screenshots-scroll-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
}

.screenshots-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.screenshots-scroll-container::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 10px;
}

.screenshot-card-img {
  height: 280px;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border-card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  object-fit: cover;
}

.screenshot-card-img:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.lightbox-close-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

/* Versions History Section */
.versions-list-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.version-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  padding: 14px 20px;
  border-radius: var(--r-lg);
  transition: background 0.2s ease;
}

.version-item-row:hover {
  background: var(--primary-50);
}

.version-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.version-tag {
  font-weight: 900;
  font-size: 15px;
  color: var(--text);
}

.version-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* Ratings & Reviews Component */
.ratings-summary-box {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--r-lg);
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .ratings-summary-box {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.rating-score-large {
  font-size: 48px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.rating-stars-gold {
  color: #F59E0B;
  font-size: 20px;
  margin: 6px 0;
}

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.rating-progress-bg {
  flex: 1;
  height: 8px;
  background: var(--border-card);
  border-radius: 4px;
  overflow: hidden;
}

.rating-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
  border-radius: 4px;
}

/* User Reviews List */
.reviews-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.review-item-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 18px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.review-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

/* Floating Sticky Download Bar (Aptoide Mobile & Desktop Sticky Bar) */
.aptoide-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1.5px solid var(--border-card);
  padding: 12px 24px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(120%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.aptoide-sticky-bar.visible {
  transform: translateY(0);
}

.aptoide-sticky-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.aptoide-sticky-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.aptoide-sticky-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-card);
}

/* Description Collapsible Box */
.collapsible-text-box {
  position: relative;
  max-height: 180px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.collapsible-text-box.expanded {
  max-height: 2500px;
}

.collapsible-fade-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg-card));
  pointer-events: none;
}

.collapsible-text-box.expanded .collapsible-fade-overlay {
  display: none;
}

.btn-toggle-expand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-light);
  font-weight: 800;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 8px;
}

.btn-toggle-expand:hover {
  background: var(--primary-50);
}

/* Rich Description Format Styles */
#appDescriptionText h1, #appDescriptionText h2, #appDescriptionText h3 {
  color: var(--text);
  font-weight: 900;
  margin: 16px 0 8px;
}
#appDescriptionText blockquote {
  border-right: 4px solid var(--primary-light);
  background: var(--bg-secondary);
  padding: 12px 18px;
  border-radius: 8px;
  margin: 12px 0;
  font-style: italic;
  color: var(--text-secondary);
}
#appDescriptionText pre, #appDescriptionText code {
  font-family: monospace;
  background: #1E293B;
  color: #38BDF8;
  padding: 12px 16px;
  border-radius: 10px;
  display: block;
  overflow-x: auto;
  margin: 12px 0;
  direction: ltr;
  text-align: left;
}
#appDescriptionText .spoiler {
  background: var(--text);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
}
#appDescriptionText .spoiler:hover, #appDescriptionText .spoiler.revealed {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px dashed var(--border);
}
#appDescriptionText a {
  color: var(--primary-light);
  font-weight: 800;
  text-decoration: underline;
}

/* Mobile & Android Responsiveness Adjustments */
@media (max-width: 768px) {
  .site-header .container {
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
  }
  
  .header-search {
    order: 3;
    width: 100%;
    margin: 4px 0 0;
  }

  .main-nav {
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .aptoide-hero-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .aptoide-app-icon {
    width: 90px;
    height: 90px;
  }

  .aptoide-app-developer-row {
    justify-content: center;
    flex-wrap: wrap;
  }

  .aptoide-cta-row {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }

  .btn-aptoide-download {
    width: 100%;
    justify-content: center;
  }

  .aptoide-tabs-bar {
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
    padding: 6px;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .aptoide-tab-btn {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 13px;
  }

  .app-main-grid {
    grid-template-columns: 1fr !important;
  }

  .tech-info-grid {
    grid-template-columns: 1fr !important;
  }

  .aptoide-metrics-strip {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .ratings-summary-box {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
}


/* Footer & Social Media Icons */
.site-footer {
  background: var(--primary-deeper); color: #C8CDF5;
  text-align: center; padding: 28px 20px; font-size: 13px; margin-top: 40px;
}

.social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(200, 205, 245, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.social-icon-btn .material-icons {
  font-size: 18px;
}

.social-icon-btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.social-telegram:hover { background: #2AABEE; border-color: #2AABEE; color: #FFFFFF; }
.social-facebook:hover { background: #1877F2; border-color: #1877F2; color: #FFFFFF; }
.social-x:hover { background: #0F1419; border-color: #0F1419; color: #FFFFFF; }
.social-youtube:hover { background: #FF0000; border-color: #FF0000; color: #FFFFFF; }
.social-whatsapp:hover { background: #25D366; border-color: #25D366; color: #FFFFFF; }

