/* ============================================================
   JomIdea — Design System
   A premium dark-mode design with glassmorphism and vibrant accents
   ============================================================ */

/* ---------- Google Fonts - loaded via preconnect in HTML for performance ---------- */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Base colors */
  --bg-primary: #06080f;
  --bg-secondary: #0c1021;
  --bg-tertiary: #111729;
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-card-hover: rgba(20, 30, 55, 0.8);
  --bg-glass: rgba(15, 23, 42, 0.4);

  /* Text colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #38bdf8;

  /* Accent palette */
  --accent-cyan: #22d3ee;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-red: #ef4444;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #a855f7 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.3));
  --gradient-glow: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.06), transparent 40%);
  --gradient-score-high: conic-gradient(from 0deg, #10b981, #22d3ee, #3b82f6);
  --gradient-score-mid: conic-gradient(from 0deg, #f59e0b, #fb923c, #ef4444);

  /* 🇲🇾 Malaysian Jalur Gemilang Colors */
  --my-red: #CC0001;
  --my-blue: #010066;
  --my-yellow: #FFCC00;
  --my-white: #FFFFFF;
  --gradient-jalur: linear-gradient(90deg, #CC0001 0%, #CC0001 28%, #FFFFFF 28%, #FFFFFF 42%, #010066 42%, #010066 56%, #FFCC00 56%, #FFCC00 100%);

  /* Borders */
  --border-subtle: rgba(148, 163, 184, 0.08);
  --border-medium: rgba(148, 163, 184, 0.15);
  --border-accent: rgba(56, 189, 248, 0.25);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 500;
  --z-modal: 1000;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--accent-blue);
}

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

/* ---------- Background Effects ---------- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(99, 102, 241, 0.05), transparent),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(168, 85, 247, 0.04), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Grid dots background */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
}

/* ---------- Motion Background SVGs ---------- */
.bg-animated-layers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.motion-svg {
  position: absolute;
  will-change: transform;
}

.shape-1 {
  width: 800px;
  height: 800px;
  top: -200px;
  right: -200px;
  opacity: 0.6;
  animation: rotateSlow 60s linear infinite;
}

.shape-2 {
  width: 1200px;
  height: 1200px;
  top: -300px;
  left: -200px;
  animation: floatSlow 25s ease-in-out infinite alternate;
}

.shape-3 {
  width: 1000px;
  height: 1000px;
  bottom: -400px;
  right: -100px;
  animation: floatSlowReverse 30s ease-in-out infinite alternate;
}

@keyframes rotateSlow {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes floatSlow {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(50px, 30px) scale(1.05);
  }

  100% {
    transform: translate(-20px, 60px) scale(0.95);
  }
}

@keyframes floatSlowReverse {
  0% {
    transform: translate(0, 0) scale(0.95);
  }

  50% {
    transform: translate(-40px, -40px) scale(1.05);
  }

  100% {
    transform: translate(30px, -80px) scale(1);
  }
}


/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(6, 8, 15, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

/* 🇲🇾 Malaysian Flag Stripe — top of header */
.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-jalur);
  z-index: 10;
}

/* 🇲🇾 Malaysia Badge */
.my-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(204, 0, 1, 0.08), rgba(1, 0, 102, 0.08), rgba(255, 204, 0, 0.08));
  border: 1px solid rgba(255, 204, 0, 0.2);
  color: var(--my-yellow);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.my-badge .my-flag {
  font-size: 0.9rem;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: #f8fafc; /* Slate 50 */
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.9;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: #3b82f6; /* Premium Blue */
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.logo span {
  color: #f8fafc;
}

.logo-subtitle {
  font-size: 0.85rem;
  color: var(--my-yellow) !important;
  font-weight: 500;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* Flag Icon Style */
.flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  font-size: 1.1em;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gradient-hero);
  border-radius: var(--radius-full);
}

.nav-cta {
  background: var(--gradient-hero) !important;
  color: white !important;
  padding: var(--space-sm) var(--space-lg) !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  font-size: var(--text-sm) !important;
  transition: all var(--transition-base) !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.nav-cta:hover {
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.35) !important;
  transform: translateY(-1px);
}

/* Products Dropdown - Fixed */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.nav-dropdown > a::after {
  content: '▼';
  font-size: 8px;
  margin-left: 4px;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  /* Increased opacity and added blur to prevent text bleed-through */
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  min-width: 240px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 9999;
  margin-top: 8px;
}

