*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #07071a;
  --card: rgba(255,255,255,.04);
  --card-h: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.07);
  --border-h: rgba(139,92,246,.4);
  --p: #8b5cf6;
  --p2: #06b6d4;
  --p3: #f59e0b;
  --p4: #10b981;
  --grad: linear-gradient(135deg,#8b5cf6,#06b6d4);
  --grad2: linear-gradient(135deg,#f59e0b,#ef4444);
  --grad3: linear-gradient(135deg,#10b981,#06b6d4);
  --glow: 0 0 36px rgba(139,92,246,.25);
  --shadow: 0 8px 32px rgba(0,0,0,.4);
  --r: 16px;
  --rs: 10px;
  --t: #f1f5f9;
  --t2: #a2b2c8;
  --t3: #8496ae;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--t);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--t); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--p2); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--grad); border-radius: 3px; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 15% 5%, rgba(139,92,246,.12) 0%, transparent 55%),
              radial-gradient(ellipse 70% 60% at 85% 85%, rgba(6,182,212,.09) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: .28;
  animation: floatorb 8s ease-in-out infinite;
}
.orb1 { width: 380px; height: 380px; background: var(--p); top: -90px; left: -90px; }
.orb2 { width: 320px; height: 320px; background: var(--p2); bottom: -70px; right: -70px; animation-delay: 3s; }
@keyframes floatorb {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-24px) scale(1.04); }
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7,7,26,.85);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}
.hdr {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 68px;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--glow);
  transition: transform .3s;
}
.logo:hover .logo-icon { transform: rotate(-8deg) scale(1.08); }
.logo-name {
  font-size: 1.16rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

nav { display: flex; gap: 4px; }
nav a {
  color: var(--t2);
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: .87rem;
  font-weight: 500;
  transition: all .2s;
}
nav a:hover { color: var(--t); background: var(--card-h); }

.hdr-cta {
  padding: 8px 18px;
  border-radius: 50px;
  background: var(--grad);
  border: none;
  color: #fff;
  font-size: .83rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(139,92,246,.35);
  transition: all .25s;
}
.hdr-cta:hover { transform: translateY(-2px); box-shadow: var(--glow); }

.ham {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--t);
  width: 40px;
  height: 40px;
  border-radius: 9px;
  cursor: pointer;
  font-size: .9rem;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.ham:hover { border-color: var(--p); color: var(--p); }

#mainNav.mob-open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: rgba(7,7,26,.97);
  padding: 16px;
  border-bottom: 1px solid var(--border);
  z-index: 999;
  gap: 4px;
}
#mainNav.mob-open a { padding: 12px 16px; border-radius: 10px; font-size: .95rem; }

/* ===== HERO ===== */
.hero { position: relative; z-index: 10; text-align: center; padding: 100px 24px 70px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.28);
  color: var(--p);
  padding: 7px 20px;
  border-radius: 50px;
  font-size: .79rem;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 30px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--t);
}
.gtext {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gtext2 {
  background: var(--grad2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-p {
  font-size: 1.06rem;
  color: var(--t2);
  max-width: 560px;
  margin: 0 auto 42px;
  line-height: 1.75;
}

/* ===== SEARCH ===== */
.search-wrap { position: relative; max-width: 600px; margin: 0 auto; z-index: 1000; }
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.06);
  border: 1.5px solid var(--border);
  border-radius: 60px;
  padding: 6px 6px 6px 22px;
  transition: all .3s;
}
.search-box:focus-within {
  border-color: var(--p);
  background: rgba(139,92,246,.08);
  box-shadow: 0 0 0 4px rgba(139,92,246,.12);
}
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--t);
  font-size: .96rem;
  font-family: inherit;
  padding: 9px 0;
}
.search-box input::placeholder { color: var(--t3); }
.sbtn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  color: #fff;
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(139,92,246,.4);
  transition: all .25s;
}
.sbtn:hover { transform: scale(1.1); }
.stags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.stag {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  font-size: .78rem;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.25s ease;
}
.stag:hover {
  border-color: var(--p);
  color: #ffffff;
  background: rgba(139, 92, 246, 0.25);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

/* ===== SEARCH DROPDOWN ===== */
.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  background: #111129; /* Darker, solid professional background */
  border: 2px solid var(--p); /* Explicit, thicker border for punchy contrast */
  border-radius: var(--r);
  box-shadow: 0 15px 50px rgba(0,0,0,0.8), 0 0 30px rgba(139,92,246,0.3); /* Strong glowing drop shadow */
  max-height: 380px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(.34,1.56,.64,1);
  text-align: left;
  z-index: 2000;
}
.search-dropdown::-webkit-scrollbar { width: 5px; }
.search-dropdown::-webkit-scrollbar-track { background: transparent; }
.search-dropdown::-webkit-scrollbar-thumb { background: var(--p); border-radius: 3px; }

