/* ============================================================
   高效导航 365.eycit.com - 视觉系统 v2
   设计基调：清爽 · 层次 · 呼吸感 · 微动效
   ============================================================ */
:root {
  /* 品牌色 */
  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --primary-grad: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --primary-soft: rgba(37, 99, 235, .08);
  --accent: #f59e0b;

  /* 表面 */
  --bg: #f3f5f9;
  --panel: #ffffff;
  --panel-2: #fafbfd;

  /* 文本 */
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #9ca3af;

  /* 线条与阴影 */
  --border: #e8ebf1;
  --hover-bg: #f4f6fb;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow-md: 0 4px 12px rgba(17, 24, 39, .07);
  --shadow-lg: 0 12px 32px rgba(17, 24, 39, .12);
  --ring: 0 0 0 3px rgba(37, 99, 235, .14);

  --radius: 12px;
  --radius-lg: 16px;
}
[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-deep: #3b82f6;
  --primary-grad: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  --primary-soft: rgba(96, 165, 250, .12);
  --accent: #fbbf24;

  --bg: #0b1220;
  --panel: #131c2e;
  --panel-2: #172233;

  --text: #e6eaf2;
  --text-2: #9aa7bd;
  --text-3: #64748b;

  --border: #24314a;
  --hover-bg: #1b2940;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  --ring: 0 0 0 3px rgba(96, 165, 250, .2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ============ 顶部品牌区 ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-header { background: rgba(19, 28, 46, .86); }

.header-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-badge {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .35);
}
.logo-text { font-size: 19px; font-weight: 800; letter-spacing: .5px; }
.logo-sub {
  font-size: 12px; color: var(--text-3); font-weight: 400;
  padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--border);
}

.search-box { flex: 1; max-width: 600px; position: relative; display: flex; }
.search-box input {
  flex: 1; height: 42px; padding: 0 48px 0 18px;
  border: 1.5px solid var(--border); border-radius: 21px;
  background: var(--panel-2); color: var(--text); font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.search-box input::placeholder { color: var(--text-3); }
.search-box input:focus { border-color: var(--primary); box-shadow: var(--ring); background: var(--panel); }
#searchBtn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--text-2); transition: all .15s;
}
#searchBtn:hover { background: var(--primary-grad); color: #fff; }

.search-suggest {
  position: absolute; top: 48px; left: 0; right: 0; z-index: 50;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 340px; overflow-y: auto; padding: 6px;
  animation: dropIn .15s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }
.suggest-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; font-size: 13px;
}
.suggest-item:hover { background: var(--hover-bg); }
.suggest-item .s-ico {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.suggest-item .s-name { font-weight: 600; }
.suggest-item .s-cat { margin-left: auto; font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.suggest-item mark { background: none; color: var(--primary); font-weight: 700; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--panel);
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--primary); transform: translateY(-1px); }

.greet-bar {
  max-width: 1400px; margin: 0 auto; padding: 0 24px 10px;
  font-size: 12.5px; color: var(--text-2);
  display: flex; align-items: center; gap: 14px;
}
.greet-bar .dot { color: var(--border); }
.greet-bar .stat { color: var(--primary); font-weight: 600; }

/* ============ 布局 ============ */
.layout {
  max-width: 1400px; margin: 22px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: 216px 1fr; gap: 24px;
  align-items: start;
}

/* ============ 左侧分类导航 ============ */
.sidenav {
  position: sticky; top: 108px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 14px 12px;
  max-height: calc(100vh - 132px); overflow-y: auto;
}
.side-head {
  font-size: 12px; color: var(--text-3); font-weight: 600;
  letter-spacing: 1px; padding: 2px 10px 10px;
}
.side-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 3px;
  border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: all .18s ease;
}
.side-item:hover { background: var(--hover-bg); color: var(--text); transform: translateX(2px); }
.side-item.active {
  background: var(--primary-grad); color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .28);
}
.side-item .s-ico {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; background: var(--panel-2); border: 1px solid var(--border);
  transition: all .18s;
}
.side-item:hover .s-ico { border-color: var(--primary); }
.side-item.active .s-ico { background: rgba(255, 255, 255, .22); border-color: transparent; }
.side-item .s-count { margin-left: auto; font-size: 11px; color: var(--text-3); font-weight: 400; }
.side-item.active .s-count { color: rgba(255, 255, 255, .75); }

