/* ─────────────────────────────────────────────────────────────────────
   IconDrop · Premium developer-asset library theme
   Deep navy + electric blue, grid-first layout, Inter typography
   ───────────────────────────────────────────────────────────────────── */

:root {
  /* surfaces */
  --bg:           #07091a;
  --bg-2:         #0d1124;
  --bg-3:         #11162e;
  --surface:      #161b34;
  --surface-2:    #1c2240;
  --surface-3:    #232a4d;
  --line:         #232a4d;
  --line-2:       #2c3457;
  --line-3:       #3a4373;

  /* text */
  --ink:          #f5f7ff;
  --ink-2:        #c7cce4;
  --ink-3:        #8a91b4;
  --muted:        #6b7299;

  /* electric brand */
  --brand:        #4f7cff;
  --brand-2:      #7ea1ff;
  --brand-3:      #2d4fb3;
  --accent:       #00e5ff;
  --accent-2:     #00b8d4;
  --violet:       #8b5cf6;
  --pink:         #f472b6;

  /* effects */
  --radius:       14px;
  --radius-sm:    10px;
  --radius-lg:    20px;
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.4);
  --shadow:       0 8px 24px rgba(0,0,0,0.45), 0 0 0 1px var(--line);
  --shadow-lg:    0 30px 60px rgba(0,0,0,0.55), 0 0 0 1px var(--line-2);
  --glow:         0 0 0 1px rgba(79,124,255,0.5), 0 0 24px rgba(79,124,255,0.25);
  --glow-accent:  0 0 0 1px rgba(0,229,255,0.55), 0 0 30px rgba(0,229,255,0.25);
  --grad:         linear-gradient(135deg, #4f7cff 0%, #00e5ff 100%);
  --grad-soft:    linear-gradient(180deg, rgba(79,124,255,0.10) 0%, rgba(0,229,255,0.04) 100%);
  --grad-violet:  linear-gradient(135deg, #4f7cff 0%, #8b5cf6 100%);

  /* type */
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  color: var(--ink-2);
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 80% -10%, rgba(79,124,255,0.18), transparent 60%),
    radial-gradient(700px 400px at 0% 0%,    rgba(0,229,255,0.10), transparent 60%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-2); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
code, pre { font-family: var(--font-mono); font-size: 13px; background: var(--surface); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; color: var(--accent); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.ink   { color: var(--ink); }

h1,h2,h3,h4 { color: var(--ink); line-height: 1.18; margin: 0 0 14px; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(22px, 2.5vw, 30px); }
h3 { font-size: 18px; }
h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; }

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

/* ───── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,9,26,0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-wrap { display: flex; align-items: center; gap: 28px; padding: 14px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -0.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px; box-shadow: var(--glow);
}
.brand-name .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.primary-nav { display: flex; gap: 22px; margin-left: 12px; }
.primary-nav a { color: var(--ink-2); font-weight: 500; font-size: 14px; }
.primary-nav a:hover { color: var(--ink); }

.search { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search input {
  width: 320px; max-width: 50vw;
  padding: 10px 14px; font-size: 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 999px;
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,124,255,0.15); }
.search button {
  padding: 10px 18px; border: 0; border-radius: 999px;
  background: var(--grad); color: #fff; font-weight: 600; font-size: 13px;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.search button:hover { box-shadow: var(--glow); }

@media (max-width: 880px) {
  .header-wrap { padding: 12px 18px; gap: 14px; }
  .primary-nav { display: none; }
  .search input { width: 180px; }
}

/* ───── Hero ───────────────────────────────────────────────── */
.hero { padding: 90px 0 60px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -100px -100px auto auto;
  width: 600px; height: 600px;
  background: radial-gradient(closest-side, rgba(79,124,255,0.20), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(79,124,255,0.12); color: var(--accent);
  border: 1px solid rgba(79,124,255,0.35);
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero h1 { color: var(--ink); margin: 0 0 18px; }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 580px; margin: 0; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-stat { padding: 12px 0; }
.hero-stat strong { display: block; font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.hero-stat span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }

.hero-preview {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line-2);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.hero-preview-head { display: flex; gap: 6px; margin-bottom: 16px; }
.hero-preview-head span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-3); }
.hero-preview-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.hero-preview-cell {
  aspect-ratio: 1;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center; padding: 14px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.hero-preview-cell:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--glow); }
