:root{
  --bg:#000000;
  --panel:#0b0b0b;
  --card:#0d0d0d;
  --stroke:#1a1a1a;
  --text:#ffffff;
  --muted:rgba(255,255,255,.68);
  --muted2:rgba(255,255,255,.52);
  --accent:#e3ff00;
  --radius:18px;
  --shadow: 0 14px 40px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  line-height:1.45;
  overflow-x:hidden;
}

a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}

.skip-link{
  position:absolute; left:-999px; top:10px;
  background:var(--accent); color:#050505;
  padding:10px 12px; border-radius:12px;
}
.skip-link:focus{left:12px; z-index:99999}

.container{
  width:min(1200px, 92vw);
  margin:0 auto;
  padding: 28px 0 100px; /* padding bottom for fixed nav */
}

/* Ambient background glow */
.bg-glow{
  position:fixed;
  inset:-20%;
  background:
    radial-gradient(600px 380px at 12% 12%, rgba(227,255,0,.12), transparent 60%),
    radial-gradient(520px 340px at 86% 18%, rgba(227,255,0,.08), transparent 62%),
    radial-gradient(700px 460px at 60% 92%, rgba(227,255,0,.06), transparent 60%);
  filter: blur(12px);
  pointer-events:none;
  z-index:-1;
  animation: glowFloat 10s ease-in-out infinite;
}
@keyframes glowFloat{
  0%,100%{transform: translateY(0px)}
  50%{transform: translateY(-10px)}
}

/* Typography */
.section{margin-top: 26px}
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:12px; margin: 0 0 12px;
}
.section-title{
  margin:0;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: .2px;
}
.section-sub{
  margin:6px 0 0;
  color: var(--muted);
}
.link{
  color: var(--muted);
  font-size: 14px;
  transition: color .15s ease;
}
.link:hover{color: var(--accent)}

.pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  border-radius:999px;
  border:1px solid var(--stroke);
  color: var(--muted);
  background: rgba(255,255,255,.02);
}

/* HERO */
.hero{
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  overflow:hidden;
  position:relative;
}
.hero::after{
  content:"";
  position:absolute; inset:-2px;
  background: radial-gradient(600px 200px at 40% 0%, rgba(227,255,0,.12), transparent 65%);
  pointer-events:none;
}
.hero-inner{
  padding: 22px;
  text-align:center;
}
.hero-title{
  margin: 14px 0 8px;
  font-size: clamp(28px, 3.2vw, 48px);
  line-height: 1.1;
}
.hero-subtitle{
  margin: 0 auto;
  max-width: 70ch;
  color: var(--muted);
  font-size: 16px;
}
.hero-actions{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top: 16px;
}

.btn{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 650;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 170px;
}
.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(227,255,0,.55);
  box-shadow: 0 0 0 3px rgba(227,255,0,.06), 0 18px 50px rgba(0,0,0,.55);
}
.btn:active{transform: translateY(0px) scale(.99)}

.btn-accent{
  background: var(--accent);
  color:#070707;
  border-color: rgba(227,255,0,.85);
  box-shadow: 0 0 22px rgba(227,255,0,.16);
}
.btn-accent:hover{
  box-shadow: 0 0 0 3px rgba(227,255,0,.10), 0 0 22px rgba(227,255,0,.22);
}
.btn-outline{
  background: transparent;
  border-color: rgba(227,255,0,.28);
}

.hero-metrics{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
.metric{
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(0,0,0,.35);
  padding: 12px;
}
.metric-num{font-size: 18px; font-weight: 800; color: var(--accent)}
.metric-label{font-size: 13px; color: var(--muted2)}

@media (max-width: 720px){
  .hero-metrics{grid-template-columns: 1fr}
  .btn{min-width: 100%}
}

/* SEARCH BLOCK */
.search-block{
  margin-top: 18px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.02);
  border-radius: calc(var(--radius) + 6px);
  padding: 16px;
  box-shadow: var(--shadow);
}
.search-head{margin-bottom: 10px}
.search-bar{
  display:grid;
  grid-template-columns: 1.2fr .7fr auto;
  gap:10px;
  align-items:stretch;
}
.search-input-wrap{
  position:relative;
  border-radius: 16px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.02);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.search-input-wrap:focus-within{
  transform: scale(1.01);
  border-color: rgba(227,255,0,.65);
  box-shadow: 0 0 0 3px rgba(227,255,0,.08);
}
.search-icon{
  position:absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  display:flex;
}
.search-icon svg{width:20px; height:20px}
.search-input{
  width:100%;
  padding: 14px 14px 14px 44px;
  border:none;
  outline:none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}
.search-select{
  border-radius: 16px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.02);
  color: var(--text);
  padding: 14px 12px;
  outline:none;
}
.search-select:focus{
  border-color: rgba(227,255,0,.65);
  box-shadow: 0 0 0 3px rgba(227,255,0,.08);
}
.btn-search{
  min-width: 120px;
}

@media (max-width: 820px){
  .search-bar{grid-template-columns: 1fr; }
  .btn-search{min-width: 100%}
}

/* SEARCH RESULTS */
.search-results{
  margin-top: 10px;
  display:grid;
  gap:10px;
}
.result{
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.35);
  border-radius: var(--radius);
  padding: 12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.result strong{display:block}
.result span{color: var(--muted); font-size: 13px}

