/* AI创作页面特有样式 */
.ai-creation-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    background: rgba(30, 35, 40, 0.8);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-section {
    position: relative;
    margin-bottom: 30px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: -30px;
    font-size: 24px;
    color: #aafc89;
    z-index: 1;
    width:18px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 15px 20px 15px 50px;
    background: rgba(20, 25, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: #aafc89;
    box-shadow: 0 0 0 2px rgba(170, 252, 137, 0.2);
    outline: none;
}

.search-btn, .reset-btn {
    padding: 0 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn {
    background: linear-gradient(106deg, #aafc89 0%, #00f9e5 100%);
    color: #0e0f0f;
    border: none;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(170, 252, 137, 0.3);
}

.reset-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-tab {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: #ddd;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.category-tab:hover {
    background: rgba(170, 252, 137, 0.1);
    color: #aafc89;
}

.category-tab.active {
    background: linear-gradient(106deg, #aafc89 0%, #00f9e5 100%);
    color: #0e0f0f;
    font-weight: 600;
    border-color: rgba(170, 252, 137, 0.5);
}

.ai-tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ai-tool-card {
    background: rgba(30, 35, 40, 0.8);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(170, 252, 137, 0.3);
}

.tool-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #aafc89 0%, #00f9e5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #0e0f0f;
    font-size: 20px;
}

.tool-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-desc {
    font-size: 14px;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-use-btn {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #aafc89;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.tool-use-btn:hover {
    background: rgba(170, 252, 137, 0.1);
    border-color: rgba(170, 252, 137, 0.3);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 10px;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover {
    background: rgba(170, 252, 137, 0.1);
    color: #aafc89;
}

.page-btn.active {
    background: linear-gradient(106deg, #aafc89 0%, #00f9e5 100%);
    color: #0e0f0f;
    font-weight: 600;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 修改搜索图标样式 */
.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #aafc89;
    z-index: 2;
}

.search-input {
    padding-left: 45px; /* 增加左边距给图标留空间 */
}


/* 修改AI工具卡片布局 */
.ai-tools-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 一行4列 */
    gap: 15px;
    margin-bottom: 30px;
}

.ai-tool-card {
    background: rgba(30, 35, 40, 0.8);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%; /* 确保卡片高度一致 */
}

/* 修改工具内容为水平布局 */
.tool-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.tool-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #aafc89 0%, #00f9e5 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0e0f0f;
    font-size: 16px;
    flex-shrink: 0;
    margin-right: 12px;
}

.tool-title-wrapper {
    flex: 1;
    min-width: 0; /* 防止文本溢出 */
}

.tool-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.tool-desc {
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.tool-use-btn {
    width: 100%;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #aafc89;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    margin-top: auto; /* 将按钮推到卡片底部 */
}

/* 响应式调整 */
@media (max-width: 1600px) {
    .ai-tools-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .ai-tools-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ai-tools-list {
        grid-template-columns: 1fr;
    }
}