/* ============ 快捷区（收藏/最近访问） ============ */
.quick-zone { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 26px; }
.quick-block {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 16px 18px; min-height: 96px;
  transition: box-shadow .2s;
}
.quick-block:hover { box-shadow: var(--shadow-md); }
.quick-title { font-size: 14.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.link-btn {
  font-size: 12px; color: var(--text-3); font-weight: 400;
  padding: 2px 8px; border-radius: 6px; transition: all .15s;
}
.link-btn:hover { color: var(--primary); background: var(--primary-soft); }
.quick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-tip { font-size: 12.5px; color: var(--text-3); }
.quick-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  background: var(--panel-2); color: var(--text-2);
  border: 1px solid var(--border); border-radius: 18px;
  transition: all .15s;
}
.quick-chip:hover {
  color: var(--primary); border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

/* ============ 分类区块 ============ */
.cat-section { margin-bottom: 38px; scroll-margin-top: 100px; }
.cat-title {
  font-size: 19px; font-weight: 800; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.cat-title .cat-icon {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-grad); font-size: 16px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .3);
}
.cat-title .cat-meta { font-size: 12.5px; color: var(--text-3); font-weight: 400; margin-left: 4px; }
.cat-title::after { content: ""; flex: 1; height: 1px; background: var(--border); margin-left: 6px; }

.sub-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
  padding-bottom: 4px;
}
.sub-tab {
  padding: 6px 16px; font-size: 13px; font-weight: 500; color: var(--text-2);
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; transition: all .15s;
}
.sub-tab:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.sub-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(37, 99, 235, .28);
}

.sub-panel { display: none; }
.sub-panel.show { display: block; animation: fadeUp .28s cubic-bezier(.2, .7, .3, 1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ 站点卡片 ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 14px;
}
.site-card {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 15px 16px 13px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.site-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--primary-grad); opacity: 0; transition: opacity .18s;
}
.site-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, .35);
}
.site-card:hover::before { opacity: 1; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.card-ico {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  box-shadow: 0 3px 8px rgba(17, 24, 39, .18);
}
.card-name {
  font-size: 14.5px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-desc {
  font-size: 12.5px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 10px; min-height: 20px;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.card-go {
  font-size: 12.5px; font-weight: 500; color: var(--primary);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 8px;
  background: var(--primary-soft);
  transition: all .15s;
}
.card-go:hover { background: var(--primary); color: #fff; }
.fav-btn { font-size: 16px; color: var(--text-3); padding: 3px 5px; transition: all .15s; }
.fav-btn:hover { transform: scale(1.25); color: var(--accent); }
.fav-btn.faved { color: var(--accent); }

/* ============ 搜索结果 ============ */
.search-result { margin-bottom: 38px; }
.no-result {
  padding: 48px; text-align: center; color: var(--text-3);
  background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius-lg);
}

/* ============ 页脚 ============ */
.site-footer { margin-top: 56px; background: var(--panel); border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 1400px; margin: 0 auto; padding: 36px 24px;
  display: grid; grid-template-columns: 1.2fr 2fr 1.2fr; gap: 28px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-col h3 { font-size: 17px; margin-bottom: 8px; }
.footer-col h4 { font-size: 14px; margin-bottom: 10px; color: var(--text); }
.footer-col p { font-size: 12.5px; color: var(--text-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.footer-links a {
  font-size: 12.5px; color: var(--text-2);
  padding: 4px 12px; border-radius: 14px; border: 1px solid var(--border);
  transition: all .15s;
}
.footer-links a:hover { color: var(--primary); border-color: var(--primary); }
.footer-copy {
  border-top: 1px solid var(--border); padding: 16px 24px;
  text-align: center; font-size: 12px; color: var(--text-3);
}

/* 回到顶部 */
.back-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary-grad); color: #fff; font-size: 19px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .4);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .25s, transform .25s;
}
.back-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover { transform: translateY(-2px); }

/* ============ 响应式 ============ */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .sidenav {
    position: static; display: flex; gap: 6px;
    max-height: none; overflow-x: auto; padding: 8px;
    scrollbar-width: none;
  }
  .sidenav::-webkit-scrollbar { display: none; }
  .side-head { display: none; }
  .side-item { flex-shrink: 0; margin-bottom: 0; padding: 8px 12px; white-space: nowrap; border-radius: 18px; }
  .side-item:hover { transform: none; }
  .side-item .s-count { display: none; }
  .quick-zone { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 12px; }
  .search-box { order: 3; max-width: none; flex-basis: 100%; }
  .logo-sub { display: none; }
  .layout { padding: 0 16px; margin-top: 16px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .site-card { padding: 12px 13px 11px; }
  .card-ico { width: 28px; height: 28px; font-size: 13px; }
  .greet-bar { padding: 0 16px 8px; }
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