.hero-preview-cell img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25)); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 56px 0 40px; }
  .hero-preview-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ───── Section / generic ───────────────────────────────────── */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; gap: 24px; }
.section-head h2 { margin: 0; }
.section-head .more { color: var(--brand-2); font-weight: 600; font-size: 14px; }
.section-eyebrow { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 6px; }

/* ───── Icon grid ──────────────────────────────────────────── */
.icon-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.icon-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 14px 14px;
  text-align: center;
  display: block;
  color: var(--ink-2);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
  position: relative;
  overflow: hidden;
}
.icon-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-soft); opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.icon-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: var(--glow);
  color: var(--ink);
}
.icon-card:hover::before { opacity: 1; }
.icon-card img {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  transition: transform .25s ease;
  position: relative; z-index: 1;
}
.icon-card:hover img { transform: scale(1.08); }
.icon-card .icon-name {
  font-size: 13px; font-weight: 500; color: var(--ink);
  min-height: 32px; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.icon-card .icon-meta { font-size: 11px; color: var(--ink-3); margin-top: 4px; position: relative; z-index: 1; }

/* ───── Category cards (homepage / categories index) ───────── */
.cat-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: block;
  color: var(--ink-2);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  position: relative;
  overflow: hidden;
}
.cat-card::after {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-soft); opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.cat-card:hover { border-color: var(--brand); transform: translateY(-4px); box-shadow: var(--glow); }
.cat-card:hover::after { opacity: 1; }
.cat-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; position: relative; z-index: 1; }
.cat-card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 20px;
}
.cat-card h3 { margin: 0; font-size: 17px; color: var(--ink); }
.cat-card p { margin: 0; font-size: 14px; color: var(--ink-3); position: relative; z-index: 1; }
.cat-card-meta { display: flex; gap: 10px; margin-top: 14px; font-size: 12px; color: var(--accent); font-weight: 600; position: relative; z-index: 1; }

/* ───── Chips ──────────────────────────────────────────────── */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink-2); font-weight: 500;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.chip:hover { border-color: var(--brand); color: var(--ink); background: var(--surface-2); }
.chip .count { color: var(--ink-3); font-size: 11px; font-weight: 500; }

/* ───── Card ───────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }

/* ───── Detail page ────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: start; }
.detail-preview {
  background:
    linear-gradient(45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.02) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.02) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.02) 75%),
    var(--surface);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 70px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.detail-preview img {
  width: 280px; height: 280px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.35));
}
.detail-meta dl {
  display: grid; grid-template-columns: 130px 1fr; gap: 10px 18px;
  margin: 22px 0;
}
.detail-meta dt { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.detail-meta dd { margin: 0; color: var(--ink); font-weight: 500; font-size: 14px; }
.detail-meta dd code { font-size: 12px; padding: 2px 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  background: var(--grad);
  color: #fff !important;
  font-weight: 600; font-size: 14px;
  border: 0; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.btn.ghost {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--line-3);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--brand); background: var(--surface); }
.btn.lg { padding: 14px 28px; font-size: 15px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-list a, .tag-list span {
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  background: rgba(79,124,255,0.10); border: 1px solid rgba(79,124,255,0.25);
  color: var(--brand-2); font-weight: 500;
}
.tag-list a:hover { background: rgba(79,124,255,0.18); color: var(--accent); border-color: var(--accent); }

/* ───── Prose / editorial ──────────────────────────────────── */
.prose { max-width: 760px; }
.prose p { margin: 0 0 16px; color: var(--ink-2); font-size: 16px; line-height: 1.7; }
.prose h2 { margin-top: 36px; }
.prose ul { padding-left: 22px; color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent); border-bottom: 1px dashed rgba(0,229,255,0.4); }

