    /* 基础重置和暗黑背景 */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #0b0f1a; color: #e5e7eb; line-height: 1.6; -webkit-font-smoothing: antialiased; }
    a { color: inherit; text-decoration: none; }
    ul { list-style: none; }

    /* 顶部导航 */
    .top-nav {
        position: sticky; top: 0; z-index: 100;
        background: rgba(11,15,26,0.85); backdrop-filter: blur(12px);
        border-bottom: 1px solid #1f2937;
        padding: 0 40px; height: 56px;
        display: flex; align-items: center; justify-content: space-between;
    }
    .top-nav .brand { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; }
    .top-nav .brand span { background: linear-gradient(135deg, #6366f1, #7c3aed); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .top-nav .nav-links { display: flex; gap: 28px; font-size: 14px; color: #9ca3af; }
    .top-nav .nav-links a:hover { color: #e5e7eb; }
    .top-nav .nav-right { display: flex; gap: 16px; font-size: 14px; align-items: center; }
    .top-nav .nav-right a.btn-login { color: #9ca3af; }
    .top-nav .nav-right a.btn-signup { background: linear-gradient(135deg, #6366f1, #7c3aed); color: #fff; padding: 6px 18px; border-radius: 6px; font-weight: 500; }


/* ===== 全局重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #0b0f1a; color: #e5e7eb; -webkit-font-smoothing: antialiased; }
ul { list-style: none; }

/* ===== Page Layout ===== */
.page-wrapper { max-width: 1600px; margin: 0 auto; display: flex; min-height: calc(100vh - 64px); align-items: flex-start; }

/* ===== Left Sidebar ===== */
.sidebar { width: 260px; flex-shrink: 0; padding: 24px 16px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; border-right: 1px solid #1f2937; background: #0b0f1a; }
.sidebar h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: #6b7280; margin: 0 0 12px 12px; font-weight: 600; }
.sidebar .cat-list li a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px 9px 24px; border-radius: 6px; font-size: 14px; color: #9ca3af; transition: all 0.2s; position: relative; white-space: nowrap; }
.sidebar .cat-list li a span:first-child { overflow: hidden; text-overflow: ellipsis; }
.sidebar .cat-list li a::before { content: ""; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; background: #4b5563; transition: background 0.2s; }
.sidebar .cat-list li a:hover { background: #1f2937; color: #e5e7eb; }
.sidebar .cat-list li a.active { background: #1f2937; color: #818cf8; }
.sidebar .cat-list li a.active::before { background: #818cf8; }
.cat-count { font-size: 12px; color: #4b5563; font-weight: 500; flex-shrink: 0; margin-left: 8px;}

.sidebar .filter-group { margin-bottom: 24px; padding-top: 20px; border-top: 1px solid #1f2937; }
.sidebar .filter-group h3 { margin-left: 0; margin-bottom: 16px; }

/* ===== 完美的原生复选框 ===== */
.filter-list { display: flex; flex-direction: column; gap: 12px; padding: 0 12px; }
.filter-list label { display: flex; align-items: center; cursor: pointer; font-size: 14px; color: #9ca3af; transition: color 0.2s; }
.filter-list label:hover { color: #e5e7eb; }

.filter-list input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background-color: #111827;
    border: 1px solid #374151;
    border-radius: 4px;
    margin-right: 10px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.filter-list input[type="checkbox"]:checked {
    background-color: #8b5cf6;
    border-color: #8b5cf6;
}

.filter-list input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ===== Main Content ===== */
.main-content { flex: 1; min-width: 0; padding: 32px 40px; background: #0b0f1a; }

.hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: linear-gradient(180deg, #111827 0%, #0b0f1a 100%);
    border: 1px solid #1f2937; border-radius: 16px; padding: 36px 40px; margin-bottom: 32px;
    position: relative; overflow: hidden;
}
@media (max-width: 900px) {
    .hero-banner { flex-direction: column; align-items: flex-start; gap: 24px; }
    .hero-search { width: 100%; }
}
.hero-banner::before { content: ''; position: absolute; top: -50%; left: -10%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%); pointer-events: none; }
.hero-text { flex: 1; }
.hero-banner h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 12px; color: #fff; }
.hero-banner h1 span { background: linear-gradient(135deg, #818cf8, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-banner p { color: #9ca3af; font-size: 15px; max-width: 600px; line-height: 1.6; }

/* 搜索框样式 */
.hero-search { width: 400px; max-width: 100%; flex-shrink: 0; position: relative; z-index: 10; }
.search-wrapper {
    display: flex;
    align-items: center;
    background: #0b0f1a;
    border: 1px solid #2a3343;
    border-radius: 50px;
    padding: 6px 6px 6px 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}
.search-wrapper:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 8px 20px -6px rgba(99, 102, 241, 0.4);
    background: #111827;
}
.search-wrapper svg { color: #6b7280; margin-right: 10px; flex-shrink: 0; }
.search-wrapper:focus-within svg { color: #818cf8; }
.search-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-size: 15px;
    width: 100%;
}
.search-wrapper input::placeholder { color: #4b5563; }
.search-wrapper button {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.search-wrapper button:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ================== Tool Grid ================== */
.tool-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (min-width: 1400px) { .tool-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .tool-list { grid-template-columns: 1fr; } }

.tool-card { 
    display: flex; flex-direction: column; background: linear-gradient(145deg, #161b26 0%, #111827 100%); 
    border: 1px solid #2a3343; border-radius: 16px; padding: 20px; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.card-overlay-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tool-card::before { 
    content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; 
    background: linear-gradient(90deg, #6366f1, #a855f7); opacity: 0; transition: opacity 0.3s; z-index: 2;
}
.tool-card:hover { border-color: #4f46e5; transform: translateY(-3px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 0 15px rgba(99, 102, 241, 0.1); }
.tool-card:hover::before { opacity: 1; }

.card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.tool-logo { 
    width: 46px; height: 46px; border-radius: 12px; background: #1f2937; 
    display: flex; align-items: center; justify-content: center; 
    flex-shrink: 0; overflow: hidden; border: 1px solid #374151;
}
.tool-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.tool-name { font-size: 17px; font-weight: 700; color: #f8fafc; letter-spacing: -0.2px; }

.tool-info { flex: 1; margin-bottom: 16px; }
.tool-desc { 
    font-size: 13.5px; color: #94a3b8; line-height: 1.6; 
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; 
}

.tool-meta {
    display: flex; gap: 15px; font-size: 12px; color: #64748b; margin-bottom: 16px;
    padding-bottom: 16px; border-bottom: 1px dashed #2a3343;
}
.tool-meta span { display: flex; align-items: center; gap: 5px; }

.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; position: relative; z-index: 2; }
.tool-tags { display: flex; gap: 10px; }
.tag { font-size: 12px; padding: 4px 12px; border-radius: 20px; font-weight: 700; letter-spacing: 0.5px; }
.tag-free { background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.tag-paid { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

/* 操作按钮区 */
.card-actions { display: flex; gap: 8px; position: relative; z-index: 3; align-items: center;}

/* 分享图标按钮的样式 */
.btn-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #a8a3b8;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    margin-right: 4px;
}
.btn-share-icon:hover { color: #8b5cf6; background: #1f2937; border-color: #374151; }

.btn-detail {
    font-size: 13px; padding: 6px 12px; border-radius: 8px; color: #a8a3b8;
    background: transparent; border: 1px solid #374151; transition: all 0.2s;
}
.btn-detail:hover { color: #fff; border-color: #6b7280; background: #1f2937; }
.btn-visit { 
    font-size: 13px; padding: 6px 18px; border-radius: 8px; 
    background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; 
    font-weight: 600; transition: all 0.2s; box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.btn-visit:hover { box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5); transform: translateY(-1px); background: linear-gradient(135deg, #6366f1, #8b5cf6); }

/* ===== Ad Card ===== */
.ad-card { 
    grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 24px; 
    background: linear-gradient(90deg, rgba(99,102,241,0.03), rgba(124,58,237,0.05)); 
    border: 1px dashed #4338ca; border-radius: 16px; padding: 24px; position: relative; min-height: 100px; margin: 8px 0; overflow: hidden; 
}
.ad-badge { position: absolute; top: 16px; left: 24px; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #818cf8; font-weight: 800; z-index: 10; }
.ad-content { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 728px; min-height: 90px; }
.ad-card .btn-visit { background: transparent; border: 1px solid #4c3a8a; color: #a78bfa; transition: all 0.2s; box-shadow: none; }
.ad-card .btn-visit:hover { background: rgba(99,102,241,0.1); border-color: #6366f1; color: #fff; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 48px 0 20px; }
.pagination a, .pagination span { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; font-weight: 600; background: #111827; border: 1px solid #1f2937; color: #9ca3af; transition: all 0.2s; }
.pagination a:hover { background: #1f2937; color: #e5e7eb; border-color: #334155; }
.pagination .active { background: #4f46e5; color: #fff; border-color: #4f46e5; box-shadow: 0 4px 12px rgba(99,102,241,0.3); }
.pagination .total_page { width: auto !important; height: auto !important; background: transparent !important; border: none !important; padding: 0 12px !important; color: #64748b !important; font-size: 13px !important; white-space: nowrap !important; box-shadow: none !important; }