:root{
  --bg:#0b0f17; --panel:#111827; --muted:#7c8aa5; --soft:#1f2937; --accent:#22d3ee;
  --text:#e5e7eb; --title:#f9fafb; --ring: rgba(34,211,238,.35);
}
html,body{height:100%}
body{
  background: radial-gradient(1200px 800px at 70% -10%, #0c1a2e 0%, #0b0f17 55%),
              url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><circle cx="2" cy="2" r="2" fill="white" opacity="0.15"/><circle cx="80" cy="50" r="1.5" fill="white" opacity="0.25"/><circle cx="120" cy="120" r="1.2" fill="white" opacity="0.2"/></svg>');
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-attachment: fixed, fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-smooth: always;
}
.starfield{
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  z-index:0;
}
.starfield span{
  position:absolute;
  display:block;
  border-radius:50%;
  background:rgba(255,255,255,.85);
  box-shadow:0 0 6px rgba(255,255,255,.5);
  animation:star-twinkle 6s infinite ease-in-out;
}
@keyframes star-twinkle{
  0%,100%{opacity:.2; transform:scale(1);}
  50%{opacity:.7; transform:scale(1.4);}
}
main.container{
  position:relative;
  z-index:1;
}
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  box-shadow: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(34,211,238,.4);
  box-shadow: 0 20px 45px rgba(14,116,144,.18);
}
.tool-card{
  padding:20px 20px 22px;
  display:flex;
}
.tool-card .card-content{
  display:flex;
  flex-direction:column;
  gap:10px;
  height:100%;
}
.tool-card .card-title{
  margin:4px 0 0;
  color: var(--title);
  font-weight:800;
  letter-spacing:.3px;
  font-size:1.15rem;
}
.tool-card .card-description{
  margin:0;
  color: rgba(226,232,240,.82);
  line-height:1.5;
  font-size:0.95rem;
}
.tool-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:6px 0 12px;
}
.tag{
  font-size:12px;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:#e6fbff;
  background:rgba(34,211,238,.12);
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(34,211,238,.22);
  box-shadow:0 1px 0 rgba(255,255,255,.08) inset;
}
.hide-btn{
  position:absolute;
  right:14px;
  top:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(15,23,42,.6);
  color:#dbeafe;
  border-radius:999px;
  padding:6px 14px;
  font-size:11px;
  letter-spacing:.05em;
  text-transform:uppercase;
  transition:background .18s ease, border-color .18s ease, color .18s ease;
}
.hide-btn:hover{background:rgba(34,211,238,.12); border-color:rgba(34,211,238,.35); color:#f8fafc;}
.hide-btn.is-hidden{
  background:rgba(8,47,73,.6);
  border-color:rgba(14,116,144,.6);
  opacity:1;
  filter:none;
}
.btn-primary {
  --bg1:#0ea5b3; --bg2:#06b6d4;
  background: linear-gradient(180deg, var(--bg2), var(--bg1));
  color:#02242a; font-weight:700; border:1px solid rgba(255,255,255,.1);
  box-shadow: 0 6px 18px rgba(34,211,238,.15), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-outline-primary {
  background: var(--soft); color: var(--text); font-weight:600;
  border:1px solid rgba(255,255,255,.1);
}
.btn-outline-primary:hover { filter: brightness(1.05); }
.btn.pill{
  color:#ffffff;
  font-weight:600;
}
.search-group{min-width:260px;}
.search-field{
  flex:1 1 260px;
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--soft);
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:10px 12px;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.search-field:focus-within{
  border-color:rgba(34,211,238,.45);
  box-shadow:0 0 0 3px rgba(34,211,238,.25);
  transform:translateY(-1px);
}
.search-icon{flex-shrink:0; opacity:.85;}
.search-input{
  border:none;
  outline:none;
  flex:1;
  background:transparent;
  color:var(--text);
  font-size:15px;
}
.search-input::placeholder{color:#8ea0c0;}
.tool-actions{
  margin-top:auto;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.action-btn{
  --bg1:#0ea5b3; --bg2:#06b6d4;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.1);
  background:linear-gradient(180deg, var(--bg2), var(--bg1));
  color:#02242a;
  font-weight:700;
  font-size:14px;
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow:0 6px 18px rgba(34,211,238,.15), inset 0 1px 0 rgba(255,255,255,.2);
  cursor:pointer;
}
.action-btn.secondary{
  background:var(--soft);
  color:var(--text);
  font-weight:600;
  box-shadow:none;
}
.action-btn:hover{transform:translateY(-1px); filter:brightness(1.05);}
.action-btn svg path{stroke:#a9e9f5;}
.page-header{
  border-bottom:1px solid rgba(255,255,255,.08);
  padding-bottom:1rem;
}
.btn-blue{
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  color:#f8fafc;
  font-weight:600;
  border:1px solid rgba(37,99,235,.45);
  box-shadow:0 6px 18px rgba(59,130,246,.22), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-blue:hover { filter: brightness(1.06); color:#ffffff; }
.btn-blue:focus-visible { outline:2px solid rgba(147,197,253,.45); outline-offset:3px; }
.tag-btn {
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  padding:.35rem .8rem;
  margin:4px 8px 4px 0;
}
.tag-btn.selected{
  background: linear-gradient(180deg, #0e7490, #075985); color:#e6fbff; box-shadow:0 1px 0 rgba(255,255,255,.08) inset;
  outline:2px solid var(--ring);
}
.tag-btn:not(.selected){ background: #1f2a44; color: #9bb2d6; }
.is-hidden { opacity:.55; filter:saturate(.9) }
