/* ============ 深空霓虹主题 ============ */
:root {
  --bg: #05070f;
  --bg-2: #0a0f1e;
  --cyan: #00f0ff;
  --purple: #a855f7;
  --pink: #ff2fd6;
  --text: #d8e6f5;
  --text-dim: #7d8fa8;
  --glass: rgba(14, 22, 42, 0.55);
  --glass-border: rgba(0, 240, 255, 0.18);
  --card-glow: rgba(0, 240, 255, 0.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ---------- 背景层 ---------- */
.bg-layers { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(ellipse at 50% -20%, #0d1a3a 0%, var(--bg) 60%); }

.stars, .grid-floor, .nebula { position: absolute; inset: 0; }

.stars {
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff 50%, transparent),
    radial-gradient(1px 1px at 40% 70%, #9fd 50%, transparent),
    radial-gradient(1.5px 1.5px at 60% 20%, #fff 50%, transparent),
    radial-gradient(1px 1px at 80% 60%, #fdf 50%, transparent),
    radial-gradient(1px 1px at 10% 80%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 90% 10%, #0ff 50%, transparent),
    radial-gradient(1px 1px at 30% 50%, #fff 50%, transparent),
    radial-gradient(1px 1px at 70% 85%, #f0f 50%, transparent);
  background-size: 600px 600px;
  opacity: .6;
  animation: starDrift 120s linear infinite;
}
@keyframes starDrift { to { background-position: 600px 1200px; } }

.grid-floor {
  background:
    linear-gradient(rgba(0,240,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 55%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 55%);
}

.nebula { filter: blur(110px); opacity: .35; border-radius: 50%; }
.nebula-1 { width: 55vw; height: 55vw; background: #1030a0; top: -20vw; left: -15vw; animation: float1 26s ease-in-out infinite alternate; }
.nebula-2 { width: 45vw; height: 45vw; background: #5b1480; bottom: -15vw; right: -12vw; animation: float2 32s ease-in-out infinite alternate; }
@keyframes float1 { to { transform: translate(8vw, 6vw) scale(1.15); } }
@keyframes float2 { to { transform: translate(-7vw, -5vw) scale(1.1); } }

/* ---------- 通用 ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- 顶部导航 ---------- */
.nav { position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 30px rgba(0,0,0,.5); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }

.logo { display: flex; align-items: baseline; gap: 8px; }
.logo-mark { color: var(--cyan); font-size: 22px; text-shadow: 0 0 14px var(--cyan); animation: pulse 3s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.logo-text { font-size: 22px; font-weight: 800; letter-spacing: 3px; color: #fff; }
.logo-text em { font-style: normal; color: var(--cyan); text-shadow: 0 0 16px var(--cyan); }
.logo-sub { font-size: 9px; letter-spacing: 2px; color: var(--text-dim); }

.nav-links { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; overflow: hidden; max-height: 64px; }
.nav-links a {
  padding: 6px 12px; font-size: 14px; color: var(--text-dim);
  border-radius: 6px; transition: all .2s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.nav-links a .cat-icon { flex-shrink: 0; color: var(--cyan); opacity: .95; filter: drop-shadow(0 0 4px rgba(0,240,255,.5)); transition: all .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--cyan); background: rgba(0,240,255,.08); text-shadow: 0 0 10px var(--cyan); }
.nav-links a:hover .cat-icon, .nav-links a.active .cat-icon { opacity: 1; filter: drop-shadow(0 0 8px rgba(0,240,255,.85)); transform: scale(1.08); }

.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.btn-lang {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(0, 240, 255, .06);
  border: 1px solid rgba(0, 240, 255, .35);
  border-radius: 4px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all .25s;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn-lang:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(0, 240, 255, .35); }
.lang-opt {
  font-size: 12px; letter-spacing: 1px; line-height: 1;
  color: var(--text-dim); transition: all .25s;
}
.lang-opt.active {
  color: var(--cyan);
  font-weight: 700;
  text-shadow: 0 0 12px var(--cyan);
}
.lang-sep { color: rgba(125, 143, 168, .45); font-size: 11px; line-height: 1; }

/* 汉堡菜单按钮：仅移动端显示 */
.nav-menu-btn {
  display: none;
  background: rgba(0, 240, 255, .06);
  border: 1px solid rgba(0, 240, 255, .35);
  border-radius: 4px;
  color: var(--cyan);
  font-size: 16px;
  width: 34px; height: 32px;
  cursor: pointer;
  transition: all .25s;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.nav-menu-btn:hover { box-shadow: 0 0 14px rgba(0, 240, 255, .3); }

/* 移动端分类下拉面板 */
.mobile-menu {
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  background: rgba(8, 13, 26, .97);
  border-top: 1px solid transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.mobile-menu.open {
  max-height: 70vh;
  overflow-y: auto;
  border-top-color: var(--glass-border);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .5);
}
.mobile-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid rgba(120, 150, 200, .08);
}
.mobile-menu a .cat-icon { color: var(--cyan); flex-shrink: 0; }

/* ---------- Hero ---------- */
.hero { padding: 72px 24px 40px; text-align: center; position: relative; }
.hero-core { max-width: 860px; margin: 0 auto; position: relative; }

.hero-ring {
  position: absolute; left: 50%; top: -46px; transform: translateX(-50%);
  width: 130px; height: 130px; border-radius: 50%;
  border: 1px solid var(--glass-border); border-top-color: var(--cyan);
  animation: spin 6s linear infinite;
}
.hero-ring::after {
  content: ""; position: absolute; inset: 16px; border-radius: 50%;
  border: 1px dashed rgba(168,85,247,.5); border-bottom-color: var(--purple);
  animation: spin 4s linear infinite reverse;
}
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

.hero-title { margin-top: 44px; font-size: 52px; font-weight: 900; letter-spacing: 8px; color: #fff; text-shadow: 0 0 30px rgba(0,240,255,.5); }

.glitch { position: relative; color: var(--cyan); }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; overflow: hidden;
}
.glitch::before { color: var(--pink); clip-path: inset(0 0 60% 0); animation: glitch 3.4s infinite; }
.glitch::after { color: var(--purple); clip-path: inset(60% 0 0 0); animation: glitch 2.8s infinite reverse; }
@keyframes glitch {
  0%, 90%, 100% { transform: none; opacity: .0; }
  92% { transform: translate(-4px, 2px); opacity: .8; }
  96% { transform: translate(4px, -2px); opacity: .8; }
}

.hero-sub { margin: 14px 0 34px; color: var(--text-dim); font-family: Consolas, monospace; letter-spacing: 2px; font-size: 14px; }

.search-console { max-width: 640px; margin: 0 auto; }
.search-box { display: flex; align-items: center; padding: 6px 6px 6px 18px; border-radius: 10px; box-shadow: 0 0 40px rgba(0,240,255,.12), inset 0 0 20px rgba(0,240,255,.04); }
.search-icon { color: var(--cyan); font-size: 20px; margin-right: 12px; }
.search-box input { flex: 1; background: none; border: none; outline: none; color: #fff; font-size: 16px; padding: 12px 0; }
.search-box input::placeholder { color: #56688a; }

.btn-scan {
  padding: 12px 30px; background: linear-gradient(135deg, var(--cyan), #0088ff); color: #001318;
  font-weight: 700; border: none; border-radius: 7px; cursor: pointer; letter-spacing: 4px;
  transition: all .25s;
}
.btn-scan:hover { box-shadow: 0 0 30px var(--card-glow); transform: translateY(-1px); }

.quick-links { margin-top: 14px; display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 13px; }
.engine-current { color: var(--purple); font-family: Consolas, monospace; margin-right: 8px; }
.engine { padding: 4px 12px; border-radius: 20px; border: 1px solid transparent; color: var(--text-dim); cursor: pointer; transition: all .2s; }
.engine:hover { color: var(--cyan); }
.engine.active { color: var(--cyan); border-color: var(--cyan); background: rgba(0,240,255,.08); }

.hero-stats { margin-top: 40px; display: flex; justify-content: center; gap: 56px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 34px; color: #fff; font-family: Consolas, monospace; text-shadow: 0 0 18px var(--card-glow); }
.stat span { font-size: 12px; color: var(--text-dim); letter-spacing: 3px; }

/* ---------- 快讯 ---------- */
.news-ticker { margin: 24px auto 0; max-width: 1280px; width: calc(100% - 48px); border-radius: 10px; display: flex; align-items: center; overflow: hidden; height: 44px; }
.ticker-label { padding: 0 18px; color: var(--pink); font-size: 13px; font-weight: 700; white-space: nowrap; text-shadow: 0 0 10px var(--pink); border-right: 1px solid var(--glass-border); height: 100%; display: flex; align-items: center; }
.ticker-viewport { flex: 1; overflow: hidden; }
.ticker-track { display: inline-flex; gap: 48px; white-space: nowrap; padding-left: 100%; animation: ticker 40s linear infinite; font-size: 13px; color: var(--text-dim); }
.ticker-track a:hover { color: var(--cyan); }
.ticker-track b { color: var(--cyan); font-weight: normal; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------- 主内容 ---------- */
.main { max-width: 1280px; margin: 32px auto 60px; padding: 0 24px; }
.section { margin-bottom: 48px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title { font-size: 20px; letter-spacing: 3px; color: #fff; border-left: 3px solid var(--cyan); padding-left: 14px; text-shadow: 0 0 14px var(--card-glow); display: flex; align-items: center; }
.section-title .cat-icon { color: var(--cyan); margin-right: 8px; filter: drop-shadow(0 0 7px rgba(0,240,255,.7)); flex-shrink: 0; }
.section-title .tick { margin-right: 2px; }
.section-title em { font-size: 11px; color: var(--text-dim); letter-spacing: 2px; font-style: normal; margin-left: 10px; }
.tick { color: var(--cyan); font-size: 12px; margin-right: 6px; animation: pulse 1.6s infinite; }

.btn-ghost { background: none; border: 1px solid var(--glass-border); color: var(--text-dim); padding: 6px 16px; border-radius: 6px; cursor: pointer; transition: all .2s; }
.btn-ghost:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- 工具卡片 ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }

.tool-card {
  position: relative; padding: 18px 18px 16px; border-radius: 10px;
  background: linear-gradient(160deg, rgba(16,26,50,.7), rgba(9,14,28,.7));
  border: 1px solid rgba(120,150,200,.14);
  transition: all .25s; overflow: hidden; display: flex; flex-direction: column; gap: 8px;
}
.tool-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0; transition: opacity .3s;
}
.tool-card:hover { transform: translateY(-4px); border-color: var(--card-glow); box-shadow: 0 10px 36px rgba(0,240,255,.14); }
.tool-card:hover::before { opacity: 1; }

.tool-top { display: flex; align-items: center; gap: 12px; }
.tool-logo {
  width: 44px; height: 44px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #123, #1a2f55);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}
.tool-logo img { width: 100%; height: 100%; object-fit: cover; }
.tool-name { font-size: 15px; font-weight: 700; color: #fff; }
.tool-badge {
  margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 2px 8px;
  border-radius: 3px; color: #ff5de0; border: 1px solid rgba(255,47,214,.55);
  background: rgba(255,47,214,.1); text-shadow: 0 0 8px rgba(255,47,214,.6);
}
.tool-desc { font-size: 13px; color: #b9c9de; line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tool-tag { font-size: 10px; color: var(--cyan); border: 1px solid rgba(0,240,255,.25); padding: 1px 7px; border-radius: 10px; font-family: Consolas, monospace; }
.tool-meta { display: flex; justify-content: space-between; font-size: 11px; color: #6b7f9c; font-family: Consolas, monospace; }

/* ---------- 空状态 ---------- */
.empty { padding: 60px; text-align: center; color: var(--text-dim); font-family: Consolas, monospace; letter-spacing: 2px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--glass-border); background: rgba(5,8,16,.8); padding: 36px 24px; text-align: center; }
.footer-brand { font-size: 18px; color: #fff; letter-spacing: 3px; }
.footer-brand .logo-mark { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }
.footer-text { margin: 10px 0 6px; color: var(--text-dim); font-size: 13px; letter-spacing: 2px; }
.footer-copy { color: #44557a; font-size: 12px; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed; right: 26px; bottom: 30px; padding: 10px 14px; font-size: 12px;
  color: var(--cyan); border: 1px solid var(--glass-border); border-radius: 8px;
  background: var(--glass); backdrop-filter: blur(10px); z-index: 90;
  transition: all .25s; letter-spacing: 1px;
}
.back-top:hover { box-shadow: 0 0 20px var(--card-glow); }

.hidden { display: none !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .nav-inner { padding: 0 14px; gap: 10px; height: 56px; }
  .logo { gap: 6px; }
  .logo-mark { font-size: 18px; }
  .logo-text { font-size: 19px; letter-spacing: 2px; }
  .nav-actions { gap: 8px; }
  .logo-sub { display: none; }
  .nav-links { display: none; }
  .nav-menu-btn { display: inline-block; }
  .mobile-menu { display: block; }

  .hero { padding: 44px 16px 28px; }
  .hero-core { overflow: hidden; }
  .hero-ring { width: 90px; height: 90px; top: -34px; }
  .hero-title { font-size: 27px; letter-spacing: 3px; line-height: 1.35; word-break: keep-all; }
  .hero-sub { font-size: 11px; letter-spacing: 1px; margin: 10px 0 20px; padding: 0 8px; }
  .search-box { padding: 4px 4px 4px 12px; }
  .search-box input { font-size: 14px; min-width: 0; }
  .btn-scan { padding: 10px 16px; letter-spacing: 2px; }

  /* 搜索引擎快捷条：横滑代替换行 */
  .quick-links {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; justify-content: flex-start;
    margin: 10px -16px 0; padding: 0 16px;
  }
  .quick-links::-webkit-scrollbar { display: none; }
  .engine-current { flex-shrink: 0; margin-right: 4px; }
  .engine { flex-shrink: 0; }

  .hero-stats { gap: 22px; margin-top: 26px; }
  .stat b { font-size: 21px; }
  .stat span { font-size: 10px; letter-spacing: 1px; }

  .news-ticker { height: 38px; width: calc(100% - 24px); }
  .ticker-label { font-size: 11px; padding: 0 12px; }
  .ticker-track { font-size: 12px; }

  .main { padding: 0 12px; margin-top: 22px; }
  .section { margin-bottom: 32px; }
  .section-title { font-size: 16px; letter-spacing: 1px; flex-wrap: wrap; }
  .section-title em { display: none; }

  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card { padding: 13px 12px 11px; gap: 6px; }
  .tool-logo { width: 38px; height: 38px; font-size: 16px; border-radius: 8px; }
  .tool-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tool-badge { font-size: 9px; padding: 1px 6px; }
  .tool-desc { display: none; }
  .tool-tags { display: none; }
  .tool-top { gap: 10px; }
  .tool-top > div { min-width: 0; }

  .back-top { right: 14px; bottom: 18px; padding: 8px 10px; }
}
