/* ================================================================
   EveryAI – Premium App Directory CSS
   ================================================================ */

/* ── Page Transitions ── */
body {
  animation: pageIn 0.4s ease-out both;
}

body.page-exit {
  animation: pageOut 0.3s ease-in both;
}

@keyframes pageIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pageOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}


/* ── Clerk Auth State (prevents flash of wrong UI) ── */
#sign-in-btn,
#mobile-sign-in-btn,
#user-button,
#mobile-user-button {
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.clerk-signed-out #sign-in-btn,
body.clerk-signed-out #mobile-sign-in-btn {
  opacity: 1;
  display: block !important;
}

body.clerk-signed-in #user-button,
body.clerk-signed-in #mobile-user-button {
  opacity: 1;
}

body.clerk-signed-in #sign-in-btn,
body.clerk-signed-in #mobile-sign-in-btn {
  display: none !important;
}

/* ── Reset & Tokens ── */
/* ── Premium Background Elements ── */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.02;
  pointer-events: none;
  animation: bg-move 25s infinite alternate;
}

.light .bg-glow {
  display: none;
}

.bg-glow-1 {
  top: -10%;
  left: -5%;
  background: var(--accent-1);
}

.bg-glow-2 {
  top: 15%;
  right: -5%;
  background: var(--accent-cyan);
  animation-delay: -5s;
}

.bg-glow-3 {
  bottom: -10%;
  left: 20%;
  background: var(--accent-pink);
  animation-delay: -10s;
}

@keyframes bg-move {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(100px, 50px) scale(1.1);
  }
}

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

:root {
  --bg-base: #050505;
  --bg-surface: #0f0f0f;
  --bg-elevated: #1a1a1a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);

  --accent-1: #5cb85c;
  /* Vibrant button green */
  --accent-2: #449d44;
  --accent-3: #85d185;
  --accent-cyan: #475569;
  --accent-pink: #ec4899;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px rgba(92, 184, 92, 0.3);
  --shadow-featured: 0 0 25px rgba(92, 184, 92, 0.15);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-head: 'Outfit', sans-serif;
}

