/* ==========================================================================
   Spac2 App Store (App Center 2.0) - Design System & UI Stylesheet
   Path: /app/data/css/app-store.css
   ========================================================================== */

:root {
  --primary: #2978FF;
  --primary-hover: #1555df;
  --primary-glow: rgba(41, 120, 255, 0.45);

  --bg-body: #282828;
  --bg-surface: #303030;
  --bg-surface-hover: #383838;
  --bg-capsule: rgba(40, 40, 40, 0.82);
  --bg-btn: #353535;
  --bg-btn-hover: #2978FF;
  
  --border: rgba(255, 255, 255, 0.09);
  --border-capsule: rgba(255, 255, 255, 0.13);
  --border-hover: rgba(255, 255, 255, 0.20);
  
  --text-primary: #FFFFFF;
  --text-secondary: #B0B3BC;
  --text-muted: #888C98;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --bg-capsule: rgba(255, 255, 255, 0.65);
  --bg-btn: #f1f5f9;
  --bg-btn-hover: #2978FF;

  --border: rgba(0, 0, 0, 0.08);
  --border-capsule: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);

  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
}

[data-theme="light"] .brand-name {
  color: #0f172a;
}

[data-theme="light"] .brand-divider {
  color: #94a3b8;
}

[data-theme="light"] .brand-app {
  color: #475569;
}

[data-theme="light"] .btn-back,
[data-theme="light"] .btn-theme-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.16);
  color: #0f172a;
}

[data-theme="light"] .btn-back:hover,
[data-theme="light"] .btn-theme-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .store-search-input {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .store-search-input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(41, 120, 255, 0.2), 0 8px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .search-clear-btn {
  background: rgba(0, 0, 0, 0.06);
  color: #64748b;
}

[data-theme="light"] .search-clear-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

[data-theme="light"] .app-tile-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .app-tile-card:hover {
  background: #ffffff;
  border-color: rgba(41, 120, 255, 0.3);
  box-shadow: 0 8px 24px rgba(41, 120, 255, 0.12);
}

[data-theme="light"] .app-tile-title {
  color: #0f172a;
}

[data-theme="light"] .category-heading {
  color: #0f172a;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE & Edge */
}

body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: 'Outfit', 'Plus Jakarta Sans', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE & Edge */
}

/* Hide scrollbar for Chrome, Safari, Opera & modern WebKit browsers */
::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* Ambient Canvas Glow Background */
.ambient-glow-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.22;
}

.glow-blue {
  top: -80px;
  left: 20%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #2978FF 0%, transparent 70%);
}

.glow-purple {
  top: 360px;
  right: 15%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
}

/* ==========================================================================
   Top Ambient Frosted Blur Overlay (Lớp phủ mờ chuyển sắc đỉnh trang)
   ========================================================================== */
.store-top-blur-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 88px;
  pointer-events: none;
  z-index: 95;
  background: linear-gradient(to bottom, rgba(40, 40, 40, 0.65) 0%, rgba(40, 40, 40, 0.15) 55%, transparent 100%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.75) 50%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.75) 50%, rgba(0, 0, 0, 0) 100%);
  transition: opacity 0.3s ease;
}

[data-theme="light"] .store-top-blur-layer {
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0.55) 0%, rgba(248, 250, 252, 0.18) 55%, transparent 100%);
}

/* ==========================================================================
   Top Suspended / Floating Header (Chuẩn hóa Spac2 Floating Glassmorphism Header)
   ========================================================================== */
.store-floating-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  pointer-events: none;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 8px 20px;
}

.store-floating-capsule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-capsule);
  border: 1px solid var(--border-capsule);
  border-radius: 20px;
  padding: 8px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  gap: 16px;
  max-width: 1360px;
  margin: 0 auto;
  pointer-events: auto;
  transform-origin: center top;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s ease,
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  will-change: transform;
}

