/*
Theme Name: PaidAppStore v4.9.4
Theme URI: https://website4sell.com
Author: AlgorithmDevZ
Description: A premium app store WordPress theme inspired by PaidAppStore - featuring trending apps, games, categories, and MOD APK listings.
Version: 4.9.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: paidappstore
Tags: custom-menu, featured-images, full-width-template, rtl-language-support, sticky-post, translation-ready
*/

/* =============================================
   CSS VARIABLES  (overridden by JS for themes)
   ============================================= */
:root {
  --primary: #FF6A00;
  --primary-light: #FF8C38;
  --primary-bg: #FFF4EC;
  --primary-shadow: rgba(255,106,0,.30);
  --primary-shadow-md: rgba(255,106,0,.20);
  --primary-shadow-sm: rgba(255,106,0,.14);
  --primary-glow: rgba(255,106,0,.12);
  --dark: #1A1A1A;
  --dark2: #2D2D2D;
  --gray: #666666;
  --gray-light: #999999;
  --border: #EBEBEB;
  --bg: #F7F7F7;
  --white: #FFFFFF;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 8px 28px rgba(0,0,0,0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-display: 'Nunito', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-height: 64px;
  --bottom-nav-height: 64px;
  --transition: 0.2s ease;
}

/* =============================================
   DARK MODE VARIABLES
   ============================================= */
body.dark-mode {
  --dark:       #F0F0F0;
  --dark2:      #C0C0C0;
  --gray:       #888888;
  --gray-light: #505050;
  --border:     #181818;
  --bg:         #0A0A0A;
  --white:      #111111;
  --card-shadow: 0 2px 16px rgba(0,0,0,0.7);
  --card-shadow-hover: 0 8px 32px rgba(0,0,0,0.85);
  --primary-bg: var(--primary-glow);
  --primary-shadow: rgba(255,106,0,.22);
  --primary-shadow-md: rgba(255,106,0,.15);
  --primary-shadow-sm: rgba(255,106,0,.10);
  --primary-glow: rgba(255,106,0,.09);
}

