/* ============================================================
   DT Store — style.css
   Developer: Developers Tech
   ============================================================ */

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* ── Colors — DT Store Logo Palette (Navy → Teal → Green) ── */
  --bg: #080f18;
  --bg-2: #060b12;
  --card: #0e1c2a;
  --card-hover: #132436;
  --border: #1a3045;
  --border-light: #0f2035;
  --accent: #00c2a8;
  /* teal — logo primary */
  --accent-2: #008f82;
  /* deep teal */
  --accent-green: #39e09b;
  /* bright green — logo highlight */
  --accent-navy: #0d2240;
  /* dark navy — logo shadow */
  --accent-glow: rgba(0, 194, 168, .20);
  --accent-glow2: rgba(0, 194, 168, .08);
  --text: #c4d6e0;
  --text-muted: #7a9db5;
  --text-dim: #4d7a90;
  --white: #e8f4f8;
  --green: #39e09b;
  --yellow: #e3b341;
  --red: #f85149;
  --purple: #5eead4;
  /* replaced purple with teal-cyan to stay on-theme */

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --ease: cubic-bezier(.25, .46, .45, .94);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 150ms;
  --t-base: 250ms;
  --t-slow: 400ms;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .5), 0 4px 16px rgba(0, 0, 0, .4);
  --shadow-glow: 0 0 24px var(--accent-glow), 0 0 48px var(--accent-glow2);
  --shadow-modal: 0 24px 80px rgba(0, 0, 0, .8);

  /* Nav */
  --nav-h: 64px;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;
  --glass-hover-bg: rgba(255, 255, 255, 0.06);
  --glass-hover-border: var(--accent);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Typography ────────────────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--white);
  font-weight: 700;
  line-height: 1.2;
}

p,
li {
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

a:hover {
  color: var(--white);
}

code,
pre {
  font-family: var(--font-mono);
}

strong {
  color: var(--white);
  font-weight: 600;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Glassmorphism Utility ────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--t-base) var(--ease);
}

.glass:hover {
  background: var(--glass-hover-bg);
  border-color: var(--glass-hover-border);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* ── Bento Grid ────────────────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: var(--space-lg);
}

.bento-item {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
}

.bento-1 { 
  grid-column: span 2; 
  grid-row: span 2; 
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-2xl);
}

.bento-1 .bento-icon {
  transform: scale(1.4);
  margin-bottom: var(--space-xl);
}

.bento-1 h3 {
  font-size: 26px;
}

.bento-1 p {
  font-size: 16px;
  max-width: 280px;
  margin: 0 auto;
}

.bento-2 { grid-column: span 2; grid-row: span 1; }
.bento-3 { grid-column: span 1; grid-row: span 1; }
.bento-4 { grid-column: span 1; grid-row: span 1; }

@media (max-width: 991px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-1 { padding: var(--space-lg); justify-content: flex-end; align-items: flex-start; text-align: left; }
  .bento-1 .bento-icon { transform: none; margin-bottom: var(--space-md); }
  .bento-1 p { max-width: none; margin: 0; }
}
@media (max-width: 480px) {
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-1, .bento-2, .bento-3, .bento-4 { grid-column: span 1; grid-row: span 1; }
}

/* ── Progress Bar ──────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-green));
  z-index: 2000;
  width: 0%;
  transition: width 0.1s ease;
}

/* ── Bento Content Styling ── */
.bento-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  color: var(--accent);
}

.bento-content h3 {
  font-size: 20px;
  margin-bottom: var(--space-xs);
  color: var(--white);
}

.bento-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.bento-bg-glow {
  position: absolute;
  top: -20%;
  right: -20%;
  width: 150px;
  height: 150px;
  filter: blur(40px);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .3px;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    transform var(--t-fast) var(--ease-back),
    color var(--t-base) var(--ease);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow), 0 4px 16px rgba(31, 111, 235, .4);
  transform: translateY(-2px);
  color: #fff;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-large {
  padding: 14px 28px;
  font-size: 15px;
}

/* Download button pulse */
.btn-download {
  position: relative;
  overflow: hidden;
}

.btn-download::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .15) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform .6s var(--ease);
}