.search-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.sd-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: #ffffff; /* Bright white text */
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: all 0.2s ease;
  cursor: pointer;
}
.sd-item:last-child { border-bottom: none; }
.sd-item:hover { background: rgba(139,92,246,0.25); } /* Stronger hover contrast */
.sd-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}
.sd-info { flex: 1; min-width: 0; }
.sd-name { font-size: 0.98rem; font-weight: 700; color: #ffffff; margin-bottom: 4px; }
.sd-desc { font-size: 0.82rem; color: #b4c6e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* High contrast lighter blue-gray description */
.sd-empty {
  padding: 30px;
  text-align: center;
  color: #a2b2c8;
  font-size: 0.95rem;
}
.sd-empty i { font-size: 2rem; margin-bottom: 10px; color: var(--p); opacity: 0.8; display: block; }

/* ===== STATS ===== */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 46px;
  margin-top: 54px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-n {
  font-size: 1.85rem;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-l {
  font-size: .72rem;
  color: var(--t3);
  margin-top: 3px;
  letter-spacing: .5px;
}

/* ===== SECTION ===== */
.sec {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
  scroll-margin-top: 80px;
}
.sec-head { text-align: center; margin-bottom: 50px; }
.sec-tag {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 50px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 13px;
}
.tp { background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.25); color: var(--p); }
.tc { background: rgba(6,182,212,.12); border: 1px solid rgba(6,182,212,.25); color: var(--p2); }
.tg { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.25); color: var(--p4); }
.sec-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--t);
}
.sec-head p {
  color: var(--t2);
  font-size: .95rem;
  max-width: 460px;
  margin: 0 auto;
}