/* ───── Breadcrumbs ────────────────────────────────────────── */
.crumbs { font-size: 13px; color: var(--ink-3); padding: 22px 0 0; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { margin: 0 6px; color: var(--line-3); }

/* ───── Sidebar layout ─────────────────────────────────────── */
.layout-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 48px; }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.sidebar-card h4 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; }
.sidebar-card ul { list-style: none; padding: 0; margin: 0; }
.sidebar-card li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sidebar-card li:last-child { border-bottom: 0; }
.sidebar-card li a { color: var(--ink-2); display: flex; justify-content: space-between; gap: 10px; }
.sidebar-card li a:hover { color: var(--accent); }
.sidebar-card .meta { color: var(--ink-3); font-size: 12px; }

.recommend-card { background: var(--surface-2); }
.recommend-card .recommend-link {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.recommend-card .recommend-link:last-child { border-bottom: 0; }
.recommend-card .recommend-link:hover { color: var(--ink); }
.recommend-card .recommend-bullet {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-top: 8px; flex: 0 0 8px;
  box-shadow: 0 0 8px rgba(0,229,255,0.5);
}
.recommend-card .recommend-body strong { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.recommend-card .recommend-body span { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }

.adslot {
  background: linear-gradient(180deg, rgba(79,124,255,0.06), rgba(0,229,255,0.02));
  border: 1px dashed var(--line-3);
  border-radius: var(--radius);
  padding: 28px 14px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
  margin: 24px 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 980px) {
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .layout-sidebar { grid-template-columns: 1fr; gap: 32px; }
}

/* ───── Pagination ─────────────────────────────────────────── */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 48px 0 0; }
.pager-link {
  padding: 10px 18px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.pager-link:hover { border-color: var(--brand); color: var(--ink); }
.pager-info { color: var(--ink-3); font-size: 13px; }

/* ───── Footer ─────────────────────────────────────────────── */
.site-footer {
  margin-top: 72px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  padding: 56px 0 28px;
  position: relative;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.site-footer h4 { color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: var(--ink-2); font-size: 14px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .brand { color: var(--ink); margin-bottom: 12px; }
.site-footer .footer-blurb { font-size: 14px; color: var(--ink-3); max-width: 320px; }
.copy { border-top: 1px solid var(--line); padding-top: 22px; font-size: 12px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.footer-recommend {
  background: var(--bg-3);
  border-top: 1px solid var(--line);
  padding: 32px 0;
}
.footer-recommend h4 { color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.footer-recommend-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.footer-recommend-grid a {
  display: block; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--ink-2);
  font-size: 13px;
  transition: border-color .15s ease, color .15s ease;
}
.footer-recommend-grid a:hover { border-color: var(--brand); color: var(--ink); }
.footer-recommend-grid a strong { display: block; color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.footer-recommend-grid a span { color: var(--ink-3); font-size: 11px; }

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

/* ───── CTA bar ────────────────────────────────────────────── */
.cta-bar {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px;
  margin: 56px 0;
  position: relative;
  overflow: hidden;
}
.cta-bar::before {
  content: ''; position: absolute; inset: -50% -10% auto auto;
  width: 400px; height: 400px;
  background: radial-gradient(closest-side, rgba(79,124,255,0.18), transparent 70%);
  pointer-events: none;
}
.cta-bar h2 { color: var(--ink); margin: 0 0 6px; }
.cta-bar p { color: var(--ink-2); margin: 0; }
.cta-bar > * { position: relative; z-index: 1; }

/* ───── Tag cloud ──────────────────────────────────────────── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--ink-2); font-size: 13px;
}
.tag-cloud a:hover { background: var(--surface-2); color: var(--accent); border-color: var(--brand); }

/* ───── Stat band ──────────────────────────────────────────── */
.stat-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 40px 0;
}
.stat-band div strong { display: block; font-size: 28px; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }
.stat-band div span { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* ───── Search status ──────────────────────────────────────── */
#search-status { color: var(--ink-3); font-size: 14px; margin: 12px 0 20px; }

/* ───── Recommend block (in-content sidebar style) ─────────── */
.recommend-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin: 32px 0;
}
.recommend-section h4 { margin: 0 0 14px; font-size: 12px; }
