* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 60px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 浮动分类导航 */
.category-nav {
    position: sticky;
    top: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    z-index: 100;
    transition: all 0.3s ease;
}

.category-nav:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.category-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-nav li {
    margin: 0;
}

.category-nav a {
    display: block;
    padding: 15px 25px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 5px;
}

.category-nav a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

/* 工具展示区域 */
.tool-container {
    margin-top: 20px;
}

.tool-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.tool-section:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.tool-section h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.tool-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* 工具网格布局 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
    gap: 15px;
    margin-top: 20px;
}

/* 工具卡片 */
.tool-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    min-height: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-card:hover {
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    border-color: #667eea;
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tool-card:hover .tool-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.1);
}

.tool-icon svg {
    width: 20px;
    height: 20px;
    color: #555;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon svg {
    color: white;
}

.tool-card h3 {
    font-size: 1rem;
    margin: 0;
    color: #333;
    cursor: pointer;
    flex-grow: 1;
    text-align: left;
}

.tool-card p {
    display: none;
}

/* 工具卡片整体点击效果 */
.tool-card {
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 移除链接默认样式 */
.tool-card:link,
.tool-card:visited,
.tool-card:hover,
.tool-card:active {
    text-decoration: none;
    color: inherit;
}

/* 页脚 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 50px;
    border-radius: 10px;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .category-nav {
        position: relative;
        top: 0;
    }

    .category-nav ul {
        flex-wrap: wrap;
    }

    .category-nav a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .tool-section {
        padding: 25px;
    }

    .tool-section h2 {
        font-size: 1.5rem;
    }

    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
        gap: 10px;
    }

    .tool-card {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr));
        gap: 8px;
    }

    .tool-card {
        padding: 10px;
        gap: 8px;
    }

    .tool-icon {
        width: 32px;
        height: 32px;
    }

    .tool-icon svg {
        width: 16px;
        height: 16px;
    }

    .tool-card h3 {
        font-size: 0.9rem;
    }
}

/* 大屏幕设备优化 */
@media (min-width: 1200px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    }
}

/* 滚动动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-section {
    animation: fadeInUp 0.6s ease-out;
}

.tool-section:nth-child(2) {
    animation-delay: 0.1s;
}

.tool-section:nth-child(3) {
    animation-delay: 0.2s;
}

.tool-section:nth-child(4) {
    animation-delay: 0.3s;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}