/* 基础样式：复用全局样式，确保风格统一 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    /* 保持相同的渐变背景，确保视觉连贯性 */
    background: linear-gradient(135deg, #d282ff 0%, #009d77 70%, #7b36ff 100%);
    color: #333;
    min-height: 100vh;
    padding: 40px 20px;
}

/* 容器样式：控制内容宽度，居中显示 */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* 返回导航区：保持与其他页面一致的返回按钮样式 */
.breadcrumb {
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 0.8;
}

.back-link i {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* 页面标题区：明确当前页面主题 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* 工具卡片容器：采用网格布局，更紧凑 */
.tools-container {
    /* 使用网格布局，自动适应屏幕宽度 */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px; /* 较小的间距，使布局更紧凑 */
    margin-bottom: 60px;
}

/* 工具卡片：紧凑风格设计 */
.tool-card {
    background: white;
    border-radius: 12px; /* 稍小的圆角 */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    position: relative; /* 用于角标定位 */
}

/* 卡片hover效果：保持交互感 */
.tool-card:hover {
    transform: translateY(-5px); /* 较小的上浮效果 */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 卡片头部：包含图标和标题 */
.tool-header {
    background: #7b36ff;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 工具图标样式 */
.tool-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-icon i {
    font-size: 1.2rem;
}

.tool-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* 卡片内容区：紧凑布局 */
.tool-content {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* 工具简介：控制字数，保持简洁 */
.tool-desc {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* 下载链接样式 */
.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0e6ff; /* 淡紫色背景 */
    color: #7b36ff; /* 主色调文字 */
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.download-link:hover {
    background: #7b36ff;
    color: white;
}

.download-link i {
    margin-right: 8px;
    font-size: 0.9rem;
}

/* 角标样式：复用之前的设计 */
.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.badge-new {
    background-color: #4CAF50; /* 绿色-最新 */
}

.badge-hot {
    background-color: #FF5252; /* 红色-热门 */
}

.badge-updated {
    background-color: #2196F3; /* 蓝色-已更新 */
}

/* 页脚：保持一致风格 */
footer {
    text-align: center;
    color: white;
    margin-top: 60px;
    opacity: 0.8;
    padding: 20px 0;
}

/* 响应式适配：确保在移动设备上显示正常 */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    /* 在小屏幕上每行显示2个卡片 */
    .tools-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}