/* Invisible bridge to fix mouse hover gap */
.nav-dropdown-content::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 10px;
}

.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown:focus-within .nav-dropdown-content {
  display: block;
}

.nav-dropdown-content a {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 12px 16px !important;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  gap: 12px;
}

.nav-dropdown-content a:hover {
  background: rgba(34, 211, 238, 0.08); /* accent-cyan with low opacity */
  transform: translateX(4px);
}

.nav-dropdown-content a .dropdown-title {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.4;
}

.nav-dropdown-content a .dropdown-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

.nav-dropdown-content a .dropdown-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Mobile menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: scale(1.05);
}

/* ---------- Container ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  position: relative;
  z-index: 1;
}

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

.section-header {
  margin-bottom: var(--space-2xl);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-cyan);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.section-label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

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

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

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-hero);
  color: white;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
  color: white;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: rgba(148, 163, 184, 0.15);
  border-color: var(--border-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.08);
}

.btn-lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-base);
}

.btn-sm {
  padding: 0.375rem var(--space-md);
  font-size: var(--text-xs);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

.badge-trend-up {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-trend-down {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-trend-stable {
  background: rgba(250, 204, 21, 0.15);
  color: #fde047;
  border: 1px solid rgba(250, 204, 21, 0.25);
}

.badge-difficulty {
  font-size: 0.65rem;
  padding: 2px 8px;
}

/* ---------- Score Ring ---------- */
.score-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.score-ring svg {
  transform: rotate(-90deg);
}

.score-ring .score-value {
  position: absolute;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* ---------- Pain Stars ---------- */
.pain-stars {
  display: inline-flex;
  gap: 2px;
}

.pain-stars .star {
  font-size: var(--text-sm);
}

.pain-stars .star.filled {
  color: var(--accent-amber);
}

.pain-stars .star.empty {
  color: var(--text-muted);
  opacity: 0.3;
}

/* ---------- Signal Ticker ---------- */
.ticker-wrap {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.5);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-sm) 0;
}

.ticker {
  display: flex;
  gap: var(--space-2xl);
  animation: ticker-scroll 40s linear infinite;
  width: max-content;
}

.ticker:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.ticker-item .trend-value {
  color: var(--accent-emerald);
  font-weight: 700;
  font-family: var(--font-mono);
}

.ticker-item .dot {
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ---------- Grid Layouts ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* ---------- Stat Counter ---------- */
.stat-card {
  text-align: center;
  padding: var(--space-xl);
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 900;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-mono);
}

.stat-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: var(--space-xs);
}

/* ---------- Search Bar ---------- */
.search-bar {
  position: relative;
  max-width: 560px;
  width: 100%;
}

.search-bar input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: var(--space-md) var(--space-xl);
  padding-left: 48px;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-base);
}

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

.search-bar input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.search-bar .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--text-lg);
  pointer-events: none;
}

/* ---------- Filter Chips ---------- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.chip:hover {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary);
}

.chip.active {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

/* ---------- Sort Controls ---------- */
.sort-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.sort-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.sort-btn:hover {
  color: var(--text-secondary);
}

.sort-btn.active {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
}

/* ---------- Idea Card (Discover) ---------- */
.idea-card {
  cursor: pointer;
  position: relative;
}

.idea-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.idea-card .idea-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.idea-card .idea-problem {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idea-card .card-metrics {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.idea-card .metric {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.idea-card .metric .metric-value {
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* ---------- Idea Detail Page ---------- */
.idea-hero {
  padding: var(--space-3xl) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.idea-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2xl);
}

.idea-hero .idea-title {
  font-size: var(--text-4xl);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.idea-hero .idea-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.detail-panel {
  padding: var(--space-xl);
}

.detail-panel h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.detail-panel p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Validation Stepper */
.stepper {
  position: relative;
  padding-left: var(--space-2xl);
}

.stepper::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border-medium);
}

.stepper-step {
  position: relative;
  padding-bottom: var(--space-xl);
}

.stepper-step:last-child {
  padding-bottom: 0;
}

.stepper-step .step-dot {
  position: absolute;
  left: calc(-1 * var(--space-2xl) + 4px);
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  background: var(--bg-primary);
}

.stepper-step .step-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stepper-step .step-text {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ---------- Radar Chart ---------- */
.radar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

/* ---------- Trend Heatmap ---------- */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
}

.heatmap-cell {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
  cursor: default;
}

.heatmap-cell:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.heatmap-cell .sector-name {
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-xs);
}

.heatmap-cell .sector-metric {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.heatmap-cell .sector-metric strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* ---------- Pain Cloud ---------- */
.pain-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  align-items: center;
  padding: var(--space-2xl) 0;
}

.pain-word {
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-base);
  cursor: default;
}