.store-floating-capsule.header-scrolling-compact {
  transform: translateY(-2px) scale(0.985);
  background: rgba(40, 40, 40, 0.94);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

[data-theme="light"] .store-floating-capsule {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .store-floating-capsule.header-scrolling-compact {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Cụm bên trái: Nút Back + Brand Link + Logo Card + Brand Text */
.store-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-back {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f4f4f5;
  text-decoration: none;
  font-size: 19px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  flex-shrink: 0;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateX(-2px) scale(1.03);
}

.btn-back:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.22);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.18s ease;
}

.brand-link:hover {
  opacity: 0.92;
}

.brand-logo-card {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  padding: 3px;
  box-sizing: border-box;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-link:hover .brand-logo-card {
  transform: scale(1.06);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 7px;
  display: block;
}

.brand-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
}

.brand-name {
  font-weight: 800;
  font-size: 19px;
  color: #ffffff;
  letter-spacing: -0.025em;
  line-height: 1;
}

.brand-divider {
  font-size: 14px;
  font-weight: 300;
  color: #52525b;
  opacity: 0.85;
}

.brand-app {
  font-size: 14px;
  font-weight: 600;
  color: #a1a1aa;
  letter-spacing: -0.01em;
}

/* Cụm bên phải: Theme Toggle */
.store-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f4f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.btn-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.04);
}

.btn-theme-toggle:active {
  transform: scale(0.94);
}

/* ==========================================================================
   Main Store Layout & Omnibar
   ========================================================================== */
.store-main-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: calc(76px + env(safe-area-inset-top, 0px)) 20px 48px 20px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.store-search-container {
  width: 100%;
  max-width: 580px;
  margin: 4px auto 32px auto;
  display: flex;
  justify-content: center;
}

.store-search-pill {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-lens-icon {
  position: absolute;
  left: 18px;
  width: 18px;
  height: 18px;
  stroke: var(--text-secondary);
  pointer-events: none;
  transition: stroke 0.2s ease;
}

.store-search-input {
  width: 100%;
  height: 48px;
  background: rgba(48, 48, 48, 0.92);
  border: 1px solid var(--border-capsule);
  border-radius: var(--radius-pill);
  padding: 0 44px 0 48px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

.store-search-input::placeholder {
  color: var(--text-muted);
}

.store-search-input:focus {
  border-color: var(--primary);
  background: rgba(56, 56, 56, 0.98);
  box-shadow: 0 0 0 3px rgba(41, 120, 255, 0.25), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.store-search-pill:focus-within .search-lens-icon {
  stroke: var(--primary);
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.search-clear-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* ==========================================================================
   Quick Tag Filter Navigation (Scrollable Filter Pills)
   ========================================================================== */
.store-filter-nav {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 28px auto;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 5;
}

.store-filter-scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 6px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.store-filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  flex-shrink: 0;
}

.filter-tag-pill i {
  font-size: 15px;
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.filter-tag-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.filter-tag-pill:hover i {
  color: var(--text-primary);
}

.filter-tag-pill.active {
  background: var(--primary);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.filter-tag-pill.active i {
  color: #ffffff;
}

.filter-tag-pill:active {
  transform: scale(0.95);
}

[data-theme="light"] .filter-tag-pill {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

[data-theme="light"] .filter-tag-pill:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.16);
  color: #0f172a;
}

[data-theme="light"] .filter-tag-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(41, 120, 255, 0.35);
}

[data-theme="light"] .filter-tag-pill.active i {
  color: #ffffff;
}

/* ==========================================================================
   Skeleton Shimmer Loading Effect (selecoton)
   ========================================================================== */
.skeleton-section {
  animation: fadeInSkeleton 0.3s ease;
}

@keyframes fadeInSkeleton {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.11) 50%, rgba(255, 255, 255, 0.04) 100%);
  background-size: 200% 100%;
  animation: shimmerFlow 1.6s infinite ease-in-out;
  border-radius: 8px;
}

[data-theme="light"] .skeleton-shimmer {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.09) 50%, rgba(0, 0, 0, 0.04) 100%);
  background-size: 200% 100%;
}

@keyframes shimmerFlow {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-heading-placeholder {
  width: 140px;
  height: 18px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.skeleton-tile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 10px 4px;
  width: 100%;
}

.skeleton-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  margin-bottom: 8px;
}

