/* ============================================================
   list-ai.css —— AI写作工具列表页专属样式
   包含：Hero 区高度覆盖、中间栏目列表模块、分页盒子
   ============================================================ */

/* --- Hero 区（页面差异：min-height 400px） --- */
.page-header { min-height: 400px; }

/* ================= 中间栏目列表模块 ================= */
.tool-list-wrapper {
    padding: 20px 20px 0 20px;
    display: flex; flex-direction: column; gap: 20px;
    flex: 1;
}

/* 区块标题（列表头部） */
.section-header { display: flex; justify-content: space-between; align-items: center; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: #1e3a8a; }
.section-title .plain-icon { font-size: 20px; color: #2563eb; margin-right: 4px; background: transparent; width: auto; height: auto; border-radius: 0; }
.view-more { font-size: 13px; color: #6b7280; cursor: pointer; transition: color 0.2s; }
.view-more:hover { color: #2563eb; }

/* 🔥 列表大盒子：语义化 ul，5 列多行，行列间距 30px，绝不溢出 */
.ai-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow: visible;
}

/* 🔥 li 包裹层：核心防挤压设置 min-width: 0 */
.tool-item { width: 100%; min-width: 0; }

/* 列表内容为静态 HTML，通过 data-page 控制分页显示 */
.ai-list .tool-item { display: none; }
.ai-list .tool-item.is-show { display: block; }

/* 工具卡片（a 标签） */
.tool-card {
    width: 100%;
    height: 80px;
    background: #ffffff; border-radius: 10px;
    padding: 0 15px;
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    border: 1px solid transparent; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none; color: inherit;
    overflow: hidden;
}
.tool-card:hover, .tool-card.active {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
    border-color: #dbeafe;
}

.tool-logo {
    width: 50px; height: 50px;
    border-radius: 8px; object-fit: cover;
    flex-shrink: 0;
    background-color: #f3f4f6;
}

/* 🔥 文字信息区：核心防挤压设置 min-width: 0 */
.tool-info {
    display: flex; flex-direction: column; gap: 10px;
    overflow: hidden;
    min-width: 0;
}
.tool-name { font-size: 14px; font-weight: 600; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1; }
.tool-desc { font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1; }

/* ================= 分页盒子 ================= */
.pages {
    display: flex; justify-content: center; align-items: center;
    gap: 8px; flex-wrap: wrap;
    padding: 30px 0 50px 0;
}
.pages span,
.pages a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 14px;
    border-radius: 8px; background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #4b5563; font-size: 14px; text-decoration: none;
    cursor: pointer; user-select: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.pages a:hover,
.pages span:hover { background: #eff6ff; color: #2563eb; border-color: #dbeafe; }

.pages a.active {
    background: #2563eb; color: #ffffff; border-color: #2563eb;
    font-weight: 600; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.pages span.disabled {
    color: #cbd5e1; background: #f9fafb; cursor: not-allowed;
    box-shadow: none;
}
.pages span.disabled:hover {
    color: #cbd5e1; background: #f9fafb; border-color: #e5e7eb;
}

.pages .ellipsis {
    border: none; background: transparent; cursor: default;
    box-shadow: none; color: #9ca3af; padding: 0 4px;
}
.pages .ellipsis:hover { background: transparent; color: #9ca3af; }

/* ================= 响应式适配 ================= */
@media (max-width: 1500px) { .ai-list { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1200px) { .ai-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 992px) {
    .ai-list { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (max-width: 768px) {
    .ai-list { grid-template-columns: repeat(2, 1fr); gap: 15px; }
}