/* Light theme override */
/* Light theme override */
:root.light,
html.light,
body.light,
.light {
  --bg-base: #ffffff;
  --bg-surface: #f8fafc;
  --bg-elevated: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --text-primary: #0f172a;
  /* Richer black */
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: rgba(0, 0, 0, 0.08);
  /* Darker border for light mode */
  --border-hover: rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.12);
  --shadow-featured: 0 10px 30px rgba(92, 184, 92, 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

/* ── Container ── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #5cb85c;
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(92, 184, 92, 0.4);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background: #4cae4c;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(92, 184, 92, 0.5);
}

.btn-login {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-login:hover {
  background: var(--bg-card);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

/* Clerk UserButton avatar size */
.cl-userButtonTrigger {
  width: 38px !important;
  height: 38px !important;
}

.cl-userButtonTrigger .cl-avatarBox {
  width: 38px !important;
  height: 38px !important;
}

/* Hide Clerk Badge/Watermark */
.cl-internal-ph678i,
.cl-internal-1py6yly,
.cl-userButtonPopoverFooter,
[data-clerk-theme="light"] .cl-internal-b3fm6y,
.cl-internal-b3fm6y,
.cl-footer,
.cl-internal-annv7f,
.cl-internal-17kjvbw {
  display: none !important;
}

/* Hide 'Manage account' from UserButton popover */
.cl-userButtonPopoverActionButton__manageAccount,
.cl-userButtonPopoverActions__manageAccount,
button[class*="manageAccount"],
.cl-userButtonPopoverActionButtonIcon__manageAccount {
  display: none !important;
}

/* Specifically target the dev mode banner */
div[class*="cl-internal-"][style*="background-image: linear-gradient"],
.cl-internal-17kjvbw {
  display: none !important;
}

/* ── Clerk Popover: Dark Theme Overrides ── */
/* Use broad selectors to target all Clerk popover elements */

/* Popover card background */
body:not(.light) .cl-userButtonPopoverCard,
body:not(.light) [class*="cl-userButtonPopover"]>[class*="cl-"] {
  background-color: #111111 !important;
}

body:not(.light) .cl-userButtonPopoverCard {
  border: 1px solid rgba(92, 184, 92, 0.15) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

/* All popover text elements */
body:not(.light) .cl-userButtonPopoverActionButton,
body:not(.light) .cl-userButtonPopoverActionButtonText,
body:not(.light) .cl-userButtonPopoverCustomItemButton,
body:not(.light) [class*="cl-userButtonPopoverAction"] span,
body:not(.light) [class*="cl-userButtonPopoverAction"] p,
body:not(.light) [class*="cl-userButtonPopoverCustom"] span,
body:not(.light) [class*="cl-userButtonPopoverCustom"] p {
  color: #e2e8f0 !important;
}

/* User preview (name + email at top) */
body:not(.light) .cl-userPreviewMainIdentifier,
body:not(.light) [class*="cl-userPreview"] [class*="Identifier"],
body:not(.light) [class*="cl-userPreview"] p,
body:not(.light) [class*="cl-userPreview"] span {
  color: #f1f5f9 !important;
}

body:not(.light) .cl-userPreviewSecondaryIdentifier,
body:not(.light) [class*="cl-userPreviewSecondary"] {
  color: #94a3b8 !important;
}

/* Icons */
body:not(.light) .cl-userButtonPopoverActionButtonIcon,
body:not(.light) .cl-userButtonPopoverActionButtonIcon svg,
body:not(.light) [class*="cl-userButtonPopoverAction"] svg,
body:not(.light) [class*="cl-userButtonPopoverCustom"] svg {
  color: #94a3b8 !important;
}

/* Hover states */
body:not(.light) .cl-userButtonPopoverActionButton:hover,
body:not(.light) .cl-userButtonPopoverCustomItemButton:hover,
body:not(.light) [class*="cl-userButtonPopoverAction"]:hover,
body:not(.light) [class*="cl-userButtonPopoverCustom"]:hover {
  background-color: rgba(92, 184, 92, 0.08) !important;
}

/* Dividers / borders inside popover */
body:not(.light) .cl-userPreview,
body:not(.light) [class*="cl-userPreview"] {
  border-bottom-color: rgba(92, 184, 92, 0.1) !important;
}

/* Catch-all: any Clerk popover root with data attribute */
body:not(.light) div[data-floating-ui-portal]>div,
body:not(.light) div[data-floating-ui-portal] [role="menu"],
body:not(.light) div[data-floating-ui-portal] [role="menuitem"] {
  background-color: #111111 !important;
  color: #e2e8f0 !important;
}

body:not(.light) div[data-floating-ui-portal] [role="menuitem"]:hover {
  background-color: rgba(92, 184, 92, 0.08) !important;
}

body:not(.light) div[data-floating-ui-portal] [role="menuitem"] svg {
  color: #94a3b8 !important;
}





.btn-primary.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-primary.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* ── Custom Theme Toggle ── */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

.theme-switch {
  display: inline-block;
  height: 28px;
  position: relative;
  width: 56px;
  cursor: pointer;
}

.theme-switch input {
  display: none;
}

.slider-round {
  background: transparent;
  border: 1px solid var(--border);
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: var(--transition-slow);
  border-radius: 34px;
  overflow: hidden;
}

.knob {
  background: #fff;
  bottom: 3px;
  height: 20px;
  left: 3px;
  position: absolute;
  transition: var(--transition-slow);
  width: 20px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

/* State when checked */
input:checked+.slider-round .knob {
  transform: translateX(28px);
}

.light .slider-round {
  background: transparent;
  border-color: rgba(92, 184, 92, 0.2);
}

.light .knob {
  background: var(--accent-1);
  box-shadow: 0 2px 10px rgba(92, 184, 92, 0.3);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: transparent;
  border: 1.5px solid var(--accent-1);
  color: var(--accent-3);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  background: rgba(79, 169, 79, 0.1);
  transform: translateY(-1px);
}

.gradient-text {
  color: var(--accent-1);
}

/* ================================================================
   NAVBAR
   ================================================================*/
/* ── Navbar ── */
.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  height: 80px;
  display: flex !important;
  align-items: center;
  z-index: 9999 !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transform: none !important;
}

.light .navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
  height: 64px;
  background: var(--bg-surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.light .navbar.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}



.nav-inner {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
}

.logo-img {
  height: 37px;
  width: auto;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  /* Dark mode logo (default) */
  content: url("https:///res.cloudinary.com/dhar8ajns/image/upload/v1772262509/6dcaf38d-db53-4e3e-ad76-592ed4ff3b73_ipzypu.png");
}

/* Admin specifically reduced logo */
.admin-logo .logo-img {
  height: 28px;
}

.admin-logo .logo-text {
  font-size: 1.25rem;
}

/* Light mode logo */
.light .logo-img {
  content: url("https:///res.cloudinary.com/dhar8ajns/image/upload/v1772261620/b6e4b2aa-4284-4a0d-9603-4bae72ffb715_gq7kqd.png");
}

.logo-text {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

/* ── Unread Message Badge ── */
.msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9999px;
  padding: 0 5px;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1;
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgePop {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  display: block;
  padding: 8px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Pagination ── */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
  padding: 20px;
}

.btn-pagination {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pagination:hover:not(.disabled) {
  border-color: var(--accent-1);
  background: rgba(92, 184, 92, 0.05);
  transform: translateY(-2px);
}

.btn-pagination.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

.page-info {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.page-info strong {
  color: var(--text-primary);
  font-size: 1.1rem;
}

@media (max-width: 600px) {
  .pagination-bar {
    gap: 12px;
    flex-direction: column;
  }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-slow);
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.mobile-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.mobile-cta {
  margin-top: 10px;
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orb-float 8s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(92, 184, 92, 0.08);
  top: -100px;
  left: -100px;
  animation-duration: 9s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(6, 182, 212, 0.05);
  bottom: -60px;
  right: 0;
  animation-duration: 11s;
  animation-delay: -3s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(236, 72, 153, 0.03);
  top: 40%;
  left: 50%;
  animation-duration: 7s;
  animation-delay: -5s;
}

@keyframes orb-float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -20px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 30px) scale(0.95);
  }
}


.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(92, 184, 92, 0.05);
  border: 1px solid rgba(92, 184, 92, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-1);
  margin-bottom: 28px;
  animation: fade-up 0.6s ease both;
}

.light .hero-badge {
  background: rgba(92, 184, 92, 0.05);
  border-color: rgba(92, 184, 92, 0.1);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

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

  50% {
    opacity: 0.6;
    transform: scale(1.3);
  }
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3.8rem, 11vw, 5.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
  animation: hero-reveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hero-reveal {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    filter: blur(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.hero-subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: -10px;
  margin-bottom: 40px;
  animation: fade-up 0.8s 0.2s ease both;
}

/* Search */
.hero-search-wrap {
  animation: fade-up 0.6s 0.3s ease both;
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 6px 6px 20px;
  gap: 12px;
  max-width: 580px;
  margin: 0 auto;
  transition: var(--transition);
}

.filter-btn.active {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(92, 184, 92, 0.2);
}

.view-all-link {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-1);
  text-decoration: none;
  margin-left: 8px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.view-all-link:hover {
  color: var(--accent-3);
  text-decoration: underline;
}

.search-box:focus-within {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.2);
}

.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.7;
}

.search-box:focus-within .search-icon {
  color: var(--accent-1);
  opacity: 1;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
}

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

.search-btn {
  padding: 10px 22px;
  background: #5cb85c;
  border: none;
  border-radius: var(--radius-full);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.search-btn:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

/* Tags */
.hero-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 52px;
  animation: fade-up 0.6s 0.4s ease both;
}

.tag-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.tag svg {
  opacity: 0.7;
  transition: var(--transition);
}

.tag:hover svg {
  opacity: 1;
}

.tag:hover {
  background: rgba(92, 184, 124, 0.15);
  border-color: var(--accent-1);
  color: var(--accent-3);
}

.light .tag {
  background: #fff;
  border-color: rgba(92, 184, 92, 0.1);
}

.light .search-box {
  background: #fff;
  box-shadow: 0 10px 40px rgba(92, 184, 92, 0.06);
}

.light .orb-1,
.light .orb-2,
.light .orb-3 {
  display: none;
}

.light .hero-bg {
  background: #ffffff;
}

.light .logo-wrap {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.light .app-card,
.light .featured-card,
.light .cat-card {
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.light .app-card:hover,
.light .featured-card:hover,
.light .cat-card:hover {
  box-shadow: var(--shadow-md);
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  animation: fade-up 0.6s 0.5s ease both;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-suffix {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-3);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

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

/* removed radial gradient */

/* ================================================================
   SECTIONS COMMON
   ================================================================ */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 60px;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-3);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  max-width: 520px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}


/* ── Logo image inside any icon wrapper ── */
.logo-wrap {
  background: #fff !important;
  /* clean white bg for transparent logos */
  padding: 6px;
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
  display: block;
}

.logo-wrap .icon-fallback {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: inherit;
}

/* modal icon is bigger – slightly more padding */
.modal-app-icon.logo-wrap {
  padding: 8px;
}

/* ================================================================
   ALL APPS SECTION
   ================================================================ */
.apps-section {
  background: var(--bg-base);
}

.apps-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.apps-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  border-color: transparent;
  color: #fff;
}

.sort-select {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
}

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

.app-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.app-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-1);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(79, 169, 79, 0.08);
}

