:root{
  --bg:#f6f7f4;
  --surface:#ffffff;
  --text:#1f2328;
  --sub:#5c646c;
  --muted:#98a0a7;
  --line:#e9ece6;
  --accent:#ffd43b;
  --accent-deep:#f0b400;
  --shadow-sm:0 1px 2px rgba(16,24,40,.04);
  --shadow-md:0 10px 30px rgba(16,24,40,.09);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{min-height:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;
  overflow-x:hidden;position:relative;
  min-height:100vh;display:flex;flex-direction:column;
}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
button{cursor:pointer}
.bg-glow{
  position:fixed;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(760px 400px at 50% -80px,rgba(255,212,59,.22),transparent 72%),
    radial-gradient(520px 340px at 90% 6%,rgba(120,190,255,.10),transparent 72%);
}

/* ---------- 顶栏 ---------- */
.topbar{position:relative;z-index:2;border-bottom:1px solid rgba(233,236,230,.8)}
.topbar-inner{
  max-width:1120px;margin:0 auto;padding:0 24px;height:64px;
  display:flex;align-items:center;justify-content:space-between;
}
.top-brand{display:flex;align-items:center;gap:9px;font-size:15px;font-weight:650;letter-spacing:-.2px}
.mini-logo{width:26px;height:26px;border-radius:8px;background:linear-gradient(135deg,#ffdf6e,#ffc107);
  display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(240,180,0,.28)}
.mini-logo svg{width:18px;height:18px}
.top-actions{display:flex;align-items:center;gap:18px}
.greeting{font-size:13px;color:var(--muted)}
.admin-link{
  display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--sub);
  padding:7px 14px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.7);
  transition:.18s;
}
.admin-link:hover{color:var(--text);border-color:#ffd97a;background:#fff;box-shadow:var(--shadow-sm)}
.admin-link svg{width:13px;height:13px}

/* ---------- 主视觉 ---------- */
.hero{position:relative;z-index:1;max-width:1120px;margin:0 auto;padding:40px 24px 0}
.brand{text-align:center}
.logo{
  width:50px;height:50px;margin:0 auto 12px;border-radius:16px;
  background:linear-gradient(135deg,#fff3c4,#ffe27a);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 18px rgba(240,180,0,.20),inset 0 1px 0 rgba(255,255,255,.8);
}
.logo svg{width:36px;height:36px}
.brand h1{font-size:28px;font-weight:700;letter-spacing:-.8px;line-height:1.2}
.brand p{margin-top:7px;font-size:13px;color:var(--muted);letter-spacing:.4px}

/* ---------- 搜索 ---------- */
.search-wrap{margin:24px auto 0;max-width:620px;text-align:center}
.search-box{
  position:relative;display:flex;align-items:center;gap:6px;
  height:52px;padding:6px 7px;background:var(--surface);
  border:1px solid var(--line);border-radius:999px;
  box-shadow:0 4px 14px rgba(16,24,40,.06),0 1px 2px rgba(16,24,40,.04);
  transition:.2s;
}
.search-box:focus-within{border-color:#ffd97a;box-shadow:0 6px 22px rgba(240,180,0,.16)}
.engine-btn{
  display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;
  background:#f7f8f5;border:none;border-radius:999px;color:var(--sub);font-size:13px;
  transition:.18s;white-space:nowrap;
}
.engine-btn:hover{background:#f0f2ec}
.engine-icon{
  width:24px;height:24px;border-radius:7px;background:#fff;border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:750;color:var(--text);
}
.engine-btn .chev{width:12px;height:12px;color:var(--muted)}
#searchInput{
  flex:1;min-width:0;border:none;outline:none;background:transparent;
  font-size:14px;color:var(--text);padding:0 8px;
}
#searchInput::placeholder{color:#b3bac0}
.search-submit{
  flex-shrink:0;width:40px;height:40px;border:none;border-radius:50%;
  background:linear-gradient(135deg,#ffdf6b,#ffc107);color:#3a2c00;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 3px 10px rgba(240,180,0,.35);transition:.18s;
}
.search-submit:hover{transform:scale(1.05);box-shadow:0 5px 16px rgba(240,180,0,.45)}
.search-submit svg{width:18px;height:18px}
.engine-menu{
  position:absolute;top:calc(100% + 10px);left:6px;z-index:30;
  width:212px;padding:7px;background:#fff;border:1px solid var(--line);
  border-radius:14px;box-shadow:var(--shadow-md);text-align:left;
  opacity:0;visibility:hidden;transform:translateY(-6px);transition:.16s;
}
.engine-menu.open{opacity:1;visibility:visible;transform:translateY(0)}
.engine-menu button{
  width:100%;height:40px;display:flex;align-items:center;gap:10px;
  padding:0 10px;border:none;background:transparent;border-radius:9px;
  font-size:14px;color:var(--sub);text-align:left;
}
.engine-menu button:hover{background:#f7f8f5;color:var(--text)}
.engine-menu button.active{background:#fff8dd;color:var(--text);font-weight:600}
.engine-menu .em-badge{
  width:24px;height:24px;border-radius:7px;background:#f7f8f5;border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;
}
.search-hint{margin-top:10px;font-size:11.5px;color:var(--muted)}
.search-hint kbd{
  display:inline-block;padding:1px 6px;margin:0 2px;border:1px solid var(--line);
  border-bottom-width:2px;border-radius:5px;background:#fff;font-size:11px;font-family:inherit;color:var(--sub);
}

/* ---------- 分类 ---------- */
.category-bar{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin:24px auto 24px;max-width:1000px}
.cat-pill{
  display:inline-flex;align-items:center;gap:7px;padding:9px 18px;
  border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.72);
  color:var(--sub);font-size:14px;transition:.18s;
}
.cat-pill:hover{background:#fff;border-color:#ffdc85;color:var(--text)}
.cat-pill.active{
  background:linear-gradient(135deg,#ffdd63,#ffc93c);border-color:#ffcf4d;color:#2b2200;
  font-weight:650;box-shadow:0 4px 14px rgba(240,180,0,.28);
}
.cat-pill .num{font-size:11px;opacity:.6;font-weight:500}

/* ---------- 网址区 ---------- */
.content{flex:1;max-width:1120px;width:100%;margin:0 auto;padding:0 24px 56px;position:relative;z-index:1;min-height:180px}
.group{margin-bottom:36px}
.group-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.group-dot{width:8px;height:8px;border-radius:50%;background:linear-gradient(135deg,#ffd43b,#f0b400);flex-shrink:0}
.group-title{font-size:16px;font-weight:650;letter-spacing:-.2px}
.group-count{font-size:12px;color:var(--muted)}
.group-line{flex:1;height:1px;background:var(--line);margin-left:4px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(226px,1fr));gap:12px}
.site-card{
  display:flex;align-items:center;gap:12px;padding:14px;
  background:var(--surface);border:1px solid var(--line);border-radius:14px;
  box-shadow:var(--shadow-sm);transition:transform .18s,box-shadow .18s,border-color .18s;
  min-width:0;
}
.site-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:#ffe08a}
.site-icon,.letter-icon{width:38px;height:38px;flex-shrink:0;border-radius:11px;object-fit:contain}
.site-icon{background:#fff;border:1px solid var(--line);padding:4px}
.letter-icon{display:flex;align-items:center;justify-content:center;color:#fff;font-size:17px;font-weight:700}
.site-meta{flex:1;min-width:0}
.site-name{display:block;font-size:14px;font-weight:650;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.site-desc{display:block;margin-top:3px;font-size:12px;line-height:1.35;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.site-arrow{width:14px;height:14px;color:#c8ced3;opacity:0;transform:translateX(-3px);transition:.18s;flex-shrink:0}
.site-card:hover .site-arrow{opacity:1;transform:translateX(0)}

.state{
  text-align:center;padding:64px 20px;color:var(--muted);font-size:14px;
}
.state .state-icon{font-size:30px;display:block;margin-bottom:12px;opacity:.6}
.state button{
  margin-top:16px;padding:9px 20px;border:1px solid var(--line);border-radius:999px;
  background:#fff;color:var(--sub);font-size:13px;
}
.state button:hover{border-color:#ffd97a;color:var(--text)}
.state.error{color:#c25b5b}

/* ---------- 页脚 ---------- */
.footer{
  position:relative;z-index:1;text-align:center;padding:26px 20px 34px;
  font-size:13px;color:var(--muted);border-top:1px solid rgba(233,236,230,.9);
}
.footer .dot{margin:0 8px;color:#d3d8d2}

@media (max-width:720px){
  .hero{padding-top:28px}
  .brand h1{font-size:24px}
  .logo{width:44px;height:44px;border-radius:14px}
  .logo svg{width:32px;height:32px}
  .search-box{height:48px}
  .engine-btn{height:38px;padding:0 10px;gap:6px}
  .engine-btn span:not(.engine-icon){display:none}
  .search-submit{width:38px;height:38px}
  .search-hint{font-size:11px}
  .category-bar{gap:7px;margin:20px auto 20px}
  .cat-pill{padding:8px 14px;font-size:13px}
  .content{padding:0 16px 40px}
  .grid{grid-template-columns:repeat(auto-fill,minmax(152px,1fr));gap:10px}
  .site-card{padding:12px;gap:10px}
  .site-desc{display:none}
  .greeting{display:none}
}
