/* ==========================================================================
   aran 导航 · 深色科技霓虹
   ========================================================================== */
:root {
  --bg: #06070d;
  --bg-soft: #0a0d17;
  --ink: #e9eefb;
  --ink-dim: #aab3c9;
  --muted: #7b86a1;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --cyan: #22d3ee;
  --violet: #a855f7;
  --pink: #f472b6;
  --radius: 14px;
  --shadow: 0 18px 48px -24px rgba(0, 0, 0, 0.95);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Cascadia Code", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

a { color: inherit; text-decoration: none; }

/* ---------- 背景光效 ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(720px 360px at 14% -14%, rgba(34, 211, 238, 0.13), transparent 64%),
    radial-gradient(660px 340px at 86% -12%, rgba(168, 85, 247, 0.12), transparent 62%),
    var(--bg);
}
/* 让顶部霓虹在页面中部彻底沉入黑色 */
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(6, 7, 13, 0) 0,
      rgba(6, 7, 13, 0.55) 26%,
      rgba(6, 7, 13, 0.92) 46%,
      var(--bg) 62%);
}
.aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.22;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) {
  width: 380px; height: 300px; top: -170px; left: 2%;
  background: #06b6d4;
}
.aurora i:nth-child(2) {
  width: 340px; height: 280px; top: -150px; right: 0%;
  background: #9333ea;
  animation-delay: -7s;
}
.aurora i:nth-child(3) {
  width: 260px; height: 200px; top: -120px; left: 46%;
  background: #4f46e5;
  opacity: 0.16;
  animation-delay: -13s;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, 26px, 0) scale(1.12); }
}

/* 网格 + 扫描线，制造"控制台"质感 */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 35%, transparent 78%);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(240px, 620px) auto;
  align-items: center;
  gap: 26px;
  padding: 14px 30px;
  background: rgba(6, 7, 13, 0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.brand .logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.16em;
  background: linear-gradient(100deg, #67e8f9, #a855f7 62%, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.35));
}
.brand .badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 2px 7px;
  border-radius: 6px;
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

/* 搜索框 */
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 10px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s, box-shadow 0.25s;
}
.search:focus-within {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12),
              0 0 32px -10px rgba(34, 211, 238, 0.75);
}
.search > svg { flex: none; opacity: 0.55; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
}
.search input::placeholder { color: #67718c; }

.engines { display: flex; gap: 3px; flex: none; }
.engines button {
  border: 0;
  cursor: pointer;
  font-family: var(--font);
  font-size: 11.5px;
  color: var(--muted);
  padding: 5px 9px;
  border-radius: 999px;
  background: transparent;
  transition: color 0.15s, background 0.15s;
}
.engines button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.engines button.on {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.13);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.28);
}

.clock {
  justify-self: end;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}
.clock b { color: #a5f3fc; font-weight: 600; }

/* ---------- 分类导航条 ---------- */
.toc {
  position: sticky;
  top: 75px;
  z-index: 30;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 30px;
  background: linear-gradient(180deg, rgba(6, 7, 13, 0.9), rgba(6, 7, 13, 0.55));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.toc a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  flex: 0 0 auto;
  white-space: nowrap;
  transition: color 0.16s, border-color 0.16s, background 0.16s, transform 0.16s;
}
.toc a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, var(--cyan));
  box-shadow: 0 0 10px var(--c, var(--cyan));
}
.toc a:hover {
  color: #fff;
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--c, var(--cyan)) 55%, transparent);
  background: color-mix(in srgb, var(--c, var(--cyan)) 10%, transparent);
}

/* ---------- 主体 ---------- */
.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 30px 72px;
}

/* 常去 */
.hot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 6px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(34, 211, 238, 0.22);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.07), transparent 70%);
}
.hot-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: #67e8f9;
  text-transform: uppercase;
}
.hot a {
  font-size: 13px;
  color: var(--ink-dim);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  transition: color 0.15s, background 0.15s;
}
.hot a:hover { color: #fff; background: rgba(34, 211, 238, 0.16); }

/* 分类区块 */
.cat { margin-top: 34px; animation: fadeUp 0.5s both; animation-delay: calc(var(--i, 0) * 45ms); }

.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cat-head .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent),
              0 0 14px var(--c);
}
.cat-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: #e6ecfa;
}
.cat-head .count {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.cat-head .rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%);
}

/* 卡片 */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.25s ease,
              background 0.18s ease;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 12% -20%, color-mix(in srgb, var(--c) 26%, transparent), transparent 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: var(--shadow), 0 0 26px -10px var(--c);
}
.card:hover::after { opacity: 1; }
.card:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.card:active { transform: translateY(-1px) scale(0.995); }

.ico {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.ico b {
  font-size: 17px;
  font-weight: 700;
  color: color-mix(in srgb, var(--c) 78%, #fff);
  opacity: 0.9;
}
.ico img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  object-fit: contain;
  z-index: 1;
}

.txt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.nm {
  font-size: 14.5px;
  font-weight: 550;
  color: #eef2fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds {
  font-size: 11.8px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 无结果 */
.nomatch {
  display: none;
  margin: 60px auto;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.nomatch.show { display: block; }
.nomatch b { color: #67e8f9; font-weight: 600; }

/* 页脚 */
.foot {
  border-top: 1px solid var(--line);
  padding: 26px 30px 40px;
  text-align: center;
  color: #5d667e;
  font-size: 12.5px;
}
.foot a { color: #8b95ad; border-bottom: 1px dashed rgba(139, 149, 173, 0.4); }
.foot a:hover { color: #67e8f9; }
.foot .sep { margin: 0 8px; opacity: 0.4; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .topbar {
    grid-template-columns: auto auto;
    grid-template-areas: "brand clock" "search search";
    gap: 12px;
    padding: 12px 16px;
  }
  .brand { grid-area: brand; }
  .clock { grid-area: clock; }
  .search { grid-area: search; }
  .toc { top: 128px; padding: 10px 16px; }
  .wrap { padding: 4px 16px 56px; }
  .engines { display: none; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 9px; }
  .card { padding: 10px; gap: 9px; }
  .ico { width: 34px; height: 34px; border-radius: 9px; }
  .ds { display: none; }
  .nm { font-size: 13px; }
  .toc { top: 124px; overflow-x: auto; flex-wrap: nowrap; }
  .toc::-webkit-scrollbar { display: none; }
}

/* 细滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #06070d; }
::-webkit-scrollbar-thumb {
  background: #1d2438;
  border-radius: 8px;
  border: 2px solid #06070d;
}
::-webkit-scrollbar-thumb:hover { background: #2b344f; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