/* FEATURED GRID */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
}
.card{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.02);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.card:hover{
  transform: translateY(-3px);
  border-color: rgba(227,255,0,.55);
  box-shadow: 0 0 0 3px rgba(227,255,0,.06), 0 18px 55px rgba(0,0,0,.62);
}
.card-inner{padding:14px}
.logo{
  width: 40px; height: 40px;
  border-radius: 12px;
  border:1px solid rgba(227,255,0,.25);
  background: radial-gradient(circle at 30% 30%, rgba(227,255,0,.22), rgba(255,255,255,.02));
  display:flex; align-items:center; justify-content:center;
  color: var(--accent);
  font-weight: 900;
}
.tool-name{margin: 10px 0 6px; font-size: 18px}
.tool-desc{margin:0; color: var(--muted); font-size: 14px}
.card-actions{margin-top: 12px}
.small-btn{
  width: 100%;
  min-width: unset;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 750;
}

.featured-card{
  grid-column: span 4;
}
@media (max-width: 980px){
  .featured-card{grid-column: span 6}
}
@media (max-width: 560px){
  .featured-card{grid-column: span 12}
}

/* TRENDING HSCROLL */
.hscroll{
  display:flex;
  gap:12px;
  overflow-x:auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}
.hscroll::-webkit-scrollbar{height:8px}
.hscroll::-webkit-scrollbar-thumb{
  background: rgba(227,255,0,.12);
  border-radius:999px;
}
.tcard{
  min-width: 260px;
  scroll-snap-align: start;
  position:relative;
}
.badge-pop{
  position:absolute;
  top:12px; right:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(227,255,0,.35);
  background: rgba(227,255,0,.10);
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
}

/* CATEGORIES */
.cat-grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
}
.cat-card{
  grid-column: span 4;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.02);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.cat-card:hover{
  transform: translateY(-3px);
  border-color: rgba(227,255,0,.55);
  box-shadow: 0 0 0 3px rgba(227,255,0,.06), 0 18px 55px rgba(0,0,0,.62);
}
.cat-ico{
  width: 42px; height: 42px;
  border-radius: 14px;
  border:1px solid rgba(227,255,0,.25);
  background: radial-gradient(circle at 30% 30%, rgba(227,255,0,.22), rgba(255,255,255,.02));
  display:flex; align-items:center; justify-content:center;
  color: var(--accent);
}
.cat-title{margin:0; font-size: 16px}
.cat-sub{margin:6px 0 0; color: var(--muted); font-size: 13px}

@media (max-width: 980px){
  .cat-card{grid-column: span 6}
}
@media (max-width: 560px){
  .cat-card{grid-column: span 12}
}

/* PREMIUM CTA */
.premium-cta{
  margin-top: 26px;
  border-radius: calc(var(--radius) + 8px);
  border:1px solid rgba(227,255,0,.22);
  background:
    radial-gradient(900px 260px at 20% 10%, rgba(227,255,0,.12), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  box-shadow: var(--shadow);
  overflow:hidden;
}
.premium-inner{
  padding: 18px;
  text-align:center;
}
.premium-title{
  margin: 0;
  font-size: clamp(20px, 2.5vw, 30px);
}
.premium-sub{
  margin: 10px auto 0;
  max-width: 75ch;
  color: var(--muted);
}
.premium-actions{
  margin-top: 14px;
  display:flex; justify-content:center; gap:12px; flex-wrap:wrap;
}
.premium-note{
  margin-top: 12px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  color: var(--muted2);
  font-size: 13px;
}
.glow-dot{
  width:8px; height:8px;
  border-radius:999px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(227,255,0,.35);
}

/* FOOTER */
.footer{
  margin-top: 26px;
  border-top: 1px solid var(--stroke);
  padding-top: 18px;
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  align-items:flex-start;
}
.footer-brand{
  display:flex; gap:10px; align-items:center;
}
.brand-mark{
  width:44px; height:44px;
  border-radius: 14px;
  border:1px solid rgba(227,255,0,.25);
  background: radial-gradient(circle at 30% 30%, rgba(227,255,0,.22), rgba(255,255,255,.02));
  display:flex; align-items:center; justify-content:center;
  color: var(--accent);
  font-weight: 900;
}
.footer-title{font-weight: 900}
.footer-sub{color: var(--muted); font-size: 13px}
.footer-links{
  display:flex; gap:14px; flex-wrap:wrap;
  color: var(--muted);
}
.footer-links a:hover{color: var(--accent)}
.footer-copy{color: var(--muted2); font-size: 13px}

/* BOTTOM NAV (CRITICAL) */
.bottom-nav{
  position: fixed;
  left:0; right:0; bottom:0;
  height: 76px;
  background: rgba(0,0,0,.82);
  border-top: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 9999;
}
.nav-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  transition: transform .12s ease, color .12s ease;
}
.nav-ico svg{width:22px; height:22px}
.nav-item:hover{transform: translateY(-1px); color: rgba(255,255,255,.82)}
.nav-item.active{
  color: var(--accent);
}
.nav-item.active .nav-ico{
  filter: drop-shadow(0 0 10px rgba(227,255,0,.22));
}
.nav-dot{
  width:6px; height:6px;
  border-radius:999px;
  background: transparent;
}
.nav-item.active .nav-dot{
  background: var(--accent);
  box-shadow: 0 0 14px rgba(227,255,0,.35);
}

/* Reveal animation */
.reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.show{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{opacity:1; transform:none}
  .bg-glow{animation:none}
}
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}
.accent{color: var(--accent)}