*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:#f5f7fa;color:#333;height:100vh;overflow:hidden;display:flex;flex-direction:column}
.header{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff;padding:10px 24px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 2px 8px rgba(0,0,0,0.1);z-index:10;position:relative;gap:16px;flex-wrap:wrap}
.header h1{font-size:20px;font-weight:600;white-space:nowrap}
.header .stats{font-size:13px;opacity:0.85;white-space:nowrap}
.header-search-box{display:flex;align-items:center;gap:0;flex:1;max-width:480px;min-width:260px}
.header-search-mode{height:36px;padding:0 8px;border:1px solid rgba(255,255,255,0.3);border-right:none;border-radius:8px 0 0 8px;background:rgba(255,255,255,0.15);color:#fff;font-size:13px;outline:none;cursor:pointer;appearance:none;-webkit-appearance:none;text-align:center}
.header-search-mode option{color:#333;background:#fff}
.header-search-input{flex:1;height:36px;padding:0 12px;border:1px solid rgba(255,255,255,0.3);border-left:none;border-right:none;background:rgba(255,255,255,0.12);color:#fff;font-size:14px;outline:none;min-width:0}
.header-search-input::placeholder{color:rgba(255,255,255,0.5)}
.header-search-input:focus{background:rgba(255,255,255,0.2)}
.header-search-btn{height:36px;width:40px;border:1px solid rgba(255,255,255,0.3);border-left:none;border-radius:0 8px 8px 0;background:rgba(255,255,255,0.2);color:#fff;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s}
.header-search-btn:hover{background:rgba(255,255,255,0.35)}
.layout{display:flex;height:calc(100vh - 56px)}
.sidebar{width:260px;min-width:260px;background:#fff;border-right:1px solid #e8e8e8;overflow-y:auto;padding:8px 0}
.sidebar::-webkit-scrollbar{width:4px}
.sidebar::-webkit-scrollbar-thumb{background:#d0d0d0;border-radius:2px}
.cat-group{border-bottom:1px solid #f0f0f0}
.cat-group:last-child{border-bottom:none}
.cat-header{display:flex;align-items:center;padding:10px 16px;cursor:pointer;font-size:14px;font-weight:600;color:#333;transition:background .15s;user-select:none}
.cat-header:hover{background:#f8f9ff}
.cat-header .arrow{width:16px;font-size:10px;color:#999;transition:transform .2s;margin-right:4px;text-align:center}
.cat-header.expanded .arrow{transform:rotate(90deg)}
.cat-header .name{flex:1}
.cat-header .badge{font-size:11px;color:#999;background:#f0f0f0;padding:1px 7px;border-radius:10px;font-weight:400}
.sub-list{display:none}
.sub-list.open{display:block}
.sub-item{padding:7px 16px 7px 40px;cursor:pointer;font-size:13px;color:#666;transition:all .15s;border-left:3px solid transparent;user-select:none;display:flex;justify-content:space-between;align-items:center}
.sub-item:hover{background:#f0f2ff;color:#667eea}
.sub-item.active{background:#eef0ff;color:#667eea;font-weight:600;border-left-color:#667eea}
.sub-item .sub-badge{font-size:10px;color:#aaa;background:#f5f5f5;padding:0 6px;border-radius:8px}
.main{flex:1;overflow-y:auto;padding:20px 24px}
.main::-webkit-scrollbar{width:6px}
.main::-webkit-scrollbar-thumb{background:#c0c0c0;border-radius:3px}
.section-title{font-size:18px;font-weight:700;color:#333;margin-bottom:4px}
.section-subtitle{font-size:13px;color:#999;margin-bottom:20px}
.tool-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}
.tool-card{background:#fff;border-radius:10px;padding:16px;display:flex;align-items:flex-start;gap:12px;cursor:pointer;transition:all .2s;border:1px solid #eee;text-decoration:none;color:inherit}
.tool-card:hover{box-shadow:0 4px 16px rgba(102,126,234,.12);border-color:#c5cdff;transform:translateY(-2px)}
.tool-logo{width:48px;height:48px;border-radius:10px;object-fit:contain;background:#f8f9fc;flex-shrink:0;border:1px solid #f0f0f0}
.tool-info{flex:1;min-width:0}
.tool-name{font-size:15px;font-weight:600;color:#222;margin-bottom:4px}
.tool-desc{font-size:12px;color:#999;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tool-url{font-size:11px;color:#bbb;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tool-cat-tag{font-size:10px;color:#667eea;background:#eef0ff;padding:1px 6px;border-radius:4px;margin-top:4px;display:inline-block}
.empty-state{text-align:center;padding:80px 20px;color:#ccc}
.empty-state .icon{font-size:48px;margin-bottom:12px}
.empty-state p{font-size:14px}
.loading{text-align:center;padding:40px;color:#999;font-size:14px}
.search-bar{margin-bottom:20px;position:relative}
.search-bar input{width:100%;padding:10px 16px 10px 38px;border:1px solid #ddd;border-radius:8px;font-size:14px;outline:none;transition:border .2s}
.search-bar input:focus{border-color:#667eea}
.search-bar .search-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#bbb;font-size:16px}
.breadcrumb{font-size:13px;color:#aaa;margin-bottom:12px}
.breadcrumb span{color:#667eea;cursor:pointer}
.breadcrumb span:hover{text-decoration:underline}
.cat-overview{background:#fff;border:1px solid #eee;border-radius:10px;padding:16px 20px;margin-bottom:12px;cursor:pointer;transition:.2s}
.cat-overview:hover{border-color:#c5cdff;box-shadow:0 4px 12px rgba(102,126,234,.08)}
.back-to-top{position:fixed;bottom:30px;right:30px;width:48px;height:48px;border-radius:50%;background:rgba(102,126,234,0.7);color:#fff;font-size:22px;border:none;cursor:pointer;display:none;align-items:center;justify-content:center;z-index:9999;transition:background .3s,transform .3s;box-shadow:0 2px 12px rgba(0,0,0,0.15)}
.back-to-top:hover{background:rgba(102,126,234,1);transform:translateY(-2px)}
.back-to-top.show{display:flex}
.site-footer{background:#fff;border-top:1px solid #e8e8e8;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#999;flex-shrink:0}
.site-footer a{color:#667eea;text-decoration:none;margin-left:16px}
.site-footer a:hover{text-decoration:underline}
.site-footer .footer-left{display:flex;align-items:center;gap:12px}
.site-footer .footer-right{display:flex;align-items:center}
.menu-toggle{display:none;width:36px;height:36px;border:none;background:rgba(255,255,255,0.15);color:#fff;font-size:20px;cursor:pointer;border-radius:6px;align-items:center;justify-content:center;flex-shrink:0}
.sidebar-overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.4);z-index:99}
.sidebar-overlay.show{display:block}
@media (max-width:1023px){
  .sidebar{width:220px;min-width:220px}
  .tool-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
  .header{padding:10px 16px;gap:10px}
  .header h1{font-size:18px}
  .header-search-box{max-width:360px;min-width:200px}
  .main{padding:16px}
}
@media (max-width:767px){
  .menu-toggle{display:flex}
  .header{padding:8px 12px;gap:8px;flex-wrap:nowrap}
  .header h1{font-size:16px}
  .header .stats{display:none}
  .header-search-box{order:3;flex:1 1 100%;max-width:none;min-width:0;margin-top:4px}
  .layout{position:relative}
  .sidebar-overlay{display:none}
  .sidebar{position:fixed;top:0;left:0;bottom:0;width:260px;min-width:260px;z-index:100;transform:translateX(-100%);transition:transform .25s ease;box-shadow:2px 0 12px rgba(0,0,0,0.15)}
  .sidebar.open{transform:translateX(0)}
  .main{padding:12px}
  .tool-grid{grid-template-columns:1fr}
  .tool-card{padding:12px;gap:10px}
  .tool-logo{width:40px;height:40px;border-radius:8px}
  .tool-name{font-size:14px}
  .tool-desc{font-size:11px;-webkit-line-clamp:2}
  .cat-overview{padding:12px 16px}
  .section-title{font-size:16px}
  .search-bar input{font-size:13px}
  .breadcrumb{font-size:12px}
  .site-footer{flex-direction:column;gap:6px;text-align:center;padding:12px;font-size:11px}
  .site-footer a{margin-left:0}
  .site-footer .footer-left{flex-direction:column;gap:2px}
  .back-to-top{width:40px;height:40px;bottom:16px;right:12px;font-size:18px}
}