.app-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.app-card:hover::after {
  transform: translateX(100%);
}

.featured-card {
  background: rgba(92, 184, 92, 0.03);
  border: 1.5px solid rgba(92, 184, 92, 0.2);
  box-shadow: var(--shadow-featured);
}

.light .featured-card {
  background: rgba(92, 184, 92, 0.05);
  border-color: rgba(92, 184, 92, 0.2);
}

.featured-card::before {
  content: "RECOMMENDED";
  position: absolute;
  top: 32px;
  right: -45px;
  background: var(--accent-1);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 6px 0;
  width: 170px;
  text-align: center;
  transform: rotate(45deg);
  box-shadow: 0 2px 10px rgba(92, 184, 92, 0.2);
  z-index: 10;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.featured-card:hover {
  background: rgba(92, 184, 92, 0.06);
  border-color: var(--accent-1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(92, 184, 92, 0.2);
}

.app-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon-sm {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
}

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

.app-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.app-category-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.app-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-price {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.app-price.PAID {
  background: var(--accent-1);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  line-height: 1;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(92, 184, 92, 0.3);
}

.app-price.FREE {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.app-price.freemium {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
}

.app-visit-btn {
  padding: 7px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.app-visit-btn:hover {
  border-color: var(--accent-1);
  color: var(--accent-3);
}

.load-more-wrap {
  text-align: center;
  margin-top: 48px;
}

/* ================================================================
   SUBMIT CTA
   ================================================================ */
.submit-section {
  background: var(--bg-surface);
}

.submit-card {
  position: relative;
  background: linear-gradient(135deg, rgba(92, 184, 92, 0.08), rgba(6, 182, 212, 0.04));
  border: 1px solid rgba(92, 184, 92, 0.15);
  border-radius: var(--radius-xl);
  padding: 72px 40px;
  text-align: center;
  overflow: hidden;
}

.submit-bg-orb {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(92, 184, 92, 0.12), transparent 70%);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.submit-content {
  position: relative;
  z-index: 1;
}

.submit-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 20px;
}

.submit-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.submit-desc {
  max-width: 520px;
  margin: 0 auto 36px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.submit-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.submit-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 12px;
  margin-bottom: 20px;
  max-width: 260px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
}

.social-link svg {
  width: 24px;
  height: 24px;
}

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

/* Premium "Natural" Social Buttons (Icon Only) */
.social-icon-btn.linkedin,
.share-btn.linkedin,
.social-link.linkedin {
  background: transparent !important;
  color: #0077b5 !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.social-icon-btn.x,
.share-btn.twitter,
.social-link.x {
  background: transparent !important;
  color: #000000 !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

body:not(.light) .social-icon-btn.x,
body:not(.light) .share-btn.twitter,
body:not(.light) .social-link.x {
  color: #ffffff !important;
}

.social-icon-btn.github,
.share-btn.github,
.social-link.github {
  background: transparent !important;
  color: #1f2937 !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

body:not(.light) .social-icon-btn.github,
body:not(.light) .share-btn.github,
body:not(.light) .social-link.github {
  color: #f3f4f6 !important;
}

.social-icon-btn:hover,
.social-link:hover,
.share-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-group h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.footer-links-group a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links-group a:hover {
  color: var(--text-primary);
}

/* Premium Shimmer and Fade effect for Banners */
.shimmer-banner {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.01) 25%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0.01) 75%);
  background-size: 200% 100%;
  animation: shimmerAnim 2s infinite linear;
}

.light .shimmer-banner {
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.01) 25%,
      rgba(0, 0, 0, 0.03) 50%,
      rgba(0, 0, 0, 0.01) 75%);
  background-size: 200% 100%;
}

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

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

.tool-banner-wrap img {
  transform: scale(1);
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tool-banner-wrap:hover img {
  transform: scale(1.02);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-slow);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: var(--transition-slow);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 36px;
}

.modal-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* Modal app detail */
.modal-app-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

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

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

.modal-app-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-app-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.modal-app-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

.modal-app-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.modal-pricing {
  margin-bottom: 28px;
}

.modal-pricing-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.modal-pricing-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.modal-visit-btn {
  display: block;
  text-align: center;
}

/* Submit form */
.submit-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.15);
}

