:root {
  --bg: #121929;
  --card: #161e30;
  --muted: #a9b0c0;
  --text: #f2f5ff;
  --accent: #ff8a26;
  --ring: rgba(138, 160, 255, 0.35);
  --border: rgba(255, 255, 255, 0.1);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--text);
 background-color: var(--bg);
}
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}
img.svg-free-logo {
  opacity: 0.26;
  display: inline-block;
  max-width: 200px;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.06);
  margin-bottom: 2rem;
  border-radius: 16px;
}
header {
  text-align: center;
  margin-bottom: 14px;
}
h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  font-size: 48px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.search {
  position: sticky;
  top: 12px;
  z-index: 5;
  backdrop-filter: saturate(120%) blur(6px);
  margin-bottom: 12px;
}
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 2px solid #2e42a4;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transition: background 0.2s;
}
.searchbar:hover {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid #344cc8;
}
.searchbar:focus {
  border: 2px solid #ff8a26;
}
.searchbar input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 18px;
  padding: 6px 4px;
}
.searchbar input::placeholder {
  color: #7f8797;
}
.searchbar .btn {
  border: 0;
  background: #0e111a;
  color: #e9edff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}
#btnDownloadSel {
  display: none !important;
}
.searchbar .btn:hover {
  filter: brightness(1.06);
}
.filters {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 29px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #cfd6ea;
  font-size: 13px;
}
.pill input {
  accent-color: var(--accent);
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  flex-wrap: wrap;
}
.toolbar .left {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.btn-ghost {
  background: #151a27;
  color: #e8ecff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 12px;
  cursor: pointer;
}
.btn-ghost[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.results {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.card {
  background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02),
      transparent 70%
    ),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.svgbox {
  display: grid;
  place-items: center;
  height: 120px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #0c0f16;
  position: relative;
}
.svgbox img {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.2));
}
.selectbox {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.selectbox input {
  accent-color: var(--accent);
}
.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.name {
  font-size: 13px;
  color: #dde3ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 64%;
}
.set {
  font-size: 12px;
  color: #9aa6d1;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #0d1220;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-sm {
  padding: 8px 10px;
  font-size: 13px;
  background: #151a27;
  color: #e8ecff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.btn-sm:hover {
  filter: brightness(1.05);
}
.row2 {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.row2-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.colorpick {
  width: 34px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  padding: 0;
}
.stroke-wrap {
  display: none !important;
  align-items: center;
  gap: 6px;
}
.stroke-wrap input {
  width: 110px;
}
.stroke-wrap .val {
  font-size: 12px;
  color: #aeb8d8;
  min-width: 34px;
  text-align: right;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 32px 10px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.badge {
  font-size: 12px;
  color: #aeb8d8;
}
select {
  -webkit-appearance: none;
  appearance: none;
  padding: 4px 34px 4px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0e111a;
  color: #e7ecff;
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23cdd6ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
.notice {
  font-size: 12px;
  color: #93a1bd;
  margin-top: 8px;
}
.footer {
  margin-top: 22px;
  text-align: center;
  color: #7f889a;
  font-size: 12px;
}
.footer a {
  color: #aab7ff;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}
.kbd {
  background: #0e1322;
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  color: #c9d3ff;
}
.lic {
  font-size: 11px;
  color: #9fb1ff;
  margin-left: 6px;
}

/* Quick category tags */
.quick-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
  align-items: center;
}
.qt-label {
  font-size: 12px;
  color: #7f889a;
  margin-right: 2px;
}
.qt {
  all: unset;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #cfd6ea;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  transition: all .2s ease;
}
.qt:hover {
  background: rgba(255,138,38,.12);
  border-color: rgba(255,138,38,.3);
  color: #ff8a26;
  transform: translateY(-1px);
}
.qt:active {
  transform: translateY(0);
}
.qt.active {
  background: rgba(255,138,38,.15);
  border-color: #ff8a26;
  color: #ff8a26;
}

/* Card animations */
.card {
  animation: cardIn .35s ease both;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.results .card:nth-child(1) { animation-delay: 0s; }
.results .card:nth-child(2) { animation-delay: .04s; }
.results .card:nth-child(3) { animation-delay: .08s; }
.results .card:nth-child(4) { animation-delay: .12s; }
.results .card:nth-child(5) { animation-delay: .16s; }
.results .card:nth-child(6) { animation-delay: .2s; }
.results .card:nth-child(7) { animation-delay: .24s; }
.results .card:nth-child(8) { animation-delay: .28s; }

/* Icon preview hover effect */
.svgbox img {
  transition: transform .2s ease;
}
.card:hover .svgbox img {
  transform: scale(1.12);
}

/* Copy button feedback */
.btn-sm.copied {
  background: rgba(86,243,138,.15) !important;
  color: #56f38a !important;
  border-color: rgba(86,243,138,.3) !important;
}

/* Search suggestions dropdown */
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #161e30;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0 0 12px 12px;
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}
.suggestions.show { display: block; }
.sug-item {
  padding: 8px 14px;
  font-size: 14px;
  color: #cfd6ea;
  cursor: pointer;
  transition: background .15s;
}
.sug-item:hover, .sug-item.active {
  background: rgba(255,138,38,.1);
  color: #ff8a26;
}
.sug-item .sug-cat {
  font-size: 11px;
  color: #7f889a;
  margin-left: 8px;
}

/* Loading spinner */
.loading-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff8a26;
  animation: dotPulse .6s ease infinite alternate;
}
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dotPulse {
  from { opacity: .3; transform: scale(.8); }
  to { opacity: 1; transform: scale(1.2); }
}

/* Searchbar glow on focus */
.searchbar:focus-within {
  border-color: #ff8a26;
  box-shadow: 0 0 0 3px rgba(255,138,38,.15), 0 8px 30px rgba(0,0,0,.25);
}

/* Results count badge */
.results-count {
  text-align: center;
  font-size: 12px;
  color: #7f889a;
  margin-top: 8px;
}

@media screen and (max-width: 660px) {
  .search {
    position: relative;
    margin-bottom: 2rem;
  }
  .quick-tags {
    gap: 4px;
  }
  .qt {
    padding: 3px 8px;
    font-size: 11px;
  }
}
