/* ============ 图片滤镜处理 - 工具特有样式 ============ */
/* 通用样式（卡片、按钮、分隔线、info-box、empty-state 等）已由 common.css 统一提供 */

/* ---- 容器 ---- */
#lj-container {
    margin-bottom: 15px;
}

/* ---- 预览区工具栏 ---- */
.editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e5e7eb;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---- 上传区（与九宫格切图保持一致） ---- */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 40px;
    border: 3px dashed #d1d5db;
    border-radius: 16px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.upload-icon {
    font-size: 48px;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.upload-hint {
    font-size: 13px;
    color: #9ca3af;
}

/* ---- 应用模式按钮（复用 common.css 的 .mode-buttons / .mode-btn） ---- */
.mode-buttons .mode-btn {
    flex: 1;
    text-align: center;
}

/* ---- 滤镜网格 ---- */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #ffffff;
}

.filter-item:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.filter-item.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.filter-thumb-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    background: repeating-conic-gradient(#ccc 0% 25%, transparent 0% 50%) 50% / 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-placeholder {
    font-size: 20px;
}

.filter-name {
    font-size: 11px;
    color: #374151;
    text-align: center;
    white-space: nowrap;
}

.filter-item.active .filter-name {
    color: #6d28d9;
    font-weight: 600;
}

/* ---- 预览区 ---- */
.preview-section {
    display: flex;
    justify-content: center;
    align-items: center;
    background: repeating-conic-gradient(#ccc 0% 25%, transparent 0% 50%) 50% / 20px 20px;
    border-radius: 12px;
    padding: 15px;
    min-height: 300px;
}

.canvas-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.preview-canvas {
    display: block;
    max-width: 100%;
    max-height: 500px;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    #lj-container > .section-row {
        flex-direction: column;
        gap: 12px;
    }
}