.form-group select option {
  background: var(--bg-elevated);
}

/* ================================================================
   TOAST
   ================================================================ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: var(--transition-slow);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (min-width: 1024px) {
  .hero-floating-cards {
    display: block;
  }
}

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

@media (max-width: 1024px) {
  .nav-inner {
    justify-content: space-between;
    position: relative;
    padding: 0 20px;
  }

  .nav-links,
  .nav-actions .btn-primary,
  #user-button,
  #sign-in-btn,
  #clerk-admin-user-button {
    display: none !important;
  }

  .nav-inner .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-inner .logo-img {
    height: 34px;
  }

  .nav-inner .logo-text {
    font-size: 1.5rem;
  }

  .hamburger {
    display: flex;
    margin-left: 0;
    order: -1;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-num {
    font-size: 1.5rem;
  }

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

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-top>div:nth-child(even) {
    align-items: flex-end;
    text-align: right;
    padding-right: 20px;
  }

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

@media (max-width: 480px) {
  .hero {
    padding: 100px 20px 60px;
  }

  .section {
    padding: 60px 0;
  }

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

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-top>div:nth-child(even) {
    align-items: flex-start;
    text-align: left;
    padding-right: 0;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
  }

  .stat-divider {
    display: none;
  }

  .modal-body {
    padding: 24px;
  }
}

/* ── Hide Clerk branding (Secured by Clerk / Development mode) ── */
[class*="cl-footer"],
[class*="cl-internal-b3fm57"],
[class*="cl-devBrowser"],
.cl-footer,
.cl-footerAction,
.cl-footerPages {
  display: none !important;
}

/* ── Force Clerk Theme Overrides ── */
.cl-userButtonPopoverCard,
.cl-popoverCard {
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

.cl-userButtonPopoverActionButton,
.cl-popoverActionButton {
  color: var(--text-primary) !important;
}

.cl-userButtonPopoverActionButton:hover,
.cl-popoverActionButton:hover {
  background-color: var(--bg-card-hover) !important;
}

.cl-userButtonPopoverActionButtonIcon,
.cl-popoverActionButtonIcon {
  color: var(--text-secondary) !important;
}