:root{
  --bg:#f6f7fb; --surface:#ffffff; --text:#1d1f29; --muted:#6b7280;
  --border:rgba(0,0,0,.07); --radius:16px; --sidebar-w:212px; --accent:#5b53e6;
  --t0:#eef0ff; --t0fg:#3c3489; --t1:#fdeef0; --t1fg:#993556;
  --t2:#e3f6ee; --t2fg:#0f6e56; --t3:#fdf0db; --t3fg:#854f0b;
  --t4:#e7f1fc; --t4fg:#0c447c; --t5:#fbeee8; --t5fg:#993c1d;
}
[data-theme="dark"]{
  --bg:#0e1117; --surface:#161b22; --text:#e6edf3; --muted:#8b949e;
  --border:rgba(255,255,255,.09);
  --t0:#23204a; --t0fg:#b9b3ff; --t1:#3a2030; --t1fg:#f4a8c4;
  --t2:#10342a; --t2fg:#67d8b3; --t3:#3a2c10; --t3fg:#f0c071;
  --t4:#12304f; --t4fg:#8fc1f5; --t5:#3a2418; --t5fg:#f0a786;
  --accent:#8b82ff;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;}
a{text-decoration:none;color:inherit}
.layout{display:flex;min-height:100vh;max-width:1972px;margin:0 auto}
.sidebar{width:var(--sidebar-w);flex-shrink:0;position:sticky;top:0;height:100vh;
  background:var(--surface);border-right:1px solid var(--border);
  display:flex;flex-direction:column;padding:20px 14px;overflow-y:auto;
  transition:width .22s ease,padding .22s ease}
.brand{display:flex;align-items:center;gap:11px;padding:4px 10px 20px;margin:0;white-space:nowrap}
.sidebar-collapse{margin-left:auto;flex-shrink:0;width:30px;height:30px;padding:0;border:none;
  background:transparent;color:var(--muted);border-radius:9px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s}
.sidebar-collapse:hover{background:var(--border);color:var(--text)}
html[data-sidebar="collapsed"] .sidebar{width:0;padding-left:0;padding-right:0;
  border-right-color:transparent;overflow:hidden}
.sidebar-open{position:fixed;left:18px;top:18px;width:42px;height:42px;border-radius:12px;
  border:1px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer;
  display:none;align-items:center;justify-content:center;box-shadow:0 6px 18px rgba(0,0,0,.12);z-index:20}
.sidebar-open:hover{color:var(--accent)}
html[data-sidebar="collapsed"] .sidebar-open{display:flex}
.brand-logo{width:36px;height:36px;border-radius:11px;background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center;flex-shrink:0}
.brand-text{display:flex;flex-direction:column;line-height:1.15}
.brand-title{font-size:18px;font-weight:600;margin:0}
.brand-sub{font-size:11px;color:var(--muted);margin-top:1px}
.nav{display:flex;flex-direction:column;gap:16px;flex:1}
.nav-group{display:flex;flex-direction:column;gap:2px}
.nav-group-title{display:flex;align-items:center;gap:8px;padding:2px 12px 6px;
  font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--tint-fg)}
.nav-group-title .dot{width:8px;height:8px;border-radius:50%;background:var(--tint-fg);flex-shrink:0}
.sidebar-link{display:flex;align-items:center;gap:8px;padding:7px 12px 7px 26px;border-radius:11px;
  font-size:13.5px;color:var(--muted);transition:background .15s}
.sidebar-link-solo{padding-left:12px;color:var(--tint-fg);font-weight:600}
.sidebar-link .dot{width:8px;height:8px;border-radius:50%;background:var(--tint-fg);flex-shrink:0}
.sidebar-link:hover{background:var(--tint)}
.sidebar-link.active{background:var(--tint);color:var(--tint-fg);font-weight:600}
.theme-toggle{margin-top:12px;padding:9px;border:1px solid var(--border);background:transparent;
  color:var(--muted);border-radius:12px;cursor:pointer;font-size:13px}