.pain-word:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  background: rgba(56, 189, 248, 0.06);
}

/* ---------- Bar Chart ---------- */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.bar-label {
  min-width: 60px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: right;
  font-family: var(--font-mono);
}

.bar-track {
  flex: 1;
  height: 24px;
  background: rgba(148, 163, 184, 0.06);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  background: var(--gradient-hero);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  padding-left: var(--space-sm);
}

.bar-fill-value {
  font-size: var(--text-xs);
  font-weight: 600;
  color: white;
  font-family: var(--font-mono);
}

/* ── Premium Footer Styles (User-Approved) ── */
.site-footer {
    background: #06080f;
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: #fff;
    font-family: 'Inter', sans-serif;
}

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

.footer-brand .logo {
    margin-bottom: var(--space-lg);
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    max-width: 320px;
}

.footer-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-item {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.social-item:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #fff;
    border-color: rgba(148, 163, 184, 0.3);
}

.footer-email-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 44px;
    background: rgba(30, 41, 59, 0.5); /* Same as social-item */
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.footer-email-link:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #fff;
}

.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: var(--space-xl);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #3b82f6;
}

.footer-bottom {
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    text-align: left;
    color: #64748b;
    font-size: 0.85rem;
}

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

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

/* ---------- Animations ---------- */
@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

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

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

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

@keyframes glow-pulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
  }

  50% {
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.25);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}

/* ---------- Hero Section ---------- */
.hero {
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
}

.hero-headline {
  font-size: var(--text-6xl);
  font-weight: 900;
  line-height: 1.05;
  max-width: 800px;
  margin: 0 auto var(--space-lg);
  letter-spacing: -0.02em;
}

.hero-headline .gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

/* ---------- How It Works ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 16.67%;
  right: 16.67%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo), var(--accent-purple));
  opacity: 0.2;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
  z-index: 1;
}

.step-number {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--gradient-hero);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 800;
  color: white;
}

.step-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.step-desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ---------- Donate Button ---------- */
.donate-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--my-yellow);
  color: #000000;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  cursor: pointer; /* Ensure pointer cursor for button */
}

.donate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 204, 0, 0.4);
}

.donate-btn .tt-icon {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain; /* Ensure image fits well */
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid::before {
    display: none;
  }
}

/* ---------- FAQ Grid ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --text-6xl: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
  }

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

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

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(6, 8, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--space-sm);
  }

  .mobile-toggle {
    display: block;
  }

  .grid-3,
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .steps-grid::before {
    display: none;
  }

  .hero-headline {
    font-size: var(--text-4xl);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .idea-hero-inner {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .section {
    padding: var(--space-2xl) 0;
  }
}

/* ---------- Discover Page Layout ---------- */
.discover-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.discover-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-section {
  margin-bottom: var(--space-xl);
}

.sidebar-section h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .discover-layout {
    grid-template-columns: 1fr;
  }

  .discover-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
  }

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

/* ---------- Trends Page ---------- */
.trends-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

@media (max-width: 768px) {
  .trends-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Rising signal list ---------- */
.signal-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: rgba(148, 163, 184, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.signal-row:hover {
  background: rgba(148, 163, 184, 0.06);
  border-color: var(--border-medium);
}

.signal-keyword {
  font-size: var(--text-sm);
  font-weight: 500;
}

.signal-trend {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--accent-emerald);
}

/* ---------- Back button ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-lg);
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--text-primary);
}

/* ---------- Action Bar ---------- */
.action-bar {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-xl);
}

/* ---------- Utility ---------- */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

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

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.relative {
  position: relative;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Modal */
.donate-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out;
}

.donate-modal.open {
  opacity: 1;
  visibility: visible;
}

.donate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.donate-content {
  position: relative;
  background: #0c1021; /* var(--bg-secondary) fallback */
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s ease-in-out;
  z-index: 10;
}

.donate-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.donate-close:hover {
  color: var(--text-primary);
}

.donate-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.donate-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.donate-qr-container {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.donate-qr {
  width: 100%;
  max-width: 240px;
  height: auto;
  display: block;
}

.donate-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.donate-modal.open .donate-content {
  transform: scale(1);
}