.skeleton-text {
  width: 60px;
  height: 12px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-btn {
  width: 48px;
  height: 20px;
  border-radius: var(--radius-pill);
}

.spotlight-skeleton-card {
  flex: 0 0 clamp(200px, 17vw, 250px);
  height: 180px;
  border-radius: 16px;
  scroll-snap-align: start;
}

@media (max-width: 640px) {
  .spotlight-skeleton-card {
    flex: 0 0 clamp(190px, 58vw, 230px);
    height: 170px;
  }
}

/* ==========================================================================
   Spotlight Showcase (Hero Curated App Carousel with Live UI Preview)
   ========================================================================== */
.store-spotlight-section {
  width: 100%;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeInSpotlight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes fadeInSpotlight {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.spotlight-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.spotlight-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spotlight-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.spotlight-title i {
  color: #f59e0b;
  font-size: 17px;
}

.spotlight-subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.spotlight-carousel-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spotlight-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f4f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotlight-nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.06);
}

.spotlight-nav-btn:active {
  transform: scale(0.92);
}

[data-theme="light"] .spotlight-nav-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

[data-theme="light"] .spotlight-nav-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.16);
}

.spotlight-carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 12px 4px;
  margin: 0 -4px;
  will-change: scroll-position;
}

.spotlight-carousel-track::-webkit-scrollbar {
  display: none;
}

.spotlight-card {
  flex: 0 0 clamp(200px, 17vw, 250px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: rgba(48, 48, 48, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s ease,
              border-color 0.28s ease,
              background 0.28s ease;
  position: relative;
  user-select: none;
}

@media (max-width: 640px) {
  .spotlight-card {
    flex: 0 0 clamp(190px, 58vw, 230px);
  }
}

.spotlight-card:hover {
  transform: translateY(-4px);
  background: rgba(58, 58, 58, 0.85);
  border-color: rgba(41, 120, 255, 0.45);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35), 0 0 20px rgba(41, 120, 255, 0.2);
}

.spotlight-card:active {
  transform: scale(0.98);
}

.spotlight-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.spotlight-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.spotlight-card:hover .spotlight-preview-img {
  transform: scale(1.05);
}

.spotlight-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 30%, rgba(10, 11, 16, 0.75) 100%);
  pointer-events: none;
}

.spotlight-content {
  padding: 8px 12px 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 6px;
  background: transparent;
}

.spotlight-app-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spotlight-app-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  box-sizing: border-box;
}

.spotlight-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 7px;
  display: block;
}

.spotlight-app-info {
  flex: 1;
  min-width: 0;
}

.spotlight-app-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.spotlight-app-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.spotlight-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.spotlight-tag-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.spotlight-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(41, 120, 255, 0.35);
  transition: all 0.2s ease;
}

.spotlight-card:hover .spotlight-open-btn {
  background: #ffffff;
  color: #09090b;
  box-shadow: 0 3px 14px rgba(255, 255, 255, 0.4);
  transform: scale(1.02);
}

/* Light Theme for Spotlight */
[data-theme="light"] .spotlight-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .spotlight-card:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(41, 120, 255, 0.4);
  box-shadow: 0 14px 32px rgba(41, 120, 255, 0.12);
}

[data-theme="light"] .spotlight-app-title {
  color: #0f172a;
}

[data-theme="light"] .spotlight-overlay-gradient {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.85) 100%);
}

