/* NPU Links Theme — main.css */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0f14;
  --surface: #13161e;
  --surface2: #1a1e29;
  --border: #252a38;
  --text: #e8eaf2;
  --muted: #6b7390;
  --accent: #3b6fd4;
  --accent2: #2a9d8f;
  --accent-glow: rgba(59,111,212,0.22);
  --pill-bg: #181c28;
  --radius-card: 14px;
  --radius-search: 20px;
}

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

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 50% -5%, rgba(59,111,212,0.1) 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 85% 90%, rgba(42,157,143,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── HEADER ── */
#site-header {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 100;
  background: rgba(13,15,20,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.site-logo {
  font-family: 'Unbounded', sans-serif;
  font-size: 1rem; font-weight: 900;
  color: var(--text); text-decoration: none; letter-spacing: -0.02em;
  cursor: pointer;
}
.site-logo span { color: var(--accent); }
.site-logo-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem; color: var(--muted);
  font-weight: 400; margin-left: 8px; letter-spacing: 0;
}

/* ── MAIN WRAPPER ── */
#page-wrap { position: relative; z-index: 1; }

/* ── HERO ── */
#hero {
  padding: 120px 24px 48px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
}

.hero-tagline {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}

.hero-heading {
  font-family: 'Unbounded', sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 3.6rem);
  font-weight: 900; line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 40px; max-width: 680px;
}

.hero-heading em {
  font-style: normal;
  background: linear-gradient(135deg, #6fa3f7 0%, #3b6fd4 50%, #2a9d8f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── SEARCH BOX ── */
.search-wrap {
  width: 100%; max-width: 780px;
  position: relative; margin-bottom: 20px;
}

.search-wrap::before {
  content: ''; position: absolute; inset: -2px;
  border-radius: calc(var(--radius-search) + 2px);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  opacity: 0; transition: opacity 0.35s; z-index: 0;
}
.search-wrap:focus-within::before { opacity: 1; }

.search-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center;
  background: var(--surface);
  border-radius: var(--radius-search);
  border: 1.5px solid var(--border);
  padding: 6px 8px 6px 22px; gap: 10px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.search-wrap:focus-within .search-inner {
  border-color: transparent;
  box-shadow: 0 8px 60px rgba(59,111,212,0.25);
}

.search-icon { flex-shrink: 0; color: var(--muted); transition: color 0.2s; }
.search-wrap:focus-within .search-icon { color: var(--accent); }

#npu-search-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 400; color: var(--text);
  padding: 14px 0; caret-color: var(--accent);
}
#npu-search-input::placeholder { color: var(--muted); }

.icon-btn {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 6px; border-radius: 8px;
  display: flex; transition: color 0.2s, background 0.2s;
}
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.search-btn {
  flex-shrink: 0; background: var(--accent); color: #fff; border: none;
  border-radius: 14px; padding: 13px 26px;
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.search-btn:hover {
  background: #5285e0; transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(59,111,212,0.5);
}
.search-btn:active { transform: translateY(0); }

/* ── QUICK PILLS ── */
.pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; max-width: 680px; margin-bottom: 56px;
}
.pill {
  background: var(--pill-bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 16px;
  font-size: 0.78rem; color: var(--muted); cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.pill:hover { border-color: var(--accent); color: var(--text); background: rgba(59,111,212,0.1); }

/* ── BROWSE (all links) ── */
#browse-section {
  width: 100%; max-width: 1060px; margin: 0 auto;
  padding: 0 24px 80px;
}

.section-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.63rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px; margin-top: 40px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.link-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px;
  text-decoration: none; color: var(--text);
  transition: border-color 0.2s, background 0.2s;
  display: flex; align-items: flex-start; gap: 12px;
}
.link-card:hover { border-color: var(--accent); background: var(--surface); }

.link-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(59,111,212,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px; overflow: hidden;
}
.link-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }

.link-info { min-width: 0; }
.link-name { font-size: 0.88rem; font-weight: 500; margin-bottom: 3px; line-height: 1.3; }
.link-url { font-size: 0.7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Highlight matched text */
.link-name mark {
  background: rgba(59,111,212,0.28);
  color: #a0c0ff;
  border-radius: 3px;
  padding: 0 2px;
  font-style: normal;
}

/* Smooth hide/show of cards and blocks */
.link-card { transition: border-color 0.2s, background 0.2s, opacity 0.15s; }
.section-block { transition: opacity 0.2s; }

/* ── FOOTER ── */
#site-footer {
  position: relative; z-index: 1;
  text-align: center; padding: 20px 24px;
  font-size: 0.75rem; color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  #site-header { padding: 14px 18px; }
  .site-logo-sub { display: none; }
  .hero-heading { margin-bottom: 28px; }
  .search-btn span { display: none; }
  .search-btn { padding: 13px 16px; }
  .links-grid { grid-template-columns: 1fr; }
}