/* ===== CATEGORY CARDS ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.cat-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 22px 22px;
  cursor: pointer;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
  text-decoration: none;
  display: block;
  color: var(--t);
}
.cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--cg, var(--grad));
  opacity: 0;
  transition: opacity .3s;
}
.cat-card:hover {
  border-color: var(--border-h);
  transform: translateY(-7px);
  box-shadow: var(--shadow), 0 0 26px rgba(139,92,246,.12);
}
.cat-card:hover::before { opacity: 1; }
.cat-card:hover .cat-title { color: var(--p); }
.cat-emoji {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--cb, rgba(139,92,246,.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 15px;
  transition: transform .3s;
}
.cat-card:hover .cat-emoji { transform: scale(1.1) rotate(-5deg); }
.cat-title {
  font-size: .97rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--t);
  transition: color .2s;
}
.cat-info {
  font-size: .78rem;
  color: var(--t3);
  line-height: 1.5;
  margin-bottom: 13px;
}

/* ===== TOOL SECTIONS & CARDS ===== */
.tool-section { margin-bottom: 40px; scroll-margin-top: 100px; }

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(139,92,246, 0.6); border-color: var(--p); }
  70% { box-shadow: 0 0 0 15px rgba(139,92,246, 0); border-color: var(--p); }
  100% { box-shadow: 0 0 0 0 rgba(139,92,246, 0); border-color: rgba(255,255,255,.07); }
}
.highlight-tool {
  animation: pulseGlow 1.5s ease-out;
  border-color: var(--p) !important;
  background: var(--card-h) !important;
}
.active-highlight {
  border-color: #a78bfa !important;
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.85) !important;
  background: rgba(139, 92, 246, 0.18) !important;
  transform: translateY(-10px) scale(1.04) !important;
  transition: all 0.35s cubic-bezier(.34,1.56,.64,1);
}
.sec-sub-head {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.sec-sub-head h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--t);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.tc2 {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--rs);
  padding: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: all .28s;
  position: relative;
  overflow: hidden;
  color: var(--t);
}
.tc2:hover {
  border-color: rgba(139,92,246,.4);
  background: var(--card-h);
  transform: translateX(5px);
  box-shadow: -4px 0 20px rgba(139,92,246,.16);
}
.ticon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--tib, rgba(139,92,246,.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: all .28s;
}
.tc2:hover .ticon {
  background: var(--tig, var(--grad));
  box-shadow: var(--glow);
}
.tinfo { flex: 1; min-width: 0; }
.tname {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--t);
}
.tdesc {
  font-size: .74rem;
  color: var(--t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tarr {
  color: var(--t3);
  font-size: .78rem;
  transition: all .25s;
  flex-shrink: 0;
}
.tc2:hover .tarr { color: var(--p); transform: translateX(3px); }

/* Badges */
.badge-hot { position: absolute; top: 9px; right: 9px; background: var(--grad2); color: #fff; font-size: .58rem; font-weight: 800; padding: 2px 7px; border-radius: 20px; pointer-events: none; }
.badge-new { position: absolute; top: 9px; right: 9px; background: var(--grad3); color: #fff; font-size: .58rem; font-weight: 800; padding: 2px 7px; border-radius: 20px; pointer-events: none; }
.badge-trending { position: absolute; top: 9px; right: 9px; background: linear-gradient(135deg,#ef4444,#f97316); color: #fff; font-size: .58rem; font-weight: 800; padding: 2px 7px; border-radius: 20px; pointer-events: none; }
.badge-popular { position: absolute; top: 9px; right: 9px; background: linear-gradient(135deg,#f59e0b,#fbbf24); color: #000; font-size: .58rem; font-weight: 800; padding: 2px 7px; border-radius: 20px; pointer-events: none; }

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  background: rgba(7,7,26,.96);
  border-top: 1px solid var(--border);
  padding: 58px 24px 24px;
}
.fi { max-width: 1280px; margin: 0 auto; }
.fg {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 42px;
  margin-bottom: 48px;
}
.fb p {
  color: var(--t3);
  font-size: .82rem;
  line-height: 1.7;
  max-width: 255px;
  margin: 11px 0 17px;
}
.sr { display: flex; gap: 9px; }
.sb {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t2);
  text-decoration: none;
  font-size: .86rem;
  transition: all .22s;
}
.sb:hover {
  background: var(--p);
  border-color: var(--p);
  color: #fff;
  transform: translateY(-2px);
}
.fc h4 {
  font-size: .87rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--t);
}
.fc a {
  display: block;
  color: var(--t3);
  text-decoration: none;
  font-size: .8rem;
  padding: 4px 0;
  transition: color .2s;
}
.fc a:hover { color: var(--p); }
.fbot {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.fcopy { font-size: .78rem; color: var(--t3); }
.fcopy strong {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.flinks { display: flex; gap: 16px; }
.flinks a { font-size: .75rem; color: var(--t3); text-decoration: none; transition: color .2s; }
.flinks a:hover { color: var(--p); }

/* ===== RESPONSIVE ===== */
@media(max-width:900px){
  nav, .hdr-cta { display: none; }
  .ham { display: flex; }
}
@media(max-width:1024px){
  .fg { grid-template-columns: 1fr 1fr; }
}
@media(max-width:640px){
  .fg { grid-template-columns: 1fr; gap: 26px; }
  .hero { padding: 70px 18px 54px; }
  .hero-stats { gap: 22px; }
  .fbot { flex-direction: column; text-align: center; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .tgrid { grid-template-columns: 1fr; }
}
