*{margin:0;padding:0;box-sizing:border-box;font-family:system-ui,-apple-system,sans-serif;}
body{transition: all 0.35s ease;overflow-x: hidden !important;}
html,body{height:100%;min-height:100%;}
.page-wrap{min-height:100%;display:flex;flex-direction:column;}
.main-body{flex:1;margin-left:0 !important;}

/* 明暗主题底色 */
html[data-theme="light"] body{background:#f8f9fa;color:#222;}
html[data-theme="dark"] body{background:#121418;color:#eee;}

/* Banner */
.banner-wrap{
    width:100%;min-height:320px;padding:40px 30px;
    background: url("../../img/bj.png") center / cover no-repeat;
    mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
    text-align:center;position:relative;
}
.logo-title{margin-top:30px;}
.logo-title h1{font-size:48px;color:#fff;text-shadow:0 2px 12px rgba(0,0,0,0.12);}
.logo-title p{color:#fff;font-size:18px;margin-top:8px;opacity:0.9;}
.banner-top-logo{display:flex;justify-content:center;}
.banner-top-logo img{height:auto;max-height:80px;max-width:100%;object-fit:contain;}

/* 流光Logo */
.logo-shine{
    display:inline-flex !important;align-items:center !important;vertical-align:middle;
    gap:14px !important;text-decoration:none;
}
.logo-shine img{height:auto;max-height:64px;width:auto;}
.logo-shine .text-group{
    display:flex !important;flex-direction:column !important;justify-content:center !important;
    line-height:1 !important;margin:0 !important;padding:0 !important;
}
.logo-shine .logo-title{
    font-size:28px !important;font-weight:800;letter-spacing:1.5px !important;
    margin:0 !important;padding:0 !important;line-height:1.2 !important;display:block !important;
    background:linear-gradient(90deg,#fff 0%,#fff 35%,#4facfe 45%,#a855f7 50%,#4facfe 55%,#fff 65%,#fff 100%);
    background-size:200% 100%;-webkit-background-clip:text;background-clip:text;
    -webkit-text-fill-color:transparent;animation:text-shine 3s linear infinite;
}
.logo-shine .logo-url{
    font-size:14px !important;font-weight:600;letter-spacing:0.5px;
    margin:0 !important;padding:0 !important;line-height:1.2 !important;display:block !important;margin-top:4px !important;
    background:linear-gradient(90deg,rgba(255,255,255,0.7) 0%,rgba(255,255,255,0.7) 35%,#4facfe 45%,#a855f7 50%,#4facfe 55%,rgba(255,255,255,0.7) 65%,rgba(255,255,255,0.7) 100%);
    background-size:200% 100%;-webkit-background-clip:text;background-clip:text;
    -webkit-text-fill-color:transparent;animation:text-shine 4s linear infinite;
}
.logo-shine .ai-icon{
    width:56px !important;height:56px !important;border-radius:12px !important;
    background:linear-gradient(135deg,#4facfe 0%,#a855f7 100%);
    display:flex !important;align-items:center !important;justify-content:center !important;
    color:#fff;font-weight:800;font-size:20px !important;line-height:1 !important;
    box-shadow:0 2px 12px rgba(79,172,254,0.4);flex-shrink:0;margin:0 !important;padding:0 !important;
}
@keyframes text-shine{0%{background-position:200% 50%;}100%{background-position:-200% 50%;}}
.logo-shine:hover .logo-title{animation-duration:1.5s;}
.logo-shine:hover .logo-url{animation-duration:2s;}

/* 搜索按钮 */
.quick-search{display:flex;gap:12px;justify-content:center;margin:32px 0 16px;flex-wrap:wrap;}
.quick-search button{
    padding:8px 18px;border-radius:999px;border:1px solid rgba(255,255,255,0.35);
    cursor:pointer;font-size:15px;background:transparent;color:#fff;
    transition:all 0.2s ease;white-space:nowrap;flex-shrink:0;
}
.quick-search button.active{background:#fff;color:#222;border-color:#fff;}
.quick-search button:hover:not(.active){background:rgba(255,255,255,0.15);}
.search-box-wrap{max-width:680px;margin:0 auto;display:flex;}
#search-input{flex:1;height:52px;border:none;border-radius:999px 0 0 999px;padding:0 24px;font-size:16px;outline:none;}
#search-btn{height:52px;padding:0 30px;border:none;border-radius:0 999px 999px 0;background:#6349ff;color:#fff;font-size:16px;cursor:pointer;}

.container{max-width:1800px;margin:10px auto 60px auto;padding:0 30px;}

/* 分类导航 */
.category-nav{width:100%;box-sizing:border-box;background:#fff;border:1px solid #eee;border-radius:16px;padding:16px 20px;margin:16px 0;line-height:2.4;}
.category-nav a,.category-nav button{
    display:inline-block;font-size:19px;color:#666;padding:6px 12px;
    position:relative;background:transparent;border:none;cursor:pointer;
}
.category-nav a:first-child::before,.category-nav button:first-child::before{content:none;}
.category-nav a::before,.category-nav button::before{content:"|";color:#ccc;margin:0 14px;}
.category-nav a.active,.category-nav button.active{color:#0055ff;font-weight:bold;}
.category-nav a:hover,.category-nav button:hover{color:#0055ff;}

/* 工具区块 */
.tool-wrap-block{background:#fff;border-radius:16px;padding:20px;margin-bottom:22px;box-shadow:0 1px 8px rgba(0,0,0,0.04);}
.tool-block-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;}
.tool-wrap-block h2{font-size:16px;font-weight:600;display:flex;align-items:center;gap:7px;}
.tool-more-btn{border:1px solid #dde0e8;background:#fff;color:#444;border-radius:6px;padding:3px 10px;font-size:13px;cursor:pointer;transition:0.2s;}
.tool-more-btn:hover{border-color:#6349ff;color:#6349ff;}

.tool-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:16px;}
.tool-wrap-block[data-cat-sort="0"] .tool-grid{grid-template-columns:repeat(6,1fr);}

/* 工具卡片（最终精简版） */
.tool-card{
    display:flex;gap:6px !important;
    padding:6px 6px !important;padding-top:6px !important;padding-bottom:6px !important;
    border-radius:12px;background:#fff;border:1px solid #edf0f7;
    text-decoration:none;color:inherit;
    transition:0.2s cubic-bezier(0.25,0.46,0.45,0.94);
    min-width:0;box-shadow:0 1px 6px rgba(0,0,0,0.04);
    position:relative !important;overflow:visible !important;
}
.tool-wrap-block[data-cat-sort="0"] .tool-card{padding:6px 8px !important;gap:6px !important;}
.tool-card:hover{border-color:#8880ff;box-shadow:0 2px 12px rgba(136,128,255,0.18);}
.tool-card:hover .card-name-text{color:#e53e3e;transition:color 0.2s ease;}

.card-icon{
    flex-shrink:0;width:30px !important;height:30px !important;
    border-radius:50%;overflow:hidden;
    display:flex;align-items:center;justify-content:center;
    border:none !important;background:transparent !important;
}
.tool-wrap-block[data-cat-sort="0"] .card-icon{width:34px !important;height:34px !important;}
.card-icon img{width:100%;height:100%;object-fit:contain;object-position:center;display:block;transition:transform 0.22s cubic-bezier(0.25,0.46,0.45,0.94);}
.tool-card:hover .card-icon img{transform:scale(1.15);}

.card-info{flex:1;min-width:0;}
.card-name{font-weight:700;font-size:12.5px;margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;}
.card-desc{font-size:10.5px;color:#888;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.25;}
.tool-wrap-block[data-cat-sort="0"] .card-name{font-size:13px;}
.tool-wrap-block[data-cat-sort="0"] .card-desc{font-size:11px;}

/* PC隐藏25以后 */
.tool-grid > .tool-card:nth-child(n+25){display:none;}
.tool-grid.expand-all > .tool-card:nth-child(n+25){display:flex;}

/* 置顶推荐角标（最终丝带版） */
.card-recommend-badge{
    position:absolute;right:0 !important;top:0 !important;z-index:10;
    background:#e53e3e;color:#fff;font-size:10px !important;font-weight:600 !important;
    padding:2px 7px 2px 8px !important;border-radius:0 12px 0 7px !important;
    line-height:1.3 !important;box-shadow:0 1px 3px rgba(229,62,62,0.3) !important;
}
.card-top-badge-wrap{
    position:absolute;left:0 !important;top:0 !important;z-index:10;
    background:#ff7d00;color:#fff;font-size:10px !important;font-weight:600 !important;
    padding:2px 8px 2px 7px !important;border-radius:12px 0 7px 0 !important;
    line-height:1.3 !important;box-shadow:0 1px 3px rgba(255,125,0,0.3) !important;
}

/* 置顶标题彩虹拆字流动 */
.tool-card > .card-top-badge-wrap ~ .card-info .card-name{
    background:none !important;-webkit-background-clip:initial !important;background-clip:initial !important;
    -webkit-text-fill-color:initial !important;color:initial !important;
    animation:none !important;filter:none !important;
}
.tool-card > .card-top-badge-wrap ~ .card-info .card-name-text{
    -webkit-text-fill-color:initial !important;color:initial !important;
    background:none !important;animation:none !important;filter:none !important;
}
@keyframes hueSpinChar{0%{filter:hue-rotate(0deg);}100%{filter:hue-rotate(360deg);}}

/* Tooltip悬浮提示框 */
.card-tooltip{
    visibility:hidden;opacity:0;position:absolute;left:50%;top:calc(100% + 12px);
    transform:translateX(-50%);max-width:440px;min-width:220px;
    background:#111;color:#fff;padding:12px 16px;border-radius:8px;
    font-size:14px;line-height:1.45;box-shadow:0 4px 14px rgba(0,0,0,0.22);
    transition:0.22s ease;z-index:999;pointer-events:none;white-space:normal;word-break:break-all;
}
.card-tooltip::after{
    content:"";position:absolute;bottom:100%;left:50%;transform:translateX(-50%);
    border-width:6px;border-style:solid;border-color:transparent transparent #111 transparent;
}
.tool-card:hover .card-tooltip{visibility:visible;opacity:1;}

/* 子分类tab胶囊轨道式布局 */
.sub-tab-bar{
    display:inline-flex !important;flex-wrap:wrap !important;gap:4px !important;
    margin-bottom:14px !important;background:#f0f2f5 !important;border-radius:999px !important;
    padding:4px !important;width:auto !important;max-width:100% !important;
}
.sub-tab-btn{
    border:none !important;background:transparent !important;color:#666 !important;
    border-radius:999px !important;padding:6px 16px !important;font-size:13px !important;
    cursor:pointer !important;transition:all 0.2s ease !important;white-space:nowrap !important;
}
.sub-tab-btn.active{background:#6349ff !important;color:#fff !important;box-shadow:0 2px 8px rgba(99,73,255,0.25) !important;}
.sub-tab-btn:hover:not(.active){background:rgba(99,73,255,0.08) !important;color:#6349ff !important;}

/* 站内搜索结果 */
.search-result-block{background:#fff;border-radius:22px;padding:32px;margin-bottom:40px;box-shadow:0 1px 12px rgba(0,0,0,0.05);}
.search-empty-tip{color:#888;padding:20px 0;font-size:16px;}
.search-result-block .tool-grid > .tool-card:nth-child(n+9){display:none !important;}
.search-result-block.show-all .tool-grid > .tool-card:nth-child(n+9){display:flex !important;}
.search-more-btn:hover{text-decoration:underline !important;}

/* 返回顶部 */
#backTop{
    position:fixed;right:30px;bottom:30px;z-index:9999;cursor:pointer;
    width:38px;height:38px;border-radius:50%;background:transparent;
    border:1.5px solid #9ca3af;display:flex;align-items:center;justify-content:center;
    box-shadow:0 4px 12px rgba(0,0,0,0.08);transition:all 0.3s ease;opacity:0;visibility:hidden;
}
#backTop img{width:20px;height:20px;}
#backTop:hover{transform:translateY(-4px);box-shadow:0 6px 16px rgba(0,0,0,0.12);}
#backTop.show{opacity:1;visibility:visible;}

/* 夜间模式悬浮按钮 */
.theme-toggle{
    position:fixed;right:30px;bottom:78px;z-index:9999;cursor:pointer;
    width:38px;height:38px;border-radius:50%;background:transparent;
    border:1.5px solid #9ca3af;display:flex;align-items:center;justify-content:center;
    box-shadow:0 4px 12px rgba(0,0,0,0.08);transition:all 0.3s ease;opacity:1;visibility:visible;
}
.theme-toggle:hover{transform:translateY(-4px);box-shadow:0 6px 16px rgba(0,0,0,0.12);}

/* 赞赏模块 */
.donate-wrap{margin-top:40px;}
.donate-header-bar{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:12px;flex-wrap:wrap;}
.donate-title{font-size:22px;font-weight:bold;flex-shrink:0;}
.donate-sub{font-size:16px;font-weight:normal;color:#667285;margin-left:4px;}
.donate-right-action{
    display:inline-flex;align-items:center;justify-content:center;gap:6px;
    padding:8px 18px;border:1px solid #ccc;border-radius:10px;
    text-decoration:none;color:inherit;transition:all 0.24s ease;
    cursor:pointer;font-size:16px;flex-shrink:0;white-space:nowrap;
}
.donate-right-action:hover{transform:translateY(-2px) scale(1.03);border-color:#409eff;box-shadow:0 4px 12px rgba(64,158,255,0.15);}
.donate-desc-text{color:#667285;margin-bottom:18px;font-size:15px;}
.donate-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:14px;padding:0;}
.donate-item{
    display:flex;flex-direction:column;justify-content:space-between;min-height:110px;
    padding:14px;border-radius:10px;background:#fff;border:1px solid #e8ebf0;
    text-decoration:none;transition:0.24s ease;
}
.donate-item:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(99,73,255,0.10);}
.donate-avatar{width:100%;height:60px;margin-bottom:8px;overflow:hidden;background:transparent;}
.donate-avatar img{width:100%;height:100%;object-fit:contain;}
.donate-desc-box{align-self:flex-start;padding:4px 10px;background:#e6a23c;border-radius:6px;font-size:14px;color:#fff;font-weight:500;white-space:nowrap;}

/* 收藏提示（页脚内最终版） */
.site-footer .favorite-tip{
    display:table !important;width:auto !important;max-width:none !important;
    margin:0 auto 10px !important;padding:6px 14px !important;
    background:transparent !important;border:1px solid #e0e0e0 !important;
    border-radius:20px !important;font-size:13px !important;color:#888 !important;
}
.site-footer .favorite-tip kbd{
    display:inline-block !important;padding:1px 6px !important;background:#f5f5f5 !important;
    border:1px solid #ddd !important;border-radius:3px !important;font-size:11px !important;
    font-family:monospace !important;color:#666 !important;font-weight:500 !important;
}
.site-footer .favorite-tip strong{color:#6349ff !important;font-weight:600 !important;}
html[data-theme="dark"] .site-footer .favorite-tip{border-color:#333 !important;color:#999 !important;}
html[data-theme="dark"] .site-footer .favorite-tip kbd{background:#222 !important;border-color:#444 !important;color:#aaa !important;}

/* 页脚 */
.site-footer{width:100%;padding:24px 20px 18px;background:#fff;text-align:center;flex-shrink:0;border-top:1px solid #eee;}
.footer-inner{max-width:900px;margin:0 auto;}
.friend-link-wrap{max-width:100%;margin:0 0 12px 0;width:100%;padding:0;}
.friend-link-title-bar{border-left:4px solid #6349ff;padding-left:10px;margin-bottom:6px;padding-bottom:3px;border-bottom:1px solid #eee;text-align:left;}
.friend-link-title-bar h3{font-size:14px;margin:0;color:#222;}
.friend-link-items{display:flex;flex-wrap:wrap;align-items:center;row-gap:6px;justify-content:flex-start;}
.fl-item{color:#333;text-decoration:none;}
.fl-item:hover{color:#6349ff;}
.fl-divider{color:#aaa;}
.footer-nav{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0;margin-bottom:12px;}
.footer-nav a{color:#000;text-decoration:none;font-size:14px;font-weight:500;padding:0 12px;}
.footer-nav a:hover{color:#6349ff;}
.footer-line{width:1px;height:16px;background:#ccc;}
.footer-desc{font-size:12px;line-height:1.6;color:#000;max-width:720px;margin:0 auto 10px;}
.beian-row{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:8px;font-size:13px;color:#333;}
.beian-sep{color:#aaa;}
.beian-police{display:flex;align-items:center;gap:6px;flex-shrink:0;}
.beian-link{color:#333;text-decoration:none;}
.beian-link:hover{color:#6349ff;}
.beian-icon{height:16px;width:auto;vertical-align:middle;}

/* 两栏布局 */
.layout-two-col{display:flex;gap:24px;align-items:flex-start;contain:layout;}
.col-right{flex:1;min-width:0;}

/* 侧边栏 */
.sidebar-inner{
    width:180px;flex:0 0 auto;background:#fff;border-radius:12px;
    box-shadow:0 1px 6px rgba(0,0,0,0.06);padding:16px 12px;
    overflow-y:auto;max-height:85vh;position:sticky;top:20px;
    transition:width 0.24s ease;will-change:width;transform:translateZ(0);
}
.sidebar-inner.folded{width:54px;padding:16px 6px;}
.sidebar-inner.folded .sidebar-logo{display:none;}
.sidebar-inner.folded .sidebar-category button{justify-content:center;padding:11px 0 !important;gap:0;}
.sidebar-inner.folded .sidebar-category button img{margin-right:0 !important;}
.sidebar-inner.folded .sidebar-category button span{display:none;opacity:0;width:0;overflow:hidden;white-space:nowrap;}
.sidebar-inner.folded .tree-parent-btn .tree-arrow{display:none !important;}
.sidebar-inner:not(.folded) .fold-icon-left{display:inline-block;}
.sidebar-inner:not(.folded) .fold-icon-right{display:none !important;}
.sidebar-inner.folded .fold-icon-left{display:none !important;}
.sidebar-inner.folded .fold-icon-right{display:inline-block !important;}

.sidebar-header-bar{display:flex;align-items:center;gap:10px;padding-bottom:12px;margin-bottom:10px;border-bottom:1px solid #eee;}
.sidebar-header-bar img{width:auto;height:42px;max-width:100%;object-fit:contain;}
.sidebar-header-bar span{font-size:17px;font-weight:bold;}

.sidebar-category button{
    display:flex !important;width:100%;gap:8px;align-items:center !important;text-align:left;
    border:none;background:transparent;padding:11px 12px;border-radius:8px;margin-bottom:6px;
    cursor:pointer;font-size:14.5px;color:#303133;transition:0.2s ease;
    min-height:42px;height:42px;overflow:hidden;
}
.sidebar-category button.active{background:#e6f0ff;color:#1677ff;font-weight:500;}
.sidebar-category button:hover:not(.active){background:#eef1f7;color:#1677ff;}
.sidebar-category button img{flex-shrink:0;width:17px;height:17px;}

.sidebar-footer-fold{margin-top:20px;padding-top:12px;border-top:1px solid #e4e7ed;}
.sidebar-footer-fold button{
    width:100%;display:flex;align-items:center;justify-content:center;gap:6px;
    padding:10px;border-radius:8px;border:0;background:transparent;
    cursor:pointer;font-size:14px;color:#555;
}
.sidebar-footer-fold button:hover{background:#eef1f7;color:#1677ff;}

/* 侧边栏树形菜单 */
.sidebar-tree-item{margin-bottom:4px;}
.tree-parent-btn{
    display:flex !important;width:100%;gap:8px;align-items:center !important;text-align:left;
    border:none;background:transparent;padding:11px 12px;border-radius:8px;margin-bottom:0;
    cursor:pointer;font-size:14.5px;color:#303133;transition:0.2s ease;
    min-height:42px;height:42px;overflow:hidden;
}
.tree-parent-btn .tree-arrow{margin-left:auto;}
.tree-parent-btn.active{background:#e6f0ff;color:#1677ff;font-weight:500;}
.tree-parent-btn:hover:not(.active){background:#eef1f7;color:#1677ff;}
.tree-arrow{transition:transform 0.22s ease;flex-shrink:0;}
.tree-arrow.open{transform:rotate(-180deg);}
.tree-children-wrap{overflow:hidden;max-height:0;transition:max-height 0.26s ease;}
.tree-children-wrap.open{max-height:800px;}
.tree-child-btn{
    display:flex !important;width:100%;gap:8px;align-items:center !important;text-align:left;
    border:none;background:transparent;padding:10px 12px 10px 26px;border-radius:8px;margin-bottom:4px;
    cursor:pointer;font-size:14px;color:#444;transition:0.2s;min-height:40px;height:40px;
}
.tree-child-btn.active{background:#e6f0ff;color:#1677ff;font-weight:500;}
.tree-child-btn:hover:not(.active){background:#eef1f7;color:#1677ff;}

/* 移动端汉堡菜单 */
.mobile-hamburger-btn{
    display:none;position:fixed;top:12px;z-index:998;margin:0 16px 10px 16px;
    background:transparent !important;border:none !important;width:44px;height:44px;
    border-radius:10px;cursor:pointer;color:#888;box-shadow:none !important;
}
.mobile-menu-overlay{
    position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,0.45);
    z-index:9998;opacity:0;visibility:hidden;transition:0.24s ease;
}
.mobile-menu-overlay.show{opacity:1;visibility:visible;}
.mobile-menu-drawer{
    position:fixed;top:0;left:0;width:280px;height:100vh;z-index:9999;background:#fff;
    transform:translateX(-100%);transition:transform 0.28s cubic-bezier(0.25,0.46,0.45,0.94);
    display:flex;flex-direction:column;
}
.mobile-menu-drawer.show{transform:translateX(0);}
.mobile-drawer-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid #eee;flex-shrink:0;}
.mobile-drawer-title{font-size:17px;font-weight:600;}
.mobile-drawer-close{background:transparent;border:none;cursor:pointer;color:#444;}
.mobile-drawer-category{flex:1;overflow-y:auto;padding:12px 12px !important;}
.mobile-drawer-title-img{height:32px;max-width:180px;object-fit:contain;}

.mobile-cat-btn{
    display:flex !important;width:100%;align-items:center !important;justify-content:flex-start !important;gap:8px;
    border:none;background:transparent;padding:12px 12px;border-radius:9px;margin-bottom:6px;
    text-align:left;font-size:15px;cursor:pointer;color:#333;min-height:44px;
}
.mobile-cat-btn.active{background:#e6f0ff;color:#1677ff;font-weight:500;}
.mobile-cat-btn:hover:not(.active){background:#eef1f7;}
.mobile-cat-btn img{width:18px;height:18px;flex-shrink:0;}

/* 移动端树形 */
.mobile-tree-item{margin-bottom:4px;}
.mobile-tree-parent-btn{
    display:flex;width:100%;align-items:center;justify-content:flex-start !important;gap:10px;
    border:none;background:transparent;padding:12px 12px;border-radius:9px;margin-bottom:0;
    text-align:left;font-size:15px;cursor:pointer;color:#333;min-height:44px;
}
.mobile-tree-parent-btn .mobile-tree-arrow{margin-left:auto !important;flex-shrink:0;}
.mobile-tree-parent-btn img,.mobile-tree-child-btn img{width:22px;height:22px;flex-shrink:0;object-fit:contain;display:block;}
.mobile-tree-parent-btn.active{background:#e6f0ff;color:#1677ff;font-weight:500;}
.mobile-tree-parent-btn:hover:not(.active){background:#eef1f7;}
.mobile-tree-arrow{transition:transform 0.22s ease;flex-shrink:0;}
.mobile-tree-arrow.open{transform:rotate(-180deg);}
.mobile-tree-children-wrap{overflow:hidden;max-height:0;transition:max-height 0.26s ease;}
.mobile-tree-children-wrap.open{max-height:800px;}
.mobile-tree-child-btn{
    display:flex;width:100%;align-items:center;gap:10px;border:none;background:transparent;
    padding:12px 12px 12px 28px;border-radius:9px;margin-bottom:6px;text-align:left;
    font-size:15px;cursor:pointer;color:#333;min-height:44px;
}
.mobile-tree-child-btn.active{background:#e6f0ff;color:#1677ff;font-weight:500;}
.mobile-tree-child-btn:hover:not(.active){background:#eef1f7;}

/* =========深色模式统一规则========= */
html[data-theme="dark"] .tool-wrap-block{background:#171920;}
html[data-theme="dark"] .tool-card{background:#1b1e24;border-color:#2d303f;box-shadow:0 1px 6px rgba(0,0,0,0.12);}
html[data-theme="dark"] .card-icon{background:#272a36;border-color:#383c4c;}
html[data-theme="dark"] .card-desc{color:#aaa;}
html[data-theme="dark"] .tool-more-btn{background:#222834;border-color:#333948;color:#ccc;}
html[data-theme="dark"] .tool-more-btn:hover{border-color:#6349ff;color:#6349ff;}
html[data-theme="dark"] .tool-card:hover .card-name-text{color:#8c7dff;}
html[data-theme="dark"] .search-result-block{background:#171920;}
html[data-theme="dark"] #backTop{background:transparent;border-color:#6b7280;}
html[data-theme="dark"] .theme-toggle{background:transparent;border-color:#6b7280;}
html[data-theme="dark"] .donate-right-action{border-color:#444a58;color:#eee;}
html[data-theme="dark"] .donate-right-action:hover{border-color:#409eff;box-shadow:0 4px 12px rgba(64,158,255,0.25);}
html[data-theme="dark"] .donate-item{background:#1b1e24;border-color:#303542;}
html[data-theme="dark"] .donate-desc-box{background:#d49b22;color:#fff;}
html[data-theme="dark"] .donate-title,html[data-theme="dark"] .donate-right-action{color:#eee;}
html[data-theme="dark"] .site-footer{background:#11121b;border-top-color:#272a36;}
html[data-theme="dark"] .friend-link-title-bar{border-bottom-color:#333842;}
html[data-theme="dark"] .friend-link-title-bar h3{color:#eee;}
html[data-theme="dark"] .fl-divider{color:#555;}
html[data-theme="dark"] .fl-item{color:#ccc;}
html[data-theme="dark"] .footer-nav a{color:#fff;}
html[data-theme="dark"] .footer-line{background:#555;}
html[data-theme="dark"] .footer-desc{color:#eee;}
html[data-theme="dark"] .beian-row{color:#eee;}
html[data-theme="dark"] .beian-link{color:#eee;}
html[data-theme="dark"] .sidebar-inner{background:#1b1e24;box-shadow:0 1px 8px rgba(0,0,0,0.15);}
html[data-theme="dark"] .sidebar-header-bar{border-bottom-color:#2c3038;}
html[data-theme="dark"] .sidebar-category button{color:#e5e7eb;}
html[data-theme="dark"] .sidebar-category button.active{background:#20304c;color:#4096ff;}
html[data-theme="dark"] .sidebar-category button:hover:not(.active){background:#272c38;color:#4096ff;}
html[data-theme="dark"] .sidebar-footer-fold{border-top-color:#303440;}
html[data-theme="dark"] .sidebar-footer-fold button{color:#aaa;}
html[data-theme="dark"] .sidebar-footer-fold button:hover{background:#272c38;color:#4096ff;}
html[data-theme="dark"] .tree-parent-btn{color:#e5e7eb;}
html[data-theme="dark"] .tree-parent-btn.active{background:#20304c;color:#4096ff;}
html[data-theme="dark"] .tree-parent-btn:hover:not(.active){background:#272c38;color:#4096ff;}
html[data-theme="dark"] .tree-child-btn{color:#ccc;}
html[data-theme="dark"] .tree-child-btn.active{background:#20304c;color:#4096ff;}
html[data-theme="dark"] .tree-child-btn:hover:not(.active){background:#272c38;color:#4096ff;}
html[data-theme="dark"] .mobile-hamburger-btn{color:#aaa;}
html[data-theme="dark"] .mobile-menu-drawer{background:#1b1e24;}
html[data-theme="dark"] .mobile-drawer-head{border-bottom-color:#2c3038;}
html[data-theme="dark"] .mobile-drawer-title{color:#eee;}
html[data-theme="dark"] .mobile-drawer-close{color:#ccc;}
html[data-theme="dark"] .mobile-cat-btn{color:#e5e7eb;}
html[data-theme="dark"] .mobile-cat-btn.active{background:#20304c;color:#4096ff;}
html[data-theme="dark"] .mobile-cat-btn:hover:not(.active){background:#272c38;}
html[data-theme="dark"] .mobile-tree-parent-btn{color:#e5e7eb;}
html[data-theme="dark"] .mobile-tree-parent-btn.active{background:#20304c;color:#4096ff;}
html[data-theme="dark"] .mobile-tree-parent-btn:hover:not(.active){background:#272c38;}
html[data-theme="dark"] .mobile-tree-child-btn{color:#e5e7eb;}
html[data-theme="dark"] .mobile-tree-child-btn.active{background:#20304c;color:#4096ff;}
html[data-theme="dark"] .mobile-tree-child-btn:hover:not(.active){background:#272c38;}
html[data-theme="dark"] .sub-tab-bar{background:#222834 !important;}
html[data-theme="dark"] .sub-tab-btn{color:#ccc !important;}
html[data-theme="dark"] .sub-tab-btn.active{background:#6349ff !important;color:#fff !important;}
html[data-theme="dark"] .sub-tab-btn:hover:not(.active){background:rgba(99,73,255,0.15) !important;color:#6349ff !important;}

/* =========响应式媒体查询========= */
@media(max-width:1600px){
    .tool-grid{grid-template-columns:repeat(7,1fr);}
    .tool-wrap-block[data-cat-sort="0"] .tool-grid{grid-template-columns:repeat(4,1fr);}
}
@media(max-width:1400px){
    .tool-grid{grid-template-columns:repeat(6,1fr);}
    .tool-wrap-block[data-cat-sort="0"] .tool-grid{grid-template-columns:repeat(4,1fr);}
}
@media(max-width:1200px){
    .tool-grid{grid-template-columns:repeat(5,1fr);}
    .tool-wrap-block[data-cat-sort="0"] .tool-grid{grid-template-columns:repeat(4,1fr);}
}
@media(max-width:900px){
    .tool-grid{grid-template-columns:repeat(3,1fr);}
    .tool-wrap-block[data-cat-sort="0"] .tool-grid{grid-template-columns:repeat(3,1fr);}
}
@media(max-width:992px){
    .layout-two-col{display:block !important;}
    .sidebar-inner{display:none !important;}
    .col-right{width:100% !important;}
    .mobile-hamburger-btn{display:flex;align-items:center;justify-content:center;}
}
@media(min-width:993px){
    .sidebar-header-bar img,.sidebar-header-bar span{display:none;}
    .sidebar-header-bar{border-bottom:none;padding-bottom:0;margin-bottom:0;}
    .mobile-menu-overlay,.mobile-menu-drawer{display:none !important;}
}
@media(max-width:768px){
    .logo-shine img{max-height:44px;}
    .logo-shine .logo-title{font-size:18px !important;}
    .logo-shine .logo-url{font-size:11px !important;}
    .logo-shine .ai-icon{width:36px !important;height:36px !important;font-size:14px !important;}
    .favorite-tip{font-size:13px;padding:12px 16px;}
}
@media(max-width:640px){
    .category-nav{padding:12px 14px;line-height:2;}
    .category-nav a,.category-nav button{font-size:16px;padding:3px 6px;}
    .category-nav a::before,.category-nav button::before{margin:0 6px;}
    .donate-right-action{padding:6px 12px;font-size:14px;}
    .donate-title{font-size:18px;}
}
@media(max-width:600px){
    .logo-title h1{font-size:34px;}
    .banner-wrap{padding:30px 16px;min-height:280px;}
    .quick-search{display:grid;grid-template-columns:repeat(5,1fr);gap:8px 6px;padding:0 4px;margin:20px 0 14px;}
    .quick-search button{padding:6px 2px;font-size:12px;width:100%;justify-content:center;display:flex;align-items:center;gap:4px;}
    .quick-search button img{height:14px !important;}
    .search-box-wrap{padding:0 8px;}
    #search-input{height:46px;padding:0 16px;font-size:15px;}
    #search-btn{height:46px;padding:0 18px;font-size:14px;}
    .banner-top-logo img{max-height:52px;}
    .tool-grid{grid-template-columns:repeat(2,1fr);}
    .tool-wrap-block[data-cat-sort="0"] .tool-grid{grid-template-columns:repeat(2,1fr);}
    .tool-wrap-block{padding:16px 14px;}
    .card-name{white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;display:block !important;}
    .tool-grid > .tool-card:nth-child(n+7){display:none;}
    .tool-grid.expand-all > .tool-card:nth-child(n+7){display:flex;}
    .search-result-block{padding:20px 16px;}
    .donate-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;}
    .donate-item{min-height:100px;}
    .site-footer{padding:12px 10px 10px;}
    .footer-nav{flex-wrap:nowrap !important;overflow-x:auto;gap:0 !important;padding-bottom:6px;}
    .footer-nav a{padding:0 6px !important;font-size:13px !important;white-space:nowrap;}
    .footer-line{height:12px !important;flex-shrink:0;}
    .beian-row{font-size:11px;gap:6px;flex-wrap:wrap !important;justify-content:center;overflow:visible;padding:0 8px;line-height:1.65;}
    .beian-police{flex-shrink:1;}
    .footer-nav::-webkit-scrollbar{height:3px;}
    html[data-theme="light"] .footer-nav::-webkit-scrollbar-thumb{background:#ddd;}
    html[data-theme="dark"] .footer-nav::-webkit-scrollbar-thumb{background:#444;}
    .footer-fake-stats{gap:12px;font-size:13px;}
    .theme-toggle{bottom:74px;right:16px;width:34px;height:34px;}
    .theme-toggle img{width:16px;height:16px;}
    #backTop{right:16px;bottom:20px;width:34px;height:34px;}
    #backTop img{width:16px;height:16px;}
}

/* 友情链接挨着底部（紧贴页脚上方） */
.main-body{
    display:flex !important;
    flex-direction:column !important;
}
.main-body > .container{
    flex:1 !important;
    display:flex !important;
    flex-direction:column !important;
    margin-bottom:0 !important;
}
.main-body > .container .friend-link-wrap{
    margin-top:auto !important;
    padding-top:30px !important;
    margin-bottom:0 !important;
}

/* Logo流光来回跑 */
.logo-shine .logo-title{
    animation:text-shine 3s linear infinite alternate !important;
}
.logo-shine .logo-url{
    animation:text-shine 4s linear infinite alternate !important;
}
/* Logo图标去掉背景 */
.logo-shine .ai-icon{
    background:transparent !important;
    box-shadow:none !important;
    padding:0 !important;
}

/* ========== 手机端修复：Logo放大 + 工具卡片显示8个 ========== */
@media(max-width:600px){
    /* Logo图标放大 */
    .logo-shine .ai-icon{
        width:48px !important;
        height:48px !important;
    }
    .logo-shine .logo-title{
        font-size:22px !important;
    }
    .logo-shine .logo-url{
        font-size:13px !important;
    }
    /* 工具卡片从显示6个改成显示8个 */
    .tool-grid > .tool-card:nth-child(n+7){
        display:flex !important;
    }
    .tool-grid > .tool-card:nth-child(n+9){
        display:none !important;
    }
    .tool-grid.expand-all > .tool-card:nth-child(n+9){
        display:flex !important;
    }
    /* 搜索按钮改成3列，更整齐 */
    .quick-search{
        grid-template-columns:repeat(3,1fr) !important;
    }
}

/* ========== 手机端自适应终极修复 ========== */
@media only screen and (max-width:600px){
    /* 页面不横向溢出 */
    html,body{
        width:100% !important;
        overflow-x:hidden !important;
    }
    /* 容器宽度自适应 */
    .container{
        width:100% !important;
        max-width:100% !important;
        padding:0 12px !important;
        box-sizing:border-box !important;
    }
    /* 强制工具卡片两列 */
    body .tool-grid,
    body .tool-wrap-block[data-cat-sort="0"] .tool-grid{
        display:grid !important;
        grid-template-columns:repeat(2,1fr) !important;
        gap:10px !important;
        width:100% !important;
        box-sizing:border-box !important;
    }
    body .tool-card{
        width:100% !important;
        display:flex !important;
        box-sizing:border-box !important;
        min-width:0 !important;
    }
    /* 工具区块内边距 */
    .tool-wrap-block{
        padding:14px 12px !important;
        box-sizing:border-box !important;
    }
}