.btn-download:hover::after {
  transform: translateX(100%);
}

/* ── NAVBAR ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: auto;
  background: rgba(8, 15, 24, .85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}

.navbar.scrolled {
  background: rgba(8, 15, 24, .96);
  border-bottom-color: var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  gap: var(--space-lg);
}

/* Logo */
.nav-logo,
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
}

.logo-icon svg {
  transition: transform var(--t-base) var(--ease-back);
}

.nav-logo:hover .logo-icon svg {
  transform: rotate(-8deg) scale(1.1);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
  letter-spacing: -.3px;
}

.logo-accent {
  color: var(--accent);
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-link {
  position: relative;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--accent);
  border-radius: 99px;
  transition: left var(--t-base) var(--ease), right var(--t-base) var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: var(--accent-glow2);
}

.nav-link.active::after {
  left: 14px;
  right: 14px;
}

.nav-link:hover::after {
  left: 14px;
  right: 14px;
}

/* Nav Right */
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.search-toggle-btn,
.nav-github-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
}

.search-toggle-btn:hover,
.nav-github-btn:hover {
  background: var(--card);
  border-color: var(--accent);
  color: var(--accent);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 8px;
  transition: border-color var(--t-fast) var(--ease);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
  transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease), background var(--t-fast) var(--ease);
}

.hamburger:hover {
  border-color: var(--accent);
}

.hamburger:hover span {
  background: var(--accent);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Search Bar */
.search-bar-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow) var(--ease);
  border-top: 0px solid var(--border);
}

.search-bar-wrapper.open {
  max-height: 80px;
  border-top-width: 1px;
}

.search-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--white);
}

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

.search-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.search-clear.visible {
  opacity: 1;
}

.search-clear:hover {
  color: var(--red);
}

/* Mobile Menu */
.mobile-menu {
  display: flex !important;
  flex-direction: column;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 0 var(--space-lg);
  gap: 4px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: 
    max-height 0.6s ease-in-out,
    padding 0.6s ease-in-out,
    opacity 0.5s ease-in-out,
    transform 0.6s ease-in-out,
    visibility 0.6s;
}

.mobile-menu.open {
  max-height: 500px;
  padding: var(--space-md) var(--space-lg);
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-link {
  display: block;
  padding: 12px var(--space-md);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.mobile-link:hover,
.mobile-link.active {
  background: var(--card);
  color: var(--accent);
}

.mobile-link.active {
  position: relative;
}

.mobile-link.active::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: var(--space-md);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 99px;
}

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 48px) var(--space-lg) var(--space-3xl);
}

/* Hero background */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 30%, transparent 100%);
  opacity: .4;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .12;
  animation: glowPulse 6s ease-in-out infinite;
}

.hero-glow-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: var(--accent);
  /* teal */
  animation-delay: 0s;
}

.hero-glow-2 {
  width: 400px;
  height: 400px;
  top: 100px;
  right: -80px;
  background: var(--accent-green);
  /* bright green */
  animation-delay: 2s;
}

.hero-glow-3 {
  width: 300px;
  height: 300px;
  bottom: 0;
  left: 40%;
  background: var(--accent-2);
  /* deep teal */
  animation-delay: 4s;
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: .10;
    transform: scale(1);
  }

  50% {
    opacity: .18;
    transform: scale(1.08);
  }
}

/* Particles */
.floating-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent-green);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }

  10% {
    opacity: .8;
  }

  90% {
    opacity: .4;
  }

  100% {
    opacity: 0;
    transform: translateY(-120vh) scale(.3);
  }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 12px;
  color: var(--text-muted);
  animation: fadeInDown .6s var(--ease) both;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(63, 185, 80, .6);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(63, 185, 80, 0);
  }
}

.hero-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.08;
  color: var(--white);
  animation: fadeInUp .7s var(--ease) .1s both;
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s infinite alternate;
}

@keyframes shimmer {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(20deg); }
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.7;
  height: 1.7em; /* Keep height stable for typing */
  animation: fadeInUp .7s var(--ease) .2s both;
}

