/* 提示词工具推荐模块样式 */
.prompt-tools-section {
    padding: 48px 0;
    background: #f8fafc;
    /* 使用更柔和的背景色与主内容区区分 */
    overflow: hidden;
    /* 防止 padding 溢出影响页面水平滚动 */
}

/* 标题样式，利用 content-section.css 中已有的 section-title 风格进行微调 */
.prompt-tools-section .section-header {
    text-align: center;
    margin-bottom: 32px;
}

.prompt-tools-section .section-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 15px;
    margin-top: 12px;
    margin-bottom: 0;
}

.container {
    max-width: 1220px;
    /* 用户指定的 1220px 版心 */
    margin: 0 auto;
    padding: 0 20px;
}

.tools-scroll-wrapper {
    position: relative;
    max-width: 1180px;
    /* 1220px 减去两侧 20px padding = 1180px */
    margin: 0 auto;
    padding: 10px 0;
    /* 为悬停效果留出空间 */
}

.tools-scroll-wrapper .scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.tools-scroll-wrapper .scroll-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15);
    opacity: 1 !important;
}

.tools-scroll-wrapper .scroll-left {
    left: -20px;
    opacity: 0.5;
}

.tools-scroll-wrapper .scroll-right {
    right: -20px;
}

#tools-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 32px 32px 48px 32px;
    /* 增加四周内边距，确保悬浮大位移和大阴影不被截断 */
    margin: -8px -32px -24px -32px;
    /* 使用负外边距抵消所有增加的 padding，维持原本的视觉位置 */
}

#tools-scroll-container::-webkit-scrollbar {
    display: none;
}

.tools-grid {
    display: flex;
    gap: 16px;
    /* 更紧凑的间距 */
}

.tool-card-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    /* 
      版心计算：
      可视区域总宽: 1180px
      需要显示: 4个卡片, 产生 3个 gap
      gap 设置为 16px, 总 gap = 48px
      每个卡片理论宽度: (1180 - 48) / 4 = 283px
    */
    width: 283px;
    min-width: 283px;
    background: white;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* 渐变背景块 */
.translate-tool {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.formatter-tool {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.optimizer-tool {
    background: linear-gradient(135deg, #fecaca, #fca5a5);
}

.interactive-tool {
    background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
}

.agent-tool {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.api-tool {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.tool-card-item:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
}

.tool-icon-wrapper {
    font-size: 38px;
    /* 稍微放大图标，比初版小，比刚改的大 */
    margin-bottom: 12px;
    line-height: 1;
}

.tool-h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* 恢复标题颜色 */
.translate-tool .tool-h3 {
    color: #1e3a8a;
}

.formatter-tool .tool-h3 {
    color: #78350f;
}

.optimizer-tool .tool-h3 {
    color: #7f1d1d;
}

.interactive-tool .tool-h3 {
    color: #5b21b6;
}

.agent-tool .tool-h3 {
    color: #065f46;
}

.api-tool .tool-h3 {
    color: #3730a3;
}

.tool-p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
    min-height: 40px;
    flex-grow: 1;
}

/* 恢复正文颜色 */
.translate-tool .tool-p {
    color: #1e40af;
}

.formatter-tool .tool-p {
    color: #92400e;
}

.optimizer-tool .tool-p {
    color: #991b1b;
}

.interactive-tool .tool-p {
    color: #6b21a8;
}

.agent-tool .tool-p {
    color: #047857;
}

.api-tool .tool-p {
    color: #4338ca;
}

.tool-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.45);
    /* 恢复半透明白色背景，更透一点 */
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 2px 8px rgba(0, 0, 0, 0.02);
    /* 内发光边缘，更精致的晶砂质感 */
}

.stat-column {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 6px;
    opacity: 0.85;
    /* 让标签柔和一点 */
}

/* 恢复标签颜色 */
.translate-tool .stat-label {
    color: #1e40af;
}

.formatter-tool .stat-label {
    color: #92400e;
}

.optimizer-tool .stat-label {
    color: #991b1b;
}

.interactive-tool .stat-label {
    color: #6b21a8;
}

.agent-tool .stat-label {
    color: #047857;
}

.api-tool .stat-label {
    color: #4338ca;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
    /* 数字略微收紧 */
}

.translate-tool .stat-value {
    color: #2563eb;
}

.formatter-tool .stat-value {
    color: #d97706;
}

.optimizer-tool .stat-value {
    color: #dc2626;
}

.interactive-tool .stat-value {
    color: #7c3aed;
}

.agent-tool .stat-value {
    color: #059669;
}

.api-tool .stat-value {
    color: #4f46e5;
}

.stat-arrow {
    font-size: 16px;
    color: #94a3b8;
    /* 一个更温和的灰蓝色 */
    font-weight: 300;
    margin-top: 18px;
    /* 往下顶一点，使其在视觉上下降并对齐加粗底部的数值 */
    padding: 0 12px;
}

.usage-guide {
    max-width: 500px;
    /* 更加紧凑 */
    margin: 16px auto 0;
    /* 考虑到滚动容器底部增加的 padding，这里缩小边距以保持正常高度 */
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    display: flex;
    /* 改为横向布局，更紧凑 */
    align-items: center;
    justify-content: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-icon {
    font-size: 14px;
}

.guide-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.guide-divider {
    width: 1px;
    height: 16px;
    background: #e2e8f0;
}

.guide-steps {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 6px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #e0e7ff;
    /* 减弱数字背景，更加小清新 */
    color: #4f46e5;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
}

.step-text {
    font-size: 12px;
    color: #64748b;
}

.step-arrow {
    color: #cbd5e1;
    font-size: 12px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .prompt-tools-section {
        padding: 32px 0;
    }

    .prompt-tools-section .section-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .prompt-tools-section .section-subtitle {
        font-size: 13px;
    }

    .tools-scroll-wrapper {
        padding: 0;
    }

    #tools-scroll-container {
        padding: 24px 24px 44px 24px;
        margin: -4px -24px -20px -24px;
        /* 移动端同样预留边距防截断阴影边缘 */
    }

    .tool-card-item {
        min-width: 260px;
        width: 260px;
        padding: 20px;
        border-radius: 12px;
    }

    .tool-icon-wrapper {
        font-size: 28px;
    }

    .tool-h3 {
        font-size: 16px;
    }

    .tool-p {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .tool-stats {
        padding: 10px;
    }

    .stat-value {
        font-size: 16px;
    }

    .tools-scroll-wrapper .scroll-btn {
        display: none;
    }

    .usage-guide {
        margin: 16px 16px 0;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        gap: 12px;
    }

    .guide-divider {
        display: none;
    }

    .guide-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .step-arrow {
        display: none;
    }
}