[data-theme="light"] .spotlight-action-row {
  border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .spotlight-tag-badge {
  background: rgba(0, 0, 0, 0.04);
  color: #64748b;
  border-color: rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Main Content & Categorized Sections (Edge-to-Edge Fluid Grid)
   ========================================================================== */
.store-main-container {
  flex: 1;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: calc(68px + env(safe-area-inset-top, 0px)) clamp(12px, 2vw, 36px) 72px clamp(12px, 2vw, 36px);
  position: relative;
  z-index: 1;
}

.store-search-container {
  max-width: 580px;
  width: 100%;
  margin: 0 auto 12px auto;
}

.store-sections-wrapper {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

.store-category-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  animation: fadeInCategory 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInCategory {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.category-header-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding-left: 2px;
  margin-bottom: 2px;
}

.category-heading {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.category-heading i {
  font-size: 15px;
  color: var(--primary);
}

.category-count-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

[data-theme="light"] .category-count-badge {
  background: rgba(0, 0, 0, 0.05);
  color: #64748b;
  border-color: rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   Category Mini Preview Showcase (3 Random UI Preview Cards per Section)
   ========================================================================== */
.category-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  width: 100%;
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .category-preview-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 4px 2px;
    margin: 0 -4px 4px -4px;
  }

  .category-preview-grid::-webkit-scrollbar {
    display: none;
  }
}

.cat-preview-card {
  display: flex;
  flex-direction: column;
  background: rgba(48, 48, 48, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease,
              border-color 0.25s ease,
              background 0.25s ease;
  position: relative;
  user-select: none;
}

@media (max-width: 900px) {
  .cat-preview-card {
    flex: 0 0 clamp(180px, 52vw, 220px);
    scroll-snap-align: start;
  }
}

.cat-preview-card:hover {
  transform: translateY(-3px);
  background: rgba(58, 58, 58, 0.85);
  border-color: rgba(41, 120, 255, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.cat-preview-card:active {
  transform: scale(0.98);
}

.cat-preview-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.cat-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.cat-preview-card:hover .cat-preview-img {
  transform: scale(1.05);
}

.cat-preview-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 30%, rgba(10, 11, 16, 0.75) 100%);
  pointer-events: none;
}

.cat-preview-body {
  padding: 6px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
}

.cat-preview-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  padding: 1.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  box-sizing: border-box;
}

.cat-preview-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
  display: block;
}

.cat-preview-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cat-preview-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.cat-preview-desc {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.cat-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2.5px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cat-preview-card:hover .cat-preview-btn {
  background: #ffffff;
  color: #09090b;
  border-color: #ffffff;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.35);
}

/* Light Mode for Category Previews */
[data-theme="light"] .cat-preview-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .cat-preview-card:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(41, 120, 255, 0.4);
  box-shadow: 0 8px 22px rgba(41, 120, 255, 0.12);
}

[data-theme="light"] .cat-preview-title {
  color: #0f172a;
}

[data-theme="light"] .cat-preview-gradient {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.85) 100%);
}

.category-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 12px 6px;
  width: 100%;
}

@media (min-width: 600px) {
  .category-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 14px 8px;
  }
}

@media (min-width: 1024px) {
  .category-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 16px 10px;
  }
}

@media (min-width: 1440px) {
  .category-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 18px 12px;
  }
}

@media (min-width: 1920px) {
  .category-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px 14px;
  }
}

/* ==========================================================================
   App Tile Card (Ultra-Sleek Native Minimalist Aesthetic)
   ========================================================================== */
.app-tile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 6px 3px 8px 3px;
  border-radius: 14px;
  background: transparent;
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1), background 0.2s ease, box-shadow 0.22s ease;
  position: relative;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}

.app-tile-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.app-tile-card:active {
  transform: scale(0.94);
}

.app-tile-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  margin-bottom: 5px;
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
  flex-shrink: 0;
}

.app-tile-card:hover .app-tile-icon-box {
  transform: scale(1.05);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65), 0 0 16px rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.app-tile-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.app-tile-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 6px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
  letter-spacing: -0.1px;
}

.app-tile-get-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 23px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-btn);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  transition: all 0.2s ease;
}

.app-tile-card:hover .app-tile-get-btn {
  background: #ffffff;
  color: #09090b;
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.store-empty-box {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.store-empty-box p {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 6px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.store-minimal-footer {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.store-footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.store-footer-links a:hover {
  color: #ffffff;
}

@media (max-width: 640px) {
  .store-floating-header {
    padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 6px 10px;
  }

  .store-floating-capsule {
    padding: 6px 10px;
    gap: 8px;
    border-radius: 18px;
  }

  .btn-back {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand-logo-card {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .brand-name {
    font-size: 16.5px;
  }

  .brand-divider {
    font-size: 13px;
  }

  .brand-app {
    font-size: 13px;
  }

  .store-search-container {
    max-width: 100%;
    margin: 4px auto 24px auto;
  }

  .store-search-input {
    height: 44px;
    padding: 0 38px 0 42px;
    font-size: 14px;
  }

  .search-lens-icon {
    left: 14px;
    width: 16px;
    height: 16px;
  }

  .btn-theme-toggle {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  
  .store-main-container {
    padding: calc(74px + env(safe-area-inset-top, 0px)) 14px 40px 14px;
  }

  .category-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px 6px;
  }

  .app-tile-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 15px;
  }

  .app-tile-title {
    font-size: 12px;
  }

  .app-tile-get-btn {
    height: 24px;
    padding: 0 12px;
    font-size: 10.5px;
  }

  .store-minimal-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