/* 3D Icon */
.hero-icon-3d {
  position: relative;
  width: 140px;
  height: 140px;
  perspective: 1000px;
  margin: var(--space-md) 0;
  animation: fadeInUp .8s var(--ease) .25s both, float 6s ease-in-out infinite;
}

.icon-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease-out;
}

.icon-layer img {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 194, 168, 0.2);
}

.layer-1 { transform: translateZ(30px); opacity: 1; }
.layer-2 { transform: translateZ(15px); opacity: 0.5; filter: blur(2px); }
.layer-3 { transform: translateZ(0px); opacity: 0.2; filter: blur(5px); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  animation: fadeInUp .7s var(--ease) .3s both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Hero actions */
.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp .7s var(--ease) .4s both;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: .5;
  animation: scrollBob 2s ease-in-out infinite;
}

.scroll-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

@keyframes scrollBob {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: .5;
  }

  50% {
    transform: translateX(-50%) translateY(6px);
    opacity: .8;
  }
}

/* ── SECTION SHARED ─────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: lowercase;
  margin-bottom: var(--space-sm);
  opacity: .8;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -1px;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 16px;
}

/* ── APPS SECTION ───────────────────────────────────────────── */
.apps-section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.apps-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* Controls */
.apps-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.filter-tab {
  padding: 7px 16px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.filter-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sort-select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--t-fast) var(--ease);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b949e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.sort-select:hover,
.sort-select:focus {
  border-color: var(--accent);
  color: var(--white);
}

/* No results */
.no-results {
  text-align: center;
  padding: var(--space-3xl) 0;
  color: var(--text-muted);
}

.no-results-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

/* Apps Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* App Card */
.app-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform var(--t-base) var(--ease-back),
    box-shadow var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease),
    background var(--t-base) var(--ease);
  animation: cardAppear .5s var(--ease) both;
}

.app-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5), 0 0 0 1px var(--accent), var(--shadow-glow);
  border-color: var(--accent);
  background: var(--card-hover);
}

/* Shimmer accent */
.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-green), var(--accent));
  background-size: 200%;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
  animation: shimmerLine 2s linear infinite;
}

.app-card:hover::before {
  opacity: 1;
}

@keyframes shimmerLine {
  0% {
    background-position: 0%;
  }

  100% {
    background-position: 200%;
  }
}

.app-card-body {
  padding: var(--space-lg);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-2), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

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

.card-icon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.card-meta {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: .3px;
}

.badge-version {
  background: rgba(88, 166, 255, .12);
  color: var(--accent);
  border: 1px solid rgba(88, 166, 255, .25);
}

.badge-category {
  background: rgba(188, 140, 255, .1);
  color: var(--purple);
  border: 1px solid rgba(188, 140, 255, .2);
}

.card-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Stats */
.card-stats {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 12px;
  color: var(--text-dim);
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-stat svg {
  flex-shrink: 0;
}

/* Card Rating */
.card-rating {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-md);
}

.star {
  font-size: 13px;
}

.star.filled {
  color: var(--yellow);
}

.star.empty {
  color: var(--text-dim);
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.card-size {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.card-btn-dl {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-fast) var(--ease-back);
}

.card-btn-dl:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.card-btn-dl:active {
  transform: scale(.96);
}

/* Card animation */
@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── ABOUT SECTION ──────────────────────────────────────────── */
.about-section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  transition: transform var(--t-base) var(--ease-back), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

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

.about-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-glow), rgba(57, 224, 155, .12));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  margin-bottom: var(--space-md);
}

.about-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--white);
}

.about-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Developer CTA */
.developer-cta {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  background-image: radial-gradient(ellipse 50% 80% at 90% 50%, rgba(0, 194, 168, .08) 0%, transparent 70%);
}

.dev-cta-inner {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.dev-avatar {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
}

.dev-info {
  flex: 1;
}

.dev-info h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.dev-info p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  padding: var(--space-2xl) 0 var(--space-lg);
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-md);
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--t-fast) var(--ease);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow2);
}

.footer-nav h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: var(--space-md);
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-nav li a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

.footer-nav li a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-dim);
}

.footer-bottom a {
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--accent);
}

