/* ============ 基础 ============ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Arial,sans-serif;font-size:14px;line-height:1.6;color:#333;background:#f5f7fa;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
ul,ol{list-style:none}
button{font-family:inherit;cursor:pointer;border:0;background:none}
input,button{outline:none}
.main-content{min-height:60vh;padding-bottom:40px}

/* ============ 顶部 ============ */
.site-header{position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid #eaecef;backdrop-filter:saturate(180%) blur(12px)}
.header-wrap{max-width:1280px;margin:0 auto;padding:12px 20px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.logo{display:flex;align-items:center;gap:8px;font-weight:700;font-size:18px;color:#111;min-width:0}
.logo-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;background:linear-gradient(135deg,#3b82f6,#06b6d4);color:#fff;font-size:13px;letter-spacing:.5px;flex-shrink:0}
.logo-img{height:36px;width:auto;max-width:180px;max-height:36px;object-fit:contain;display:block;flex-shrink:0}
.logo-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.main-nav{display:flex;align-items:center;gap:6px;flex:1;overflow-x:auto;scrollbar-width:none}
.main-nav::-webkit-scrollbar{display:none}
.nav-link{padding:8px 12px;border-radius:6px;color:#555;font-size:14px;white-space:nowrap;transition:background .2s,color .2s}
.nav-link:hover{background:#eff6ff;color:#3b82f6}
.menu-toggle{display:none;flex-direction:column;gap:5px;padding:6px}
.menu-toggle span{width:22px;height:2px;background:#333;border-radius:2px}

/* ============ Hero 搜索 ============ */
.hero{background:linear-gradient(135deg,#eff6ff 0%,#f0fdfa 100%);padding:48px 20px 36px;border-bottom:1px solid #e5e7eb}
.hero-wrap{max-width:760px;margin:0 auto;text-align:center}
.hero-title{font-size:30px;font-weight:700;color:#111;margin-bottom:8px}
.hero-sub{color:#6b7280;font-size:15px;margin-bottom:24px}
.search-box{background:#fff;border-radius:14px;padding:8px;box-shadow:0 4px 18px rgba(59,130,246,.08);border:1px solid #e5e7eb}
.search-tabs{display:flex;gap:4px;padding:4px 6px 6px;overflow-x:auto;scrollbar-width:none}
.search-tabs::-webkit-scrollbar{display:none}
.search-tabs .tab{padding:6px 14px;font-size:13px;color:#6b7280;border-radius:6px;white-space:nowrap;transition:all .2s}
.search-tabs .tab:hover{color:#3b82f6}
.search-tabs .tab.active{color:#3b82f6;background:#eff6ff;font-weight:600}
.search-row{display:flex;align-items:center;gap:8px;padding:4px}
.search-input{flex:1;height:44px;padding:0 14px;font-size:15px;border:0;background:transparent;color:#111}
.search-input::placeholder{color:#9ca3af}
.search-btn{height:44px;padding:0 22px;background:linear-gradient(135deg,#3b82f6,#06b6d4);color:#fff;border-radius:10px;font-size:15px;font-weight:600;transition:transform .15s,box-shadow .2s}
.search-btn:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(59,130,246,.3)}
.search-box.compact{max-width:560px;margin:16px auto 0}

/* ============ 快捷导航 ============ */
.quick-nav{background:#fff;border-bottom:1px solid #eaecef}
.quick-nav-wrap{max-width:1280px;margin:0 auto;padding:12px 20px;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.quick-nav-wrap::-webkit-scrollbar{display:none}
.quick-link{padding:6px 12px;font-size:13px;color:#4b5563;border-radius:16px;background:#f3f4f6;white-space:nowrap;transition:all .2s}
.quick-link:hover{background:#eff6ff;color:#3b82f6}

/* ============ Banner ============ */
.banners{max-width:1280px;margin:24px auto 0;padding:0 20px}
.banners-wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}
.banner-item{display:block;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.05);transition:transform .25s}
.banner-item:hover{transform:translateY(-2px)}
.banner-item img{width:100%;height:auto;display:block}

/* ============ 分类区块 ============ */
.cat-section{max-width:1280px;margin:32px auto 0;padding:0 20px}
.cat-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;padding-bottom:10px;border-bottom:1px solid #eef0f3}
.cat-title{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:700;color:#111}
.cat-bar{width:4px;height:18px;border-radius:2px;background:linear-gradient(180deg,#3b82f6,#06b6d4)}
.cat-more{color:#6b7280;font-size:13px;transition:color .2s}
.cat-more:hover{color:#3b82f6}
.cat-more span{display:inline-block;margin-left:4px;transition:transform .2s}
.cat-more:hover span{transform:translateX(2px)}

/* ============ 卡片网格 ============ */
.site-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.site-card{display:block;background:#fff;border:1px solid #eef0f3;border-radius:10px;transition:all .25s;overflow:hidden}
.site-card:hover{border-color:#bfdbfe;box-shadow:0 6px 18px rgba(59,130,246,.12);transform:translateY(-2px)}
.site-card-inner{display:flex;gap:10px;padding:12px}
.site-logo{width:44px;height:44px;border-radius:8px;flex-shrink:0;object-fit:contain;background:#f9fafb;padding:4px}
.site-info{flex:1;min-width:0}
.site-name{font-size:14px;font-weight:600;color:#111;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:4px}
.site-card:hover .site-name{color:#3b82f6}
.site-desc{font-size:12px;color:#6b7280;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5}
.tag{display:inline-block;padding:1px 5px;font-size:10px;font-style:normal;border-radius:3px;color:#fff;line-height:1.4}
.tag-new{background:#10b981}
.tag-hot{background:#ef4444}

/* ============ 面包屑 ============ */
.breadcrumb{background:#fff;border-bottom:1px solid #eaecef}
.breadcrumb-wrap{max-width:1280px;margin:0 auto;padding:12px 20px;font-size:13px;color:#6b7280}
.breadcrumb a{color:#3b82f6}
.breadcrumb a:hover{text-decoration:underline}
.breadcrumb span{margin:0 6px;color:#9ca3af}
.breadcrumb .current{color:#111}

/* ============ 分类/搜索页 ============ */
.cat-page{max-width:1280px;margin:24px auto 0;padding:0 20px}
.cat-page-header{margin-bottom:20px}
.cat-page-header h1{font-size:24px;font-weight:700;color:#111;margin-bottom:6px}
.cat-page-header p{color:#6b7280;font-size:14px}
.cat-page-header strong{color:#3b82f6}
.empty{padding:60px 20px;text-align:center;color:#9ca3af;background:#fff;border-radius:12px}
.pagination{display:flex;gap:6px;justify-content:center;margin:30px 0}
.pagination a{padding:8px 14px;background:#fff;border:1px solid #e5e7eb;border-radius:6px;color:#4b5563;font-size:13px;transition:all .2s}
.pagination a:hover{border-color:#3b82f6;color:#3b82f6}
.pagination a.active{background:#3b82f6;border-color:#3b82f6;color:#fff}

/* ============ 详情页 ============ */
.site-detail{max-width:1080px;margin:24px auto 0;padding:0 20px}
.detail-header{display:flex;gap:24px;padding:28px;background:#fff;border-radius:14px;border:1px solid #eef0f3}
.detail-logo{width:96px;height:96px;border-radius:16px;flex-shrink:0;object-fit:contain;background:#f9fafb;padding:8px}
.detail-meta{flex:1;min-width:0}
.detail-meta h1{font-size:24px;font-weight:700;color:#111;margin-bottom:8px}
.detail-summary{color:#4b5563;margin-bottom:12px;line-height:1.7}
.detail-info{display:flex;gap:16px;color:#6b7280;font-size:13px;margin-bottom:18px;flex-wrap:wrap}
.detail-actions{display:flex;gap:10px;flex-wrap:wrap}
.btn-primary{padding:10px 22px;background:linear-gradient(135deg,#3b82f6,#06b6d4);color:#fff;border-radius:8px;font-weight:600;font-size:14px;display:inline-block;transition:transform .15s,box-shadow .2s}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(59,130,246,.3)}
.btn-secondary{padding:10px 22px;background:#f3f4f6;color:#374151;border-radius:8px;font-weight:500;font-size:14px;transition:background .2s}
.btn-secondary:hover{background:#e5e7eb}
.detail-content{margin-top:20px;padding:24px;background:#fff;border-radius:14px;border:1px solid #eef0f3}
.detail-content h2,.related h2,.section-title{font-size:18px;font-weight:700;margin-bottom:14px;color:#111}
.prose{color:#374151;line-height:1.8}
.prose p{margin-bottom:12px}
.related{margin-top:28px}
.page-static{max-width:880px;margin:30px auto;padding:30px;background:#fff;border-radius:14px;border:1px solid #eef0f3}
.page-static h1{font-size:22px;margin-bottom:16px;color:#111}

/* ============ 页脚 ============ */
.site-footer{margin-top:60px;background:#fff;border-top:1px solid #eaecef}
.footer-wrap{max-width:1280px;margin:0 auto;padding:36px 20px 20px}
.footer-top{text-align:center;margin-bottom:18px}
.footer-logo{display:inline-block;font-size:18px;font-weight:700;color:#111;margin-bottom:8px}
.footer-desc{color:#6b7280;font-size:13px;max-width:680px;margin:0 auto;line-height:1.7}
.footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;padding:18px 0;border-top:1px solid #eef0f3;border-bottom:1px solid #eef0f3}
.footer-links a{color:#6b7280;font-size:13px;transition:color .2s}
.footer-links a:hover{color:#3b82f6}
.footer-bottom{padding-top:16px;text-align:center;color:#9ca3af;font-size:12px}
.footer-bottom a{margin-left:10px;color:#9ca3af}
.footer-bottom a:hover{color:#3b82f6}

/* ============ 返回顶部 ============ */
.back-to-top{position:fixed;right:20px;bottom:30px;width:42px;height:42px;border-radius:50%;background:#fff;border:1px solid #e5e7eb;display:flex;align-items:center;justify-content:center;color:#6b7280;font-size:18px;box-shadow:0 4px 12px rgba(0,0,0,.08);opacity:0;visibility:hidden;transition:all .25s;z-index:50}
.back-to-top.show{opacity:1;visibility:visible}
.back-to-top:hover{color:#3b82f6;border-color:#3b82f6}

/* ============ 响应式 ============ */
@media (max-width:900px){
  .main-nav{display:none;position:absolute;top:100%;left:0;right:0;background:#fff;flex-direction:column;align-items:stretch;padding:8px;border-bottom:1px solid #eaecef;box-shadow:0 6px 18px rgba(0,0,0,.06);overflow:visible}
  .main-nav.show{display:flex}
  .nav-link{padding:10px 14px}
  .menu-toggle{display:flex}
}
@media (max-width:640px){
  .hero{padding:32px 16px 24px}
  .hero-title{font-size:22px}
  .hero-sub{font-size:13px;margin-bottom:18px}
  .search-input{height:40px;font-size:14px}
  .search-btn{height:40px;padding:0 16px;font-size:14px}
  .site-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
  .site-logo{width:36px;height:36px}
  .site-name{font-size:13px}
  .site-desc{font-size:11px}
  .cat-section,.cat-page,.site-detail,.banners{padding:0 14px}
  .cat-title{font-size:16px}
  .detail-header{flex-direction:column;padding:20px;text-align:center}
  .detail-logo{margin:0 auto}
  .detail-info,.detail-actions{justify-content:center}
  .header-wrap{padding:10px 14px;gap:10px}
  .logo-text{font-size:16px}
  .logo-img{height:30px;max-width:130px;max-height:30px}
  .logo-icon{width:28px;height:28px;font-size:12px}
}
