/* =========================================================
   芸窗 —— hao268 经典风格
   绿色边框盒子、990px 居中、链接悬停变红
   ========================================================= */
*{margin:0;padding:0;box-sizing:border-box}
:focus{outline:none}
img{border:0}
ol,ul,li{list-style:none}
a{text-decoration:none}

body{
  font:normal 14px/1.6 "Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",Tahoma,sans-serif;
  color:#333;
  background:#f5faf0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Crect width='60' height='60' fill='%23f5faf0'/%3E%3Ccircle cx='8' cy='8' r='1' fill='%23e3f2d3'/%3E%3Ccircle cx='40' cy='30' r='1' fill='%23e3f2d3'/%3E%3Ccircle cx='20' cy='55' r='1' fill='%23e3f2d3'/%3E%3C/svg%3E");
}
a:link,a:visited{color:#333}
a:hover{color:#e00;text-decoration:underline}

.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}
.clearfix{zoom:1}
.center{width:990px;margin:0 auto}
.fl{float:left}
.fr{float:right}

/* ---------------- 顶部 ---------------- */
#header{background:#fff;border-bottom:2px solid #6dba2b}
.usrbar{
  height:26px;line-height:26px;font-size:12px;color:#8e8e8e;
  background:#f2f9e8;border-bottom:1px solid #e3efd4;
}
.usrbar a:link,.usrbar a:visited{color:#6b8a4e}
.usrbar a:hover{color:#e00}
.usrbar .home{font-weight:bold}
.usrbar .fr a{margin-left:12px}

.head-main{padding:12px 0 10px;overflow:hidden}
.logo{
  float:left;display:block;height:46px;line-height:46px;
  font-size:30px;font-weight:bold;color:#4a8f1f;
}
.logo:hover{color:#e00;text-decoration:none}
.logo-icon{
  display:inline-block;width:38px;height:38px;line-height:38px;
  margin-right:8px;vertical-align:-7px;text-align:center;
  font-size:20px;color:#fff;background:linear-gradient(135deg,#8fdc3f,#6dba2b);
  border-radius:8px;box-shadow:0 2px 4px rgba(109,186,43,.4);
}

/* 搜索框 —— 复刻 hao268 圆角绿条 */
.sch{float:right;margin-top:2px;width:560px}
.sch-table{border-collapse:collapse;width:100%}
.sch-table .first_td,.sch-table .last_td{width:12px;background:#6dba2b}
.sch-table .first_td{border-radius:6px 0 0 6px}
.sch-table .last_td{border-radius:0 6px 6px 0}
.sch-table .mid_td{background:#6dba2b}
.sch-table td{padding:4px 4px}
.sch input{
  width:100%;height:26px;line-height:26px;padding:0 8px;
  font-size:13px;border:1px solid #a2c77f;
}
.sch button{
  height:28px;width:64px;cursor:pointer;
  font-size:13px;color:#fff;font-weight:bold;
  background:linear-gradient(180deg,#83d13a,#5daa20);
  border:1px solid #4e941b;border-radius:4px;
}
.sch button:hover{background:linear-gradient(180deg,#95e34a,#6dba2b)}
.hot-links{margin-top:4px;padding-left:12px;font-size:12px;color:#999}
.hot-links a{margin-right:10px;color:#6b8a4e}
.hot-links a:hover{color:#e00}

/* ---------------- 主体布局 ---------------- */
#content{padding:10px 0 20px}
#content .center{display:flex;align-items:flex-start;gap:10px}
#content .center:after{display:none}  /* 屏蔽 clearfix 伪元素对 flex 的干扰 */
.left{float:left;width:215px;flex:0 0 215px}
.right{float:right;width:765px;flex:1 1 auto}
/* 分类导航吸顶：滚动时侧栏始终可见 */
.left{position:sticky;top:10px}
.sidebox{max-height:calc(100vh - 30px);overflow-y:auto}
.sidebox::-webkit-scrollbar{width:6px}
.sidebox::-webkit-scrollbar-thumb{background:#cdebb0;border-radius:3px}
.sidebox::-webkit-scrollbar-track{background:#f2f9e8}

/* ---------------- 分类盒子（hao268 经典绿） ---------------- */
.box_outer{
  margin-bottom:10px;
  border:2px solid #6dba2b;
  background:#fefefb;border-radius:4px;overflow:hidden;
}
.box_t{
  height:28px;line-height:28px;padding:0 12px;
  font-size:14px;font-weight:bold;color:#fff;
  background:linear-gradient(180deg,#9fdc55,#6dba2b);
  border-bottom:1px solid #5ca322;
}
.box_t .tag-icon{margin-right:6px;font-size:16px;color:#eaffd2;vertical-align:-2px}
.box_t .tag-icon-letter{
  display:inline-block;width:18px;height:18px;line-height:18px;
  font-size:11px;text-align:center;color:#6dba2b;background:#eaffd2;border-radius:4px;
}
.box_body{padding:10px 10px 6px 14px;background:#fafff3}

/* 书签链接列表 —— 等宽网格对齐 */
.links{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:5px 12px}
.links li{margin:0;min-width:0}
.links li a{
  display:flex;align-items:center;gap:6px;padding:3px 6px;border-radius:3px;
  color:#333;line-height:22px;min-width:0;
}
.links li a:hover{background:#f2fce2;color:#e00;text-decoration:none}
.link-text{
  flex:1 1 auto;min-width:0;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;
}
.favicon{flex:0 0 16px;width:16px;height:16px;display:block}
.fav-fallback{
  flex:0 0 16px;width:16px;height:16px;display:inline-flex;
  align-items:center;justify-content:center;font-size:11px;font-weight:bold;
  color:#fff;background:#9fd05a;border-radius:3px;
}
.pin{flex:0 0 auto;color:#f40;margin-right:1px;font-style:normal}

.box-more{margin:4px 0 8px;padding-left:6px}
.box-more a{color:#4a8f1f;font-weight:bold}
.box-more a:hover{color:#e00}

/* ---------------- 左侧快速导航 ---------------- */
.sidebox .box_body{padding:8px 10px}
.quicknav li{margin-bottom:2px}
.quicknav a{display:block;position:relative;padding:2px 8px;color:#4a6f2e;border-radius:3px}
.quicknav a:hover{background:#eaf7da;color:#e00;text-decoration:none}
.quicknav li.cur a{background:#6dba2b;color:#fff;font-weight:bold}
.quicknav li.cur a:hover{color:#fff}
/* 分类后的书签数量徽标 */
.qn-name{display:block;padding-right:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qn-count{
  position:absolute;right:6px;top:3px;min-width:20px;
  padding:0 5px;text-align:center;font-size:11px;line-height:16px;
  color:#7a9f52;background:#eaf7da;border-radius:8px;
  font-weight:normal;
}
.quicknav li.cur .qn-count{color:#fff;background:rgba(255,255,255,.28)}

/* ---------------- 访问统计模块（最近访问 / 排行） ---------------- */
.mod-row{display:flex;gap:10px;margin-bottom:10px}
.modbox{flex:1;min-width:0}
.mod-list li,.rank-list li{
  display:flex;align-items:center;gap:6px;padding:4px 2px;
  border-bottom:1px dashed #e4f1d5;
}
.mod-list li:last-child,.rank-list li:last-child{border-bottom:none}
.mod-list .m-name,.rank-list .r-name{
  flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#333;
}
.mod-list .m-name:hover,.rank-list .r-name:hover{color:#e00;text-decoration:none}
.mod-list .m-meta{margin-left:auto;color:#9aab85;font-size:13px;white-space:nowrap;flex-shrink:0}
.m-ip{color:#7a9f52;font-family:"SFMono-Regular",Consolas,Menlo,monospace}
.m-time{color:#b0bf9e}
.rank-list .rank-no{
  flex:0 0 20px;height:18px;line-height:18px;text-align:center;
  font-size:12px;font-weight:bold;color:#7a9f52;background:#eaf7da;border-radius:4px;
}
.rank-list .rank-no.top{background:#6dba2b;color:#fff}
.rank-list .rank-count{margin-left:auto;color:#b09c5e;font-size:13px;white-space:nowrap;flex-shrink:0}
.mod-empty{color:#aaa;padding:6px}

/* ---------------- 悬停预览截图 ---------------- */
.link-preview{
  position:fixed; z-index:9999; display:none;
  width:520px; max-width:90vw;
  border:2px solid #6dba2b; border-radius:6px; overflow:hidden;
  background:#fff; box-shadow:0 6px 20px rgba(0,0,0,.2);
}
.link-preview img{display:block;width:520px;max-width:90vw;height:338px;object-fit:cover;border:0;background:#fff}
.link-preview .loading,
.link-preview .np{
  display:flex;align-items:center;justify-content:center;
  height:130px;font-size:13px;color:#7a9f52;background:#fafff3;
}
.link-preview .np{color:#999}

/* ---------------- 分类详情 / 搜索页 ---------------- */
.crumbs{color:#888;margin-bottom:8px}
.crumbs a{color:#4a8f1f}
.crumbs a:hover{color:#e00}
.result-info{margin:0 0 8px 4px;color:#555}
.result-info b{color:#e00}
.tip{color:#888;padding:20px 4px}
.pagination{margin:6px 0 14px;text-align:center}
.pagination .btn{
  display:inline-block;padding:4px 14px;margin:0 6px;
  border:1px solid #b7dc92;background:#f2f9e8;border-radius:4px;
}
.pagination .btn:hover{color:#fff;background:#6dba2b;text-decoration:none}
.pagination .btn.disabled{color:#bbb;background:#f5f5f5;border-color:#e0e0e0}
.pagination .pageinfo{color:#666;margin:0 8px}

/* ---------------- 页脚 ---------------- */
#footer{
  padding:20px 0 30px;color:#8a9a7a;text-align:center;
  background:#fff;border-top:2px solid #e3efd4;
}
.foot-main{font-size:13px;color:#6b8a4e;line-height:24px;letter-spacing:1px}
.foot-cta{font-size:12px;color:#a3b896;line-height:24px}

/* ---------------- 平板 / 小屏（≤1024px） ---------------- */
@media (max-width:1024px){
  .center{width:auto;padding:0 12px}
  .left{display:none}
  .right{float:none;width:100%}
  .sch{float:none;width:100%;margin-top:10px}
  .head-main .logo{margin:0 auto;float:none;display:block;text-align:center}
  .head-main .logo-icon{vertical-align:-7px}
  .links{grid-template-columns:repeat(auto-fill,minmax(175px,1fr))}
}

/* ---------------- 手机（≤768px） ---------------- */
@media (max-width:768px){
  body{font-size:15px}
  .usrbar{font-size:13px;height:30px;line-height:30px}
  .logo{font-size:26px;height:44px;line-height:44px}
  .logo-icon{width:34px;height:34px;line-height:34px;font-size:18px}
  .sch{margin-top:10px}
  .sch input{font-size:16px;height:38px;line-height:38px}  /* ≥16px 避免 iOS 聚焦缩放 */
  .sch button{height:40px;width:84px;font-size:16px}
  .hot-links{font-size:14px}
  .box_t{height:34px;line-height:34px;font-size:16px}
  .box_t .tag-icon{font-size:18px}
  .box_body{padding:10px 8px 6px 10px}
  .links{gap:6px 10px;grid-template-columns:repeat(auto-fill,minmax(158px,1fr))}
  .links li a{line-height:26px;padding:4px 5px;font-size:15px}
  .favicon,.fav-fallback{flex-basis:18px;width:18px;height:18px;font-size:12px}
  .mod-row{flex-direction:column}
  .mod-list .m-name,.rank-list .r-name{max-width:none;font-size:15px}
  .mod-list .m-meta,.rank-list .rank-count{font-size:13px}
  .qn-count{font-size:12px}
  .pagination .btn{padding:6px 16px}
}
