/* 全局样式与布局（适用于所有页面） */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #fff;
}
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --primary-soft: #ecfdf5;
    --primary-border: #d1fae5;
    --gray-bg: #f9fafb;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --header-border: #eef2f6;
}
a {
    text-decoration: none;
    color: #4b5563;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--primary);
}
ul {
    list-style: none;
}
.center {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* 左侧导航 */
.left-nav {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid var(--header-border);
    z-index: 1000;
    padding: 0 16px;
    overflow-y: auto;
}
.left-nav::-webkit-scrollbar {
    width: 4px;
}
.left-nav::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}
.logo-area {
    height: 72px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--header-border);
    margin-bottom: 20px;
}
.logo-img {
    font-weight: 700;
    font-size: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.logo-img span {
    background: none;
    color: #1f2937;
}
.nav-menu li {
    margin-bottom: 6px;
}
.nav-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
}
.nav-menu li a span {
    font-size: 12px;
    color: #6b7280;
    font-weight: normal;
}
.nav-menu li a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.nav-menu li.active a {
    background: var(--primary-soft);
    color: var(--primary);
}

/* 顶部栏 */
.header {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--header-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 999;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #4b5563;
}
.search-wrapper {
    position: relative;
    width: 280px;
}
.search-wrapper input {
    width: 100%;
    height: 40px;
    padding: 0 36px 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 40px;
    background: #f9fafb;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}
.search-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    background: #fff;
}
.search-wrapper i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3f4f6;
    cursor: pointer;
    transition: 0.2s;
    font-size: 18px;
    color: #4b5563;
}
.icon-btn:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e2e8f0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239ca3af"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
    background-size: 60%;
    background-position: center 55%;
    background-repeat: no-repeat;
    cursor: pointer;
}

/* 主内容区 */
.main-content {
    margin-top: 80px;
    margin-left: 260px;
    padding: 0 24px 40px;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--header-border);
}
.category-tab {
    cursor: pointer;
    user-select: none; /* 可选，防止文字被选中，提升体验 */
}
.category-tab {
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    background: #f3f4f6;
    color: #4b5563;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.category-tab i {
    margin-right: 6px;
    font-size: 14px;
}
.category-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.category-tab:not(.active):hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary-border);
}

/* 工具卡片网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 8px;
}
.tool-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 18px;
    border: 1px solid #f0f2f5;
    box-shadow: var(--card-shadow);
    transition: all 0.25s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-border);
    box-shadow: 0 12px 20px -12px rgba(0, 0, 0, 0.1);
}
.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.tool-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    color: var(--primary-dark);
    flex-shrink: 0;
}
.tool-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}
.tool-card p {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.45;
    margin-top: 8px;
}

/* 底部 */
.footer {
    margin-left: 260px;
    background: #1f2a3a;
    color: #cbd5e1;
    padding: 48px 32px 24px;
    border-top: 2px solid var(--primary);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
}
.footer-col {
    flex: 1;
    min-width: 200px;
}
.footer-col h4 {
    color: #e2e8f0;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-left: 12px;
}
.footer-col h4::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}
.footer-col p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 10px;
}
.footer-col a {
    color: #9ca3af;
    margin-right: 12px;
    font-size: 13px;
}
.footer-col a:hover {
    color: var(--primary-light);
}
.copyright {
    text-align: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #334155;
    font-size: 12px;
    color: #94a3b8;
}

/* 移动端适配 */
@media (max-width: 886px) {
    .left-nav {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
    }
    .left-nav.open {
        transform: translateX(0);
        box-shadow: 2px 0 12px rgba(0,0,0,0.1);
    }
    .header {
        left: 0;
        padding: 0 16px;
    }
    .main-content {
        margin-left: 0;
        padding: 0 16px 70px;
    }
    .footer {
        margin-left: 0;
        padding: 32px 20px 80px;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .search-wrapper {
        width: 200px;
    }
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}
@media (max-width: 640px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-tab {
        padding: 6px 14px;
        font-size: 13px;
    }
    .header .search-wrapper {
        display: none;
    }
}
@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .tool-card {
        padding: 16px;
    }
    .footer-col {
        min-width: 100%;
        text-align: center;
    }
    .footer-col h4::before {
        display: none;
    }
}
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 16px;
    grid-column: 1 / -1;
}