.content{flex:1;min-width:0;padding:34px 44px}
.topbar{display:flex;flex-direction:column;align-items:center;gap:16px;margin-bottom:34px}
.greeting{font-size:21px;font-weight:600;text-align:center}
.clock{font-size:13px;color:var(--muted);margin-top:3px;text-align:center}
.searchbar{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%}
.search-row{display:flex;gap:8px;width:100%;max-width:480px}
.search{flex:1;min-width:0;height:42px;padding:0 18px;border-radius:999px;
  border:1px solid var(--border);background:var(--surface);color:var(--text);font-size:14px}
.search:focus{outline:none;border-color:var(--accent)}
.search-btn{height:42px;padding:0 22px;border:none;border-radius:999px;cursor:pointer;
  background:var(--accent);color:#fff;font-size:14px;font-weight:600;transition:filter .15s}
.search-btn:hover{filter:brightness(1.08)}
.engines{display:flex;gap:16px;width:100%;justify-content:center;font-size:13px;color:var(--muted)}
.engines label{cursor:pointer;display:flex;align-items:center;gap:4px}
.section{margin-bottom:54px;scroll-margin-top:20px}
.section-title{display:flex;align-items:center;gap:9px;font-size:16px;font-weight:600;margin:0 0 18px}
.section-title .dot{width:8px;height:8px;border-radius:50%;background:var(--tint-fg)}
.section-title .count{font-size:12px;font-weight:500;color:var(--muted);
  background:var(--tint);padding:1px 9px;border-radius:999px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(184px,1fr));gap:30px 26px}
.card{display:flex;align-items:center;gap:13px;padding:16px 18px;border-radius:var(--radius);
  background:var(--tint);transition:transform .14s,box-shadow .14s}
.card:hover{transform:translateY(-3px);box-shadow:0 8px 20px rgba(0,0,0,.08)}
.logo{width:40px;height:40px;border-radius:11px;background:#fff;flex-shrink:0;
  border:1px solid rgba(0,0,0,.08);
  display:flex;align-items:center;justify-content:center;overflow:hidden}
.logo img{width:30px;height:30px;object-fit:contain}
.fallback{display:none;width:100%;height:100%;align-items:center;justify-content:center;
  font-weight:600;color:var(--tint-fg);background:var(--tint)}
.meta{min-width:0;display:flex;flex-direction:column}
.name{font-size:14px;font-weight:600;color:var(--tint-fg);line-height:1.3;word-break:break-word}
.desc{font-size:11px;color:var(--muted);line-height:1.3;margin-top:2px;word-break:break-word}
.empty{color:var(--muted);padding:20px 0}
.notfound{padding:80px;text-align:center}
.to-top{position:fixed;right:26px;bottom:26px;width:44px;height:44px;border-radius:50%;
  border:1px solid var(--border);background:var(--surface);color:var(--accent);cursor:pointer;
  display:flex;align-items:center;justify-content:center;box-shadow:0 6px 18px rgba(0,0,0,.12);
  opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .2s,transform .2s,visibility .2s}
.to-top.show{opacity:1;visibility:visible;transform:translateY(0)}
.t-0{--tint:var(--t0);--tint-fg:var(--t0fg)} .t-1{--tint:var(--t1);--tint-fg:var(--t1fg)}
.t-2{--tint:var(--t2);--tint-fg:var(--t2fg)} .t-3{--tint:var(--t3);--tint-fg:var(--t3fg)}
.t-4{--tint:var(--t4);--tint-fg:var(--t4fg)} .t-5{--tint:var(--t5);--tint-fg:var(--t5fg)}
@media(max-width:760px){
  .layout{flex-direction:column}
  .sidebar{width:100%;height:auto;position:static;padding:14px 16px}
  .sidebar .brand{padding:0 0 12px}
  .sidebar .nav{flex-direction:row;flex-wrap:wrap;gap:14px 24px}
  .theme-toggle{margin-top:14px;align-self:flex-start}
  .content{padding:20px 14px}
  .topbar{flex-direction:column}
  .searchbar{justify-content:flex-start;min-width:0;width:100%}
  .grid{grid-template-columns:repeat(2,1fr);gap:14px}
  .card{padding:12px 13px;gap:10px}
  .section{margin-bottom:36px}
  .to-top{right:16px;bottom:16px}
}
