:root {
    --primary-color: #6e48aa;
    --secondary-color: #9d50bb;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

body {
    /* background-color: #f5f7fa; */
}

/* 主内容区域 */
.main-content {
    /* padding: 30px; */
    /* max-width: 1200px; */
    margin: 0 auto;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.category-info {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* 工具卡片 */
.tool-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border: 1px solid rgba(128, 0, 128, 0.2);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.tool-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 置顶按钮 - 仅悬停显示 */
.tool-pin {
    position: absolute;
    left: 15px;
    top: 15px;
    color: var(--primary-color);
    background: rgba(255,255,255,0.9);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tool-item:hover .tool-pin {
    opacity: 1;
}

/* 免费标记 */
.tool-free {
    position: absolute;
    right: 15px;
    top: 15px;
    background: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 2;
}

/* 16:10 预览图容器 */
.tool-image-container {
    position: relative;
    width: 100%;
    padding-top: 62.5%; /* 16:10 比例 (10/16=0.625) */
    overflow: hidden;
}

.tool-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.tool-body {
    padding: 15px;
    display: block;
    flex-direction: column;
    height: calc(100% - 62.5vw);
    min-height: 160px;
}

@media (min-width: 576px) {
    .tool-body {
        height: calc(100% - 62.5%);
    }
}

.tool-title {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-desc {
    color: #495057;
    margin-bottom: 12px;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tool-rating {
    color: #ffc107;
    font-size: 0.85rem;
}

.tool-views {
    color: #6c757d;
    font-size: 0.8rem;
}

.tool-tags {
    margin-bottom: 12px;
}

.tool-tag {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(110, 72, 170, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.7rem;
    margin-right: 4px;
    margin-bottom: 4px;
}

.tool-actions {
    display: flex;
    justify-content: space-between;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* 广告位 */
.ad-item {
    background: linear-gradient(135deg, #f5f7fa, #e4e8eb);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #6c757d;
    border: 1px dashed #ced4da;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100%;
}

.ad-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* 分页样式 */
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link {
    color: var(--primary-color);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}