.footer-tech {
  font-size: 12px;
}

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: modalFadeIn var(--t-base) var(--ease);
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-container {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  animation: modalSlideIn var(--t-slow) var(--ease-back);
  scrollbar-width: thin;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: sticky;
  float: right;
  top: var(--space-md);
  margin: var(--space-md) var(--space-md) calc(-1 * var(--space-md)) 0;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast) var(--ease);
}

.modal-close:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(248, 81, 73, .1);
}

.modal-body {
  padding: var(--space-xl);
}

/* Modal Header */
.modal-header {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  margin-bottom: var(--space-xl);
}

.modal-app-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-2), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.modal-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-app-name {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.modal-meta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.modal-rating {
  display: flex;
  gap: 2px;
}

/* Screenshots */
.modal-screenshots {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-sm);
  scrollbar-width: thin;
}

.modal-screenshot {
  flex-shrink: 0;
  width: 160px;
  height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  position: relative;
}

.modal-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screenshot-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, var(--card-hover) 0%, var(--bg) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font-mono);
}

.screenshot-placeholder span {
  font-size: 28px;
}

/* Modal sections */
.modal-section {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
}

.modal-section:last-of-type {
  border-bottom: none;
}

.modal-section h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: var(--space-md);
}

.modal-description {
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
}

.modal-release-notes {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-developer {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.modal-dev-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent);
  font-weight: 500;
}

/* Modal download */
.modal-download {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.modal-dl-note {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ── BACK TO TOP ────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-base) var(--ease);
  opacity: 0;
  transform: translateY(10px);
}

.back-to-top:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top[hidden] {
  display: flex;
  opacity: 0;
  pointer-events: none;
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--card-hover);
}

/* ── TOAST ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 3000;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade-in on scroll */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */

/* ── Tablet ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .apps-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .hero-content {
    max-width: 600px;
  }

  .hero-stats {
    gap: var(--space-lg);
  }
}

/* ── Mobile (≤ 640px) ──────────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --space-3xl: 56px;
    --space-2xl: 48px;
    --space-xl: 28px;
  }

  /* Navbar */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* ── HERO — key mobile fix ── */
  .hero {
    min-height: auto;
    padding: calc(var(--nav-h) + 16px) var(--space-md) 32px;
    align-items: flex-start;
  }

  .hero-content {
    gap: 28px;
    max-width: 100%;
    padding: 0;
  }

  .hero-badge {
    font-size: 11px;
    padding: 5px 12px;
  }

  .hero-title {
    font-size: clamp(28px, 8vw, 42px);
    letter-spacing: -1px;
    line-height: 1.12;
  }

  .hero-subtitle {
    font-size: 15px;
    max-width: 100%;
    line-height: 1.65;
  }

  .hero-stats {
    gap: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
  }

  .stat-number {
    font-size: 24px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-divider {
    width: 1px;
    height: 32px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: var(--space-sm);
  }

  .hero-actions .btn {
    justify-content: center;
    width: 100%;
    padding: 13px 20px;
  }

  .scroll-indicator {
    bottom: 20px;
  }

  /* Apps */
  .section {
    padding: var(--space-xl) 0;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .apps-controls {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }

  .filter-tabs {
    flex-wrap: wrap;
  }

  .sort-select {
    width: 100%;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
  }

  .dev-cta-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Modal */
  .modal-overlay {
    padding: var(--space-sm);
    align-items: flex-end;
  }

  .modal-container {
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .modal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-body {
    padding: var(--space-md);
  }

  .modal-app-icon {
    width: 64px;
    height: 64px;
  }

  .modal-app-name {
    font-size: 22px;
  }

  .modal-screenshot {
    width: 130px;
    height: 230px;
  }

  /* Back to Top */
  .back-to-top {
    bottom: 16px;
    right: 16px;
  }
}

/* ── Very small (≤ 400px) ──────────────────────────────── */
@media (max-width: 400px) {
  :root {
    --space-lg: 16px;
  }

  .filter-tab {
    padding: 6px 10px;
    font-size: 11px;
  }

  .hero-title {
    font-size: clamp(24px, 9vw, 34px);
  }

  .stat-number {
    font-size: 20px;
  }

  .container {
    padding: 0 var(--space-md);
  }
}