body.dark-mode { background: #0A0A0A; color: #F0F0F0; }

/* Header — translucent dark glass */
body.dark-mode .site-header {
  background: rgba(8,8,8,0.70);
  border-color: rgba(255,255,255,0.07);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}

/* Navigation */
body.dark-mode .bottom-nav { background: rgba(8,8,8,0.92); border-color: #1D1D1D; }

/* Cards & surfaces — layered depth */
body.dark-mode .section-wrapper         { background: #0A0A0A; }
body.dark-mode .section-wrapper.bg-gray { background: #0F0F0F; }
body.dark-mode .section-divider         { background: #141414; }

body.dark-mode .category-row     { background: #181818; border-color: #1C1C1C; }
body.dark-mode .category-row:hover { border-color: var(--primary); background: #1E1E1E; }

body.dark-mode .details-card,
body.dark-mode .tutorials-card,
body.dark-mode .author-card       { background: #111111; border-color: #1A1A1A; }

body.dark-mode .detail-row,
body.dark-mode .tutorial-item,
body.dark-mode .tutorials-hdr     { border-color: #161616; }

body.dark-mode .tutorial-tog:hover { background: #111; }
body.dark-mode .tutorial-vid       { background: #111; }

body.dark-mode .app-info-block { background: #111111; }
body.dark-mode .sticky-bar { background: rgba(8,8,8,0.97); border-color: #1D1D1D; }

body.dark-mode .pill { background: #161616; border-color: #303030; color: #DEDEDE; }
body.dark-mode .badge-mod { background: var(--primary-shadow-sm); border-color: var(--primary-shadow); }

/* Search & forms */
body.dark-mode .hero-search   { background: #111; border-color: #1C1C1C; }
body.dark-mode .hero-cat-card { background: #111; border-color: #1C1C1C; }
body.dark-mode input { color: #EDEDED; background: transparent; }

body.dark-mode .header-search-dropdown {
  background: rgba(18,18,18,0.98);
  border-color: #1A1A1A;
  backdrop-filter: blur(24px);
}
body.dark-mode .header-search-dropdown form { background: #111; border-color: #1C1C1C; }

/* Misc */
body.dark-mode .faq-card          { background: #111111; border-color: #1A1A1A; }
body.dark-mode .site-footer       { background: #111; border-color: #111; }
body.dark-mode .archive-app-card  { background: #111111; border-color: #1A1A1A; }
body.dark-mode .app-detail-item   { background: #111; }
body.dark-mode .slide-menu-panel  { background: #0A0A0A; border-color: #111; }
body.dark-mode .game-card         { background: #111111; }
body.dark-mode .update-card .update-thumb { background: #111; }
body.dark-mode .sc-dot            { background: #333; }
body.dark-mode .sc-dot.active     { background: var(--primary); }

/* Pre-paint — no flash */
html.dark-mode-pre body        { background: #0A0A0A !important; }
html.dark-mode-pre .site-header {
  background: rgba(20,20,20,0.78) !important;
  border-color: rgba(255,255,255,0.06) !important;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Fluid base: 13px at 320px → 15px at 480px+ */
  font-size: clamp(13px, 3.2vw, 15px);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;     /* inherits from fluid html font-size */
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
}

/* =============================================
   SITE HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  /* Ultra-transparent frosted glass */
  background: rgba(255,255,255,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(28px) saturate(220%) brightness(1.05);
  -webkit-backdrop-filter: blur(28px) saturate(220%) brightness(1.05);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 24px rgba(0,0,0,0.04);
  height: 62px;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;   /* logo | all-right-items */
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
}

/* All right-side items: dots + toggle + search in one flex row */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;   /* push everything to far right */
  flex-shrink: 0;
  min-width: 0;
}

/* Dots sit directly left of toggle, no extra spacing */
.theme-color-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
  padding: 3px 0;
}

.logo-android-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
  transition: transform 0.3s ease;
}
.site-logo:hover .logo-android-img { transform: rotate(-8deg) scale(1.1); }

.logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =============================================
   THEME COLOUR PICKER DOTS
   ============================================= */

.theme-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  opacity: 0.5;
}

.theme-dot:hover {
  transform: scale(1.35);
  opacity: 0.9;
}

/* Active — slightly bigger + full opacity */
.theme-dot.active {
  transform: scale(1.5);
  opacity: 1;
}

/* =============================================
   DARK MODE TOGGLE  (pill + knob design)
   ============================================= */
.dark-mode-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #D1D5DB;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.22s;
}
body.dark-mode .dark-mode-toggle { background: #4F46E5; }

.dm-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.22s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dm-knob svg { width: 10px; height: 10px; }

.icon-sun  { display: block; color: #F59E0B; }
.icon-moon { display: none;  color: #818CF8; }

body.dark-mode .dm-knob { transform: translateX(18px); }
body.dark-mode .icon-sun  { display: none; }
body.dark-mode .icon-moon { display: block; }

.header-actions-placeholder { display: none; }

.btn-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--dark);
  cursor: pointer;
  padding: 4px;
}
.btn-icon:hover { background: rgba(0,0,0,0.06); }
.btn-icon svg { width: 18px; height: 18px; }

/* =============================================
   ANNOUNCEMENT BANNER
   ============================================= */
.announcement-banner {
  background: #FFF3E8;
  border-bottom: 1px solid #FFD4A8;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--dark2);
  position: relative;
}

/* When announcement-banner is also fp-announce (front page), keep the primary bg */
.fp-announce.announcement-banner {
  background: var(--primary);
  border-bottom: none;
  color: #fff;
}

.announcement-banner .icon { color: var(--primary); flex-shrink: 0; }
.fp-announce.announcement-banner .icon { color: #fff; }
.announcement-banner .cta-link { color: var(--primary); font-weight: 700; text-decoration: underline; }
.announcement-banner .cta-btn {
  background: #1A73E8;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.announcement-banner .close-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gray);
  font-size: 16px;
  transition: var(--transition);
  padding: 0;
}
.announcement-banner .close-btn:hover { background: var(--border); }
/* White close button on primary-colour banner */
.fp-announce.announcement-banner .close-btn { color: rgba(255,255,255,.85); }
.fp-announce.announcement-banner .close-btn:hover { background: rgba(255,255,255,.25); }
body.dark-mode .announcement-banner { background: #111111; border-color: #1A1A1A; }

/* =============================================
   CONTAINER
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  background: var(--white);
  padding: clamp(20px, 5vw, 32px) clamp(14px, 4vw, 20px) clamp(18px, 4.5vw, 28px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-bg);
  border: 1.5px solid #FFD0A8;
  color: var(--primary);
  font-size: clamp(9px, 2.2vw, 11px);
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: clamp(4px, 1.2vw, 6px) clamp(10px, 3vw, 14px);
  border-radius: 30px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(22px, 6.5vw, 40px);
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.15;
}

.hero-title span { color: var(--primary); }

.hero-subtitle {
  font-size: clamp(12px, 3.2vw, 15px);
  color: var(--gray);
  margin-bottom: 20px;
  line-height: 1.6;
  max-width: 480px;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: clamp(10px, 2.5vw, 14px) clamp(14px, 4vw, 20px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  max-width: 560px;
}

.hero-search svg { color: var(--gray-light); flex-shrink: 0; width: clamp(16px, 4vw, 20px); height: clamp(16px, 4vw, 20px); }

.hero-search input {
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: clamp(13px, 3.2vw, 15px);
  color: var(--dark);
  background: transparent;
  flex: 1;
}
.hero-search input::placeholder { color: var(--gray-light); }

/* Category Quick Links */
.hero-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 560px;
}

.hero-cat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(14px, 3.5vw, 20px) clamp(8px, 2vw, 12px) clamp(12px, 3vw, 16px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.8vw, 10px);
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
  cursor: pointer;
}
.hero-cat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.hero-cat-icon {
  width: clamp(40px, 11vw, 56px);
  height: clamp(40px, 11vw, 56px);
  border-radius: clamp(10px, 2.8vw, 16px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-cat-icon svg { width: clamp(20px, 5.5vw, 28px); height: clamp(20px, 5.5vw, 28px); color: white; }
.hero-cat-icon.games { background: #7C3AED; }
.hero-cat-icon.apps { background: #2563EB; }
.hero-cat-icon.tv { background: var(--primary); }

.hero-cat-label {
  font-size: clamp(11px, 2.8vw, 14px);
  font-weight: 700;
  color: var(--dark);
  font-family: var(--font-display);
}

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 16px;
  /* Ensure child divs (e.g. eyebrow+title wrappers) stay centred */
  gap: 8px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: clamp(15px, 4vw, 19px);
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
  margin: 0;
}

/* The | bar — perfectly centred via flexbox */
.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
  /* No align-self needed — parent align-items:center handles it */
}

.section-title.no-bar::before { display: none; }

.section-icon { font-size: clamp(14px, 3.5vw, 17px); line-height: 1; }

/* Categories header has an eyebrow label above the title —
   keep them left-aligned and the "View All" link centred vertically */
.section-header > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}
/* Eyebrow text sits above title, no extra margin-top on h2 */
.section-header h2.section-title { margin-top: 0 !important; }

.see-all-link {
  font-size: clamp(11px, 2.8vw, 13px);
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}
.see-all-link:hover { opacity: 0.75; }
.see-all-link svg { width: clamp(12px, 3.2vw, 15px); height: clamp(12px, 3.2vw, 15px); }

/* =============================================
   SECTION WRAPPER
   ============================================= */
.section-wrapper { padding: 24px 0; background: var(--white); }
.section-wrapper.bg-gray { background: var(--bg); }

/* =============================================
   TRENDING SECTION
   ============================================= */
.trending-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.trending-scroll::-webkit-scrollbar { display: none; }

.trending-card {
  flex-shrink: 0;
  width: clamp(80px, 22vw, 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.5vw, 10px);
  text-align: center;
}

.trending-thumb {
  width: clamp(60px, 16vw, 78px);
  height: clamp(60px, 16vw, 78px);
  border-radius: clamp(12px, 3.5vw, 18px);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.trending-thumb img { width: 100%; height: 100%; object-fit: cover; }
.trending-thumb .placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 900;
  color: white;
}

.trending-name {
  font-size: clamp(10px, 2.5vw, 12px);
  font-weight: 600;
  color: var(--dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================
   FEATURED SLIDER
   ============================================= */
.featured-slider-wrap {
  padding: 0;
  position: relative;
}

.featured-slider {
  display: flex;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* NO scroll-snap-type — JS handles all snapping to avoid double-animation delay */
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y; /* browser owns vertical; JS owns horizontal */
}
.featured-slider::-webkit-scrollbar { display: none; }

/* ── Prev / Next arrow buttons ── */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-calc(50% + 18px)); /* shift up slightly above dots */
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s, opacity 0.15s, transform 0.15s;
  opacity: 0.85;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.slider-btn:hover  { background: var(--primary); opacity: 1; }
.slider-btn:active { transform: translateY(-calc(50% + 18px)) scale(0.92); }
.slider-btn--prev  { left: 10px; }
.slider-btn--next  { right: 10px; }
.slider-btn.slider-btn--hidden { opacity: 0; pointer-events: none; }

.featured-card {
  flex-shrink: 0;
  width: 100vw;          /* full viewport width */
  max-width: 100%;
  border-radius: 0;      /* no corner radius — clean full-bleed */
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  box-shadow: none;
  background: #1a1a2e;
  transition: none;       /* no hover lift on full-bleed */
}

.featured-card-img {
  width: 100%;
  height: clamp(220px, 58vw, 320px);
  object-fit: cover;
  display: block;
  opacity: 1;
}

.featured-card-img-placeholder {
  width: 100%;
  height: clamp(220px, 58vw, 320px);
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(48px, 14vw, 80px);
}

/* Bottom fade overlay */
.featured-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 14px 14px;
  background: linear-gradient(to top,
    rgba(0,0,0,0.92) 0%,
    rgba(0,0,0,0.60) 50%,
    transparent 100%
  );
}

.featured-card-app {
  display: flex;
  align-items: center;
  gap: 12px;
}

.featured-app-icon {
  width: clamp(46px, 12vw, 62px);
  height: clamp(46px, 12vw, 62px);
  border-radius: clamp(10px, 2.8vw, 14px);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.25);
  background: #2a2a3e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 6vw, 30px);
}
.featured-app-icon img { width: 100%; height: 100%; object-fit: cover; }

.featured-app-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.featured-app-name {
  font-family: var(--font-display);
  font-size: clamp(15px, 4.2vw, 20px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  line-height: 1.2;
}

.featured-app-badges { display: flex; flex-wrap: wrap; gap: 5px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.badge-version  { background: rgba(255,255,255,0.18); color: #fff; }
.badge-premium  { background: var(--primary); color: #fff; }
.badge-category { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.2); }
.badge-downloads{ background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.9); }

/* Dots — tight, right inside the section, no extra space */
.slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 10px 0 4px;
}
.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.12s, width 0.15s, border-radius 0.15s;
  cursor: pointer;
  flex-shrink: 0;
}
.slider-dot.active { background: var(--primary); width: 20px; border-radius: 4px; }

/* =============================================
   POPULAR GAMES GRID (2 cols)
   ============================================= */
.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 2.5vw, 12px);
  padding: 0 clamp(12px, 3.5vw, 18px);
}

.game-card {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;   /* portrait — matches screenshot */
  background: #1a1a2e;
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
  display: block;
  width: 100%;
}
.game-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.28); }

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.game-card-img-placeholder {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(36px, 10vw, 52px);
}

/* Strong gradient from bottom — like screenshot */
.game-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(28px, 8vw, 40px) clamp(10px, 2.8vw, 14px) clamp(10px, 2.8vw, 14px);
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.92) 0%,
    rgba(0,0,0,0.7) 45%,
    transparent 100%
  );
}

/* Game title — white bold, wraps to 2 lines max */
.game-card-name {
  font-family: var(--font-display);
  font-size: clamp(13px, 3.5vw, 16px);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: clamp(4px, 1.2vw, 6px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Version · Mod info row */
.game-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: clamp(6px, 1.8vw, 9px);
}

.game-card-version {
  font-size: clamp(10px, 2.6vw, 12px);
  color: var(--primary-light, #FF8C38);
  font-weight: 700;
}

.game-card-dot {
  font-size: clamp(10px, 2.6vw, 12px);
  color: rgba(255,255,255,0.5);
}

.game-card-mod {
  font-size: clamp(10px, 2.6vw, 12px);
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Category badge — white pill bottom left */
.game-card-cat-badge {
  display: inline-block;
  background: rgba(255,255,255,0.92);
  color: #111;
  font-size: clamp(10px, 2.4vw, 12px);
  font-weight: 700;
  padding: clamp(3px, 0.9vw, 5px) clamp(8px, 2.2vw, 12px);
  border-radius: 20px;
  letter-spacing: 0.1px;
}

/* =============================================
   POPULAR APPS GRID (3 cols)
   ============================================= */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition);
}
.app-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.10); }

.app-icon {
  width: clamp(56px, 15vw, 76px);
  height: clamp(56px, 15vw, 76px);
  border-radius: clamp(12px, 3.5vw, 18px);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(24px, 7vw, 34px);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }

.app-name {
  font-size: clamp(10px, 2.8vw, 13px);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-tag {
  font-size: clamp(10px, 2.4vw, 12px);
  color: var(--primary);
  font-weight: 600;
}

/* =============================================
   BROWSE CATEGORIES
   ============================================= */
.categories-grid {
  display: grid;
  /* calc ensures both columns together never exceed viewport minus padding */
  grid-template-columns: calc(50% - 5px) calc(50% - 5px);
  gap: 10px;
  padding: 0 16px;
  overflow: hidden;
  box-sizing: border-box;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px 8px 12px 12px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  /* Fixed height — never let particles or stacking context inflate this */
  height: 72px;
  max-height: 72px;
  flex-shrink: 0;
}
.category-row:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

.category-row-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.category-row-icon svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.category-row-info { flex: 1; min-width: 0; overflow: hidden; }
.category-row-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.category-row-count { font-size: 11px; color: var(--gray); margin-top: 2px; }

.category-row-arrow { color: #bbb; flex-shrink: 0; }
.category-row-arrow svg { width: 14px; height: 14px; }

/* =============================================
   TELEGRAM CTA BANNER
   ============================================= */
.telegram-banner {
  margin: 0 16px;
  background: linear-gradient(135deg, #1565C0 0%, #1976D2 60%, #0288D1 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: none;
  box-shadow: 0 4px 20px rgba(25, 118, 210, 0.30);
  transition: opacity .18s, transform .15s;
  text-decoration: none;
}
.telegram-banner:hover { opacity: .93; transform: translateY(-1px); }
body.dark-mode .telegram-banner {
  background: linear-gradient(135deg, #0D47A1 0%, #1565C0 60%, #0277BD 100%);
  box-shadow: 0 4px 24px rgba(13, 71, 161, 0.50);
}

.telegram-icon-wrap {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.18);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.22);
}
.telegram-icon-wrap svg { width: 28px; height: 28px; color: white; fill: white; }

.telegram-info { flex: 1; }
.telegram-title { font-family: var(--font-display); font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 3px; }
.telegram-desc  { font-size: 12px; color: rgba(255,255,255,0.80); margin-bottom: 4px; }
.telegram-meta  { font-size: 11px; color: rgba(255,255,255,0.70); display: flex; align-items: center; gap: 4px; }

.telegram-arrow {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.22);
}
.telegram-arrow svg { width: 18px; height: 18px; color: white; }

/* =============================================
   LATEST UPDATES
   ============================================= */
.updates-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 14px;
}

.update-tab {
  padding: 7px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  background: none;
}
.update-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.update-tab:not(.active) { color: var(--gray); border-color: var(--border); background: var(--white); }
.update-tab:not(.active):hover { border-color: var(--primary); color: var(--primary); }

/* Latest Updates — 3 cols mobile, 4 tablet, 6 desktop */
.updates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 14px;
}
@media (min-width: 540px) {
  .updates-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}
@media (min-width: 800px) {
  .updates-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
}

.upd-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  /* CRITICAL: min-width:0 lets grid cells shrink below content size
     Without this, the cell expands to fit full text = gaps & overflow */
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.upd-icon {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,0.13);
}
.upd-icon img { width: 68px; height: 68px; object-fit: cover; display: block; flex-shrink: 0; }
.upd-icon svg { width: 40%; height: 40%; }

.upd-name {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  text-align: center;
  /* Truncate with ellipsis — requires min-width:0 on parent */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  max-width: 100%;
  display: block;
}

.upd-cat {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

/* =============================================
   APP OF THE DAY
   ============================================= */
.aotd-card {
  margin: 0 clamp(12px, 3.5vw, 18px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--dark);
  position: relative;
  box-shadow: var(--card-shadow-hover);
  cursor: pointer;
  min-height: clamp(220px, 60vw, 320px);
}

.aotd-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary);
  color: white;
  font-size: clamp(10px, 2.5vw, 13px);
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.aotd-bg {
  width: 100%;
  height: clamp(220px, 60vw, 320px);
  object-fit: cover;
  opacity: 0.55;
}
.aotd-bg-placeholder {
  width: 100%;
  height: clamp(220px, 60vw, 320px);
  background: linear-gradient(135deg, #0D1117, #1A1A2E, #16213E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(56px, 18vw, 96px);
}

.aotd-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: clamp(14px, 4vw, 24px);
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, transparent 100%);
}

.aotd-subtitle { font-size: clamp(10px, 2.4vw, 12px); color: rgba(255,255,255,0.6); margin-bottom: 6px; letter-spacing: 0.5px; }

.aotd-description {
  font-size: clamp(11px, 2.8vw, 13px);
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.aotd-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aotd-app-row { display: flex; align-items: center; gap: 10px; }
.aotd-app-icon {
  width: clamp(36px, 10vw, 50px);
  height: clamp(36px, 10vw, 50px);
  border-radius: clamp(8px, 2.5vw, 12px);
  overflow: hidden;
  background: var(--dark2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 5vw, 24px);
}
.aotd-app-icon img { width: 100%; height: 100%; object-fit: cover; }
.aotd-app-name { font-family: var(--font-display); font-size: clamp(13px, 3.5vw, 16px); font-weight: 800; color: white; }
.aotd-app-cat { font-size: clamp(10px, 2.4vw, 12px); color: rgba(255,255,255,0.6); margin-top: 2px; }

.aotd-download-btn {
  background: var(--primary);
  color: white;
  padding: clamp(6px, 1.8vw, 10px) clamp(12px, 3.5vw, 20px);
  border-radius: 20px;
  font-size: clamp(11px, 2.8vw, 13px);
  font-weight: 700;
  transition: var(--transition);
}
.aotd-download-btn:hover { background: var(--primary-light); }

/* =============================================
   FAQ SECTION
   ============================================= */
.faq-section {
  padding: 32px 16px;
  background: var(--bg);
}

.faq-eyebrow {
  font-size: clamp(9px, 2.2vw, 11px);
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

.faq-main-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 20px;
}

.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.faq-icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--primary-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.faq-icon-wrap svg { width: 22px; height: 22px; color: var(--primary); }

.faq-content { flex: 1; }
.faq-question {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}
.faq-answer { font-size: 13px; color: var(--gray); line-height: 1.6; }
.faq-answer a { color: var(--primary); font-weight: 600; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--white);
  border-top: 1.5px solid var(--border);
  padding: 24px 16px;
  /* Ensure footer content always clears the fixed bottom nav */
  padding-bottom: calc(24px + var(--bottom-nav-height, 64px) + env(safe-area-inset-bottom, 0px));
}

.footer-top {
  margin-bottom: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 8px;
}

.footer-favicon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  color: var(--dark);
}

.footer-tagline {
  font-size: 12px;
  color: var(--gray);
  margin-top: 4px;
}

.footer-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-bottom: 20px;
}

.footer-nav a {
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
  transition: color var(--transition);
  padding: 3px 12px 3px 0;
  position: relative;
}
.footer-nav a:not(:last-child)::after {
  content: '·';
  position: absolute;
  right: 4px;
  color: var(--border);
}
.footer-nav a:hover { color: var(--primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-size: 11px;
  color: var(--gray-light);
}

.footer-disclaimer {
  font-size: 11px;
  color: var(--gray-light);
}

/* =============================================
   BOTTOM NAVIGATION
   ============================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  /* Semi-transparent so backdrop-filter blur is actually visible */
  background: rgba(255, 255, 255, 0.92);
  border-top: 1.5px solid var(--border);
  /* Height = nav icon area + iOS home indicator safe area */
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  /* Push nav item content above the home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* Older iOS (< 11.2) fallback */
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  /* flex-start + fixed-height items so icons/labels never drift into safe-area zone */
  align-items: flex-start;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  /* GPU compositing layer — fixes iOS Safari position:fixed + backdrop-filter bug */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: color 0.15s ease;
  color: var(--gray-light);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  /* Exactly the nav icon area — does NOT extend into the safe-area padding */
  height: var(--bottom-nav-height);
  padding: 6px 4px 4px;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  /* Ensure taps register on iOS */
  cursor: pointer;
  touch-action: manipulation;
}
.nav-item.active { color: var(--primary); }
.nav-item:active { opacity: 0.7; }
.nav-item:hover:not(.active) { color: var(--dark); }
.nav-item svg { width: 22px; height: 22px; flex-shrink: 0; }
.nav-item span { font-family: var(--font-body); white-space: nowrap; }

/* =============================================
   AD SLOTS — sharp box, always below content
   ============================================= */

/* Base slot wrapper */
.pas-ad-slot {
  width: 100%;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Sharp corners — no border-radius */
  border-radius: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: relative;
  /* Never overlap anything above */
  clear: both;
  z-index: 1;
}
body.dark-mode .pas-ad-slot {
  background: #181818;
  border-color: #2a2a2a;
}

/* "Advertisement" label above every active ad */
.pas-ad-slot:not(:empty)::before {
  content: 'Advertisement';
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--gray);
  opacity: 0.55;
  margin-bottom: 6px;
  width: 100%;
  text-align: center;
  line-height: 1;
}
body.dark-mode .pas-ad-slot:not(:empty)::before {
  color: #666;
}

/* AdSense / iframe inside — always 100% wide, never overflow */
.pas-ad-slot ins,
.pas-ad-slot iframe,
.pas-ad-slot > * {
  max-width: 100% !important;
  border-radius: 0 !important;
}

/* Hide when empty — no blank gap */
.pas-ad-slot:empty { display: none !important; }

/* ── Section-level ad wrap (between page sections) ── */
.pas-ad-wrap-section {
  padding: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* Sits cleanly below section, above next section */
  position: relative;
  z-index: 1;
  clear: both;
}

/* ── Inline ad wrap (inside lists / grids) ── */
.pas-ad-wrap-inline {
  padding: 0;
  /* Full bleed — sharp, no side padding */
}

/* ── Archive/grid inline ad row ── */
.al-list .pas-ad-slot,
.tc-apps-grid .pas-ad-slot {
  grid-column: 1 / -1;
  border-left: none;
  border-right: none;
  margin: 4px 0;
}

/* =============================================
   DIVIDER
   ============================================= */
.section-divider { height: 8px; background: var(--bg); }

/* =============================================
   LOADING PLACEHOLDER
   ============================================= */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* =============================================
   FLOATING DOTS ANIMATION (hero decoration)
   ============================================= */
@keyframes floatDot {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(-10px); opacity: 1; }
}
.float-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(61,220,132,0.5);
  border-radius: 50%;
  animation: floatDot 3s ease-in-out infinite;
  pointer-events: none;
}

/* =============================================
   RESPONSIVE - DESKTOP
   ============================================= */
@media (min-width: 768px) {
  .site-header { height: 68px; }
  .header-inner { padding: 0 20px; gap: 12px; }
  .logo-android-img { width: 40px; height: 40px; }
  .logo-text { font-size: 20px; }
  .theme-dot { width: 9px; height: 9px; }
  .hero-categories { grid-template-columns: repeat(3, 140px); }
  .games-grid { grid-template-columns: repeat(3, 1fr); }
  .apps-grid { grid-template-columns: repeat(4, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .bottom-nav { max-width: 768px; left: 50%; margin-left: -384px; right: auto; width: 768px; border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border); }
  .featured-card { max-width: 600px; }
}

@media (min-width: 1024px) {
  .hero-section { padding: 40px 0; }
  .apps-grid { grid-template-columns: repeat(6, 1fr); }
  .games-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Prevent any child from blowing the header width */
.site-header, .header-inner {
  max-width: 100%;
  overflow-x: clip;
}

/* =============================================
   WORDPRESS STANDARD CLASSES
   ============================================= */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.alignnone { margin: 0 0 16px; }
.alignleft { float: left; margin: 0 20px 16px 0; }
.alignright { float: right; margin: 0 0 16px 20px; }
.aligncenter { clear: both; display: block; margin: 0 auto 16px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--gray); padding: 6px 0; }

.entry-content p { margin-bottom: 16px; }
.entry-content h2, .entry-content h3 { margin: 24px 0 12px; }
.entry-content ul, .entry-content ol { padding-left: 20px; margin-bottom: 16px; }

/* =============================================
   SCROLL-REVEAL ANIMATIONS
   ============================================= */

/* Base hidden state — applied via JS */
.pas-reveal {
  opacity: 0;
  transition: opacity 0.38s ease;
  will-change: opacity;
}
.pas-reveal.pas-visible {
  opacity: 1;
}

/* Stagger delay helpers */
.pas-delay-1 { transition-delay: 0.05s; }
.pas-delay-2 { transition-delay: 0.10s; }
.pas-delay-3 { transition-delay: 0.15s; }
.pas-delay-4 { transition-delay: 0.20s; }
.pas-delay-5 { transition-delay: 0.25s; }
.pas-delay-6 { transition-delay: 0.30s; }

/* Hover shadow for cards — NO transform (prevents vertical stretch) */
.category-row,
.game-card,
.app-card,
.update-card,
.featured-card {
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.category-row:hover  { box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.game-card:hover     { box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.app-card:hover      { box-shadow: 0 4px 14px rgba(0,0,0,0.10); }
.update-card:hover   { box-shadow: 0 4px 14px rgba(0,0,0,0.10); }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .pas-reveal { opacity: 1; transform: none; transition: none; }
  .category-row:hover,
  .game-card:hover,
  .app-card:hover,
  .update-card:hover { transform: none; }
}

/* =============================================
   BACKGROUND AMBIENT ANIMATIONS
   Subtle floating orbs — clean, no lag
   ============================================= */

/* Canvas-style fixed background layer */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0;
  animation: pas-orb-fade-in 1.2s ease forwards;
}

/* Primary orb — top left */
body::before {
  width: 340px;
  height: 340px;
  top: -80px;
  left: -80px;
  background: radial-gradient(circle, rgba(var(--primary-rgb,255,106,0),0.13) 0%, transparent 70%);
  animation: pas-orb-fade-in 1.2s ease forwards, pas-float-a 18s ease-in-out infinite;
  animation-delay: 0s, 1.2s;
}

/* Secondary orb — bottom right */
body::after {
  width: 280px;
  height: 280px;
  bottom: 120px;
  right: -60px;
  background: radial-gradient(circle, rgba(var(--primary-rgb,255,106,0),0.09) 0%, transparent 70%);
  animation: pas-orb-fade-in 1.2s ease forwards, pas-float-b 22s ease-in-out infinite;
  animation-delay: 0.3s, 1.5s;
}

/* Dark mode orbs — more visible */
body.dark-mode::before {
  background: radial-gradient(circle, rgba(var(--primary-rgb,255,106,0),0.18) 0%, transparent 70%);
}
body.dark-mode::after {
  background: radial-gradient(circle, rgba(var(--primary-rgb,255,106,0),0.12) 0%, transparent 70%);
}

@keyframes pas-orb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pas-float-a {
  0%   { transform: translate(0px, 0px) scale(1); }
  33%  { transform: translate(30px, 20px) scale(1.06); }
  66%  { transform: translate(-15px, 35px) scale(0.96); }
  100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes pas-float-b {
  0%   { transform: translate(0px, 0px) scale(1); }
  33%  { transform: translate(-25px, -20px) scale(1.04); }
  66%  { transform: translate(18px, -35px) scale(0.97); }
  100% { transform: translate(0px, 0px) scale(1); }
}

/* Ensure page content sits above the orbs — only block-level page wrappers */
.section-wrapper,
.section-wrapper.bg-gray,
.arc-page,
.al-page,
.sa-info,
.sa-details-section,
.sa-tut-section,
.sa-author-section,
.sa-dl-section,
.tc-page {
  position: relative;
  z-index: 1;
}

/* Header and bottom-nav keep their own position (sticky / fixed) but need higher z */
.site-header { z-index: 999; }   /* sticky — do NOT add position:relative */
.bottom-nav  { position: fixed !important; z-index: 9999 !important; }   /* always on top */

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; opacity: 0.6; }
}

/* =============================================
   PERFORMANCE — LOW-END & MOBILE OPTIMISATION
   Visual design is identical — only rendering
   cost is reduced.
   ============================================= */

/* ── 1. Disable expensive fixed-layer blurs on mobile ──
   body::before / ::after use filter:blur(80px) which forces
   a full compositing layer on every frame. Remove on mobile. */
@media (max-width: 767px) {
  body::before, body::after {
    display: none;
  }
}

/* ── 2. will-change only on elements actively animating ── */
.pas-reveal {
  will-change: opacity;
}
/* Once revealed, free the layer immediately */
.pas-reveal.pas-visible {
  will-change: auto;
}
/* Cards never need will-change — pure CSS shadow hover */
.upd-card, .category-row,
.game-card, .app-card,
.update-card, .featured-card,
.trending-card {
  will-change: auto;
}

/* content-visibility removed — caused slow/delayed section paint
   on mid-range devices when scrolling at normal speed */

/* ── 4. No translateZ promotion on cards ──
   translateZ forces GPU compositing BEFORE layout is stable.
   On mobile this causes the "stale layout until hover" bug.
   Cards repaint cheaply via box-shadow only — no GPU layer needed. */

/* ── 5. Reduce backdrop-filter cost on mobile ──
   Backdrop-filter forces a full compositing pass — fine on
   desktop, expensive on low-end phones. */
@media (max-width: 767px) {
  .site-header {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: var(--bg-header, rgba(255,255,255,0.97)) !important;
  }
  body.dark-mode .site-header {
    background: rgba(10,10,10,0.97) !important;
  }
}

/* ── 6. Reduce orb animation duration — lighter easing ──
   Shorter duration = fewer intermediate frames drawn per second. */
@media (max-width: 1023px) {
  body::before {
    animation-duration: 1.2s, 28s !important;
    animation-timing-function: ease, ease-in-out !important;
  }
  body::after {
    animation-duration: 1.2s, 34s !important;
    animation-timing-function: ease, ease-in-out !important;
  }
}

/* ── 7. Scroll-bar thin paint on mobile ──
   The progress bar is a fixed element that repaints on every
   scroll — keep it on its own layer via will-change. */
#pas-scroll-bar {
  will-change: width;
}
